Skip to main content

checkoutAssociateUser Mutation

Description​

Associates a user account with a checkout.

mutation checkoutAssociateUser($id: String!, $data: JSON) {
checkoutAssociateUser(id: $id, data: $data) {
_id
id
configRef
origin
created
shipping {
status
date
method
freeShippingThreshold
tracking
shopCollection
weight
}
billing {
status
paymentDate
refundDate
}
orderId
note {
date
content
}
items {
_id
id
quantity
added
total
unavailable
}
buyer {
_id
email
firstName
id
lastName
name
telephone
organisation
taxNumber
isGuest
}
seller {
_id
id
firstName
lastName
name
email
telephone
taxNumber
}
updated
expires
status
message
totals {
grand
leftToPay
discount
itemsQuantity
itemQuantity
subtotal
subtotalBeforeTaxes
shipping
tax
}
urls {
checkout
storefront
}
useSingleAddress
}
}

Variables​

{
"id": "Lq9-Mo8TC",
"data": {}
}

Response​

{
"checkoutAssociateUser": {
"_id": "de96f7f2a7bde59ecc66a5c7",
"id": "juJ-4C0Z7",
"configRef": "d03f74c7d50783d5c9f591bc",
"origin": "example",
"created": 1781302948927,
"shipping": {
"status": "example",
"date": 1771558497039,
"method": "example",
"freeShippingThreshold": 1.23,
"tracking": "example",
"shopCollection": true,
"weight": "example"
},
"billing": {
"status": "example",
"paymentDate": 1775756230945,
"refundDate": 1733672159349
},
"orderId": "example",
"note": {
"date": 1763361639159,
"content": "example"
},
"items": [
{
"_id": "8ff615c486143068f0943b75",
"id": "ci4-aXEjT",
"quantity": 1.23,
"added": 1751343654045,
"total": 29.99,
"unavailable": true
}
],
"buyer": {
"_id": "8dc30986be620ffbfb656d75",
"email": "email@example.com",
"firstName": "example",
"id": 1.23,
"lastName": "example",
"name": "example",
"telephone": "example",
"organisation": "example",
"taxNumber": "example",
"isGuest": true
},
"seller": {
"_id": "4f0af7c8d5f8ce07075811ac",
"id": "GlY-Czmvz",
"firstName": "example",
"lastName": "example",
"name": "example",
"email": "email@example.com",
"telephone": "example",
"taxNumber": "example"
},
"updated": 1761253763696,
"expires": 1771113215889,
"status": "example",
"message": "example",
"totals": {
"grand": 1.23,
"leftToPay": 1.23,
"discount": 0.1,
"itemsQuantity": 1.23,
"itemQuantity": 42,
"subtotal": 1.23,
"subtotalBeforeTaxes": 1.23,
"shipping": 1.23,
"tax": 1.23
},
"urls": {
"checkout": "example",
"storefront": "example"
},
"useSingleAddress": true
}
}

Arguments​

NameTypeDescription
idString!Checkout identifier string.
dataJSONAdditional user data in JSON format.

Returns​

Checkout