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:
integerThe number of location items to return. The default is 10.- offset
Type:integerIndex of the first location item to return. The default is 0.- sort
Type:stringThe 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
- items
-
Type:
arrayitemsAdditional Properties Allowed:The list of location items. - limit
-
Type:
integerThe number of location items to return. - offset
-
Type:
integerIndex of the first location item to return. - sort
-
Type:
arraysortAdditional Properties Allowed:The location items sorting criteria. - total
-
Type:
integerThe total number of location items. Deprecated. - totalResults
-
Type:
integerThe total number of location items.
Nested Schema : items
Nested Schema : sort
Nested Schema : items
Type:
object- address1
-
Type:
stringThe first address field of the location. - address2
-
Type:
stringThe second address field of the location. - address3
-
Type:
stringThe third address field of the location. - city
-
Type:
stringThe city of the location. - country
-
Type:
stringThe country of the location. - county
-
Type:
stringThe county of the location. - distance
-
Type:
numberA session-scoped property that contains the distance when searching for location items. Not applicable. -
Type:
stringThe email address of the location. - endDate
-
Type:
stringThe end date for the location. This is used when performing a search for inventory available from a store during a specific date range. If the search contains a specific date range, only locations that have a date that are contained within that date range will be displayed. - externalLocationId
-
Type:
stringAn optional additional location ID, such as the merchant store ID. Use this if you have extra parameters for identifying your stores or locations. - faxNumber
-
Type:
stringThe fax number of the location. - hours
-
Type:
stringThe store opening hours. Only applicable to location type 'store'. - latitude
-
Type:
numberThe latitude of the location. - locationId
-
Type:
stringThe ID of the location. This ID will be generated if none is provided. - longitude
-
Type:
numberThe longitude of the location. - name
-
Type:
stringThe name of the location. - phoneNumber
-
Type:
stringThe phone number of the location. - postalCode
-
Type:
stringThe postal code of the location. - repositoryId
-
Type:
stringThe ID of the location repository item. - siteGroups
-
Type:
arraysiteGroupsAdditional Properties Allowed: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. - sites
-
Type:
arraysitesAdditional Properties Allowed: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. - startDate
-
Type:
stringThe start date for the location. This is used when performing a search for inventory available from a store during a specific date range. If the search contains a specific date range, only locations that have a date that are contained within that date range will be displayed. - stateAddress
-
Type:
stringThe state of the location. - type
-
Type:
stringThe type of location, either 'location' or 'store'.
Nested Schema : siteGroups
Nested Schema : sites
Nested Schema : items
Type:
object- id
-
Type:
stringThe site group ID associated with this location.
Nested Schema : items
Type:
object- id
-
Type:
stringThe site ID associated with this location.
Nested Schema : items
Type:
object- order
-
Type:
stringSort order: asc or desc. - property
-
Type:
stringThe property by which to sort the list of location items. The default is locationId.
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- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - errors
-
Type:
arrayerrorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code - type
-
Type:
stringThe URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code
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
}]
}