Orders

Add

Adds a new order into the inventory.

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


POST Content

{
"onum": [Required] Order number as a string.,
"account": [Required] The account to add the order to.,
"date": ISO GMT Date (YYYY-MM-DDT00:00:00:000Z). Defaults to current date.,
"cust": The customer ID.,
"comments": Comments for print on the 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": "ORDER ID (from Database)", "added": true }


Example POST Content

{
"onum": "order-1",
"account": "51093df84623aef5ae25dd14",
"date": "2013-05-23T00:00:00:000Z",
"cust": "51011df84623aef5ae25ef18",
"comments": "Thanks for the business!",
"items": [
{ "id": "51093df84623acd5ae43dd17",
"name": "Big Widget",
"quantities": [
{ "variation": { "size": "big", "color": "black" },
"quantity": 7
}, ...
]
}
]
}

Modify

Modifies an existing order.

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


POST Content

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

{
"id": [Required] Order database ID,
"date": ISO GMT Date (YYYY-MM-DDT00:00:00:000Z). Defaults to current date.,
"cust": The customer ID.,
"comments": Comments for print on the 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": "ORDER ID (from Database)", "updated": true }

Get

Gets an existing order.

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


POST Content

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


Response

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

Fulfill

Fulfills an existing order by subtracting all item variation quantities from the inventory and closing the order.

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


POST Content

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


Response

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

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

Paid

Marks an existing order as paid/unpaid.

https://app.intrakr.com/api/orders/paid


POST Content

{ "id": [Required] Order database ID,
"paid": [Required] Boolean }


Response

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

{ "id": "ORDER ID (from Database)", "paid": Boolean matching input }


Reserve

Reserves the product quantities for the specified order. These quantities will be removed from the available inventory.

https://app.intrakr.com/api/orders/reserve


POST Content

{ "id": [Required] Order database ID,
"reserve": [Required] Boolean }


Response

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

{ "id": "ORDER ID (from Database)", "reserved": Boolean matching input }

Re-open

Re-opens an existing order by adding all item variation quantities back to the inventory and marking the order as open.

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


POST Content

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


Response

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

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

Search

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

https://app.intrakr.com/api/orders/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,
"orders": Array of matching orders and associated information.
}

Add Item

Adds an item variation and quantity to an existing order.

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


POST Content

{
"onum": [Required] 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 order
}
}


Response

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

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

 

 

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk