getLocation
get
/ccstore/v1/locations/{id}
Get Location. Retrieves the location details for a given location id.
Request
Supported Media Types
- application/json
Path Parameters
- id
-
Type:
string
Required:true
The ID of the requested location.
Query Parameters
- type
-
Type:
string
The type of location, for example: store.
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : getLocation_response
- address1
-
Type:
string
The first line in the address of the location. - address2
-
Type:
string
The second line in the address of the location. - address3
-
Type:
string
The third line in the address of the location. - city
-
Type:
string
The city of the location. - country
-
Type:
string
The country of the location. - county
-
Type:
string
The county of the location. - distance
-
Type:
string
The distance parameter. -
Type:
string
The email id parameter. - externalLocationId
-
Type:
string
The merchant store id. - faxNumber
-
Type:
string
The fax number of the location. - hours
-
Type:
string
The store opening hours, for a store item descriptor. - latitude
-
Type:
string
The slatitude of the location. - longitude
-
Type:
string
The longitude of the location. - name
-
Type:
string
The name of the location. - phoneNumber
-
Type:
string
The phone number of the location. - postalCode
-
Type:
string
The postal code of the location. - repositoryId
-
Type:
string
The id of the location repository item. - siteGroups
-
Type:
array
siteGroupsAdditional Properties Allowed:List of site groups. - sites
-
Type:
array
sitesAdditional Properties Allowed:List of sites. - stateAddress
-
Type:
string
The state address of the location. - type
-
Type:
string
Representation of the location type (location or store).
Nested Schema : siteGroups
Nested Schema : sites
Nested Schema : items
Type:
object
- id
-
Type:
string
The site group id. - sites
-
Type:
array
sitesAdditional Properties Allowed:List of sites.
Nested Schema : sites
Nested Schema : items
Type:
object
- id
-
Type:
string
The site id.
Nested Schema : items
Type:
object
- id
-
Type:
string
The site id.
Example application/json
{
"country":"USA",
"address3":null,
"distance":null,
"address2":"Suite 101",
"endDate":null,
"city":"Glen Allen",
"address1":"4870 Sadler Rd.",
"postalCode":"23060",
"latitude":37.6659833,
"stateAddress":"VA",
"county":null,
"sites":[
],
"type":"store",
"externalLocationId":"187",
"phoneNumber":"(617) 386-1200",
"siteGroups":[
],
"locationId":"GlenAllen187",
"name":"Glen Allen #187",
"repositoryId":"GlenAllen187",
"faxNumber":"(617) 386-1200",
"links":[
{
"rel":"self",
"href":"/locations/GlenAllen187"
}
],
"email":"store187@example.com",
"longitude":-77.5063697
}
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.|
|51004|No location details found matching the given location id input.|
Body
Root Schema : errorModel
Type:
object
- devMessage
-
Type:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - errors
-
Type:
array
errorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The HTTP status code - type
-
Type:
string
The URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object
- devMessage
-
Type:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The HTTP status code
Examples
Sample Response Payload returned by endpoint:
{ "country": "USA", "address3": null, "distance": null, "address2": "Suite 101", "endDate": null, "city": "Glen Allen", "address1": "4870 Sadler Rd.", "postalCode": "23060", "latitude": 37.6659833, "stateAddress": "VA", "county": null, "sites": [], "type": "store", "externalLocationId": "187", "phoneNumber": "(617) 386-1200", "siteGroups": [], "locationId": "GlenAllen187", "name": "Glen Allen #187", "repositoryId": "GlenAllen187", "faxNumber": "(617) 386-1200", "links": [{ "rel": "self", "href": "/locations/GlenAllen187" }], "email": "store187@example.com", "longitude": -77.5063697 }