listLocations

get

/ccadmin/v1/locations

List Locations. Retrieves and lists all the available locations using the given query options for paging and sorting.

Request

Supported Media Types
  • application/json
Query Parameters
limit
Type: integer
The number of location items to return. The default is 10.
offset
Type: integer
Index of the first location item to return. The default is 0.
sort
Type: string
The location items sorting criteria. Following are the fields supported by this param: |Field|Type|Description| |------------------|------------------|------------------| |property|string|The property by which to sort the list of location items. The default is locationId.| |order|string|The sort order, either 'asc' (ascending) or 'desc' (decending). The default is 'asc'.|

Response

Supported Media Types
  • application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : listLocations_response
Nested Schema : items
Type: array
The list of location items.
Nested Schema : sort
Type: array
The location items sorting criteria.
Nested Schema : items
Type: object
Nested Schema : siteGroups
Type: array
List of site groups. A location can be constrained to a list of site groups. If no site group is defined, the location is available on all sites.
Nested Schema : sites
Type: array
List of sites. A location can be constrained to a list of sites. If no site is defined, the location is available on all sites.
Nested Schema : items
Type: object
Nested Schema : items
Type: object
Nested Schema : items
Type: object
Example application/json

{
    "total":1,
    "totalResults":1,
    "offset":0,
    "limit":1,
    "links":[
        {
            "rel":"self",
            "href":"https://www.example.com/ccadminui/v1/locations"
        }
    ],
    "sort":[
        {
            "property":"locationId",
            "order":"asc"
        }
    ],
    "items":[
        {
            "country":"USA",
            "hours":"9:00am - 5:00pm",
            "distance":null,
            "address3":null,
            "endDate":"2017-04-25T00:00:00.000Z",
            "address2":"Suite 101",
            "city":"Glen Allen",
            "address1":"4870 Sadler Rd.",
            "latitude":37.6659833,
            "postalCode":"23060",
            "county":"Henrico",
            "stateAddress":"VA",
            "sites":[
                {
                    "id":"siteUS"
                },
                {
                    "id":"siteCA"
                }
            ],
            "type":"store",
            "externalLocationId":"187",
            "phoneNumber":"(617) 386-1200",
            "siteGroups":[
                {
                    "id":"siteGroup1"
                },
                {
                    "id":"siteGroup2"
                }
            ],
            "locationId":"CRSHome-GlenAllen187",
            "repositoryId":"4000345",
            "name":"CRS Home - Glen Allen #187",
            "faxNumber":"(617) 386-1200",
            "startDate":"2016-04-25T00:00:00.000Z",
            "email":"store187@example.com",
            "longitude":-77.5063697
        }
    ]
}
Default Response
The error response
Body
Root Schema : errorModel
Type: object
Nested Schema : errors
Type: array
An optional list of errors if multiple errors were encountered
Nested Schema : items
Type: object

Examples

Sample Response Payload returned by endpoint:

{
  "total": 1,
  "totalResults": 1,
  "offset": 0,
  "limit": 1,
  "links": [{
    "rel": "self",
    "href": "https://www.example.com/ccadminui/v1/locations"
  }],
  "sort": [{
    "property": "locationId",
    "order": "asc"
  }],
  "items": [{
    "country": "USA",
    "hours": "9:00am - 5:00pm",
    "distance": null,
    "address3": null,
    "endDate": "2017-04-25T00:00:00.000Z",
    "address2": "Suite 101",
    "city": "Glen Allen",
    "address1": "4870 Sadler Rd.",
    "latitude": 37.6659833,
    "postalCode": "23060",
    "county": "Henrico",
    "stateAddress": "VA",
    "sites": [
      {"id": "siteUS"},
      {"id": "siteCA"}
    ],
    "type": "store",
    "externalLocationId": "187",
    "phoneNumber": "(617) 386-1200",
    "siteGroups": [
      {"id": "siteGroup1"},
      {"id": "siteGroup2"}
    ],
    "locationId": "CRSHome-GlenAllen187",
    "repositoryId": "4000345",
    "name": "CRS Home - Glen Allen #187",
    "faxNumber": "(617) 386-1200",
    "startDate": "2016-04-25T00:00:00.000Z",
    "email": "store187@example.com",
    "longitude": -77.5063697
  }]
}