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": "b5baa323cd18f3389a78c4e1",
"id": "example",
"configRef": "000f9b92c45e32bc642d9b01",
"created": 1757760081197,
"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": "b2bfc2b56a36d48a97d41549",
"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": 1738014576310,
"refundDate": 1729944562539
},
"shipping": {
"status": "example",
"date": 1719148726511,
"method": "example",
"freeShippingThreshold": 1.23,
"tracking": "example",
"shopCollection": true,
"weight": "example"
},
"items": [
{
"_id": "3f0f79711108d00f819d1953",
"id": "ae40f9ef49d60d5a78680b11",
"quantity": 1.23,
"added": 1765914990602,
"total": 29.99,
"unavailable": true
}
],
"messages": [
{
"content": "example",
"subject": "example",
"created": 1767598428564,
"fromBuyer": true
}
],
"paymentUrl": "example"
}
}
Arguments
| Name | Type | Description |
|---|---|---|
id | String! | Order identifier string. |
message | String! | Message content text. |