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": "8e016ab914878e7bcdeb9644",
"note": "note"
}
Response
{
"voucherNoteUpdate": {
"_id": "59b6f6f496828fab619d7563",
"type": "coupon",
"id": "example",
"value": 1.23,
"originalValue": 1.23,
"redeemType": "value",
"redeemed": true,
"isInRange": true,
"singleSpending": true,
"unlimited": true,
"spendings": [
{
"orderId": "example",
"orderRef": "17fae53d81b0ae6c87f1a1f8",
"amount": 29.99,
"origin": "example",
"date": 1736947569761
}
],
"spendingLimit": 42,
"startDate": 1755441009826,
"expires": 1725698056740,
"resourcePath": "example",
"user": {
"type": "example",
"name": "example",
"email": "email@example.com",
"ref": "baff4714560a0535ec734cc8"
},
"created": 1708236652239,
"createdBy": {
"type": "example",
"name": "example",
"email": "email@example.com",
"ref": "f1af8a5de2d2aa83cfa8e4b2"
},
"note": {
"date": 1760988158517,
"content": "example"
},
"logs": [
{
"action": "example",
"description": "example",
"date": 1743922238515,
"ip": "example"
}
],
"recipients": [
{
"recipient": "example",
"date": 1717367610780
}
],
"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. |