List warehouses
1. API overview
- Endpoint:
/api/v6.1/warehouses - Method:
GET - Description: Returns active warehouses (
valid = 1). Filtering, sorting, paging, andfieldsfollow Needed info and the public APIWarehousedomain.
Headers
| Header | Required | Description |
|---|---|---|
X-API-KEY | Yes | API key from CRM |
Content-Type | Recommended | application/json (see Intro) |
2. Request parameters
2.1. Filtering
| Field | Operators | Type | Description |
|---|---|---|---|
id | eq, in | integer | Warehouse id (store_id) |
valid | is, in | integer | Active flag (public API enforces valid = 1 when omitted) |
storekeeper | eq, in | integer | Storekeeper user id |
inventory_in_request_user | eq | integer | Inbound request user |
inventory_out_request_user | eq | integer | Outbound request user |
inventory_request_user | eq | integer | Warehouse request user |
product_id | eq | integer | Product id (domain) |
product_name | eq, contains | string | Product name |
product_code | eq, contains | string | Product code |
product_category_id | eq, in | integer | Product category |
(other product_* + product custom fields) | Per domain | — | Extended filters |
Nested sub_account filters may apply when supported by the domain (same pattern as other CRM list APIs).
2.2. Search
- Parameter:
search - Default scope:
store_name,store_code
2.3. Sorting
| Field | Direction |
|---|---|
id | asc, desc |
Default: sort=id, direction=desc.
2.4. Fields (Public API v6.1 whitelist)
Comma-separated fields, e.g. fields=id,store_name,total_quantity.
| Field | Type | Description |
|---|---|---|
id | integer | Warehouse id |
store_name | string | Warehouse name |
total_quantity | number | Aggregated stock total |
If fields is omitted, the API defaults to id only.
2.5. Pagination
| Parameter | Type | Description |
|---|---|---|
limit | integer | Max rows |
offset | integer | Offset |
limit may be capped by global public API settings.
3. Sample response
{
"data": [
{
"id": 1,
"store_name": "Main warehouse",
"total_quantity": 15240.5
}
],
"has_more": false,
"offset": 0,
"limited": 50,
"sorted": { "id": "DESC" }
}
4. Field reference (row)
| Field | Type | Description |
|---|---|---|
id | integer | Warehouse id |
store_name | string | Display name |
total_quantity | number | Aggregated quantity |
5. Notes
- Shell: quote URLs or use
curl -gso[]infiltering[...]are not globbed. - Product-level stock APIs: Product inventory.
Example curl
curl --location 'https://example.getflycrm.com/api/v6.1/warehouses?fields=id,store_name,total_quantity&limit=50&sort=id&direction=desc' \
--header 'X-API-KEY: <your_api_key>'