Skip to main content

Inventory Request

Frequency:

Inventory request data to be sent on demand.

Expected data:

Inventory request document.

Technical:


POST https://{url}/v1/inventory​

Create a new inventory request.

Request Body​

The request body is a JSON object containing an optional data object and an articles array with the articles to count.

Top-level fields:

NameTypeRequiredDescription
dataobjectNoA data object with a flexible structure, linked to an inventory, which will be included in the inventory status response. The contents of this object are generated by the ERP system.
articlesarrayYesArray of article objects to count

Article object (inside articles array):

NameTypeRequiredDescription
article_idstringYesArticle unique identifier in ERP
dataobjectNoA data object with a flexible structure that represents a specific article in inventory, which will be included in the inventory status response. The contents of this object are generated by the ERP system.

Request Example​

{
"data": {
"templateId": "Example Template ID",
"Batch": "123321",
"Notes": "Some text",
"any_field": "any value"
},
"articles": [
{
"article_id": "0001",
"data": {
"line_number": "10000",
"any_field": "any value"
}
},
{
"article_id": "0006",
"data": {
"line_number": "60000",
"any_field": "any value"
}
}
]
}

Response Body​

The response contains the created inventory identifier and its initial status.

Top-level response fields:

NameTypeRequiredDescription
successbooleanYesWhether the operation succeeded
messagestringNoError message, if applicable
errorsstring[]NoAdditional error messages, if present
dataobjectYesInventory status data object

Inventory status object (inside data):

NameTypeRequiredDescription
inventory_idnumberYesCreated inventory identifier, used to perform an inventory status request
status_idnumberYes1 - Requested
statusstringYesName of the status

Response​

200: OK — Success​

{
"success": true,
"message": null,
"errors": null,
"data": {
"inventory_id": 1,
"status_id": 1,
"status": "Requested"
}
}

400: Bad Request — Error​

{
"success": false,
"message": "Article not found: 0001",
"errors": null
}