orderShippingUpdate Mutation
Description
Updates the shipping information for an order, including shipping price and shipping address. You can provide either a new address input, an existing address reference, or update only the shipping price.
mutation orderShippingUpdate(
$orderRef: ID!
$orderShippingPriceInput: PriceInput
$orderShippingAddressInput: AddressInput
$orderShippingAddressRef: ID
) {
orderShippingUpdate(
orderRef: $orderRef
orderShippingPriceInput: $orderShippingPriceInput
orderShippingAddressInput: $orderShippingAddressInput
orderShippingAddressRef: $orderShippingAddressRef
) {
_id
id
incId
origin
created
modified
shipping {
status
fulfilled
date
method
freeShippingThreshold
tracking
shopCollection
weight
packingSlip
}
billing {
status
fulfilled
paymentDate
refundDate
}
orderId
notes {
date
content
}
instructions
totals {
subtotal
subtotalBeforeTaxes
tax
grand
leftToPay
itemQuantity
discount
shipping
creditNote
balance
}
items {
_id
quantity
unavailable
added
}
messages {
_id
created
subject
message
fromBuyer
flagged
content
read
orderId
orderIncId
uri
via
}
buyer {
_id
firstName
lastName
email
name
path
telephone
organisation
taxNumber
}
logs {
action
description
date
ip
}
seller {
type
name
email
ref
}
updated
status
discogsStatus
buyerWasContacted
unreadMessagesCount
mergeableOrders {
_id
id
created
total
description
}
path
}
}
Variables
{
"orderRef": "33ba78a2a8c6c20956867cd1",
"orderShippingPriceInput": {
"base": 30.7,
"beforeTaxes": 30.7,
"taxes": [
{
"name": "A name",
"rate": 0.15
}
]
},
"orderShippingAddressInput": {
"description": "A description",
"addressLine1": "addressLine1",
"addressLine2": "addressLine2",
"streetNumber": 42,
"city": "Montreal",
"state": "Quebec",
"postCode": "postCode",
"alpha2": "alpha2",
"country": "Canada",
"stateCode": "stateCode",
"type": "type",
"geoLoc": {
"type": "type",
"coordinates": [
30.7
]
}
},
"orderShippingAddressRef": "f00b7b670ffcf2250280ee60"
}
Response
{
"orderShippingUpdate": {
"_id": "a10971ee3dc1da089d7dbe2f",
"id": "example",
"incId": 42,
"origin": "example",
"created": 1744810248674,
"modified": 1745521100500,
"shipping": {
"status": "Pending",
"fulfilled": true,
"date": 1742762167461,
"method": "example",
"freeShippingThreshold": 1.23,
"tracking": "example",
"shopCollection": true,
"weight": 1.23,
"packingSlip": "example"
},
"billing": {
"status": "example",
"fulfilled": true,
"paymentDate": 1734463050095,
"refundDate": 1768904009912
},
"orderId": "example",
"notes": [
{
"date": 1745232795288,
"content": "example"
}
],
"instructions": "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": "f32a8dbe3d2c62851dcaab0b",
"quantity": 1,
"unavailable": true,
"added": 1753497349229
}
],
"messages": [
{
"_id": "591827c6dfed8fe7fd181b8f",
"created": 1739462920823,
"subject": "example",
"message": "example",
"fromBuyer": true,
"flagged": true,
"content": "example",
"read": true,
"orderId": "example",
"orderIncId": 42,
"uri": "https://www.my-common-ground-store.com/release/1763553751/release-artist-release-name",
"via": "example"
}
],
"buyer": {
"_id": "cdf76a2895145582a7e39bb7",
"firstName": "example",
"lastName": "example",
"email": "email@example.com",
"name": "example",
"path": "/release/1763553751/release-artist-release-name",
"telephone": "example",
"organisation": "example",
"taxNumber": "example"
},
"logs": [
{
"action": "example",
"description": "example",
"date": 1750635053606,
"ip": "example"
}
],
"seller": {
"type": "example",
"name": "example",
"email": "email@example.com",
"ref": "df3a573c13b56cc8dfb25d04"
},
"updated": 1739175179354,
"status": "example",
"discogsStatus": "example",
"buyerWasContacted": true,
"unreadMessagesCount": 42,
"mergeableOrders": [
{
"_id": "260e551c0077f37f579a4005",
"id": "example",
"created": 1754477081389,
"total": 29.99,
"description": "example"
}
],
"path": "/release/1763553751/release-artist-release-name"
}
}
Arguments
| Name | Type | Description |
|---|---|---|
orderRef | ID! | Reference ID of the order to update. |
orderShippingPriceInput | PriceInput | New shipping price for the order. If not provided, the shipping price remains unchanged. |
orderShippingAddressInput | AddressInput | New shipping address for the order. If not provided, the shipping address remains unchanged. |
orderShippingAddressRef | ID | Reference ID of an existing address to use as the shipping address. If provided, this takes precedence over orderShippingAddressInput. |