Skip to main content

checkoutUpdateItems Mutation

Description

Updates checkout items in the existing checkout.

mutation checkoutUpdateItems($id: String!, $items: [CheckoutItemInput]) {
checkoutUpdateItems(id: $id, items: $items) {
_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": "6vJ-Ot8go",
"items": [
{
"listingId": 30.7,
"quantity": 30.7
}
]
}

Response

{
"checkoutUpdateItems": {
"_id": "e0818dc6b6b0cca5300a0a91",
"id": "oVQ-BbvSE",
"configRef": "8301cab576516ae9931ab8a0",
"origin": "example",
"created": 1738656983401,
"shipping": {
"status": "example",
"date": 1710535071758,
"method": "example",
"freeShippingThreshold": 1.23,
"tracking": "example",
"shopCollection": true,
"weight": "example"
},
"billing": {
"status": "example",
"paymentDate": 1745259816024,
"refundDate": 1714226283179
},
"orderId": "example",
"note": {
"date": 1757041042807,
"content": "example"
},
"items": [
{
"_id": "4d05e2d6a57e00a8f0badf04",
"id": "SES-BX318",
"quantity": 1.23,
"added": 1724164462246,
"total": 29.99,
"unavailable": true
}
],
"buyer": {
"_id": "52c62f660b3b2da7865a1547",
"email": "email@example.com",
"firstName": "example",
"id": 1.23,
"lastName": "example",
"name": "example",
"telephone": "example",
"organisation": "example",
"taxNumber": "example",
"isGuest": true
},
"seller": {
"_id": "88e980aa0b38df8348d8fc1b",
"id": "wZN-itpT5",
"firstName": "example",
"lastName": "example",
"name": "example",
"email": "email@example.com",
"telephone": "example",
"taxNumber": "example"
},
"updated": 1728861946176,
"expires": 1705348203549,
"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!The identifier of the checkout to be updated.
items[CheckoutItemInput]A list of items in the checkout.

Returns

Checkout