getLocation
get
/ccadmin/v1/locations/{id}
Get Location. Retrieves the location details for a given location ID.
Request
Supported Media Types
- application/json
Path Parameters
- id
-
Type:
stringRequired:trueThe ID of the requested location.
Query Parameters
- type
-
Type:
stringThe type of location, either 'location' (default) or 'store'.
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : getLocation_response
- address1
-
Type:
stringThe first line in the address of the location. - address2
-
Type:
stringThe second line in the address of the location. - address3
-
Type:
stringThe third line in the address 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:
stringThe distance parameter. -
Type:
stringThe email id parameter. - externalLocationId
-
Type:
stringThe merchant store id. - faxNumber
-
Type:
stringThe fax number of the location. - hours
-
Type:
stringThe store opening hours, for a store item descriptor. - latitude
-
Type:
stringThe slatitude of the location. - longitude
-
Type:
stringThe 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. - sites
-
Type:
arraysitesAdditional Properties Allowed:List of sites. - stateAddress
-
Type:
stringThe state address of the location. - type
-
Type:
stringRepresentation of the location type (location or store).
Nested Schema : siteGroups
Nested Schema : sites
Nested Schema : items
Type:
object- id
-
Type:
stringThe site group id. - sites
-
Type:
arraysitesAdditional Properties Allowed:List of sites.
Nested Schema : sites
Nested Schema : items
Type:
object- id
-
Type:
stringThe site id.
Nested Schema : items
Type:
object- id
-
Type:
stringThe site id.
Example application/json
{
"country":"USA",
"distance":null,
"endDate":"2017-04-25T00:00:00.000Z",
"city":"Glen Allen",
"latitude":37.6659833,
"postalCode":"23060",
"county":"Henrico",
"stateAddress":"VA",
"sites":[
{
"repositoryId":"siteUS"
},
{
"repositoryId":"siteCA"
}
],
"type":"store",
"locationId":"CRSHome-GlenAllen187",
"links":[
{
"rel":"self",
"href":"https://www.example.com/ccadminui/v1/locations/CRSHome-GlenAllen187"
}
],
"email":"store187@example.com",
"longitude":-77.5063697,
"hours":"9:00am - 5:00pm",
"address3":null,
"address2":"Suite 101",
"address1":"4870 Sadler Rd.",
"externalLocationId":"187",
"phoneNumber":"(617) 386-1200",
"siteGroups":[
{
"repositoryId":"siteGroup1"
},
{
"repositoryId":"siteGroup2"
}
],
"repositoryId":"4000345",
"name":"CRS Home - Glen Allen #187",
"faxNumber":"(617) 386-1200",
"startDate":"2016-04-25T00:00:00.000Z"
}
Default Response
The error response.
The following are the internal error codes thrown by this API when the request processing fails in Oracle Commerce Cloud:
|Error Code|Description|
|------------------|------------------|
|51003|The location id input is invalid.|
|51002|An internal error occurred while processing the request to get location details for the given location ID.|
|51005|Invalid location type.|
|51004|No location details found matching the given location id input.|
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:
{
"country": "USA",
"distance": null,
"endDate": "2017-04-25T00:00:00.000Z",
"city": "Glen Allen",
"latitude": 37.6659833,
"postalCode": "23060",
"county": "Henrico",
"stateAddress": "VA",
"sites": [
{"repositoryId": "siteUS"},
{"repositoryId": "siteCA"}
],
"type": "store",
"locationId": "CRSHome-GlenAllen187",
"links": [{
"rel": "self",
"href": "https://www.example.com/ccadminui/v1/locations/CRSHome-GlenAllen187"
}],
"email": "store187@example.com",
"longitude": -77.5063697,
"hours": "9:00am - 5:00pm",
"address3": null,
"address2": "Suite 101",
"address1": "4870 Sadler Rd.",
"externalLocationId": "187",
"phoneNumber": "(617) 386-1200",
"siteGroups": [
{"repositoryId": "siteGroup1"},
{"repositoryId": "siteGroup2"}
],
"repositoryId": "4000345",
"name": "CRS Home - Glen Allen #187",
"faxNumber": "(617) 386-1200",
"startDate": "2016-04-25T00:00:00.000Z"
}