saveCurrentGeolocationSessionContext
put
/ccstore/v1/audienceContext/currentSession/geolocation/current
Save the current geolocation session context data for the current user.
Request
Supported Media Types
- application/json
Root Schema : saveCurrentGeolocationSessionContext_request
Type:
Show Source
object
-
city(optional):
string
The city for the current session.
-
country_code(optional):
string
The country code for the current session.
-
latitude(optional):
number
The latitude for the current session.
-
longitude(optional):
number
The longitude for the current session.
-
region_code(optional):
string
The region code for the current session.
-
timezone(optional):
string
The timezone for the current session. This can be either an offset or a timezone code.
Example:
{
"country_code":"US",
"city":"DENVER",
"timezone":"America/Denver",
"latitude":39.7,
"region_code":"CO",
"longitude":105
}
Response
Supported Media Types
- application/json
200 Response
The following model is returned the when operation succeeds and indicates that the session context was updated.
Root Schema : saveCurrentGeolocationSessionContext_response
Type:
Show Source
object
-
city(optional):
string
The city for the current session.
-
cityInList(optional):
boolean
Boolean value that indicates if the city is in the list of known/supported cities. This could be false due to a spelling error or if the formatting does not match the supported standard.
-
country_code(optional):
string
The country code for the current session.
-
latitude(optional):
number
The latitude for the current session.
-
longitude(optional):
number
The longitude for the current session.
-
region_code(optional):
string
The region code for the current session.
-
timezone(optional):
string
The timezone for the current session. This can be either an offset or a timezone code.
Example:
{
"country_code":"US",
"city":"DENVER",
"timezone":"(GMT-07:00)",
"latitude":"39.7",
"cityInList":"true",
"links":[
{
"rel":"self",
"href":"http://localhost:8080/ccstoreui/v1/audienceContext/currentSession/geolocation/current"
}
],
"region_code":"CO",
"longitude":"105"
}
201 Response
The following model is returned the when operation succeeds and indicates that the session data was created.
Root Schema : saveCurrentGeolocationSessionContext_response
Type:
Show Source
object
-
city(optional):
string
The city for the current session.
-
cityInList(optional):
boolean
Boolean value that indicates if the city is in the list of known/supported cities. This could be false due to a spelling error or if the formatting does not match the supported standard.
-
country_code(optional):
string
The country code for the current session.
-
latitude(optional):
number
The latitude for the current session.
-
longitude(optional):
number
The longitude for the current session.
-
region_code(optional):
string
The region code for the current session.
-
timezone(optional):
string
The timezone for the current session. This can be either an offset or a timezone code.
Example:
{
"country_code":"US",
"city":"DENVER",
"timezone":"(GMT-07:00)",
"latitude":"39.7",
"cityInList":"true",
"links":[
{
"rel":"self",
"href":"http://localhost:8080/ccstoreui/v1/audienceContext/currentSession/geolocation/current"
}
],
"region_code":"CO",
"longitude":"105"
}
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|
|------------------|------------------|
|54107|Geolocation data contains an invalid country code: {0}|
|54108|Geolocation data must contain a country code if a region code is specified.|
|54109|Geolocation data contains an invalid region and/or country code: {0}|
|54110|Geolocation data must contain a country code if city is specified.|
|54111|Geolocation data contains a city that exceeds the maximum allowable length of {0} characters.|
|54112|Geolocation data contains an invalid latitude. The value must be a number between -90 and 90.|
|54113|Geolocation data contains an invalid longitude. The value must be a number between -180 and 180.|
|54114|Geolocation data contains an unsupported time zone value: {0}|
|54115|An error occurred while trying to validate the geolocation time zone.|
|54116|An error occurred while trying to cache the geolocation data. The cache was not found.|
|54117|An internal error occurred while trying to validate geolocation data.|
|54144|The required header is missing: X-CCVisitId|
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