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": "d3aec57b4426c02aab02a5c3",
"id": "example",
"configRef": "f58f27ee8b880d366a3677bd",
"created": 1736643749405,
"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": "10b80e92a08b16fe37736e82",
"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": 1762429132063,
"refundDate": 1731369239563
},
"shipping": {
"status": "example",
"date": 1767334528015,
"method": "example",
"freeShippingThreshold": 1.23,
"tracking": "example",
"shopCollection": true,
"weight": "example"
},
"items": [
{
"_id": "a73ba22e805af174c3b97fa0",
"id": "39ce3ef01df56a407db68055",
"quantity": 1.23,
"added": 1780406385960,
"total": 29.99,
"unavailable": true
}
],
"messages": [
{
"content": "example",
"subject": "example",
"created": 1742075584804,
"fromBuyer": true
}
],
"paymentUrl": "example"
}
}

Arguments

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

Returns

Order