Skip to main content

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:

NameTypeRequiredDescription
successbooleanYesWhether the operation succeeded
messagestringNoError message, if applicable
errorsstring[]NoAdditional error messages, if present
dataarrayYesArray of journal entry objects

Journal entry object (inside data array):

NameTypeRequiredDescription
journal_idintegerYesJournal entry unique identifier
journal_datestringYesJournal entry date and time (in format '2021-03-29T22:21:11')
article_idstringYesArticle unique identifier in ERP
quantity_changenumberYesQuantity change (delta). Positive or negative.
quantity_unit_idstringYesChanged quantity unit of measure
operation_idintegerYesJournal operation identifier: 2 - Receive, 3 - Picking, 5 - Inventory, 7 - Refill split
operationstringYesOperation description
inventory_reason_idintegerNoInventory reason identifier. Additional information for the inventory operation.
inventory_reasonstringNoInventory 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"
}