Skip to main content

List warehouses

1. API overview

  • Endpoint: /api/v6.1/warehouses
  • Method: GET
  • Description: Returns active warehouses (valid = 1). Filtering, sorting, paging, and fields follow Needed info and the public API Warehouse domain.

Headers

HeaderRequiredDescription
X-API-KEYYesAPI key from CRM
Content-TypeRecommendedapplication/json (see Intro)

2. Request parameters

2.1. Filtering

FieldOperatorsTypeDescription
ideq, inintegerWarehouse id (store_id)
validis, inintegerActive flag (public API enforces valid = 1 when omitted)
storekeepereq, inintegerStorekeeper user id
inventory_in_request_usereqintegerInbound request user
inventory_out_request_usereqintegerOutbound request user
inventory_request_usereqintegerWarehouse request user
product_ideqintegerProduct id (domain)
product_nameeq, containsstringProduct name
product_codeeq, containsstringProduct code
product_category_ideq, inintegerProduct category
(other product_* + product custom fields)Per domainExtended filters

Nested sub_account filters may apply when supported by the domain (same pattern as other CRM list APIs).

  • Parameter: search
  • Default scope: store_name, store_code

2.3. Sorting

FieldDirection
idasc, 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.

FieldTypeDescription
idintegerWarehouse id
store_namestringWarehouse name
total_quantitynumberAggregated stock total

If fields is omitted, the API defaults to id only.

2.5. Pagination

ParameterTypeDescription
limitintegerMax rows
offsetintegerOffset

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)

FieldTypeDescription
idintegerWarehouse id
store_namestringDisplay name
total_quantitynumberAggregated quantity

5. Notes

  • Shell: quote URLs or use curl -g so [ ] in filtering[...] 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>'