Purchase Orders

Add

Adds a new purchase order into the inventory.

https://app.intrakr.com/api/purchaseorders/add


POST Content

{
"po": [Required] Purchase Order number as a string.,
"account": [Required] The account to add the purchase order to.,
"date": ISO GMT Date (YYYY-MM-DDT00:00:00:000Z). Defaults to current date.,
"vendor": The vendor ID.,
"comments": Comments for print on the purchase order.,
"items": [
{ "id": The item ID,
"name": Item name,
"quantities": [
{ "variation": Variation Object,
"quantity": The quantity of the specified variation.
}, ...
]
}
]
}


Response

Upon a successful insertion, a 200 status code will be returned with the following response content:

{ "id": "PURCHASE ORDER ID (from Database)", "added": true }


Example POST Content

{
"po": "PO-1",
"account": "51093df84623aef5ae25dd14",
"date": "2013-05-23T00:00:00:000Z",
"vendor": "51093df84623aef5ae34ea11",
"comments": "Thanks for the great crab!",
"items": [
{ "id": "51093df84623acd5ae43dd17",
"name": "Big Widget",
"quantities": [
{ "variation": { "size": "big", "color": "black" },
"quantity": 7
}, ...
]
}
]
}

Modify

Modifies an existing purchase order.

https://app.intrakr.com/api/purchaseorders/modify


POST Content

If updating items, send ALL items, not just those that have changed.

{
"id": [Required] Purchase Order database ID,
"date": ISO GMT Date (YYYY-MM-DDT00:00:00:000Z). Defaults to current date.,
"vendor": The vendor ID.,
"comments": Comments for print on the purchase order.,
"items": [
{ "id": The item ID,
"name: Item name,
"quantities": [See Add action]
}
]
}


Response

Upon a successful insertion, a 200 status code will be returned with the following response content:

{ "id": "PURCHASE ORDER ID (from Database)", "updated": true }

Get

Gets an existing purchase order.

https://app.intrakr.com/api/purchaseorders/get


POST Content

{ "id": [Required] Purchase Order database ID }


Response

The API will return an object with all properties of the specified purchase order. Format will be similar to schema seen for Add action.

Fulfill

Fulfills an existing purchase order by adding all item variation quantities to the inventory and closing the purchase order.

https://app.intrakr.com/api/purchaseorders/fulfill


POST Content

{ "id": [Required] Purchase Order database ID }


Response

Upon success, a 200 status code with the following content body:

{ "id": "PURCHASE ORDER ID (from Database)", "fulfilled": true }

Re-open

Re-opens an existing purchase order by subtracting all item variation quantities back from the inventory and marking the purchase order as open.

https://app.intrakr.com/api/purchaseorders/reopen


POST Content

{ "id": [Required] Purchase Order database ID }


Response

Upon success, a 200 status code with the following content body:

{ "id": "PURCHASE ORDER ID (from Database)", "reopened": true }

Search

Searches for all purchase orders in the account which match the specified criteria.

https://app.intrakr.com/api/purchaseorders/search


POST Content

{
"account": [Required] AccountID,
"search": The search phrase as a string,
"skip": The number of results to skip when returning.
"limit": The number of results to return.
}


Response

Upon success, a 200 status code with the following content body:

{
"total": Total number of results, regardless of skip/limit,
"purchaseOrders": Array of matching purchase orders and associated information.
}

Add Item

Adds an item variation and quantity to an existing purchase order.

https://app.intrakr.com/api/purchaseorders/additem


POST Content

{
"po": [Required] Purchase Order number as a string.,
"account": [Required] The account to add the order to.,
"item": {
"id": The item ID,
"name": Item name,
"variation": Variation Object,
"quantity": The quantity to add to the purchase order.
}
}


Response

Upon success, a 200 status code with the following content body:

{ "id": "PURCHASE ORDER ID (from Database)", "updated": true, "po": "Purchase Order Number" }

 

 

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk