1. Sales
VasyOpenAPI
  • Branch
    • Branch List
      GET
  • Department
    • department
      GET
  • Category
    • category
      GET
    • subCategory
      GET
  • Brand
    • Brand
      GET
    • SubBrand
      GET
  • Contact
    • Get Customer List W Branch Id
      GET
    • Get Contact By Id
      GET
    • Get Contact By Mobile No
      GET
    • contactSave
      POST
    • Supplier(Party)
      GET
  • GST
    • Verify GST
      POST
  • Master
    • Get Country List
      GET
    • Get State List
      GET
    • Get City List
      GET
    • Get Tax List
      GET
    • Get Additional Charge List
      GET
  • Product
    • Get Product List
    • Get Product By ID
    • products with inventory
    • product details with Inventory By Product ID
    • Product Variant List ID & Name
    • Variant Details By Variant ID
  • Recipe
    • Get All Recipe
  • User
    • Created By
  • Report
    • Get Sales Item Register Data
    • Purchase Item Register Report
    • Stock Summary Report
    • Stock Transfer Item Register Report
    • Consumption Production Report
  • Sales
    • Get All Sales Data
      POST
    • Get Sales Data By Id
      GET
    • Order Create
      POST
    • Order Status
      GET
    • Shipping Details
      GET
    • Update Due Date
      POST
    • Update Order Status
      POST
  1. Sales

Order Create

POST
/api/v1/sales/order/create

Create Sales Order#

Purpose#

Create a new sales order in VasyERP for an existing customer.

Why would you use this?#

Use this API when your external application needs to create sales orders directly in VasyERP.
Common use cases:
eCommerce order synchronization
Mobile ordering applications
Third-party marketplace integrations
CRM to ERP integrations
Custom ordering platforms

Information Required#

FieldRequiredDescription
api-tokenYesAuthentication token provided by VasyERP
branch_idYesBranch ID where the order will be created
contactIdYesCustomer ID
salesOrderItemsYesList of products to be added
productIdYesProduct ID
productVariantIdYesProduct Variant ID
quantityYesQuantity to order
priceYesSelling price per unit
shippingContactAddressIdYesCustomer shipping address ID
billingContactAddressIdYesCustomer billing address ID
paymentMethodYesPayment method
couponCodeNoCoupon code
remarkNoOrder remarks
deliveryDateNoExpected delivery date
salesAdditionalChargeNoAdditional charges to apply

Information Returned#

Sales Order ID
Order Creation Status
Success/Error Message

Important Notes#

Customer must exist in VasyERP before creating the order.
Product and Product Variant IDs must be valid.
Branch ID must belong to the authenticated account.
Additional charges must use valid Additional Charge IDs.
Quantity should be greater than zero.
The API returns the generated salesId after successful creation.
Store the returned salesId for future order tracking and updates.

Common Mistakes#

āŒ Using invalid Product Variant IDs
āŒ Creating orders for non-existing customers
āŒ Sending incorrect branch IDs
āŒ Using address IDs that do not belong to the customer

Request

Query Params

Header Params

Body Params application/json

Examples

Responses

🟢200
application/json
Bodyapplication/json

🟠403Unauthorized
🟠429Too Many Request
Request Request Example
Shell
JavaScript
Java
Swift
curl --location '/api/v1/sales/order/create?branch_id=24448' \
--header 'api-token: {{.in-api-token}}' \
--header 'Content-Type: application/json' \
--data '{
    "salesOrderItems": [
        {
            "productVariantId": 20847916,
            "price": 33000.00,
            "quantity": 1,
            "productId": 18313750,
            "subTotal": 33000.00,
            "mrp": 35999.0
        }
    ],
    "contactId": 5313756,
    "shippingContactAddressId": 5278168,
    "billingContactAddressId": 5278168,
    "paymentMethod": "cod",
    "companyId": 24448,
    "couponCode": "C-987",
    "remark": "Order placed via Open API",
    "deliveryDate": "2026-07-25",
    "salesAdditionalCharge": [
        {
            "additionalChargeId": 77567,
            "additionalChargeAmount": 100.0,
            "additionalChargeValue": 100.0,
            "taxId": 65605,
            "taxRate": 18.0,
            "taxAmount": 0.0
        }
    ]
}'
Response Response Example
200 - Example
{
    "status": true,
    "message": "Sales created successfully",
    "code": "200",
    "response": {
        "salesId": 30801778
    }
}
Previous
Get Sales Data By Id
Next
Order Status
Built with