Purchase Orders

The Purchase Order API provides the ability to release Purchase Orders (POs) for Accounts. Releasing required the Purchase Order, the SKU number as well as the number of POs to release. 

Tag Data Type Required Description
accountId Long Auto The id of the Account that owns this record.
entryTimestamp Text Auto  Auto-generated timestamp of the time when the purchase order was entered
Note:
Format is in timestamp and timezone (YYYY-MM-DDTHH:MM:SS.sssZ, e.g: 1970-01-01T00:00:00.000Z) 
id Auto-incremented Long Auto Unique Identifier  
lastChangedDate Text Auto Auto-generated timestamp of the last change made to this record
Note:
Format is in timestamp and timezone (YYYY-MM-DDTHH:MM:SS.sssZ, e.g: 1970-01-01T00:00:00.000Z)
purchaseOrderNumber Text Yes  The number of the Purchase Order
purchasingAccountId Long Auto  The ID of the Account who purchased the order.
quantity Integer  Yes  The quantity of the purchases ordered 
skuId Long Yes The SKU ID assigned to the record. This ID must be the same with the SKU ID allowed in the Account.

Create

API PATH: /api/v2/purchaseOrders
METHOD: POST
EXAMPLE REQUEST:
[
  {
    "accountId":1247930,
    "purchasingAccountId":1249104,
    "purchaseOrderNumber":"101",
    "skuId":1,
    "quantity":1
  }
]
EXAMPLE RESPONSE:
[
  {
    "purchasingAccountId": 1249104,
    "purchaseOrderNumber": "101",
    "entryTimestamp": "2018-06-11T12:00:00.000Z",
    "skuId": 1,
    "quantity": 1,
    "accountId": 1247930,
    "id": 20,
    "lastChangedDate": "2018-06-11T12:00:00.000Z"
  }
]

 

Read

Update

API PATH: /api/v2/purchaseOrders
METHOD: PUT
EXAMPLE REQUEST:
[
  {
    "id":20,
    "accountId":1247930,
    "purchasingAccountId":1249104,
    "purchaseOrderNumber":"101",
    "skuId":1,
    "quantity":1
  }
]
EXAMPLE RESPONSE:
[
  {
    "purchasingAccountId": 1249104,
    "purchaseOrderNumber": "101",
    "entryTimestamp": "2018-06-11T12:00:00.000Z",
    "skuId": 1,
    "quantity": 1,
    "accountId": 1247930,
    "id": 20,
    "lastChangedDate": "2018-06-11T12:00:00.000Z"
  }
]

Delete