Create and Approve Purchase Order

This REST API is used to create the puchase order (PO) in approved status 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/purchase/purchaseOrder/createApproved
Request Type: POST
Level: Facility
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

{
   "purchaseOrderCode": "string",
   "userId": "string",
   "vendorCode": "string",
   "vendorAgreementName": "string",
   "currencyCode": "string",
   "expiryDate": "2020-07-13T12:09:16.639Z",
   "deliveryDate": "2020-07-13T12:09:16.639Z",
   "logisticChargesDivisionMethod": "string",
   "logisticCharges": 0,
   "purchaseOrderItems": [
      {
         "itemSKU": "string",
         "quantity": 1,
         "unitPrice": 0,
         "maxRetailPrice": 0,
         "discount": 0,
         "discountPercentage": 0,
         "taxTypeCode": "string"
      }
   ],
   "customFieldValues": [
      {
         "name": "string",
         "value": "string"
      }
   ]
}

Request Payload Details

LEVEL PARAMETER TYPE DESCRIPTION MANDATORY NOTES
1 purchaseOrderCode string Purchase order code No -
2 vendorCode string Vendor code Yes -
3 vendorAgreementName string Vendor aggrement name No -
4 currencyCode string Currency codes (3 digit) No Default: INR, Currency Codes
5 expiryDate string date-time No Eg.: 2020-07-11T06:39:57.490Z (UTC Format)
6 deliveryDate string date-time No Eg.: 2020-07-11T06:39:57.490Z (UTC Format)
7 purchaseOrderItems list Purchase order item details No -
7.1 itemSKU string Item SKU Yes -
7.2 quantity integer Quantity Yes -
7.3 unitPrice number Unit price Yes -
7.4 maxRetailPrice number Max. retail price No -
7.5 discount number Discount amount No -
7.6 discountPercentage number Discount percentage No -
7.7 taxTypeCode string Tax type code No -
8 customFieldValues list Custom field details No -
8.1 name string Custom field name Yes -
8.2 value string Custom field value 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"
      }
   ],
   "purchaseOrderCode": "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 purchaseOrderCode string Purchase order code as Approved in UC -

Error Codes

Refer Response Codes section to know about specific errors codes.

Unicommerce Website

Copyright © 2024 Unicommerce eSolutions Pvt. Ltd.