Skip to main content

orderGeneratePackingSlip Mutation

Description

Generates a packing slip PDF for an order. The packing slip is used for shipping and includes order items and shipping information.

mutation orderGeneratePackingSlip($orderRef: ID!) {
orderGeneratePackingSlip(orderRef: $orderRef) {
_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": "97ddd89eaecafe55329a3438"
}

Response

{
"orderGeneratePackingSlip": {
"_id": "1df3971a68f35ed36fb463d2",
"id": "example",
"incId": 42,
"origin": "example",
"created": 1710035258222,
"modified": 1721587556908,
"shipping": {
"status": "Pending",
"fulfilled": true,
"date": 1722714925992,
"method": "example",
"freeShippingThreshold": 1.23,
"tracking": "example",
"shopCollection": true,
"weight": 1.23,
"packingSlip": "example"
},
"billing": {
"status": "example",
"fulfilled": true,
"paymentDate": 1707320164848,
"refundDate": 1719664960102
},
"orderId": "example",
"notes": [
{
"date": 1747034147243,
"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": "62568e318fb95f529f45d8b4",
"quantity": 1,
"unavailable": true,
"added": 1734915897090
}
],
"messages": [
{
"_id": "e5cd0e518d823b964d3c8a79",
"created": 1717487545182,
"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": "6366e7c6d09be9c147c352b7",
"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": 1729485761325,
"ip": "example"
}
],
"seller": {
"type": "example",
"name": "example",
"email": "email@example.com",
"ref": "9b14a3a7ab38925ffd601c8e"
},
"updated": 1729269118455,
"status": "example",
"discogsStatus": "example",
"buyerWasContacted": true,
"unreadMessagesCount": 42,
"mergeableOrders": [
{
"_id": "1d69f432b9e8ee04f6192217",
"id": "example",
"created": 1756612681018,
"total": 29.99,
"description": "example"
}
],
"path": "/release/1763553751/release-artist-release-name"
}
}

Arguments

NameTypeDescription
orderRefID!Reference ID of the order to generate a packing slip for.

Returns

Order!