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": "caf7d192d65fc1a084e82edc",
"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": "52b4045e8e2bde4630cb6c65"
}
Response
{
"orderShippingUpdate": {
"_id": "8c302ed6b89478a1fff2e12a",
"id": "example",
"incId": 42,
"origin": "example",
"created": 1733697854468,
"modified": 1705195563950,
"shipping": {
"status": "Pending",
"fulfilled": true,
"date": 1755497686419,
"method": "example",
"freeShippingThreshold": 1.23,
"tracking": "example",
"shopCollection": true,
"weight": 1.23,
"packingSlip": "example"
},
"billing": {
"status": "example",
"fulfilled": true,
"paymentDate": 1764861864940,
"refundDate": 1724004887701
},
"orderId": "example",
"notes": [
{
"date": 1755773676427,
"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": "d36a1b31b60c950707b66349",
"quantity": 1,
"unavailable": true,
"added": 1733684047466
}
],
"messages": [
{
"_id": "9c106db8234c99a4ba8f0d05",
"created": 1721308797153,
"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": "b7cac5d820103b084a71e71c",
"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": 1737208806087,
"ip": "example"
}
],
"seller": {
"type": "example",
"name": "example",
"email": "email@example.com",
"ref": "06c6835cd775599b53b62ceb"
},
"updated": 1751615783270,
"status": "example",
"discogsStatus": "example",
"buyerWasContacted": true,
"unreadMessagesCount": 42,
"mergeableOrders": [
{
"_id": "40662a885c5f3c7eaea9319e",
"id": "example",
"created": 1726922731529,
"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. |