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": "sYc-fcsY5",
"entryRef": "105f0d3780145a057605d9ab",
"lineBasePrice": 30.7,
"lineQuantity": 42,
"version": 42
}
Response
{
"checkoutUpdateLine": {
"_id": "8feba8955f1615acd599ab99",
"id": "4G5-39hKC",
"version": 42,
"origin": "example",
"created": 1791378187893,
"shipping": {
"status": "Pending",
"fulfilled": true,
"date": 1776421846282,
"method": "example",
"freeShippingThreshold": 1.23,
"tracking": "example",
"shopCollection": true,
"weight": 1.23,
"packingSlip": "example"
},
"billing": {
"status": "example",
"fulfilled": true,
"paymentDate": 1776632366341,
"refundDate": 1745234284165
},
"orderId": "example",
"note": {
"date": 1789670045892,
"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": "2ba9e0b4e18d9763a761918e",
"quantity": 1,
"unavailable": true,
"added": 1753719791380
}
],
"buyer": {
"_id": "d39bb4c9038bfb2aac3a48b4",
"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": "d55eb4424b36681baa1a59c9"
},
"updated": 1762255317884,
"expires": 1752956588172,
"status": "open",
"urls": {
"checkout": "example",
"storefront": "example"
},
"useSingleAddress": true,
"taxProfile": {
"isNationalShipping": true
},
"locationRef": "15d47171fc826cf582f47f50"
}
}
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. |