This reference is a comprehensive guide to understanding of Instock API and is aimed to help developers to integrate their Host system with Instock Cloud (Incloud).
Instock API is REST-based. It has predictable resource URLs, accepts JSON in the HTTP body, returns JSON-encoded
responses, and uses standard HTTP response codes to indicate errors, methods and authentication.
Our API uses GET
, POST
, PUT
methods to perform all operations.
GET
method is both used for retrieval of a single or listing multiple objects at once.
snake_case
(not camelCase
or kebab-case
).2022-06-06T12:37:00Z
.POST
and PUT
methods.Instock API offers authentication in form of Bearer token. Bearer token must be present in each request header. The token provides a full access to all resources and methods of Instock API to its client.
Note: currently Bearer token is issued by Instock and supplied to API users during onboarding.
For example, if you'd like to retrieve sites available to your organization, your request will look like:
curl -X GET
-H 'Content-Type: application/json' \
-H 'Authorization: {access_token}' \
https://api.instock.com/v1/sites \
Instock API always returns errors in a common format. For example:
{
"code": "bad_request",
"message": "Request body/path/query params cannot be validated."
}
The code
indicates the general class of error read by your Host system.
The message
is a human-readable explanation of what went wrong.
HTTP code | Code | Description | Potential solution |
---|---|---|---|
400 | bad_request |
The request could not be understood. | Ensure that syntax is correct in parameters of request and its body. |
400 | resource_cannot_be_created |
Resource may already exist or has certain creation rules. | Ensure that resource doesn't already exist or it doesn't have any restrictions for creation. For bulk operations, ensure that all objects are valid. |
400 | resource_cannot_be_updated |
Resource has certain update rules. | Ensure that resource doesn't have any restrictions that can yield this error. |
401 | unauthorized |
Requestor is unauthorized. | Ensure that your access token is valid. |
403 | forbidden |
Requestor does not have permissions to perform an operation. | Ensure that your access token has permissions to perform an operation. |
404 | resource_not_found |
Resource doesn't exist. | Ensure that the resource is correctly identified by ID. |
500 | internal_server_error |
Something went wrong on our end. | An unexpected error occurred. Reach out to Instock for support. |
Note: each endpoint below has samples of errors it may return.
Instock API auto-generates request identifier with each API response.
You can find this value in the response headers as Instock-Request-ID
.
Use it to refer to a specific request when debugging or reaching out to Instock for support.
Instock-Request-ID: request_id
You can optionally extend your request and add Instock-Correlation-ID
to the header.
Use it to analyze incorrect and faulty behavior across your Host system.
For example, if you'd like to retrieve sites available to your organization and pass Instock-Correlation-ID
, your
request will look like:
curl -X GET
-H 'Content-Type: application/json' \
-H 'Authorization: your-token' \
-H 'Instock-Correlation-ID: your-correlation-id' \
https://api.instock.com/v1/sites \
Endpoints that return a list of objects use pagination. Instock API uses cursor-based pagination.
This approach allows Host system to request a part of the list, receiving results and next_cursor
in the response.
The latter could be used to access the next part of the list.
Note: setting page_size
lesser than 10 or greater than 1000 will yield an error.
Parameter | Request/Response | Type | Description |
---|---|---|---|
start_cursor |
Request | string (optional) |
Cursor returned from a previous response, used to request the next page of the results. |
page_size |
Request | string (optional) |
The number of objects returned in response. Has default and maximum values. |
has_more |
Response | bool | If true , use next_cursor to access next part of the list. If false , response includes the end of the list. |
next_cursor |
Response | string | Only available when has_more is true . Used to retrieve the next page of results by passing the value as the start_cursor parameter to the same endpoint. |
Throughout API reference below, you will encounter multiple unique identifiers (UIDs) that are required to perform certain operations. For example, to create customer order, your Host system must:
site_id
to specify exact instance of Instock ASRS installation,order_id
. Usually order_id
value corresponds to the ID of an order that Host system has.The table below indicates source (which system issues UID) and scope (at what level UID must be unique).
ID | Source | Scope | Description |
---|---|---|---|
org_id |
Instock | Global | ID assigned to your organization by Instock. |
site_id |
Instock | Global | ID assigned to an individual Instock site that belongs to your organization. |
article_id |
Host | Organization | ID of a product/SKU uploaded by Host system to Incloud. |
order_id |
Host | Organization | ID of an order created by Host system in Incloud. |
ordertask_id |
Instock | Organization | ID of an individual chunk of order fulfillment. |
Every article and order contain attributes
, which are reserved for custom and pre-defined parameters that your
organization may require for fulfillment-related operations.
Before integration, your IT and Instock teams should agree upon attributes
that will be configured
specifically for your site(s). Incloud will consume these attributes to perform certain operations throughout
fulfillment process, e.g. decanting, picking. Attributes can be added or updated in two ways: via API during operations
such as customer order creation or through the workstation UI during operation at ASRS, like decanting.
For example, cutoff_time
for a customer order — the time when order fulfillment starts, i.e. change its status from registered
to reserved
.
{
"org_id": "org_id_001",
"site_id": "1.1.0-1",
"order_id": "order_id_001",
"kind": "customer",
"placed_at": "2022-03-05T07:38:39Z",
"attributes": {
"cutoff_time": "2022-03-05T16:00:00Z",
},
"lines": [
{
"line_id": "00132455-1",
"article_id": "1003000031678",
"qty": 1
}
]
}
Another example involves adding an Advanced Shipping Notice ID (ASN ID) by an associate during decanting. This attribute can be retrieved via API in a reception order. This way, you'll be able to track reception in your system using the order attribute during decanting.
{
"org_id": "org_id_001",
"site_id": "1.1.0-1",
"order_id": "8b72a983-c909-4dd6-b5d4-01d1f4b2a608",
"kind": "reception",
"placed_at": "2024-03-27T13:22:47Z",
"attributes": {
"org_id_001:asn": "ASN-1818AE4RF"
},
"lines": [
{
"line_id": "af7e23f7-08e7-4cf1-b644-1b0cf329e574",
"article_id": "99.21004",
"qty": 15
}
]
}
Another example involves the use of product identifiers. While article_id
serves as the standard unique identifier,
our system allows organizations to incorporate alternative identifiers, such as EAN, SKU, UPC, ISBN within the article
object as attributes (see the example below). These identifiers enable warehouse associates to scan products
using those specific codes designated by your organization during decanting.
{
"articles": [
{
"article_id": "116000487727",
"name": "Cheerios Original Cereal, 12 Oz",
"is_serial_numbered": false,
"dimensions": {
"x": "7.75",
"y": "12",
"z": "2.75",
"uom": "in"
},
"attributes": {
"upc": "016000275287",
"sku": "CHRC-120Z-001"
}
}
]
}
Pre-defined attributes are parameters set by the system to cater to common requirements across different organizations. These attributes are standardized and offer functionalities that are frequently needed in the fulfillment process.
Attribute | Description |
---|---|
main_image |
Stores article's main image URL, helping with quick identification and differentiation of articles, for example, during picking. Images can be in .png , .jpg , or .gif format. |
The table below contains the summary of available API methods for the Instock API client.
Resource | Available API methods |
---|---|
Sites | GET - List all sites |
Articles | POST - Upload article(s)GET - List all articlesGET - Retrieve articlePUT - Update article |
Orders | POST - Create customer orderGET - List all ordersPUT - Update customer orderGET - Retrieve orderGET - Retrieve order statusPOST - Advance order status (debug)DELETE - Cancel registered order |
Ordertasks | GET - Retrieve ordertask |
Inventory | GET - List all articles inventoryPOST - Retrieve multiple articles inventoryPUT - Adjust article inventory (debug)GET - Retrieve article inventory |
Moves | GET - List all articles movesGET - Retrieve article moves |
Each Instock site (or just site) represents a single instance of Instock ASRS.
Such instance can represent either physical installation of ASRS or a simulation in sandbox environment.
Organization may own many sites.
A single physical site may have many sandboxes and each sandbox will be characterized by its own site_id
.
Note: site_id
is required to perform operations with orders, ordertasks, inventory and moves.
Returns a list of sites available to your organization and their properties.
Instock-Correlation-ID | string Optional header ID to track and analyze requests and behaviors across your Host system. |
curl -X GET 'https://api.instock.com/v1/sites' \ -H 'Authorization: Bearer {ACCESS_TOKEN}'
{- "sites": [
- {
- "site_id": "1.1.0-1",
- "is_virtual": true
}, - {
- "site_id": "1.1.0-2",
- "is_virtual": false
}
]
}
Instock is using the term article
to describe unique product or SKU managed by Instock ASRS.
Articles resource is mostly managed by you as a client of Instock API.
Article data is shared across all sites that belong to your organization.
Note:
is_serial_numbered: true
value cannot be uploaded or updated, Incloud will yield an error.attributes
object can contain both custom and pre-defined values. Custom attributes defined
upon initial integration with Incloud.Uploads single or multiple articles to your Instock organization account.
Note:
400
and entire request will fail.Instock-Correlation-ID | string Optional header ID to track and analyze requests and behaviors across your Host system. |
Array of objects |
{- "articles": [
- {
- "article_id": "116000487727",
- "name": "Cheerios Original Cereal, 12 Oz",
- "is_serial_numbered": false,
- "dimensions": {
- "x": "7.75",
- "y": "12",
- "z": "2.75",
- "uom": "in"
}, - "attributes": {
- "product_category_name": "Cereals & Bars",
- "temp_zone": "ambient"
}
}
]
}
"Successful operation."
Returns a paginated list of all articles known within your organization account.
start_cursor | string Default: "" Example: start_cursor=fe2cc560-036c-44cd-90e8-294d5a74cebc Cursor returned from a previous response, used to request the next page of the results. |
page_size | integer <int64> <= 1000 Default: 10 Example: page_size=10 The number of articles returned in response. Default (minimum) value is 10, maximum value is 1000. |
Instock-Correlation-ID | string Optional header ID to track and analyze requests and behaviors across your Host system. |
curl -X GET 'https://api.instock.com/v1/articles' \ -H 'Authorization: Bearer {ACCESS_TOKEN}'
{- "has_more": false,
- "next_cursor": "",
- "articles": [
- {
- "article_id": "1003000031678",
- "name": "Quaker Apples and Cinnamon Instant Oatmeal Packets",
- "is_serial_numbered": false,
- "dimensions": {
- "x": "4.9",
- "y": "7.9",
- "z": "3.1",
- "uom": "m"
}, - "attributes": {
- "product_category_name": "Cereals & Bars",
- "temp_zone": "ambient",
- "promotion_price": "2.99"
}
}, - {
- "article_id": "116000487727",
- "name": "Cheerios Original Cereal, 12 Oz",
- "is_serial_numbered": false,
- "dimensions": {
- "x": "7.75",
- "y": "12",
- "z": "2.75",
- "uom": "in"
}, - "attributes": {
- "product_category_name": "Cereals & Bars"
}
}, - {
- "article_id": "116000275270",
- "name": "Cheerios Honey Nut Cereal, 12 Oz",
- "is_serial_numbered": false,
- "dimensions": {
- "x": "7.75",
- "y": "12",
- "z": "2.75",
- "uom": "in"
}, - "attributes": {
- "product_category_name": "Cereals & Bars"
}
}
]
}
Retrieves a single existing article. Supply article_id
either from article upload or articles list request,
and Instock will return the corresponding article data.
article_id required | string (articleId) ^[a-zA-Z0-9_+.]+$ Example: 016000487727 ID of an article. Unique in scope of your organization(s). |
Instock-Correlation-ID | string Optional header ID to track and analyze requests and behaviors across your Host system. |
curl -X GET 'https://api.instock.com/v1/articles/{ARTICLE_ID}' \ -H 'Authorization: Bearer {ACCESS_TOKEN}'
{- "article_id": "116000487727",
- "name": "Cheerios Original Cereal, 12 Oz",
- "is_serial_numbered": false,
- "dimensions": {
- "x": "7.75",
- "y": "12",
- "z": "2.75",
- "uom": "in"
}, - "attributes": {
- "product_category_name": "Cereals & Bars",
- "temp_zone": "ambient"
}
}
Updates a single existing article by setting the values of parameters passed.
Note:
PUT
method —
when updating an article, a complete order record (all fields) must be passed.article_id
has inventory moves, Incloud will yield 400
error.
In other words, if an article has already been decanted into ASRS, its properties cannot be updated as
Incloud already relies on its properties.article_id required | string (articleId) ^[a-zA-Z0-9_+.]+$ Example: 016000487727 ID of an article. Unique in scope of your organization(s). |
Instock-Correlation-ID | string Optional header ID to track and analyze requests and behaviors across your Host system. |
Update a single existing article with properties in the request body.
article_id | string (articleId) ^[a-zA-Z0-9_+.]+$ ID of an article. Unique in scope of your organization(s). |
name | string Name of an article. |
is_serial_numbered | boolean Default: false Is article serial numbered? |
object Dimensions of an article. | |
object Custom attribute(s) added to a specific article. |
{- "article_id": "116000487727",
- "name": "Cheerios Original Cereal, 12 Oz",
- "is_serial_numbered": false,
- "dimensions": {
- "x": "7.75",
- "y": "12",
- "z": "2.75",
- "uom": "in"
}, - "attributes": {
- "product_category_name": "Cereals & Bars",
- "temp_zone": "ambient",
- "promotion_price": "1.69"
}
}
"Successful operation."
Intentions of users of Instock ASRS are represented by orders
structure.
Orders resource allows:
customer
orders)adjustment
, reception
, extraction
orders)All operations with orders are performed in scope of a particular site and require
site_id
as a path parameter.
The following kinds and statuses of orders are in use:
Order Kind | Description |
---|---|
customer |
order that needs to be fulfilled from ASRS and are placed by you, as client of API. |
adjustment |
order to correct current inventory. |
reception |
order to receive goods or assets into ASRS, triggered by shipment from supplier, return of goods, etc. |
extraction |
order to extract assets from ASRS. |
Order Status | Description |
---|---|
registered |
order registered and awaiting for fulfillment in scope of ordertask(s). |
reserved |
fulfillment in progress. |
done |
order has been fulfilled. |
canceled |
order has been canceled. |
Note:
customer
orders can be updated, and only while they are in status registered
. Once order
fulfillment has started Instock ASRS freezes (makes read-only) customer orders.attributes
object values are optional and defined upon initial integration with Incloud.Creates a single new customer order within a particular site of your organization.
Note: if lines
object contains a line with an article that is not uploaded, Incloud will yield 404
and request will fail.
site_id required | string (siteId) Example: 1.1.0-1 ID of Instock site. Globally unique. |
Instock-Correlation-ID | string Optional header ID to track and analyze requests and behaviors across your Host system. |
org_id | string ID of an organization. Globally unique. |
site_id | string ID of Instock site. Globally unique. |
order_id | string (orderId) [ 1 .. 128 ] characters ^[a-zA-Z0-9_+.:-]+$ ID of an order. Unique in scope of your organization(s). |
kind | string Default: "customer" Value: "customer" Type of an order:
|
placed_at | string <date-time> (placedAtTimestamp) Time when order was placed RFC 3339. |
object Custom attribute(s) added to an order. | |
Array of objects List of lines within an order. |
{- "org_id": "org_id_001",
- "site_id": "1.1.0-1",
- "order_id": "00132455",
- "kind": "customer",
- "placed_at": "2022-03-05T07:38:39Z",
- "attributes": {
- "property1": "string",
- "property2": "string"
}, - "lines": [
- {
- "line_id": "00132455-1",
- "article_id": "1003000031678",
- "qty": 1
}
]
}
"Successful operation."
Returns a paginated list of all orders within specific site of an organization.
site_id required | string (siteId) Example: 1.1.0-1 ID of Instock site. Globally unique. |
start_cursor | string Default: "" Example: start_cursor=fe2cc560-036c-44cd-90e8-294d5a74cebc Cursor returned from a previous response, used to request the next page of the results. |
page_size | integer <int64> <= 1000 Default: 10 Example: page_size=10 The number of articles returned in response. Default (minimum) value is 10, maximum value is 1000. |
Instock-Correlation-ID | string Optional header ID to track and analyze requests and behaviors across your Host system. |
curl -X GET 'https://api.instock.com/v1/{site_id}/orders?start_cursor={START_CURSOR}&page_size={PAGE_SIZE}' \ -H 'Authorization: Bearer {ACCESS_TOKEN}'
{- "has_more": false,
- "next_cursor": "",
- "org_id": "org_id_001",
- "site_id": "1.1.0-1",
- "orders": [
- {
- "order_id": "00132457",
- "site_id": "1.1.0-1",
- "kind": "customer",
- "placed_at": "2022-03-06T12:45:09Z",
- "attributes": {
- "property1": "string",
- "property2": "string"
}, - "lines": [
- {
- "line_id": "00132457-1",
- "article_id": "116000275270",
- "qty": 1
}, - {
- "line_id": "00132457-2",
- "article_id": "1003000031678",
- "qty": 2
}, - {
- "line_id": "00132457-3",
- "article_id": "116000487727",
- "qty": 3
}
]
}, - {
- "order_id": "00132458",
- "site_id": "1.1.0-1",
- "kind": "adjustment",
- "placed_at": "2022-03-06T12:47:19Z",
- "attributes": {
- "property1": "string",
- "property2": "string"
}, - "lines": [
- {
- "line_id": "00132458-1",
- "article_id": "116000275270",
- "qty": 1
}
]
}, - {
- "order_id": "00132459",
- "site_id": "1.1.0-1",
- "kind": "reception",
- "placed_at": "2022-03-06T12:47:19Z",
- "attributes": {
- "property1": "string",
- "property2": "string"
}, - "lines": [
- {
- "line_id": "00132459-1",
- "article_id": "116000275270",
- "qty": 14
}, - {
- "line_id": "00132459-2",
- "article_id": "116000275271",
- "qty": 20
}, - {
- "line_id": "00132459-3",
- "article_id": "116000275274",
- "qty": 10
}
]
}
]
}
Updates a single existing order with kind customer
.
Only registered
orders can be updated.
Note: order update operation is performed via PUT
method — when updating an order, all parameters must be
passed.
site_id required | string (siteId) Example: 1.1.0-1 ID of Instock site. Globally unique. |
order_id required | string Example: 00132455 ID of an order. Unique in scope of your organization(s). |
Instock-Correlation-ID | string Optional header ID to track and analyze requests and behaviors across your Host system. |
Update a single order with properties to be changed.
org_id | string ID of an organization. Globally unique. |
site_id | string ID of Instock site. Globally unique. |
order_id | string (orderId) [ 1 .. 128 ] characters ^[a-zA-Z0-9_+.:-]+$ ID of an order. Unique in scope of your organization(s). |
kind | string Default: "customer" Value: "customer" Type of an order:
|
placed_at | string <date-time> (placedAtTimestamp) Time when order was placed RFC 3339. |
object Custom attribute(s) added to an order. | |
Array of objects List of lines within an order. |
{- "org_id": "org_id_001",
- "site_id": "1.1.0-1",
- "order_id": "00132455",
- "kind": "customer",
- "placed_at": "2022-03-05T07:38:39Z",
- "attributes": {
- "property1": "string",
- "property2": "string"
}, - "lines": [
- {
- "line_id": "00132455-1",
- "article_id": "1003000031678",
- "qty": 1
}
]
}
"Successful operation."
Retrieves a single existing order data.
site_id required | string (siteId) Example: 1.1.0-1 ID of Instock site. Globally unique. |
order_id required | string Example: 00132455 ID of an order. Unique in scope of your organization(s). |
Instock-Correlation-ID | string Optional header ID to track and analyze requests and behaviors across your Host system. |
curl -X GET 'https://api.instock.com/v1/{site_id}/orders/{order_id}' \ -H 'Authorization: Bearer {ACCESS_TOKEN}'
{- "org_id": "org_id_001",
- "site_id": "1.1.0-1",
- "order_id": "00132455",
- "kind": "customer",
- "placed_at": "2022-03-05T07:38:39Z",
- "attributes": {
- "property1": "string",
- "property2": "string"
}, - "lines": [
- {
- "line_id": "00132455-1",
- "article_id": "1003000031678",
- "qty": 1
}
]
}
Retrieves a single existing order data and its ordertask status.
site_id required | string (siteId) Example: 1.1.0-1 ID of Instock site. Globally unique. |
order_id required | string Example: 00132455 ID of an order. Unique in scope of your organization(s). |
Instock-Correlation-ID | string Optional header ID to track and analyze requests and behaviors across your Host system. |
curl -X GET 'https://api.instock.com/v1/{site_id}/orders/{order_id}/status' \ -H 'Authorization: Bearer {ACCESS_TOKEN}'
{- "org_id": "org_id_001",
- "site_id": "1.1.0-1",
- "order_id": "00132456",
- "order_status": "registered",
- "timestamp": "2022-03-05T08:15:21Z",
- "ordertask_ids": [
- ""
], - "lines": [
- {
- "line_id": "00132456-1",
- "article_id": "116000487727",
- "qty": {
- "reserved": 0,
- "free": 20,
- "requested": 10
}
}, - {
- "line_id": "00132456-2",
- "article_id": "1003000031678",
- "qty": {
- "reserved": 0,
- "free": 200,
- "requested": 5
}
}
]
}
Important: this a debug endpoint, use it during integration with Incloud or during debugging.
Advances order status for virtual site from registered
to reserved
, from reserved
to done
.
A request body is mandatory for this endpoint. If there's no need to specify a target storage cell for the order, the body should be an empty JSON object ({}
).
However, if you wish to control the storage cell where the order is being moved, you can include the optional parameter to_cell_id
within the body.
Note: If there is not enough inventory for article_id
within order then, Incloud will set order status to canceled
.
site_id required | string (siteId) Example: 1.1.0-1 ID of Instock site. Globally unique. |
order_id required | string Example: 00132455 ID of an order. Unique in scope of your organization(s). |
Instock-Correlation-ID | string Optional header ID to track and analyze requests and behaviors across your Host system. |
to_cell_id | string (toCellId) [ 1 .. 1024 ] characters ID of the target storage cell to which a specific article moved. |
{- "to_cell_id": "VM-TIY6J-P001"
}
""
Cancels a single registered customer order within a particular site of your organization.
site_id required | string (siteId) Example: 1.1.0-1 ID of Instock site. Globally unique. |
order_id required | string Example: 00132455 ID of an order. Unique in scope of your organization(s). |
Instock-Correlation-ID | string Optional header ID to track and analyze requests and behaviors across your Host system. |
curl -X DELETE 'https://api.instock.com/v1/{site_id}/orders/{order_id}/status' \ -H 'Authorization: Bearer {ACCESS_TOKEN}'
""
Fulfillment of orders by associates and ASRS is split into chunks called ordertasks
.
An ordertask
can represent a picking of several lines of customer order, for example.
Each ordertask corresponds to exactly one order and one order can have multiple ordertasks.
On the other side, each action of robots of ASRS can be attributed back to exactly one ordertask.
Incloud promises, once order gets into one of the terminal statuses (done
or canceled
) the set
of corresponding ordertasks is immutable, i.e. no new ordertasks to be added, and each ordertask record
is immutable.
Ordertasks corresponding to customer order are created after order fulfillment is planned, i.e. after
order status changes from registered
to reserved
.
Once customer order is done
or canceled
, a client of API can reconstruct full picture of fulfillment of
order by retrieving ordertasks data.
Ordertasks may be presented by Incloud for all type of orders
(customer
, reception
, adjustment
, extraction
).
Ordertask status | Description |
---|---|
reserved |
ordertask is in progress. |
done |
ordertask has been completed. |
canceled |
ordertask has been canceled. |
Retrieves a single ordertask.
Requires ordertask_id
, which can be retrieved via order status retrieval and is
available only when order status is reserved
, done
or canceled
.
site_id required | string (siteId) Example: 1.1.0-1 ID of Instock site. Globally unique. |
ordertask_id required | string Example: ot0001 ID of an order task. Unique in scope of your organization(s). |
Instock-Correlation-ID | string Optional header ID to track and analyze requests and behaviors across your Host system. |
curl -X GET 'https://api.instock.com/v1/{SITE_ID}/ordertasks/{TASK_ID}' \ -H 'Authorization: Bearer {ACCESS_TOKEN}'
{- "org_id": "org_id_001",
- "site_id": "1.1.0-1",
- "order_id": "00132456",
- "ordertask_id": "ot0001",
- "ordertask_status": "reserved",
- "lines": [
- {
- "line_id": "00132456-1",
- "article_id": "116000487727",
- "to_cells": [
- {
- "to_cell_id": "c001",
- "qty": 4
}, - {
- "to_cell_id": "c002",
- "qty": 6
}
]
}, - {
- "line_id": "00132456-2",
- "article_id": "1003000031678",
- "to_cells": [
- {
- "to_cell_id": "c003",
- "qty": 3
}, - {
- "to_cell_id": "c004",
- "qty": 1
}
]
}
]
}
Inventory resource returns data on the current quantity of article(s) that your organization has uploaded, use it to track articles that are low in stock or out-of-stock and require replenishment in scope of particular site.
Returns a paginated list of inventory for all articles within specific site.
Note: The response excludes articles where free
, reserved
and registered
quantity values are all equal to 0
.
However, those articles are still in Incloud and their inventory data can be retrieved individually
via article inventory retrieval.
site_id required | string (siteId) Example: 1.1.0-1 ID of Instock site. Globally unique. |
start_cursor | string Default: "" Example: start_cursor=fe2cc560-036c-44cd-90e8-294d5a74cebc Cursor returned from a previous response, used to request the next page of the results. |
page_size | integer <int64> <= 1000 Default: 10 Example: page_size=10 The number of articles returned in response. Default (minimum) value is 10, maximum value is 1000. |
Instock-Correlation-ID | string Optional header ID to track and analyze requests and behaviors across your Host system. |
curl -X GET 'https://api.instock.com/v1/{SITE_ID}/inventory?start_cursor={START_CURSOR}&page_size={PAGE_SIZE}' \ -H 'Authorization: Bearer {ACCESS_TOKEN}'
{- "has_more": false,
- "next_cursor": "",
- "org_id": "org_id_001",
- "site_id": "1.1.0-1",
- "timestamp": "2022-06-06T12:37:00Z",
- "articles": [
- {
- "article_id": "1003000031678",
- "qty": {
- "reserved": 0,
- "free": 100,
- "registered": 0
}
}, - {
- "article_id": "116000487727",
- "qty": {
- "reserved": 25,
- "free": 50,
- "registered": 10
}
}, - {
- "article_id": "116000275270",
- "qty": {
- "reserved": 10,
- "free": 100,
- "registered": 0
}
}
]
}
Returns inventory for multiple articles by article IDs within specific site.
site_id required | string (siteId) Example: 1.1.0-1 ID of Instock site. Globally unique. |
Instock-Correlation-ID | string Optional header ID to track and analyze requests and behaviors across your Host system. |
article_ids | Array of strings (articleId) <= 1000 items List of articles. |
{- "article_ids": [
- "1003000031678",
- "116000487727",
- "116000275270"
]
}
{- "org_id": "org_id_001",
- "site_id": "1.1.0-1",
- "timestamp": "2022-06-06T12:37:00Z",
- "articles": [
- {
- "article_id": "1003000031678",
- "qty": {
- "reserved": 0,
- "free": 100,
- "registered": 0
}
}, - {
- "article_id": "116000487727",
- "qty": {
- "reserved": 25,
- "free": 50,
- "registered": 10
}
}, - {
- "article_id": "116000275270",
- "qty": {
- "reserved": 10,
- "free": 100,
- "registered": 0
}
}
]
}
Important: this a debug endpoint, use it during integration with Incloud or during debugging.
Adjusts inventory of one or more articles for virtual site.
Note: "qty": 0
will remove inventory (free stock) of a given article.
site_id required | string (siteId) Example: 1.1.0-1 ID of Instock site. Globally unique. |
Instock-Correlation-ID | string Optional header ID to track and analyze requests and behaviors across your Host system. |
Array of objects (adjustArticleInventory) |
{- "adjustments": [
- {
- "article_id": "116000487727",
- "qty": 15
}
]
}
""
Returns inventory for a single article by article ID within specific site.
site_id required | string (siteId) Example: 1.1.0-1 ID of Instock site. Globally unique. |
article_id required | string (articleId) ^[a-zA-Z0-9_+.]+$ Example: 016000487727 ID of an article. Unique in scope of your organization(s). |
Instock-Correlation-ID | string Optional header ID to track and analyze requests and behaviors across your Host system. |
curl -X GET 'https://api.instock.com/v1/{SITE_ID}/inventory/{ARTICLE_ID}' \ -H 'Authorization: Bearer {ACCESS_TOKEN}'
{- "org_id": "org_id_001",
- "site_id": "1.1.0-1",
- "timestamp": "2022-06-06T12:38:00Z",
- "article_id": "1003000031678",
- "qty": {
- "reserved": 10,
- "free": 100,
- "registered": 0
}
}
Moves allow to retrieve data on article(s) flow in and out of of a particular site owned by your organization. List moves of all articles or retrieve them for a single article.
Note: Refine your search with from_timestamp
and to_timestamp
— most recent moves will be on top of the list.
Returns a paginated list of all moves for all articles within specific site.
Note: Results are sorted in a descending order of their timestamps, meaning the latest results are displayed first.
site_id required | string (siteId) Example: 1.1.0-1 ID of Instock site. Globally unique. |
start_cursor | string Default: "" Example: start_cursor=fe2cc560-036c-44cd-90e8-294d5a74cebc Cursor returned from a previous response, used to request the next page of the results. |
page_size | integer <int64> <= 1000 Default: 10 Example: page_size=10 The number of articles returned in response. Default (minimum) value is 10, maximum value is 1000. |
from_timestamp required | string <date-time> (movesFromTimestamp) Example: from_timestamp=2023-01-01T00:00:00Z Start date of article moves RFC 3339. |
to_timestamp required | string <date-time> (movesToTimestamp) Example: to_timestamp=2023-01-01T00:00:00Z Finish date of article moves RFC 3339. |
to_cell_id | string (toCellId) [ 1 .. 1024 ] characters Example: to_cell_id=VM-TIY6J-P001 ID of the target storage cell to which a specific article moved. |
Instock-Correlation-ID | string Optional header ID to track and analyze requests and behaviors across your Host system. |
curl -X GET 'https://api.instock.com/v1/{SITE_ID}/moves?start_cursor={START_CURSOR}&page_size={PAGE_SIZE}&from_timestamp={FROM_TIMESTAMP}&to_timestamp={TO_TIMESTAMP}&to_cell_id={CELL_ID}' \ -H 'Authorization: Bearer {ACCESS_TOKEN}'
{- "has_more": false,
- "next_cursor": "",
- "org_id": "org_id_001",
- "site_id": "1.1.0-1",
- "moves": [
- {
- "article_id": "116000487727",
- "qty": 4,
- "move_timestamp": "2022-06-06T14:38:39Z",
- "user_id": "00001",
- "order_id": "00132457",
- "from_cell_id": "cell_005",
- "to_cell_id": "cell_004",
- "from_account_id": "account_001",
- "to_account_id": "account_002"
}, - {
- "article_id": "1003000031678",
- "qty": 12,
- "move_timestamp": "2022-06-06T14:38:39Z",
- "user_id": "00002",
- "order_id": "00132431",
- "from_cell_id": "cell_001",
- "to_cell_id": "cell_002",
- "from_account_id": "account_001",
- "to_account_id": "account_002"
}, - {
- "article_id": "1003000031678",
- "qty": 2,
- "move_timestamp": "2022-06-03T14:38:39Z",
- "user_id": "00003",
- "order_id": "00132623",
- "from_cell_id": "cell_003",
- "to_cell_id": "cell_004",
- "from_account_id": "account_001",
- "to_account_id": "account_002"
}
]
}
Returns a paginated list of all moves of a single article within a specific site.
Note: Results are sorted in a descending order of their timestamps, meaning the latest results are displayed first.
site_id required | string (siteId) Example: 1.1.0-1 ID of Instock site. Globally unique. |
article_id required | string (articleId) ^[a-zA-Z0-9_+.]+$ Example: 016000487727 ID of an article. Unique in scope of your organization(s). |
start_cursor | string Default: "" Example: start_cursor=fe2cc560-036c-44cd-90e8-294d5a74cebc Cursor returned from a previous response, used to request the next page of the results. |
page_size | integer <int64> <= 1000 Default: 10 Example: page_size=10 The number of articles returned in response. Default (minimum) value is 10, maximum value is 1000. |
from_timestamp required | string <date-time> (movesFromTimestamp) Example: from_timestamp=2023-01-01T00:00:00Z Start date of article moves RFC 3339. |
to_timestamp required | string <date-time> (movesToTimestamp) Example: to_timestamp=2023-01-01T00:00:00Z Finish date of article moves RFC 3339. |
Instock-Correlation-ID | string Optional header ID to track and analyze requests and behaviors across your Host system. |
curl -X GET 'https://api.instock.com/v1/{SITE_ID}/moves/{ARTICLE_ID}?start_cursor={START_CURSOR}&page_size={PAGE_SIZE}&from_timestamp={FROM_TIMESTAMP}&to_timestamp={TO_TIMESTAMP}' \ -H 'Authorization: Bearer {ACCESS_TOKEN}'
{- "has_more": false,
- "next_cursor": "",
- "org_id": "org_id_001",
- "site_id": "1.1.0-1",
- "article_id": "1003000031678",
- "moves": [
- {
- "article_id": "1003000031678",
- "qty": 12,
- "move_timestamp": "2022-06-06T14:38:39Z",
- "user_id": "00001",
- "order_id": "00132431",
- "from_cell_id": "cell_001",
- "to_cell_id": "cell_002",
- "from_account_id": "account_001",
- "to_account_id": "account_002"
}, - {
- "article_id": "1003000031678",
- "qty": 2,
- "move_timestamp": "2022-06-03T14:38:39Z",
- "user_id": "00001",
- "order_id": "00132457",
- "from_cell_id": "cell_003",
- "to_cell_id": "cell_004",
- "from_account_id": "account_001",
- "to_account_id": "account_002"
}
]
}