Skip to main content

orderMarkAsShipped Mutation

Description

Marks an order as shipped or packed. If isPacked is true, the order is marked as packed. Otherwise, the order status is updated to "Shipped" and the shipping date is set. For marketplace orders, the status may also be synchronized with the marketplace. Optionally sends a shipping confirmation email to the buyer.

mutation orderMarkAsShipped(
$orderRef: ID!
$email: String
$trackingLink: String
$isPacked: Boolean
) {
orderMarkAsShipped(
orderRef: $orderRef
email: $email
trackingLink: $trackingLink
isPacked: $isPacked
) {
_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": "b5b165e466c9ca332a1d01c3",
"email": "email@example.com",
"trackingLink": "trackingLink",
"isPacked": true
}

Response

{
"orderMarkAsShipped": {
"_id": "f88ff26d1e8cf7fb495818b0",
"id": "example",
"incId": 42,
"origin": "example",
"created": 1740669235330,
"modified": 1711868732835,
"shipping": {
"status": "Pending",
"fulfilled": true,
"date": 1738608003065,
"method": "example",
"freeShippingThreshold": 1.23,
"tracking": "example",
"shopCollection": true,
"weight": 1.23,
"packingSlip": "example"
},
"billing": {
"status": "example",
"fulfilled": true,
"paymentDate": 1734566045527,
"refundDate": 1723695649495
},
"orderId": "example",
"notes": [
{
"date": 1703898804281,
"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": "9558bf5c27503f98b970b94e",
"quantity": 1,
"unavailable": true,
"added": 1746527527913
}
],
"messages": [
{
"_id": "e6c4d0de9ca5a186aa8dd261",
"created": 1737827507988,
"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": "221cb6e809cd1a48e021eeb8",
"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": 1729292272348,
"ip": "example"
}
],
"seller": {
"type": "example",
"name": "example",
"email": "email@example.com",
"ref": "c2bf833b14f9381bb57fff5e"
},
"updated": 1709986483718,
"status": "example",
"discogsStatus": "example",
"buyerWasContacted": true,
"unreadMessagesCount": 42,
"mergeableOrders": [
{
"_id": "8a608757bab102f4d1c710f9",
"id": "example",
"created": 1712516696934,
"total": 29.99,
"description": "example"
}
],
"path": "/release/1763553751/release-artist-release-name"
}
}

Arguments

NameTypeDescription
orderRefID!Reference ID of the order to mark as shipped.
emailStringEmail address to send shipping confirmation to. If provided and isPacked is false, a shipping confirmation email is sent to this address.
trackingLinkStringTracking link or tracking number for the shipment.
isPackedBooleanIf true, marks the order as packed instead of shipped. If false or not provided, marks the order as shipped.

Returns

Order!