checkoutUpdateShipping Mutation
Description
Updates shipping information including base price and optional shipping address.
mutation checkoutUpdateShipping(
$id: String!
$basePrice: Float
$version: Int
$addressRef: ID
$shopCollection: Boolean
) {
checkoutUpdateShipping(
id: $id
basePrice: $basePrice
version: $version
addressRef: $addressRef
shopCollection: $shopCollection
) {
_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": "Vd7-EZ6Lc",
"basePrice": 30.7,
"version": 42,
"addressRef": "ad47e29dfa608cd29ce099e1",
"shopCollection": true
}
Response
{
"checkoutUpdateShipping": {
"_id": "8667e8c816221ab4533baf5c",
"id": "B03-SCVVP",
"version": 42,
"origin": "example",
"created": 1794304471891,
"shipping": {
"status": "Pending",
"fulfilled": true,
"date": 1751256749096,
"method": "example",
"freeShippingThreshold": 1.23,
"tracking": "example",
"shopCollection": true,
"weight": 1.23,
"packingSlip": "example"
},
"billing": {
"status": "example",
"fulfilled": true,
"paymentDate": 1779839153031,
"refundDate": 1741606999000
},
"orderId": "example",
"note": {
"date": 1739638863205,
"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": "46c8e00b9104ac77533daa49",
"quantity": 1,
"unavailable": true,
"added": 1738223721073
}
],
"buyer": {
"_id": "f298a3971a23c0842dd450dc",
"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": "a8d23c180cdb6e7fce4c97cc"
},
"updated": 1735766288993,
"expires": 1761984758758,
"status": "open",
"urls": {
"checkout": "example",
"storefront": "example"
},
"useSingleAddress": true,
"taxProfile": {
"isNationalShipping": true
},
"locationRef": "0e63eb04ec38f9867b07190c"
}
}
Arguments
| Name | Type | Description |
|---|---|---|
id | String! | String identifier of the checkout. |
basePrice | Float | Base shipping price. |
version | Int | Current version number of the checkout for optimistic locking. Prevents conflicts when multiple users edit simultaneously. |
addressRef | ID | Optional reference ID of the address to use for shipping. |
shopCollection | Boolean | Whether the shipping is for shop collection. |