voucherNoteUpdate Mutation
Description
Updates the note on a voucher. Replaces any existing note with the new note content.
mutation voucherNoteUpdate($voucherRef: ID!, $note: String!) {
voucherNoteUpdate(voucherRef: $voucherRef, note: $note) {
_id
type
id
value
originalValue
redeemType
redeemed
isInRange
singleSpending
unlimited
spendings {
orderId
orderRef
amount
origin
date
}
spendingLimit
startDate
expires
resourcePath
user {
type
name
email
ref
}
created
createdBy {
type
name
email
ref
}
note {
date
content
}
logs {
action
description
date
ip
}
recipients {
recipient
date
}
pdf
}
}
Variables
{
"voucherRef": "1fcbc5b04810a9ff763d48b6",
"note": "note"
}
Response
{
"voucherNoteUpdate": {
"_id": "fa3a1b6f1408d3e494ffb2b9",
"type": "coupon",
"id": "example",
"value": 1.23,
"originalValue": 1.23,
"redeemType": "value",
"redeemed": true,
"isInRange": true,
"singleSpending": true,
"unlimited": true,
"spendings": [
{
"orderId": "example",
"orderRef": "daf9dc9cddd49d64c741f67d",
"amount": 29.99,
"origin": "example",
"date": 1749777641908
}
],
"spendingLimit": 42,
"startDate": 1728931772864,
"expires": 1761033312245,
"resourcePath": "example",
"user": {
"type": "example",
"name": "example",
"email": "email@example.com",
"ref": "90726fba2ee9c57cdf7ba5da"
},
"created": 1735004584543,
"createdBy": {
"type": "example",
"name": "example",
"email": "email@example.com",
"ref": "388b3a253d0f17ed3893936c"
},
"note": {
"date": 1734404465933,
"content": "example"
},
"logs": [
{
"action": "example",
"description": "example",
"date": 1730429103868,
"ip": "example"
}
],
"recipients": [
{
"recipient": "example",
"date": 1770254532190
}
],
"pdf": "example"
}
}
Arguments
| Name | Type | Description |
|---|---|---|
voucherRef | ID! | Reference ID of the voucher to update the note for. |
note | String! | New note content to set on the voucher. |