Create Export Job

This REST API is used to create an export job in Uniware. The export job is basically an export of reports from Uniware in .csv format. In the body specify the report name (as mentioned in Uniware), choose the columns as per required information and set the filters to get the custom export report.

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.
  • In Uniware, the report name (exportJobTypeName) can be referred at: Dashboard > Other Reports > Export Type (dropdown list).
  • The column name (exportColums) and filter parameters (exportFilters) can be referred after selecting desired report from the dropdown list.
  • This is an asynchronous api, so after creating an export job using this API, an export job code is provided in response. Use this code to check the status of export request using Get Export Job Status API. Once the status becomes complete, the link to download .csv file is sent in response.

Basic Information

NAME DETAILS
Endpoint: /services/rest/v1/export/job/create
Request Type: POST
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

{
   "exportJobTypeName": "string",
   "exportColums": [
      "string"
   ],
   "exportFilters": [
      {
         "id": "string",
         "text": "string",
         "selectedValues": [
            "string"
         ],
         "selectedValue": "string",
         "dateTime": "2020-07-17T09:29:09.138Z",
         "dateRange": {
            "start": "2020-07-17T09:29:09.138Z",
            "end": "2020-07-17T09:29:09.138Z",
            "textRange": "TODAY"
         },
         "checked": true
      }
   ],
   "scheduleTime": "2020-07-17T09:29:09.138Z",
   "notificationEmail": "user@example.com",
   "frequency": "string",
   "cronExpression": "string",
   "reportName": "string"
}

Request Payload Details

LEVEL PARAMETER TYPE DESCRIPTION MANDATORY NOTES
1 exportJobTypeName string Report Name (same as in Uniware) Yes Eg.: Inventory Snapshot
2 exportColums list List of colums to be exported Yes -
3 exportFilters list Export filters No -
3.1 id integer ID Yes -
3.2 text string - No -
3.3 selectedValues list Selected values No -
3.4 selectedValue string Selected value No -
3.5 dateTime string date-time No Eg.: 2020-07-11T06:39:57.490Z (UTC Format)
3.6 dateRange object Date range details No -
3.6.1 start string date-time No Eg.: 2020-07-11T06:39:57.490Z (UTC Format)
3.6.2 end string date-time No Eg.: 2020-07-11T06:39:57.490Z (UTC Format)
3.6.3 textRange enum Range No Allowable: TODAY, YESTERDAY, LAST_WEEK, LAST_MONTH, THIS_MONTH, LAST_7_DAYS, LAST_30_DAYS, LAST_60_DAYS, LAST_90_DAYS, LAST_QUARTER, THIS_QUARTER
3.7 checked boolean true if checked No -
4 scheduleTime string date-time No Eg.: 2020-07-11T06:39:57.490Z (UTC Format)
5 notificationEmail string Email for notifications No Eg.: user@example.com
6 frequency string Frequency Yes Eg.: ONETIME
7 cronExpression string - No -
8 reportName string - 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"
      }
   ],
   "exportJobId": "string",
   "jobCode": "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 Error 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 exportJobId string Export job ID -
6 jobCode string Job code -
Unicommerce Website

Copyright © 2022 Unicommerce eSolutions Pvt. Ltd.