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

Response

{
"voucherNoteUpdate": {
"_id": "8b3536c2fdb316018dd7a898",
"type": "coupon",
"id": "example",
"value": 1.23,
"originalValue": 1.23,
"redeemType": "value",
"redeemed": true,
"isInRange": true,
"singleSpending": true,
"unlimited": true,
"spendings": [
{
"orderId": "example",
"orderRef": "8b6adb4a216fa16ccf67c473",
"amount": 29.99,
"origin": "example",
"date": 1734100779916
}
],
"spendingLimit": 42,
"startDate": 1729701697938,
"expires": 1724504359928,
"resourcePath": "example",
"user": {
"type": "example",
"name": "example",
"email": "email@example.com",
"ref": "653c3b6d5b3521a7f6e994f3"
},
"created": 1768934421959,
"createdBy": {
"type": "example",
"name": "example",
"email": "email@example.com",
"ref": "c519cb37fff73c1cea9e8248"
},
"note": {
"date": 1708702400089,
"content": "example"
},
"logs": [
{
"action": "example",
"description": "example",
"date": 1761313549676,
"ip": "example"
}
],
"recipients": [
{
"recipient": "example",
"date": 1760926721558
}
],
"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!