3. Manage & update session
Update order or customer data
To update data on the session, make a PATCH request to the Update session endpoint, providing data such as the order object. Updates should be used in combination with Suspend & Resume.
Update order
{
"data": {
"order": {
"currency": "SEK",
"amountIncVat": 2700,
"cart": [
{
"productType": "physical",
"reference": "testproduct1",
"name": "Test product",
"quantity": 2,
"quantityUnit": "pc",
"unitPrice": 1200,
"taxRate": 2500,
"discountPercentage": 1000
}
]
}
}
}
Update customer data (company / billing / shipping)
Customer data can only be updated if the connected module is not loaded in the client. For example, the billing object can not be updated when the billing module has been loaded in the client.
{
"data": {
"company": {
"data": {
"cin": "0123456789"
}
},
"billing": {
"data": {
"streetAddress": "string",
"streetAddress2": "string",
"zip": "string",
"city": "string",
"firstName": "string",
"lastName": "string",
"email": "string",
"phoneNumber": "string"
}
},
"shipping": {
"data": {
"streetAddress": "string",
"streetAddress2": "string",
"zip": "string",
"city": "string",
"firstName": "string",
"lastName": "string",
"email": "string",
"phoneNumber": "string"
}
}
}
}