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": "4670dd7a4f1337a1973f6663",
"note": "note"
}
Response
{
"voucherNoteUpdate": {
"_id": "350e5712d6e8f8bdb63a357b",
"type": "coupon",
"id": "example",
"value": 1.23,
"originalValue": 1.23,
"redeemType": "value",
"redeemed": true,
"isInRange": true,
"singleSpending": true,
"unlimited": true,
"spendings": [
{
"orderId": "example",
"orderRef": "2d5e015b6afec6a4b8dfa69e",
"amount": 29.99,
"origin": "example",
"date": 1757192949756
}
],
"spendingLimit": 42,
"startDate": 1764318131952,
"expires": 1767218866565,
"resourcePath": "example",
"user": {
"type": "example",
"name": "example",
"email": "email@example.com",
"ref": "5c47a017bc33cdc1358958bf"
},
"created": 1721915350353,
"createdBy": {
"type": "example",
"name": "example",
"email": "email@example.com",
"ref": "4d9332f519daa2bf3f988715"
},
"note": {
"date": 1744312406917,
"content": "example"
},
"logs": [
{
"action": "example",
"description": "example",
"date": 1748330068897,
"ip": "example"
}
],
"recipients": [
{
"recipient": "example",
"date": 1734110836835
}
],
"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. |