checkoutUpdateLine Mutation
Description
Updates the quantity or base price of a line item in the checkout.
mutation checkoutUpdateLine(
$id: String!
$entryRef: ID!
$lineBasePrice: Float
$lineQuantity: Int!
$version: Int
) {
checkoutUpdateLine(
id: $id
entryRef: $entryRef
lineBasePrice: $lineBasePrice
lineQuantity: $lineQuantity
version: $version
) {
_id
id
version
origin
created
shipping {
status
fulfilled
date
method
freeShippingThreshold
tracking
shopCollection
weight
packingSlip
}
billing {
status
fulfilled
paymentDate
refundDate
}
orderId
note {
date
content
}
totals {
subtotal
subtotalBeforeTaxes
tax
grand
leftToPay
itemQuantity
discount
shipping
creditNote
balance
}
items {
_id
quantity
unavailable
added
}
buyer {
_id
firstName
lastName
email
name
path
telephone
organisation
taxNumber
}
seller {
type
name
email
ref
}
updated
expires
status
urls {
checkout
storefront
}
useSingleAddress
taxProfile {
isNationalShipping
}
locationRef
}
}
Variables
{
"id": "tJ1-xJmko",
"entryRef": "f03b3c3032761e179097de93",
"lineBasePrice": 30.7,
"lineQuantity": 42,
"version": 42
}
Response
{
"checkoutUpdateLine": {
"_id": "cebf13260344b5cd1457b352",
"id": "4lK-PpCTq",
"version": 42,
"origin": "example",
"created": 1783603590104,
"shipping": {
"status": "Pending",
"fulfilled": true,
"date": 1756594958837,
"method": "example",
"freeShippingThreshold": 1.23,
"tracking": "example",
"shopCollection": true,
"weight": 1.23,
"packingSlip": "example"
},
"billing": {
"status": "example",
"fulfilled": true,
"paymentDate": 1734485433750,
"refundDate": 1792082877740
},
"orderId": "example",
"note": {
"date": 1741866655143,
"content": "example"
},
"totals": {
"subtotal": 1.23,
"subtotalBeforeTaxes": 1.23,
"tax": 1.23,
"grand": 1.23,
"leftToPay": 1.23,
"itemQuantity": 1.23,
"discount": 0.1,
"shipping": 1.23,
"creditNote": 1.23,
"balance": 1.23
},
"items": [
{
"_id": "6eb6a966a76ec41c8788c3a9",
"quantity": 1,
"unavailable": true,
"added": 1764819375060
}
],
"buyer": {
"_id": "a6fa9b69b8319430e735aec3",
"firstName": "example",
"lastName": "example",
"email": "email@example.com",
"name": "example",
"path": "/release/1763553751/release-artist-release-name",
"telephone": "example",
"organisation": "example",
"taxNumber": "example"
},
"seller": {
"type": "example",
"name": "example",
"email": "email@example.com",
"ref": "9f31800b8b65f1bfde89b446"
},
"updated": 1738262831379,
"expires": 1732495599454,
"status": "open",
"urls": {
"checkout": "example",
"storefront": "example"
},
"useSingleAddress": true,
"taxProfile": {
"isNationalShipping": true
},
"locationRef": "50305ce62ee2f0248ef4d316"
}
}
Arguments
| Name | Type | Description |
|---|---|---|
id | String! | String identifier of the checkout. |
entryRef | ID! | Reference ID of the entry to update. |
lineBasePrice | Float | New base price for the line item. If not provided, the price remains unchanged. |
lineQuantity | Int! | New quantity for the line item. |
version | Int | Current version number of the checkout for optimistic locking. Prevents conflicts when multiple users edit simultaneously. |