getLocation
get
/ccagent/v1/locations/{id}
Get Location. Retrieves the location details for a given location id.
Request
Supported Media Types
- application/json
Path Parameters
-
id: string
The ID of the requested location.
Query Parameters
-
type(optional): string
The type of location, for example: store.
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : getLocation_response
Type:
Show Source
object
-
address1(optional):
string
The first line in the address of the location.
-
address2(optional):
string
The second line in the address of the location.
-
address3(optional):
string
The third line in the address of the location.
-
city(optional):
string
The city of the location.
-
country(optional):
string
The country of the location.
-
county(optional):
string
The county of the location.
-
distance(optional):
string
The distance parameter.
-
email(optional):
string
The email id parameter.
-
externalLocationId(optional):
string
The merchant store id.
-
faxNumber(optional):
string
The fax number of the location.
-
hours(optional):
string
The store opening hours, for a store item descriptor.
-
inventory(optional):
boolean
Indicates that location has it's own inventory.
-
latitude(optional):
string
The slatitude of the location.
-
longitude(optional):
string
The longitude of the location.
-
name(optional):
string
The name of the location.
-
phoneNumber(optional):
string
The phone number of the location.
-
pickUp(optional):
boolean
Indicates that the location allows customers to collect their items.
-
postalCode(optional):
string
The postal code of the location.
-
repositoryId(optional):
string
The id of the location repository item.
-
siteGroups(optional):
array siteGroups
List of site groups.
-
sites(optional):
array sites
List of sites.
-
stateAddress(optional):
string
The state address of the location.
-
type(optional):
string
Representation of the location type (location or store).
Nested Schema : items
Type:
Show Source
object
-
id(optional):
string
The site group id.
-
sites(optional):
array sites
List of sites.
Nested Schema : items
Type:
Show Source
object
-
id(optional):
string
The site id.
-
repositoryId(optional):
string
The site repositoryId.
Example Response (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,
"pickUp":false,
"sites":[
],
"inventory":false,
"type":"store",
"externalLocationId":"187",
"phoneNumber":"(617) 386-1200",
"locationId":"GlenAllen187",
"name":"Glen Allen #187",
"repositoryId":"GlenAllen187",
"faxNumber":"(617) 386-1200",
"links":[
{
"rel":"self",
"href":"https://www.example.com/ccagent/v1/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.|
Root Schema : errorModel
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
errors(optional):
array errors
An optional list of errors if multiple errors were encountered
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code
-
type(optional):
string
The URI to the HTTP state code definition
Nested Schema : errors
Type:
array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code