Skip to main content

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": "0b978acb2e3c749dd1208478",
"note": "note"
}

Response​

{
"voucherNoteUpdate": {
"_id": "c29b1d15e2f18f88e6b41f03",
"type": "coupon",
"id": "example",
"value": 1.23,
"originalValue": 1.23,
"redeemType": "value",
"redeemed": true,
"isInRange": true,
"singleSpending": true,
"unlimited": true,
"spendings": [
{
"orderId": "example",
"orderRef": "c0d98f73c8643c23e9662a55",
"amount": 29.99,
"origin": "example",
"date": 1751045457541
}
],
"spendingLimit": 42,
"startDate": 1739348748850,
"expires": 1763013063417,
"resourcePath": "example",
"user": {
"type": "example",
"name": "example",
"email": "email@example.com",
"ref": "c57a40f31cb16867f9131611"
},
"created": 1778884527533,
"createdBy": {
"type": "example",
"name": "example",
"email": "email@example.com",
"ref": "0fc8aa75b1c4de569353deb4"
},
"note": {
"date": 1765925732073,
"content": "example"
},
"logs": [
{
"action": "example",
"description": "example",
"date": 1735099920110,
"ip": "example"
}
],
"recipients": [
{
"recipient": "example",
"date": 1763304115255
}
],
"pdf": "example"
}
}

Arguments​

NameTypeDescription
voucherRefID!Reference ID of the voucher to update the note for.
noteString!New note content to set on the voucher.

Returns​

Voucher!