Stock Journal by Journal ID
Frequency:
Stock journal by journal ID request data to be sent on demand.
Expected data:
Returns article warehouse activity that changes article quantities, with a journal ID greater than the given one.
Hold code changes are reported through the Stock Journal Holds interface and are not part of this response.
Technical:
Entries are returned ordered by journal_id, starting with the first entry after {lastJournalId}. The result is limited to 1000 entries, so the next request should use the highest journal_id that was received.
GET https://{url}/v1/journal/stock/id/{lastJournalId}
Retrieve stock journal entries starting from a given journal ID.
Response Body
The response contains a data array of journal entry objects.
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 | array | Yes | Array of journal entry objects |
Journal entry object (inside data array):
| Name | Type | Required | Description |
|---|---|---|---|
| journal_id | integer | Yes | Journal entry unique identifier |
| journal_date | string | Yes | Journal entry date and time (in format '2021-03-29T22:21:11') |
| article_id | string | Yes | Article unique identifier in ERP |
| quantity_change | number | Yes | Quantity change (delta). Positive or negative. |
| quantity_unit_id | string | Yes | Changed quantity unit of measure |
| operation_id | integer | Yes | Journal operation identifier: 2 - Receive, 3 - Picking, 5 - Inventory, 7 - Refill split |
| operation | string | Yes | Operation description |
| inventory_reason_id | integer | No | Inventory reason identifier. Additional information for the inventory operation. |
| inventory_reason | string | No | Inventory reason description |
Response
200: OK — Success
{
"success": true,
"message": null,
"errors": null,
"data": [
{
"journal_id": 263295,
"journal_date": "2021-03-29T22:21:11",
"article_id": "0001",
"quantity_change": -12,
"quantity_unit_id": "PCS",
"operation_id": 3,
"operation": "Picking",
"inventory_reason_id": null,
"inventory_reason": null
},
{
"journal_id": 263296,
"journal_date": "2021-03-29T22:44:43",
"article_id": "0001",
"quantity_change": -24,
"quantity_unit_id": "PCS",
"operation_id": 5,
"operation": "Inventory",
"inventory_reason_id": 31,
"inventory_reason": "Bad quality"
},
{
"journal_id": 263297,
"journal_date": "2021-03-29T23:14:00",
"article_id": "0006",
"quantity_change": 144,
"quantity_unit_id": "PCS",
"operation_id": 2,
"operation": "Receive",
"inventory_reason_id": null,
"inventory_reason": null
}
]
}
400: Bad Request — Error
{
"success": false,
"message": "Unexpected error"
}