Create Sale Order

This REST API is used to create sale order(s) in Uniware.

Tip

It is recommended to check out Notes for the reader. You might find this helpful as it contains Guidelines for using API references and Terminologies used here.

Basic Information

NAME DETAILS
Endpoint: /services/rest/v1/oms/saleOrder/create
Request Type: POST
Level: Tenant
Scheme: HTTPS
Header (Content-Type): application/json
Header (Authorization): bearer {access-token}, Eg.: bearer b30f3aea-7978-49bb-9ea7-33eddfc80afa
Header (Facility): facility code as in Uniware (refer FAQs)

Request Payload

{
   "saleOrder": {
      "code": "string",
      "displayOrderCode": "string",
      "displayOrderDateTime": "2020-06-11T09:23:48.023Z",
      "customerCode": "string",
      "customerName": "string",
      "customerGSTIN": "123456789012341",
      "channel": "string",
      "notificationEmail": "string",
      "notificationMobile": "string",
      "cashOnDelivery": true,
      "paymentInstrument": "CASH",
      "additionalInfo": "string",
      "thirdPartyShipping": true,
      "shippingProviders": [
         {
            "packetNumber": 0,
            "code": "string",
            "trackingNumber": "string"
         }
      ],
      "saleOrderItemCombinations": [
         {
            "combinationIdentifier": "string",
            "combinationDescription": "string"
         }
      ],
      "addresses": [
         {
            "id": "string",
            "name": "string",
            "addressLine1": "string",
            "addressLine2": "string",
            "city": "string",
            "state": "string",
            "country": "string",
            "pincode": "string",
            "phone": "string",
            "email": "string"
         }
      ],
      "billingAddress": {
         "referenceId": "string"
      },
      "shippingAddress": {
         "referenceId": "string"
      },
      "saleOrderItems": [
         {
            "code": "string",
            "status": "string",
            "shelfCode": "string",
            "reason": "string"
         }
      ],
      "customFieldValues": [
         {
            "name": "string",
            "value": "string"
         }
      ],
      "currencyCode": "string",
      "taxExempted": true,
      "cformProvided": true,
      "fulfillmentTat": "2020-06-11T09:23:48.023Z",
      "verificationRequired": true,
      "priority": 0,
      "totalDiscount": 0,
      "totalShippingCharges": 0,
      "totalCashOnDeliveryCharges": 0,
      "totalGiftWrapCharges": 0,
      "totalStoreCredit": 0,
      "totalPrepaidAmount": 0,
      "useVerifiedListings": true
   }
}

Request Payload Details

LEVEL PARAMETER TYPE DESCRIPTION MANDATORY NOTES
1 saleOrder object Sale order details Yes -
1.1 code string Sale order code No Max. chars: 45
1.2 displayOrderCode string Order code to be displayed No Max. chars: 45
1.3 displayOrderDateTime date Order date to be displayed No -
1.4 customerCode string Customer code No -
1.5 customerName string Customer name No Max. chars: 100
1.6 customerGSTIN string Customer GST number (for B2B orders) No Eg: 123456789012341
1.7 channel string Channel name No -
1.8 notificationEmail string Email for notifications No Max. chars: 100
1.9 notificationMobile string Mobile for notifications No Max. chars: 45
1.10 cashOnDelivery boolean true if COD Yes -
1.11 paymentInstrument string Mode of payment No Allowable: CASH (default), CREDIT_CARD, DEBIT_CARD, NET_BANKING, WALLET
1.12 additionalInfo string Any additional information No Max. chars: 500
1.13 thirdPartyShipping boolean true if the shipping to end customer is taken care by the Marketplace. false for self shipping No Default: true
1.14 shippingProviders object Shipping details No -
1.14.1 packetNumber integer No. of packets in a shipment Yes Default: 0
1.14.2 code string Shipment code Yes -
1.14.3 trackingNumber string Shipment tracking number No Max. chars: 45
1.14 saleOrderItemCombinations object Details of item combinations No -
1.15.1 combinationIdentifier string Combination identifier Yes -
1.15.2 combinationDescription string Combination description Yes Max. chars: 200
1.16 addresses object Address information Yes -
1.16.1 id string ID Yes -
1.16.2 name string Buyer name (for B2C) or point-of-contact of the buyer company (for B2B) Yes Max. chars: 100
1.16.3 addressLine1 string Precise address Yes Max. chars: 500
1.16.4 addressLine2 string Additional address information No -
1.16.5 city string City name Yes Eg: Surat, Max. chars: 100
1.16.6 state string State name Yes Eg: Gujrat, Max. chars: 45
1.16.7 country string Country name No -
1.16.8 pincode string Area pincode (min. 6 digits) No Eg: 395006, Max. chars: 100
1.16.9 phone string Contact no. Yes Max. chars: 100
1.16.10 email string Email ID No Case insensitive, Max. chars: 100
1.17 billingAddress object - No -
1.17.1 referenceId string - Yes -
1.18 shippingAddress object - No -
1.18.1 referenceId string - Yes -
1.18 saleOrderItems list List of ordered items No Max. chars: 5000
1.19.1 code string Item code Yes -
1.19.2 status string Item status No -
1.19.3 shelfCode string Shelf ID for the item No Default: DEFAULT
1.19.4 reason string Reason No -
1.20 customFieldValues list - No -
1.20.1 name string Custom field nalue Yes -
1.20.2 value string Custom field value No -
1.21 currencyCode string Currency codes (3 digit) No Currency Codes, Default: INR
1.22 taxExempted boolean true if tax exemption on item No Default: true
1.23 cformProvided boolean true if cform provided No Default: true
1.24 fulfillmentTat date Fulfillment date No -
1.25 verificationRequired boolean true if verification required No Default: true
1.26 priority integer Order fullfillment priority No -
1.27 totalDiscount number Discount amount No -
1.28 totalShippingCharges number Shipping charges No -
1.29 totalCashOnDeliveryCharges number Charges for COD Yes for COD -
1.30 totalGiftWrapCharges number Gift charges No -
1.31 totalStoreCredit number Total store credit No -
1.32 totalPrepaidAmount number Amount paid while ordering Yes for Prepaid -
1.33 useVerifiedListings boolean true to use verified listings No Default: true

