Get Open Stocks
Retrieve all shipments currently locked in stock (i.e. awaiting an action) for the authenticated client.
GET /stocks/open
Request
Headers
| Header | Value |
|---|---|
Authorization | Bearer <your_api_token> |
Body Parameters
None.
Response
Returns a 200 OK with a JSON object containing a stocks array.
Response Fields
| Field | Type | Description |
|---|---|---|
id | integer | Internal stock ID |
ldv | string | Tracking number (LDV) of the shipment |
status | integer | Stock status — 0 means open/pending action |
notes | string | Notes associated with the stock entry |
created_at | string | Timestamp of when the stock entry was created |
Example Response
{
"stocks": [
{
"id": 123,
"ldv": "281095I072409",
"status": 0,
"notes": "recipient absent",
"created_at": "2024-06-20T10:30:00.000000Z"
},
{
"id": 124,
"ldv": "281095I072410",
"status": 0,
"notes": null,
"created_at": "2024-06-21T08:15:00.000000Z"
}
]
}Only shipments with status = 0 (open, awaiting action) are returned. Use the Update Stock endpoint to submit an action for each entry.
Error Codes
| Code | Description |
|---|---|
200 | OK — returns list of open stocks |
401 | Unauthorized — invalid or missing API token |
Last updated on