Skip to main content

orderAddMessage Mutation

Description

Adds a message to an order conversation thread.

mutation orderAddMessage($id: String!, $message: String!) {
orderAddMessage(id: $id, message: $message) {
_id
id
configRef
created
origin
status
totals {
grand
leftToPay
discount
itemsQuantity
itemQuantity
subtotal
subtotalBeforeTaxes
shipping
tax
}
buyer {
_id
id
firstName
lastName
name
email
telephone
taxNumber
organisation
isSubscribed
}
billing {
status
paymentDate
refundDate
}
shipping {
status
date
method
freeShippingThreshold
tracking
shopCollection
weight
}
items {
_id
id
quantity
added
total
unavailable
}
messages {
content
subject
created
fromBuyer
}
paymentUrl
}
}

Variables

{
"id": "08a16b83-9094-4e89-8c05-2ccadd5c1c7e",
"message": "message"
}

Response

{
"orderAddMessage": {
"_id": "2b9612ad0c5843fa46bc914a",
"id": "example",
"configRef": "ede717b1d86c707919975f68",
"created": 1751526319577,
"origin": "example",
"status": "example",
"totals": {
"grand": 1.23,
"leftToPay": 1.23,
"discount": 0.1,
"itemsQuantity": 1.23,
"itemQuantity": 42,
"subtotal": 1.23,
"subtotalBeforeTaxes": 1.23,
"shipping": 1.23,
"tax": 1.23
},
"buyer": {
"_id": "c4a8d681764990643f6b444e",
"id": 1.23,
"firstName": "example",
"lastName": "example",
"name": "example",
"email": "email@example.com",
"telephone": "example",
"taxNumber": "example",
"organisation": "example",
"isSubscribed": true
},
"billing": {
"status": "example",
"paymentDate": 1765318651819,
"refundDate": 1764607253118
},
"shipping": {
"status": "example",
"date": 1721558690689,
"method": "example",
"freeShippingThreshold": 1.23,
"tracking": "example",
"shopCollection": true,
"weight": "example"
},
"items": [
{
"_id": "4f322461ba349b560114883d",
"id": "0ac27785f959b99b9feea46d",
"quantity": 1.23,
"added": 1756762684972,
"total": 29.99,
"unavailable": true
}
],
"messages": [
{
"content": "example",
"subject": "example",
"created": 1738952145298,
"fromBuyer": true
}
],
"paymentUrl": "example"
}
}

Arguments

NameTypeDescription
idString!Order identifier string.
messageString!Message content text.

Returns

Order