Search Sale Order

This REST API is used to search sale orders in Uniware. The user can send details in particular request body fields to use as filters for narrowing down the search and get the relevant entries.

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/search
Request Type: POST
Level: Tenant
Scheme: HTTPS
Header (Content-Type): application/json
Header (Authorization): bearer {access-token}, Eg.: bearer b30f3aea-7978-49bb-9ea7-33eddfc80afa

Request Payload

{
   "displayOrderCode": "string",
   "status": "string",
   "channel": "string",
   "customerEmailOrMobile": "string",
   "customerName": "string",
   "cashOnDelivery": true,
    "fromDate": "2021-06-01T03:52:13.812Z", 
    "toDate": "2022-01-01T03:52:13.812Z",
    "dateType": "CREATED,UPDATED,FULFILLMENT_TAT",
    "facilityCodes": [
      "06",
      "01",
      "02",
      "03",
   ],
    "returnStatuses": [
       "ALL_RETURNS",
        "RETURN_AWAITED",
        "RETURN_RECEIVED_BUT_NOT_COMPLETED",
        "RETURN_COMPLETED"  
    ],
   "searchOptions": {
      "searchKey": "string",
      "displayLength": 0,
      "displayStart": 0,
      "columns": 0,
      "sortingCols": 0,
      "sortColumnIndex": 0,
      "sortDirection": "string",
      "columnNames": "string",
      "getCount": true
   },
   "updatedSinceInMinutes": 0,
   "onHold": true

}

Request Payload Details

LEVEL PARAMETER TYPE DESCRIPTION MANDATORY NOTES
1 displayOrderCode string Order code to be displayed No -
2 status string Sale order status No -
3 channel string - No -
4 customerEmailOrMobile string Customer Email/Mobile No -
5 customerName string Customer name No -
6 cashOnDelivery boolean true if COD No Default: true
7 fromDate date Filter start date No Eg.:2021-06-01T03:52:13.812Z
8 toDate date Filter end date No Eg.:2022-06-01T03:52:13.812Z
9 dateType string Can take any one of 3 values -CREATED,UPDATED or FULFILLMENT_TAT. By default CREATED, if we don’t pass anything in the DateType. dateType: UPDATED and UpdatedSinceInMinutes cannot be used simultaneously. If dateType is selected as FULFILLMENT_TAT then use only for levels No 2,7,8,10 Yes Eg.: CREATED or UPDATED or FULFILLMENT_TAT
10 facilityCodes string Comma Separated Facility Codes No Eg.: “01”,“02”
11 returnStatuses string Return Statuses No Eg.: ALL_RETURNS, RETURN_AWAITED, RETURN_RECEIVED_BUT_NOT_COMPLETED, RETURN_COMPLETED
12 searchOptions object List of filter parameters No -
12.1 searchKey string Search keywords No -
12.2 displayLength integer Length displayed No -
12.3 displayStart integer - No -
12.4 columns integer - No -
12.5 sortingCols integer - No -
12.6 sortColumnIndex integer - No -
12.7 sortDirection string - No -
12.8 columnNames string - No -
12.9 getCount boolean - No -
13 updatedSinceInMinutes integer - No -
14 onHold boolean true if onHold No -
15 dateType boolean true if onHold No -
16 fromDate boolean true if onHold No -
17 toDate boolean true if onHold No -

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"
      }
   ],
   "totalRecords": 0,
   "elements": [
      {
         "code": "string",
         "displayOrderCode": "string",
         "channel": "string",
         "displayOrderDateTime": "2020-06-11T10:28:36.079Z",
         "status": "string",
         "created": "2020-06-11T10:28:36.079Z",
         "updated": "2020-06-11T10:28:36.079Z",
         "notificationEmail": "string",
         "notificationMobile": "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 totalRecords number Total no. of records found -
6 elements list Details of matches found -
6.1 code string Item code -
6.2 displayOrderCode string Order code to be displayed -
6.3 channel string - -
6.4 displayOrderDateTime date Order date -
6.5 status string Status -
6.6 created date Creation date -
6.7 updated date Updation date -
6.8 notificationEmail string Email for notifications -
6.9 notificationMobile string Mobile for notifications -

Error Codes

Refer Response Codes section to know about specific errors codes.

Unicommerce Website

Copyright © 2024 Unicommerce eSolutions Pvt. Ltd.