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": "70478eb824417e6b9b0c632f",
"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": "5ffb484a8e25f866ff4a1033"
}
Response
{
"orderShippingUpdate": {
"_id": "ffc5ba176dced3d8ff13cfab",
"id": "example",
"incId": 42,
"origin": "example",
"created": 1760468367263,
"modified": 1763044775955,
"shipping": {
"status": "Pending",
"fulfilled": true,
"date": 1726601972574,
"method": "example",
"freeShippingThreshold": 1.23,
"tracking": "example",
"shopCollection": true,
"weight": 1.23,
"packingSlip": "example"
},
"billing": {
"status": "example",
"fulfilled": true,
"paymentDate": 1714270194120,
"refundDate": 1748660418499
},
"orderId": "example",
"notes": [
{
"date": 1748058280495,
"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": "24ef7f1752c1cd117b88b0b0",
"quantity": 1,
"unavailable": true,
"added": 1705675168159
}
],
"messages": [
{
"_id": "3170b674b29596fe8cee3770",
"created": 1748771981976,
"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": "9ffaf7ca2242244ae82597a8",
"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": 1735655331904,
"ip": "example"
}
],
"seller": {
"type": "example",
"name": "example",
"email": "email@example.com",
"ref": "059a63d6f199b6a1be252ed3"
},
"updated": 1762318999736,
"status": "example",
"discogsStatus": "example",
"buyerWasContacted": true,
"unreadMessagesCount": 42,
"mergeableOrders": [
{
"_id": "d60a20f32767e55fa368f30a",
"id": "example",
"created": 1726779247751,
"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. |