Skip to main content

orderUpdateLine Mutation

Description

Updates a single line item on an order (price, quantity, taxes, etc.).

mutation orderUpdateLine($orderId: String!, $line: JSON!) {
orderUpdateLine(orderId: $orderId, line: $line) {
_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

{
"orderId": "orderId",
"line": {}
}

Response

{
"orderUpdateLine": {
"_id": "fda0f8e5e4718dab870d66e9",
"id": "example",
"incId": 42,
"origin": "example",
"created": 1764532919365,
"modified": 1745730145401,
"shipping": {
"status": "Pending",
"fulfilled": true,
"date": 1733224175419,
"method": "example",
"freeShippingThreshold": 1.23,
"tracking": "example",
"shopCollection": true,
"weight": 1.23,
"packingSlip": "example"
},
"billing": {
"status": "example",
"fulfilled": true,
"paymentDate": 1768724789495,
"refundDate": 1770197172130
},
"orderId": "example",
"notes": [
{
"date": 1743593567965,
"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": "198a532e23a6d9a41016156f",
"quantity": 1,
"unavailable": true,
"added": 1733147000633
}
],
"messages": [
{
"_id": "2af8bfeeb178aa04ba88b89f",
"created": 1781011915502,
"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": "afc76686bd01a889ecd94fce",
"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": 1778591520402,
"ip": "example"
}
],
"seller": {
"type": "example",
"name": "example",
"email": "email@example.com",
"ref": "82a7e8e77d39871377c98c71"
},
"updated": 1775528228965,
"status": "example",
"discogsStatus": "example",
"buyerWasContacted": true,
"unreadMessagesCount": 42,
"mergeableOrders": [
{
"_id": "e32ea03fe4ab4ac783be1b61",
"id": "example",
"created": 1759262293556,
"total": 29.99,
"description": "example"
}
],
"path": "/release/1763553751/release-artist-release-name"
}
}

Arguments

NameTypeDescription
orderIdString!Human-readable id of the order (order.id) the line belongs to.
lineJSON!The full line item to persist.

Returns

Order!