Get locations

Search and filter stores, zones, tills, and concepts in your org by type, code, name, or external ID.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Get locations

Search and retrieve stores, zones, tills, and concepts in your org. Filter by type, entity code, name, code, or external ID. Results are paginated and sorted by last update time by default.

Example request

curl -X GET "https://{host}/v2/locations?type=STORE&limit=1" \
  -H "Authorization: Basic {base64-encoded-credentials}" \
  -H "X-CAP-API-AUTH-ORG-ID: {orgId}"

Prerequisites

  • Authenticate using Basic authentication (Base64-encoded username:password).

Resource information

Pagination supportYes
Batch supportNo

Query parameters

FieldTypeRequiredDescription
typestringOptionalFilter by location type. Must be one of: STORE, ZONE, TILL, CONCEPT. Case-insensitive. Omit to return all types.
entityCodesstringOptionalComma-separated list of entity codes to filter by. Maximum 30 codes.
qstringOptionalPrefix filter in field:value format. Valid fields: name, code, external_id. Comma-separate multiple filters (for example, name:North,code:store). When multiple filters are provided, results match any one of them (OR logic). Each field may appear at most once.
isActivebooleanOptionalFilter by active status. true returns active locations only; false returns inactive locations only. Omit to return both.
isAdminbooleanOptionalFilter by admin access. true returns locations with admin access only; false returns locations with general access only. Omit to return all.
isOrgUnitbooleanOptionalFilter by org unit status. Works with any type; most relevant for type=CONCEPT.
limitintegerOptionalNumber of results per page. Between 1 and 100. Defaults to 20.
offsetintegerOptionalNumber of results to skip. Must be non-negative. Defaults to 0.
sortBystringOptionalField to sort results by. Must be one of: entityCode, name, lastUpdated. Defaults to lastUpdated.
sortOrderstringOptionalSort direction. Must be one of: ASC, DESC. Defaults to DESC.
includeCustomFieldsbooleanOptionalWhen true, includes custom field values for each location in the response. Defaults to false.
includeChildrenbooleanConditionalWhen true, returns child locations under hierarchy.children. Requires entityCodes to contain exactly one code.
childrenLimitintegerConditionalNumber of child results per page. Between 1 and 100. Defaults to 10. Only applies when includeChildren=true.
childrenOffsetintegerConditionalNumber of child results to skip. Must be non-negative. Defaults to 0. Only applies when includeChildren=true.

Example response

{
  "limit": 1,
  "offset": 0,
  "total": 10,
  "data": [
    {
      "id": 76100001,
      "type": "STORE",
      "code": "store-north-01",
      "externalIds": {
        "erpId": "ERP-STORE-001"
      },
      "name": "North Flagship Store",
      "description": "Main flagship store in the north region",
      "isActive": true,
      "isDefault": false,
      "isAdmin": false,
      "isOuEnabled": false,
      "createdBy": 76100002,
      "createdOn": "2026-06-30T08:54:23Z",
      "lastUpdatedOn": "2026-06-30T13:31:08Z",
      "lastUpdatedBy": 76100003,
      "timezoneId": 191,
      "languageId": 148,
      "currencyId": 23,
      "standardAttributes": {
        "currency": "INR",
        "language": "en-IN",
        "latitude": "28.6139",
        "longitude": "77.2090",
        "timezone": "Asia/Kolkata"
      },
      "hierarchy": {
        "areaParent": {
          "id": 76100010,
          "type": "ZONE",
          "name": "North Zone",
          "code": "north-zone",
          "externalIds": {
            "erpId": "ERP-ZONE-NORTH"
          }
        },
        "groupParent": {
          "id": 76100020,
          "type": "CONCEPT",
          "name": "Flagship Concept",
          "code": "flagship",
          "isOrgUnit": false
        }
      },
      "email": "[email protected]",
      "mobile": "9876543210",
      "landline": "01123456789"
    }
  ]
}
{
  "limit": 1,
  "offset": 0,
  "total": 10,
  "data": [
    {
      "id": 76100001,
      "type": "STORE",
      "code": "store-north-01",
      "externalIds": {
        "erpId": "ERP-STORE-001"
      },
      "name": "North Flagship Store",
      "description": "Main flagship store in the north region",
      "isActive": true,
      "isDefault": false,
      "isAdmin": false,
      "isOuEnabled": false,
      "createdBy": 76100002,
      "createdOn": "2026-06-30T08:54:23Z",
      "lastUpdatedOn": "2026-06-30T13:31:08Z",
      "lastUpdatedBy": 76100003,
      "timezoneId": 191,
      "languageId": 148,
      "currencyId": 23,
      "customFields": {
        "StoreCF": "flagship",
        "age": "5"
      },
      "standardAttributes": {
        "currency": "INR",
        "language": "en-IN",
        "latitude": "28.6139",
        "longitude": "77.2090",
        "timezone": "Asia/Kolkata"
      },
      "hierarchy": {
        "areaParent": {
          "id": 76100010,
          "type": "ZONE",
          "name": "North Zone",
          "code": "north-zone",
          "externalIds": {
            "erpId": "ERP-ZONE-NORTH"
          }
        },
        "groupParent": {
          "id": 76100020,
          "type": "CONCEPT",
          "name": "Flagship Concept",
          "code": "flagship",
          "isOrgUnit": false
        }
      },
      "email": "[email protected]",
      "mobile": "9876543210",
      "landline": "01123456789"
    }
  ]
}

Response parameters

