O2M Logo
One to Many
List warehouses
Was this page helpful?

List warehouses

Get the warehouses this key can see.

Overview

Returns the warehouses this key may see, with the IDs and codes other requests ask for.

Request

GET/warehouses

Needs the permission stock:read

cURL
curl "https://api.o2m.in/api/v1/warehouses" \
  -H "X-Access-Key: $O2M_ACCESS_KEY" \
  -H "X-Secret-Key: $O2M_SECRET_KEY"

This endpoint takes no parameters and is not paged.

Response

200 with warehouses, the Default warehouse first.

Response
{
  "warehouses": [
    {
      "id": "1",
      "code": "DEFAULT",
      "name": "Default warehouse",
      "kind": "own",
      "status": "active",
      "is_default": true,
      "fulfilment_mode": "external",
      "pincode": null
    },
    {
      "id": "2",
      "code": "BLR",
      "name": "Bengaluru",
      "kind": "own",
      "status": "active",
      "is_default": false,
      "fulfilment_mode": "external",
      "pincode": "560100"
    }
  ]
}
FieldTypeDescription
idstringUse it as warehouse_id.
codestringYour short code for the warehouse. Use it as warehouse_code.
namestringThe warehouse's name.
kindstringThe type of warehouse. See Status values.
statusstringactive or inactive.
is_defaultbooleanWhether this is the Default warehouse.
fulfilment_modestringo2m_wms when run with O2M Warehouse Management, otherwise external.
pincodestring or nullThe warehouse's PIN code.

Errors

This endpoint has no errors of its own.

Every endpoint can also return the common errors: a missing or invalid key, a missing permission, the rate limit, or a temporary failure.