Getting stock movements
API reference ProductAPI
Overview
To get the stock movements for a specific product, send the product_id in the request. The response will include all the recorded transactions for that specific product
Method access
GET https://api.getbyrd.com/v2/warehouse/transactions
Request Headers
Authorization: Bearer token-from >
Authentication
Content-Type: application/json
User-Agent: your user-agent >
How to call the APIs
Query params
Field | Type | Description |
---|---|---|
product_id | string | Product id The id of the product to get the transactions. You can get the id of all your products by listing them. |
Pagination
By sending these parameters you can get the result in different pages:
Field | Type | Description |
---|---|---|
per_page | string | Items per page Default is 250 |
page | string | It returns only that page |
sort_by | string | It sorts the response by this field |
sort_order | string | It sorts the response ascending or descending depending on this value It accepts asc and desc |
Successful response example
{
"page": 0,
"per_page": 250,
"page_count": 1,
"total_count": 2,
"data": [
{
"userID": "user_id",
"storage": {
"id": "storage_id",
"bsid": "BSID"
},
"description": null,
"updatedAt": "2023-03-16T14:31:59.128638+00:00",
"relatedStorage": null,
"createdAt": "2023-03-16T14:31:59.128638+00:00",
"stockModifier": -3,
"id": "transaction_id",
"newStock": 997,
"reason": "fulfillment"
},
{
"userID": "user_id",
"storage": {
"id": "storage_id",
"bsid": "BSID"
},
"description": "delivery TST-1234",
"updatedAt": "2023-03-08T16:14:25.578127+00:00",
"relatedStorage": null,
"createdAt": "2023-03-08T16:14:25.578119+00:00",
"stockModifier": 1000,
"id": "transaction_id",
"newStock": 1000,
"reason": "delivery"
}
]
}
Updated 29 days ago