Get Locations

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

Use this API to retrieve store location details from your organisation. You can fetch all stores, search by code, name, or external ID, or retrieve a specific store with its hierarchy information. The API supports pagination, sorting, and filtering.

You can use this API to:

  • Fetch all stores in the organisation.
  • Search stores by code, name, or external ID prefix.
  • Retrieve specific stores using store codes.
  • Filter stores by active status or admin type.
  • Retrieve hierarchy information including parent zones, concepts, and child locations.

The response includes store details, contact information, location coordinates, optional hierarchy data, and pagination details.

🚧

Filter precedence

When using multiple filters, entityCodes takes precedence over q filters. Multiple q filters are combined with OR logic.

Example request

curl --location 'https://crm-nightly-new.cc.capillarytech.com/v2/locations?q=name%3Akrishna%2C%20external_id%3Ashivam' \
--header 'Authorization: Basic a3Jpc2huYSYjk2NGIwNzE1MmQyMzRiNzA='
curl --location 'https://eu.api.capillarytech.com/v2/locations?type=STORE&entityCodes=store001,store002' \
--header 'Authorization: Basic YOUR_AUTH_TOKEN'
curl --location 'https://eu.api.capillarytech.com/v2/locations?type=STORE&q=name:MUM,code:STR' \
--header 'Authorization: Basic YOUR_AUTH_TOKEN'
curl --location 'https://eu.api.capillarytech.com/v2/locations?type=STORE&entityCodes=store001&includeChildren=true' \
--header 'Authorization: Basic YOUR_AUTH_TOKEN'

Prerequisites

  • Authentication: Basic or OAuth authentication
  • Access group resource: Read access to the Organization resource

Resource information

HTTP methodGET
PaginationYes

Query parameters

FieldTypeRequiredDescription
typestringOptionalLocation type. Currently supported: STORE. Other types (ZONE, TILL, CONCEPT) are planned for future releases. Defaults to STORE.
entityCodesstringOptional

Comma-separated store codes to retrieve specific stores. Maximum 30 codes. Takes precedence over q filters when provided.

Example: store001, store002

qstringOptional

Comma-separated field:value pairs for prefix search. Supported fields: name, code, external_id. Returns stores whose field value starts with the specified string. This parameter is ignored if entityCodes is provided.

Example: q=name:MUM,code:STR returns stores where name starts with "MUM" OR code starts with "STR".

isActivebooleanOptionalFilter by active status. true for active stores, false for inactive stores.
isAdminbooleanOptionalFilter by admin type. true for admin stores, false for non-admin stores.
isOrgUnitbooleanOptionalFilter by organization unit status. Only valid when type=CONCEPT.
limitintegerOptionalMaximum number of records to retrieve per page. Values: 1–100. Defaults to 20.
offsetintegerOptionalNumber of records to skip from the beginning of the response. Defaults to 0.
sortBystringOptionalAllows you to sort the response based on specific fields. Supported values: entityCode, name, lastUpdated. Defaults to lastUpdated.
sortOrderstringOptionalSort direction. Supported values: ASC, DESC. Defaults to DESC.
includeCFsbooleanOptionalInclude custom fields in the response. When true, the attributes object is populated in each store record.
includeChildrenbooleanOptionalInclude child locations in the hierarchy. Requires exactly one code in entityCodes.
childrenLimitintegerOptionalMaximum number of child records to retrieve per page. Values: 1–100. Defaults to 10.
childrenOffsetintegerOptionalNumber of child records to skip from the beginning of the response. Defaults to 0.

Example response

