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": "T1o-f9JXB",
"data": {}
}
Response
{
"checkoutAssociateUser": {
"_id": "1f06ef9d8538c0d3d3ef3769",
"id": "X8n-QeR8E",
"configRef": "203b58816f315f3bcb8c2657",
"origin": "example",
"created": 1727634636282,
"shipping": {
"status": "example",
"date": 1752915442974,
"method": "example",
"freeShippingThreshold": 1.23,
"tracking": "example",
"shopCollection": true,
"weight": "example"
},
"billing": {
"status": "example",
"paymentDate": 1727024459978,
"refundDate": 1707582941460
},
"orderId": "example",
"note": {
"date": 1749939547391,
"content": "example"
},
"items": [
{
"_id": "9200d6402ab56305d5f3e8ea",
"id": "abk-BcUHP",
"quantity": 1.23,
"added": 1732474322945,
"total": 29.99,
"unavailable": true
}
],
"buyer": {
"_id": "aae81f51738e1a83c396e5d9",
"email": "email@example.com",
"firstName": "example",
"id": 1.23,
"lastName": "example",
"name": "example",
"telephone": "example",
"organisation": "example",
"taxNumber": "example",
"isGuest": true
},
"seller": {
"_id": "1f026da6025516bfb34e529a",
"id": "Vd3-OW3mM",
"firstName": "example",
"lastName": "example",
"name": "example",
"email": "email@example.com",
"telephone": "example",
"taxNumber": "example"
},
"updated": 1708734589432,
"expires": 1730269056911,
"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
| Name | Type | Description |
|---|---|---|
id | String! | Checkout identifier string. |
data | JSON | Additional user data in JSON format. |