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:
| Name | Type | Required | Description |
|---|---|---|---|
| data | object | No | A 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. |
| articles | array | Yes | Array of article objects to count |
Article object (inside articles array):
| Name | Type | Required | Description |
|---|---|---|---|
| article_id | string | Yes | Article unique identifier in ERP |
| data | object | No | A 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:
| Name | Type | Required | Description |
|---|---|---|---|
| success | boolean | Yes | Whether the operation succeeded |
| message | string | No | Error message, if applicable |
| errors | string[] | No | Additional error messages, if present |
| data | object | Yes | Inventory status data object |
Inventory status object (inside data):
| Name | Type | Required | Description |
|---|---|---|---|
| inventory_id | number | Yes | Created inventory identifier, used to perform an inventory status request |
| status_id | number | Yes | 1 - Requested |
| status | string | Yes | Name 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": "Inventory request failed",
"errors": []
}