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": "nf8-ImUIj",
"items": [
{
"listingId": 30.7,
"quantity": 30.7
}
]
}

Response

{
"checkoutUpdateItems": {
"_id": "d2dbc98742f6d7e667ae50bb",
"id": "y66-K9VZD",
"configRef": "ec5baa0c6ecf326ba9eb3f19",
"origin": "example",
"created": 1732393822671,
"shipping": {
"status": "example",
"date": 1764832303294,
"method": "example",
"freeShippingThreshold": 1.23,
"tracking": "example",
"shopCollection": true,
"weight": "example"
},
"billing": {
"status": "example",
"paymentDate": 1774634944963,
"refundDate": 1738408982840
},
"orderId": "example",
"note": {
"date": 1758195584846,
"content": "example"
},
"items": [
{
"_id": "aa0e38f139d306f6a23ba198",
"id": "AUP-o4Cqp",
"quantity": 1.23,
"added": 1744239022977,
"total": 29.99,
"unavailable": true
}
],
"buyer": {
"_id": "24e1838dae54176c493273ea",
"email": "email@example.com",
"firstName": "example",
"id": 1.23,
"lastName": "example",
"name": "example",
"telephone": "example",
"organisation": "example",
"taxNumber": "example",
"isGuest": true
},
"seller": {
"_id": "6e0e425ff91021e8ff970b50",
"id": "nW2-86Ubs",
"firstName": "example",
"lastName": "example",
"name": "example",
"email": "email@example.com",
"telephone": "example",
"taxNumber": "example"
},
"updated": 1726587804255,
"expires": 1733083291342,
"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