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": "17719c75cab16236a627ba99",
"note": "note"
}

Response

{
"voucherNoteUpdate": {
"_id": "bb92c0ed736f2eb48b324c79",
"type": "coupon",
"id": "example",
"value": 1.23,
"originalValue": 1.23,
"redeemType": "value",
"redeemed": true,
"isInRange": true,
"singleSpending": true,
"unlimited": true,
"spendings": [
{
"orderId": "example",
"orderRef": "e2c18844f84e8d3b033bcf7e",
"amount": 29.99,
"origin": "example",
"date": 1760812078033
}
],
"spendingLimit": 42,
"startDate": 1765146606987,
"expires": 1765540191508,
"resourcePath": "example",
"user": {
"type": "example",
"name": "example",
"email": "email@example.com",
"ref": "05d4e1a0bb75eae93841072c"
},
"created": 1740374186389,
"createdBy": {
"type": "example",
"name": "example",
"email": "email@example.com",
"ref": "bd5b1413054d56cb3488100b"
},
"note": {
"date": 1703772470837,
"content": "example"
},
"logs": [
{
"action": "example",
"description": "example",
"date": 1752179314073,
"ip": "example"
}
],
"recipients": [
{
"recipient": "example",
"date": 1748853936092
}
],
"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!