Stock locations API
Stock locations API
GET /api/integrations/v2/{connection_id}/stock-locations
The workspace’s stock locations, keyset-paged on (created_at, id); no updated_since.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
connection_id |
path | string (uuid) | yes | Your custom integration’s id; the connection whose secret signs the request. |
cursor |
query | string, nullable | no | The next_cursor of the previous page, as given. |
limit |
query | integer | no | Page size; at most 250 rows are answered whatever is asked. Default 50. |
Headers
| Header | Required | Description |
|---|---|---|
X-Yedran-Timestamp |
yes | Unix seconds; within five minutes of the server’s clock. |
X-Yedran-Signature |
yes | Lowercase hex HMAC-SHA256, keyed with the integration’s API secret, over METHOD\npath\ntimestamp\nsha256_hex(body). |
Yedran-Version |
no | Optional: the contract version, 2026-10 today; absent is 2026-10. Any other value is 400 unsupported_version. Every answer echoes the version served. |
Response 200
Schema StockLocationPageV2.
| Field | Type | Required | Description |
|---|---|---|---|
data |
array of StockLocationV2 | yes | |
next_cursor |
string, nullable | yes |
Example
curl -X GET "https://app.yedran.com/api/integrations/v2/{connection_id}/stock-locations?limit=1" \ -H "X-Yedran-Timestamp: $TIMESTAMP" \ -H "X-Yedran-Signature: $SIGNATURE" \ -H "Yedran-Version: 2026-10"Response 200:
{ "data": [ { "id": "3f2504e0-4f89-11d3-9a0c-0305e82c3301", "external_id": "string", "name": "string", "is_default": false, "created_at": "2026-10-02T09:00:00Z" } ], "next_cursor": "string"}Errors
| Code | Meaning |
|---|---|
| 400 | Bad Request |
| 401 | Unauthorized |
| 422 | Unprocessable Entity |
Schemas
StockLocationPageV2
A page of the workspace’s locations, (created_at, id) ascending.
| Field | Type | Required | Description |
|---|---|---|---|
data |
array of StockLocationV2 | yes | |
next_cursor |
string, nullable | yes |
StockLocationV2
One place stock is counted in (0178), as the v2 API shows it.
external_id is the caller’s id for it from the bindings’ stock_locations resource (bound by its first inventory write). A location stores no change time, so the collection is paged on (created_at, id) and takes no updated_since.
| Field | Type | Required | Description |
|---|---|---|---|
id |
string (uuid) | yes | |
external_id |
string, nullable | yes | |
name |
string | yes | |
is_default |
boolean | yes | |
created_at |
string (date-time) | yes |