Response Payload

{
   "successful": true,
   "message": "string",
   "errors": [
      {
         "code": 0,
         "fieldName": "string",
         "description": "string",
         "message": "string",
         "errorParams": {
            "additionalProp1": {},
            "additionalProp2": {},
            "additionalProp3": {}
         }
      }
   ],
   "warnings": [
      {
         "code": 0,
         "message": "string",
         "description": "string"
      }
   ],
   "saleOrderDetailDTO": {
      "code": "string",
      "displayOrderCode": "string",
      "channel": "string",
      "displayOrderDateTime": "2020-06-11T09:24:09.093Z",
      "status": "string",
      "created": "2020-06-11T09:24:09.093Z",
      "updated": "2020-06-11T09:24:09.093Z",
      "notificationEmail": "string",
      "notificationMobile": "string",
      "customerGSTIN": "123456789012341",
      "cod": true,
      "priority": 0,
      "currencyCode": "string",
      "customerCode": "string",
      "billingAddress": {
         "id": "string",
         "name": "string",
         "addressLine1": "string",
         "addressLine2": "string",
         "city": "string",
         "state": "string",
         "country": "string",
         "pincode": "string",
         "phone": "string",
         "email": "string"
      },
      "addresses": [
         {
            "id": "string",
            "name": "string",
            "addressLine1": "string",
            "addressLine2": "string",
            "city": "string",
            "state": "string",
            "country": "string",
            "pincode": "string",
            "phone": "string",
            "email": "string"
         }
      ],
      "customFieldValues": [
         {
            "fieldName": "string",
            "fieldValue": {},
            "valueType": "string",
            "displayName": "string",
            "required": true,
            "possibleValues": [
               "string"
            ]
         }
      ]
   }
}

Response Payload Details

LEVEL PARAMETER TYPE DESCRIPTION NOTES
1 successful true Request success status -
2 message string Response message -
3 errors list List of errors (if any) -
3.1 code number Error code -
3.2 fieldName string Field with error -
3.3 description string Warning description -
3.4 message string Error message -
3.5 errorParams object Parameters with error -
3.5.1 additionalProp1 object Parameter 1 with error -
3.5.2 additionalProp2 object Parameter 2 with error -
3.5.3 additionalProp3 object Parameter 3 with error -
4 warnings list List of warnings (if any) -
4.1 code number Warning code -
4.2 message string Warning message -
4.3 description string Warning description -
5 saleOrderDetailDTO object Sale order details -
5.1 code string Sale order code -
5.2 displayOrderCode string Order code to be displayed -
5.3 channel string Channel name -
5.4 displayOrderDateTime date Order date to be displayed -
5.5 status string Status -
5.6 created date Sale order creation date -
5.7 updated date Sale order updation date -
5.8 notificationEmail string Email for notifications -
5.9 notificationMobile string Mobile for notifications -
5.10 customerGSTIN string Customer GST number (for B2B orders) -
5.11 cod boolean true if COD -
5.12 priority integer Order fullfillment priority Default: 0
5.13 currencyCode string Currency codes (3 digit) Default: INR, Currency Codes
5.14 customerCode string Customer code -
5.15 billingAddress object - -
5.15.1 id string Buyer ID -
5.15.2 name string Buyer name (for B2C) or point-of-contact of the buyer company (for B2B) -
5.15.3 addressLine1 string Precise address of the buyer -
5.15.4 addressLine2 string Additional address information -
5.15.5 city string City name Eg: Surat
5.15.6 state string State name Eg: Gujrat
5.15.7 country string Country name -
5.15.8 pincode string Area pincode (min. 6 digits) Eg: 395006
5.15.9 phone string Contact no. -
5.15.10 email string Email ID case insensitive
5.16 addresses object Address information -
5.16.1 id string ID -
5.16.2 name string Buyer name (for B2C) or point-of-contact of the buyer company (for B2B) -
5.16.3 addressLine1 string Precise address -
5.16.4 addressLine2 string Additional address information -
5.16.5 city string City name Eg: Surat
5.16.6 state string State name Eg: Gujrat
5.16.7 country string Country name -
5.16.8 pincode string Area pincode (min. 6 digits) Eg: 395006
5.16.9 phone string Contact no. -
5.16.10 email string Email ID case insensitive
5.17 customFieldValues list Custom field details -
5.17.1 fieldName string Custom field name -
5.17.2 fieldValue list Custom field value -
5.17.3 valueType string Value type -
5.17.4 displayName string Name to be displayed -
5.17.5 required boolean true if required Default: true
5.17.6 possibleValues list Possible values for custom field -

Error Codes

Refer Response Codes section to know about specific errors codes.

Unicommerce Website

Copyright © 2022 Unicommerce eSolutions Pvt. Ltd.