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": "jsQ-ZzXUQ",
"data": {}
}

Response

{
"checkoutAssociateUser": {
"_id": "0cb2a65e3a3a7b21978cab55",
"id": "UAP-k3Qlk",
"configRef": "db895c88b1c8a1d566253026",
"origin": "example",
"created": 1749844926147,
"shipping": {
"status": "example",
"date": 1764341879988,
"method": "example",
"freeShippingThreshold": 1.23,
"tracking": "example",
"shopCollection": true,
"weight": "example"
},
"billing": {
"status": "example",
"paymentDate": 1740944252278,
"refundDate": 1746522403360
},
"orderId": "example",
"note": {
"date": 1745585691587,
"content": "example"
},
"items": [
{
"_id": "e4fc33ab3d231d245c800979",
"id": "wDX-hrVI9",
"quantity": 1.23,
"added": 1709214580614,
"total": 29.99,
"unavailable": true
}
],
"buyer": {
"_id": "4e2834ae7de6e5061da8fa1e",
"email": "email@example.com",
"firstName": "example",
"id": 1.23,
"lastName": "example",
"name": "example",
"telephone": "example",
"organisation": "example",
"taxNumber": "example",
"isGuest": true
},
"seller": {
"_id": "c8683c3004b1c6726e043279",
"id": "cDN-j4V7D",
"firstName": "example",
"lastName": "example",
"name": "example",
"email": "email@example.com",
"telephone": "example",
"taxNumber": "example"
},
"updated": 1717730024063,
"expires": 1751260112813,
"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