FieldTypeDescription
limitintegerPage size used for this response.
offsetintegerPagination offset used for this response.
totalintegerTotal number of matching locations.
dataarrayList of location objects.
.idintegerSystem-assigned ID of the location.
.typestringType of the location. Possible values: STORE, ZONE, TILL, CONCEPT.
.codestringUnique code identifying the location within the org.
.namestringDisplay name of the location.
.descriptionstringFree-text description. Returns an empty string when set to empty.
.isActivebooleanWhether the location is active.
.isDefaultbooleanWhether this is the default location for the org.
.isAdminbooleanWhether the location has admin access.
.isOuEnabledbooleanWhether the location is configured as an org unit.
.externalIdsobjectKey-value map of external identifiers (for example, {"erpId": "ERP-001"}). Absent when no external identifiers are assigned.
.createdByintegerUser ID of the user who created this location. Absent when not available.
.createdOnstringCreation timestamp in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ), in UTC. Absent when not available.
.lastUpdatedOnstringLast-update timestamp in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ), in UTC.
.lastUpdatedByintegerUser ID of the last updater. Absent when not available.
.timezoneIdintegerSystem ID of the location's timezone.
.languageIdintegerSystem ID of the location's language.
.currencyIdintegerSystem ID of the location's currency.
.customFieldsobjectKey-value map of custom field values for this location. Present only when includeCustomFields=true.
.standardAttributesobjectObject containing standard attribute values for the location.
..currencystringISO 4217 currency code (for example, INR). Absent when the location's currency is not configured.
..languagestringIETF BCP 47 language tag (for example, en-IN). Absent when the location's language is not configured.
..timezonestringTimezone name (for example, Asia/Kolkata). Absent when the location's timezone is not configured.
..latitudestringLatitude coordinate. Present for stores only. Returns an empty string when coordinates are not configured.
..longitudestringLongitude coordinate. Present for stores only. Returns an empty string when coordinates are not configured.
.hierarchyobjectObject containing hierarchy relationships for this location. Structure varies by location type.
..areaParentobjectObject containing the area parent. Present for stores and zones.
..groupParentobjectObject containing the group parent (concept). Present for stores and concepts.
..parentobjectObject containing the direct parent store. Present for tills only.
..childrenarrayList of child location objects. Present when includeChildren=true with a single entity code.
..totalChildCountintegerTotal count of child entities. Present when includeChildren=true.
...idintegerSystem-assigned ID of the related location.
...typestringType of the related location. Possible values: STORE, ZONE, TILL, CONCEPT.
...namestringDisplay name of the related location.
...codestringCode of the related location.
...externalIdsobjectKey-value map of external identifiers for the related location. Absent when none are assigned.
...isOrgUnitbooleanWhether the related location is an org unit. Present for concept hierarchy entries only.
.emailstringEmail address of the store. Present for stores only. Returns an empty string when not configured.
.mobilestringMobile number of the store. Present for stores only. Returns an empty string when not configured.
.landlinestringLandline number of the store. Present for stores only. Returns an empty string when not configured.

Error and warning codes

CodeError numberTypeDescription
PARAM_TYPE_IS_NOT_VALID1217Errortype is not one of STORE, ZONE, TILL, CONCEPT. HTTP 400.
INVALID_LOCATIONS_Q_FORMAT1236Errorq is not in field:value format, contains an invalid field name, has an empty value, or repeats a field. Valid fields: name, code, external_id. HTTP 400.
ENTITY_CODES_MAX_30_EXCEEDED1237ErrorentityCodes contains more than 30 codes. HTTP 400.
INVALID_LOCATIONS_SORT_BY1238ErrorsortBy is not one of entityCode, name, lastUpdated. HTTP 400.
INVALID_LOCATIONS_SORT_ORDER1239ErrorsortOrder is not ASC or DESC. HTTP 400.
LOCATIONS_LIMIT_OUT_OF_RANGE1240Errorlimit is not between 1 and 100. HTTP 400.
LOCATIONS_OFFSET_NEGATIVE1241Erroroffset is negative. HTTP 400.
LOCATIONS_CHILDREN_LIMIT_OUT_OF_RANGE1242ErrorchildrenLimit is not between 1 and 100. HTTP 400.
LOCATIONS_CHILDREN_OFFSET_NEGATIVE1243ErrorchildrenOffset is negative. HTTP 400.
INCLUDE_CHILDREN_REQUIRES_SINGLE_ENTITY_CODE1244ErrorincludeChildren=true requires entityCodes to contain exactly one code. HTTP 400.
Query Params
string
enum

Filter by location type. Case-insensitive. Omit to return all types.

Allowed:
string

Comma-separated list of entity codes. Maximum 30 codes.

string

Prefix filter in field:value format. Valid fields: name, code, external_id. Values are case-sensitive. Comma-separate multiple filters.

boolean

Filter by active status. Omit to return both active and inactive.

boolean

Filter by admin access. Omit to return all.

boolean

Filter concepts by org unit status. Only applies when type=CONCEPT.

integer
1 to 100
Defaults to 20

Number of results per page. Between 1 and 100. Defaults to 20.

integer
≥ 0
Defaults to 0

Number of results to skip. Must be non-negative. Defaults to 0.

string
enum
Defaults to lastUpdated

Field to sort results by. Defaults to lastUpdated.

Allowed:
string
enum
Defaults to DESC

Sort direction. Defaults to DESC.

Allowed:
boolean
Defaults to false

When true, includes custom field values in the response.

boolean

When true, returns child locations in hierarchy.children. Requires entityCodes to contain exactly one code.

integer
1 to 100
Defaults to 10

Number of child results per page. Between 1 and 100. Defaults to 10. Only applies when includeChildren=true.

integer
≥ 0
Defaults to 0

Number of child results to skip. Must be non-negative. Defaults to 0. Only applies when includeChildren=true.

Responses

Language
Credentials
Basic
base64
:
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json