Merge a guest Cart into the customer Cart
Use the SDK for application integration. This read-only reference covers Commerce, Customer Auth, Membership and Events.
All HTTP operationsThe destination customer identity comes only from the customer bearer credential. The server credential variant supplies customerToken in the body. An unknown or wrong guestCartToken, or a Cart belonging to another customer or tenant, returns the same 404/not_found envelope without writes. One canonical transport with credential-specific request and response variants. Server bodies require the admitted server credential; browser/customer bodies retain their capability boundary.
X-Publishable-Key<token>Tenant publishable key for authentication (sent via X-Publishable-Key header)
AuthorizationBearer <JWT>Customer JWT for same-tenant authenticated customer actions
application/json- body
guestCartToken*string1 <= length <= 512Merge a guest Cart into the customer Cart result
application/json- response
cart*warnings*array<>cartToken*string1 <= length <= 512resolution*"unchanged""unchanged"merged*falsefalseclaimed*falsefalseExamples may be generated from schemas; they are illustrative, not recorded successful API calls. Example snippets may omit required authentication headers.
curl -X POST 'https://api.01.software/api/carts/merge' \ -H 'Content-Type: application/json' \ -d '{ "guestCartToken": "string"}'{ "cart": { "id": "string", "status": "active", "revision": 0, "currency": "string", "market": { "id": "string", "handle": "string", "name": "string" }, "subtotalMinor": 0, "discountMinor": 0, "estimatedTotalMinor": 0, "discountCodes": [ { "code": "string", "applicable": true } ], "attributes": [ { "key": "string", "value": "string" } ], "items": [ { "id": "string", "product": { "id": "string", "title": "string", "handle": "string", "image": "string" }, "variant": { "id": "string", "title": "string", "handle": "string", "image": "string" }, "admissions": [ { "eventId": "string", "occurrenceId": "string", "admissionTypeId": "string" } ], "quantity": 1, "unitPriceMinor": 0, "discountMinor": 0, "estimatedLineTotalMinor": 0, "requiresShipping": true } ], "expiresAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }, "warnings": [ { "code": "DISCOUNT_CODE_NOT_HONOURED", "message": "string", "target": "string" } ], "cartToken": "string", "resolution": "unchanged", "merged": false, "claimed": false}Credential variants
Credential-specific requirements from the public OpenAPI projection: Full response schemas appear in Response Body.
[
{
"security": [
{
"publishableKey": [],
"customerBearerAuth": []
}
],
"requestSchema": {
"type": "object",
"additionalProperties": false,
"required": [
"guestCartToken"
],
"properties": {
"guestCartToken": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
}
},
"responseSchema": "CartMergeResult"
},
{
"security": [
{
"publishableKey": [],
"serverSecretKey": []
}
],
"requestSchema": {
"type": "object",
"additionalProperties": false,
"required": [
"guestCartToken",
"customerToken"
],
"properties": {
"guestCartToken": {
"type": "string",
"minLength": 1,
"maxLength": 512
},
"customerToken": {
"type": "string",
"minLength": 1,
"maxLength": 4096
}
}
},
"responseSchema": "CartMergeResult"
}
]