Update customer session
PUT {{integrationBaseUrl}}/segment/customer_sessions/:customerSessionId
Update the given customer session, or creates it if it doesn't exist.
Customer sessions are a key concept in Talon.One, see the documentation.
This endpoint also allows you to define a callback where the response will be sent. See the Header parameters section below.
Request Body
{"customerSession"=>{"profileId"=>"URN-GV8294NV", "couponCodes"=>["XMAS-20-2021"], "referralCode"=>"NT2K54D9", "loyaltyCards"=>["loyalty-card-1"], "state"=>"open", "cartItems"=>[{"name"=>"Air Glide", "sku"=>"SKU1241028", "quantity"=>1, "price"=>99.99, "returnedQuantity"=>1, "remainingQuantity"=>1, "category"=>"shoes", "weight"=>1130, "height"=>7837764.22103864, "width"=>79814131.57487047, "length"=>2885254.0070254356, "position"=>-78974619.5110606, "attributes"=>{"image"=>"11.jpeg", "material"=>"leather"}, "additionalCosts"=>{"shipping"=>{"price"=>9}}}, {"name"=>"Air Glide", "sku"=>"SKU1241028", "quantity"=>1, "price"=>99.99, "returnedQuantity"=>1, "remainingQuantity"=>1, "category"=>"shoes", "weight"=>1130, "height"=>24035878.00613156, "width"=>10969199.733026788, "length"=>47023157.77929619, "position"=>-31544081.028645188, "attributes"=>{"image"=>"11.jpeg", "material"=>"leather"}, "additionalCosts"=>{"shipping"=>{"price"=>9}}}], "additionalCosts"=>{"shipping"=>{"price"=>9}}, "identifiers"=>["91.11.156.141"], "attributes"=>{"ShippingCity"=>"Berlin"}}, "sessionAttributesInfo"=>[{"name"=>"ProductClicked", "type"=>"boolean"}, {"name"=>"ProductClicked", "type"=>"boolean"}], "cartItemAttributesInfo"=>[{"name"=>"ProductClicked", "type"=>"boolean"}, {"name"=>"ProductClicked", "type"=>"boolean"}]}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
destination-hostname | string | (Required) The base URL of your Talon.One deployment. | |
X-Callback-Destination-URI | string | The full URI where Talon.One sends the response content. The callback is a POST request. | |
X-Callback-API-Key | string | The header and the API key, separated by a space. The first space marks the header. |
For example:
- To set
Authorization: 3aa74d582bd94
, useAuthorization 3aa74d582bd94
. - To set
Authorization: ApiKey-v1 3aa74d582bd94
, useAuthorization ApiKey-v1 3aa74d582bd94
.
The minimal length of the API key is 32 characters.
|
| X-Content-Fields
| string | | A comma-separated list of field names from the Update customer enpdoint's response that you want to receive.
If omitted, all the fields will be sent to the callback destination URI.
|
| X-Correlation-ID
| string | | An arbitrary ID assigned to the callback request. You can use it to track the callbacks you receive from Talon.One.
If omitted, the callback request does not include X-Correlation-ID
.
|
| Content-Type
| string | | |
| Accept
| string | | |