Close Purchase Order

This REST API is used to mark close a PO in Uniware using purchaseOrderCode.

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/close
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"
}

Request Payload Details

PARAMETER TYPE DESCRIPTION MANDATORY NOTES
purchaseOrderCode string Purchase order code Yes -

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"
      }
   ],
   "purchaseOrder": {
      "code": "string",
      "fromParty": "string",
      "vendorCode": "string",
      "vendorName": "string",
      "vendorAgreement": "string",
      "statusCode": "string",
      "created": "2020-07-13T12:15:18.320Z",
      "approved": "2020-07-13T12:15:18.320Z",
      "deliveryDate": "2020-07-13T12:15:18.320Z",
      "expiryDate": "2020-07-13T12:15:18.320Z",
      "purchaseOrderItems": [
         {
            "id": 0,
            "itemSKU": "string",
            "itemTypeCustomFields": {
               "additionalProp1": {},
               "additionalProp2": {},
               "additionalProp3": {}
            },
            "itemTypeId": 0,
            "itemTypeImageUrl": "string",
            "itemTypePageUrl": "string",
            "itemTypeName": "string",
            "vendorSkuCode": "string",
            "color": "string",
            "brand": "string",
            "size": "string",
            "quantity": 0,
            "rejectedQuantity": 0,
            "pendingQuantity": 0,
            "unitPrice": 0,
            "maxRetailPrice": 0,
            "discount": 0,
            "discountPercentage": 0,
            "subtotal": 0,
            "total": 0,
            "taxPercentage": 0,
            "tax": 0,
            "taxType": "string",
            "logisticCharges": 0,
            "expirable": true,
            "shelfLife": 0,
            "grnExpiryTolerance": 0,
            "scanIdentifier": "string"
         }
      ],
      "customFieldValues": [
         {
            "fieldName": "string",
            "fieldValue": {},
            "valueType": "string",
            "displayName": "string",
            "required": true,
            "possibleValues": [
               "string"
            ]
         }
      ]
   }
}

Response Payload Details

LEVEL PARAMETER TYPE DESCRIPTION MANDATORY 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 purchaseOrder object Purchase order details - -
5.1 code string Code - -
5.2 fromParty string From party code - -
5.3 vendorCode string Vendor code - -
5.4 vendorName string Vendor name - -
5.5 vendorAgreement string Vendor aggrement - -
5.6 statusCode string Status code - -
5.7 created string date-time - Eg.: 2020-07-11T06:39:57.490Z (UTC Format)
5.8 approved string date-time - Eg.: 2020-07-11T06:39:57.490Z (UTC Format)
5.9 deliveryDate string date-time - Eg.: 2020-07-11T06:39:57.490Z (UTC Format)
5.10 expiryDate string date-time - Eg.: 2020-07-11T06:39:57.490Z (UTC Format)
5.11 purchaseOrderItems list Purchase order item details - -
5.11.1 id integer ID - -
5.11.2 itemSKU string Item SKU - -
5.11.3 itemTypeCustomFields object Item type custom fields - -
5.11.3.1 additionalProp1 object Additional property - -
5.11.3.2 additionalProp2 object Additional property - -
5.11.3.3 additionalProp3 object Additional property - -
5.11.4 itemTypeId integer Item type ID - -
5.11.5 itemTypeImageUrl string Item type image URL - -
5.11.6 itemTypePageUrl string Item type page URL - -
5.11.7 itemTypeName string Item type name - -
5.11.8 vendorSkuCode string Vendor SKU code - -
5.11.9 color string Color description - -
5.11.10 brand string Brand of the item - Eg: Bombay Dyeing
5.11.11 size string Size - Format: LxBxH, Unit: mm, Eg: 60.00X40.00X2.00
5.11.12 quantity integer Quantity - -
5.11.13 rejectedQuantity integer Rejected quantity - -
5.11.14 pendingQuantity integer Pending quantity - -
5.11.15 unitPrice number Unit price - -
5.11.16 maxRetailPrice number Max. retail price - -
5.11.17 discount number Discount amount - -
5.11.18 discountPercentage number Discount percentage - -
5.11.19 subtotal number Sub-total - -
5.11.20 total number Total amount - -
5.11.21 taxPercentage number Tax percentage - Default: 0
5.11.22 tax number Tax - -
5.11.23 taxType string Tax type - -
5.11.24 logisticCharges number Logistics charges - -
5.11.25 expirable boolean true if expirable - -
5.11.26 shelfLife integer Duration for which item remains in good condition while storing - -
5.11.27 grnExpiryTolerance integer Expiry tolerance - -
5.11.28 scanIdentifier string Data to be matched during item scan - -
5.12 customFieldValues list Custom field details - -
5.12.1 fieldName string Custom field name - -
5.12.2 fieldValue object Custom field value - -
5.12.3 valueType string Value type - -
5.12.4 displayName string Name to be displayed - -
5.12.5 required boolean true if required - -
5.12.6 possibleValues list Possible values for custom field - -

Error Codes

Refer Response Codes section to know about specific errors codes.

Unicommerce Website

Copyright © 2024 Unicommerce eSolutions Pvt. Ltd.