Own session management
Retrieves a session context associated with the sessionId derived from the Authorization token used in the call. Recommended for performing calls on the storefront.
Your Emporix tenant's name.
Note: The tenant name should always be provided in lowercase.
^[a-z][a-z0-9]+$The request was successful. Session context details are returned.
{"Session context":{"sessionId":"62528895-b561-4518-bfdc-2cbf52a07845","customerId":"C87362407845","siteCode":"main","currency":"EUR","targetLocation":"DE","cartId":"61079711ce0eb90861357045","context":{"property1":{"property3":"propertyValue"},"property2":{"property3":"propertyValue"}},"metadata":{"version":1,"createdAt":"2022-09-20T12:33:52.456Z","modifiedAt":"2022-09-20T12:33:52.456Z"}}}A session context with the provided ID was not found.
A server-side error occurred.
GET /session-context/{tenant}/me/context HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
  "sessionId": "62528895-b561-4518-bfdc-2cbf52a07845",
  "customerId": "C87362407845",
  "siteCode": "main",
  "currency": "EUR",
  "targetLocation": "DE",
  "cartId": "61079711ce0eb90861357045",
  "context": {
    "property1": {
      "property3": "propertyValue"
    },
    "property2": {
      "property3": "propertyValue"
    }
  },
  "metadata": {
    "version": 1,
    "createdAt": "2022-09-20T12:33:52.456Z",
    "modifiedAt": "2022-09-20T12:33:52.456Z"
  }
}Partially updates a session context associated with the sessionId derived from the Authorization token used in the call. Recommended for performing calls on the storefront.
Note: To update a session context, you need to provide its current metadata.version value in the request body.
Note: Only specific fields can be updated this way, and the rest is ignored. The fields allowed to be updated: siteCode, currency, targetLocation, context.
Your Emporix tenant's name.
Note: The tenant name should always be provided in lowercase.
^[a-z][a-z0-9]+${"Update of a session context":{"sessionId":"62528895-b561-4518-bfdc-2cbf52a07845","customerId":"C87362407845","siteCode":"main","currency":"EUR","cartId":"512950192-b561-4518-bfdc-2cbf52a07845","targetLocation":"DE","metadata":{"version":1}}}The request was successful. The session context has been updated.
No content
A session context with the provided ID was not found.
A server-side error occurred.
PATCH /session-context/{tenant}/me/context HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 83
{
  "siteCode": "main",
  "currency": "EUR",
  "targetLocation": "DE",
  "metadata": {
    "version": 1
  }
}No content
Last updated
Was this helpful?

