Create or update commerce session (replace items)
PUT
/v2/commerce/sessions/{sessionId}
const url = 'https://api-crm-staging.divinea.com/api/v2/commerce/sessions/example';const options = { method: 'PUT', headers: {APIKey: '<APIKey>', 'Content-Type': 'application/json'}, body: '{"cartMode":"example","channel":"example","contacts":[{"additionalProperty":{}}],"createdAt":"2026-04-15T12:00:00Z","customName":"example","discounts":{},"guests":1,"id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","items":[{"attributes":{},"bookingCompId":"example","component":"example","editable":true,"experienceId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","itemType":"example","lineIndex":1,"locked":true,"name":"example","productId":"example","qty":1,"reservationId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","unitPriceCents":1,"vatPercent":1}],"metadata":{},"pointOfSaleId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","roomId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","sourceExperienceId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","sourceReservationId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","status":"example","tableId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","updatedAt":"2026-04-15T12:00:00Z","version":1,"wineryId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api-crm-staging.divinea.com/api/v2/commerce/sessions/example \ --header 'APIKey: <APIKey>' \ --header 'Content-Type: application/json' \ --data '{ "cartMode": "example", "channel": "example", "contacts": [ { "additionalProperty": {} } ], "createdAt": "2026-04-15T12:00:00Z", "customName": "example", "discounts": {}, "guests": 1, "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "items": [ { "attributes": {}, "bookingCompId": "example", "component": "example", "editable": true, "experienceId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "itemType": "example", "lineIndex": 1, "locked": true, "name": "example", "productId": "example", "qty": 1, "reservationId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "unitPriceCents": 1, "vatPercent": 1 } ], "metadata": {}, "pointOfSaleId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "roomId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "sourceExperienceId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "sourceReservationId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "status": "example", "tableId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "updatedAt": "2026-04-15T12:00:00Z", "version": 1, "wineryId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'Authorizations
Sezione intitolata “Authorizations”Parameters
Sezione intitolata “Parameters”Path Parameters
Sezione intitolata “Path Parameters”sessionId
required
string format: uuid
SessionId
Request Body
Sezione intitolata “Request Body”Body
Media typeapplication/json
CommerceSessionDTO
object
cartMode
string
channel
string
contacts
Array<object>
Map«string,object»object
key
additional properties
object
createdAt
string format: date-time
customName
string
discounts
object
guests
integer format: int32
id
string format: uuid
items
Array<object>
CommerceSessionItemDTOobject
attributes
object
bookingCompId
string
component
string
editable
boolean
experienceId
string format: uuid
id
string format: uuid
itemType
string
lineIndex
integer format: int32
locked
boolean
name
string
productId
string
qty
integer format: int32
reservationId
string format: uuid
unitPriceCents
integer format: int64
vatPercent
integer format: int32
metadata
object
pointOfSaleId
string format: uuid
roomId
string format: uuid
sourceExperienceId
string format: uuid
sourceReservationId
string format: uuid
status
string
tableId
string format: uuid
updatedAt
string format: date-time
version
integer format: int32
wineryId
string format: uuid
Examplegenerated
{ "cartMode": "example", "channel": "example", "contacts": [ { "additionalProperty": {} } ], "createdAt": "2026-04-15T12:00:00Z", "customName": "example", "discounts": {}, "guests": 1, "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "items": [ { "attributes": {}, "bookingCompId": "example", "component": "example", "editable": true, "experienceId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "itemType": "example", "lineIndex": 1, "locked": true, "name": "example", "productId": "example", "qty": 1, "reservationId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "unitPriceCents": 1, "vatPercent": 1 } ], "metadata": {}, "pointOfSaleId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "roomId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "sourceExperienceId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "sourceReservationId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "status": "example", "tableId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "updatedAt": "2026-04-15T12:00:00Z", "version": 1, "wineryId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Responses
Sezione intitolata “Responses”OK
Media type*/*
CommerceSessionDTO
object
cartMode
string
channel
string
contacts
Array<object>
Map«string,object»object
key
additional properties
object
createdAt
string format: date-time
customName
string
discounts
object
guests
integer format: int32
id
string format: uuid
items
Array<object>
CommerceSessionItemDTOobject
attributes
object
bookingCompId
string
component
string
editable
boolean
experienceId
string format: uuid
id
string format: uuid
itemType
string
lineIndex
integer format: int32
locked
boolean
name
string
productId
string
qty
integer format: int32
reservationId
string format: uuid
unitPriceCents
integer format: int64
vatPercent
integer format: int32
metadata
object
pointOfSaleId
string format: uuid
roomId
string format: uuid
sourceExperienceId
string format: uuid
sourceReservationId
string format: uuid
status
string
tableId
string format: uuid
updatedAt
string format: date-time
version
integer format: int32
wineryId
string format: uuid