{
    "limit": 20,
    "offset": 0,
    "total": 1,
    "data": [
        {
            "id": 50019407,
            "type": "STORE",
            "code": "krishna.store01",
            "externalId": "shivam01",
            "name": "krishna store01",
            "description": "",
            "isActive": true,
            "isAdmin": false,
            "isOuEnabled": false,
            "lastUpdatedOn": "2025-11-07T18:11:41+05:30",
            "hierarchy": {
                "areaParent": {
                    "id": 50019405,
                    "type": "ZONE",
                    "name": "South",
                    "code": "south",
                    "externalId": "south"
                },
                "groupParent": {
                    "id": 50019397,
                    "type": "CONCEPT",
                    "name": "ROOT",
                    "code": "root",
                    "externalId": "root",
                    "isOrgUnit": false
                }
            },
            "email": "",
            "mobile": "",
            "landline": "",
            "latitude": "",
            "longitude": "",
            "externalId1": "",
            "externalId2": ""
        }
    ]
}
{
  "limit": 20,
  "offset": 0,
  "total": 1,
  "data": [
    {
      "id": 50770954,
      "type": "STORE",
      "code": "store001",
      "external_id": "EXT-001",
      "name": "Main Street Store",
      "description": "Downtown flagship store",
      "is_active": true,
      "is_admin": false,
      "is_ou_enabled": false,
      "last_updated_on": "2024-01-15T10:30:00Z",
      "email": "[email protected]",
      "mobile": "919686000000",
      "landline": "",
      "latitude": "12.9716",
      "longitude": "77.5946",
      "external_id_1": "ALT-EXT-001",
      "external_id_2": "",
      "parentZoneId": 75152646,
      "parentConceptId": 75216471,
      "hierarchy": {
        "area_parent": {
          "id": 75152647,
          "type": "ZONE",
          "display_type": "Area",
          "name": "South Zone",
          "code": "ZONE_SOUTH",
          "external_id": "EXT-ZONE-001"
        },
        "group_parent": {
          "id": 75216471,
          "type": "CONCEPT",
          "display_type": "Concept",
          "name": "Retail Concept",
          "code": "CONCEPT_RETAIL",
          "external_id": "EXT-CONCEPT-001"
        },
        "child_count": 0
      }
    }
  ],
  "pagination": {
    "limit": 20,
    "offset": 0,
    "total": 1
  }
}
{
  "limit": 20,
  "offset": 0,
  "total": 1,
  "data": [
    {
      "id": 50770954,
      "type": "STORE",
      "code": "store001",
      "external_id": "EXT-001",
      "name": "Main Street Store",
      "description": "Downtown flagship store",
      "is_active": true,
      "is_admin": false,
      "is_ou_enabled": false,
      "last_updated_on": "2024-01-15T10:30:00Z",
      "email": "[email protected]",
      "mobile": "919686000000",
      "landline": "",
      "latitude": "12.9716",
      "longitude": "77.5946",
      "external_id_1": "ALT-EXT-001",
      "external_id_2": "",
      "parentZoneId": 75152646,
      "parentConceptId": 75216471,
      "attributes": {
        "store_region": "South",
        "store_size": "Large"
      }
    }
  ],
  "pagination": {
    "limit": 20,
    "offset": 0,
    "total": 1
  }
}

Response parameters

ParameterTypeDescription
limitintegerRecords returned per page.
offsetintegerStarting position of returned records.
totalintegerTotal locations matching the criteria.
dataarrayArray of location objects matching the request criteria.
. idintegerUnique identifier for the location.
. typestringLocation type (STORE).
. codestringUnique store code.
. external_idstringPrimary external identifier.
. namestringStore name.
. descriptionstringStore description.
. is_activebooleanWhether the store is active.
. is_adminbooleanWhether this is an admin store.
. is_ou_enabledbooleanWhether organization unit is enabled.
. last_updated_onstringISO 8601 timestamp of last update.
. emailstringStore email address.
. mobilestringStore mobile number.
. landlinestringStore landline number.
. latitudestringLatitude coordinate.
. longitudestringLongitude coordinate.
. external_id_1stringAdditional external identifier.
. external_id_2stringAdditional external identifier.
. parentZoneIdintegerParent zone ID.
. parentConceptIdintegerParent concept ID.
. attributesobjectCustom fields as key-value pairs. Returned when includeCFs=true.
. hierarchyobjectHierarchy information. Returned when includeChildren=true.
. . area_parentobjectParent area/zone information.
. . . idintegerUnique identifier for the parent zone.
. . . typestringEntity type (ZONE).
. . . display_typestringDisplay name for the entity type.
. . . namestringName of the parent zone.
. . . codestringUnique code of the parent zone.
. . . external_idstringExternal identifier of the parent zone.
. . group_parentobjectParent concept/group information.
. . . idintegerUnique identifier for the parent concept.
. . . typestringEntity type (CONCEPT).
. . . display_typestringDisplay name for the entity type.
. . . namestringName of the parent concept.
. . . codestringUnique code of the parent concept.
. . . external_idstringExternal identifier of the parent concept.
. . childrenarrayChild locations. Returned when includeChildren=true.
. . . idintegerUnique identifier for the child location.
. . . typestringEntity type (STORE, ZONE, CONCEPT).
. . . display_typestringDisplay name for the entity type.
. . . namestringName of the child location.
. . . codestringUnique code of the child location.
. . . external_idstringExternal identifier of the child location.
. . . isOrgUnitbooleanWhether this is an organization unit.
. . child_countintegerTotal child location count.

Error and warning codes

CodeTypeDescription
INVALID_LOCATIONS_Q_FORMATErrorInvalid q format. Use field:value pairs separated by commas.
ENTITY_CODES_MAX_30_EXCEEDEDErrorentityCodes contains more than 30 codes.
INVALID_LOCATIONS_SORT_BYErrorInvalid sortBy. Use entityCode, name, or lastUpdated.
INVALID_LOCATIONS_SORT_ORDERErrorInvalid sortOrder. Use ASC or DESC.
LOCATIONS_LIMIT_OUT_OF_RANGEErrorlimit must be between 1 and 100.
LOCATIONS_OFFSET_NEGATIVEErroroffset cannot be negative.
LOCATIONS_CHILDREN_LIMIT_OUT_OF_RANGEErrorchildrenLimit must be between 1 and 100.
LOCATIONS_CHILDREN_OFFSET_NEGATIVEErrorchildrenOffset cannot be negative.
INCLUDE_CHILDREN_REQUIRES_SINGLE_ENTITY_CODEWarningincludeChildren requires exactly one code in entityCodes.
Headers
string
required
Response
200

Successful response

Language
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here!