Skip to main content

removeVoucher Mutation

Description

Removes a voucher from a checkout.

mutation removeVoucher($id: String!) {
removeVoucher(id: $id) {
_id
id
configRef
origin
created
shipping {
status
date
method
freeShippingThreshold
tracking
shopCollection
weight
}
billing {
status
paymentDate
refundDate
}
orderId
note {
date
content
}
items {
_id
id
quantity
added
total
unavailable
}
buyer {
_id
email
firstName
id
lastName
name
telephone
organisation
taxNumber
isGuest
}
seller {
_id
id
firstName
lastName
name
email
telephone
taxNumber
}
updated
expires
status
message
totals {
grand
leftToPay
discount
itemsQuantity
itemQuantity
subtotal
subtotalBeforeTaxes
shipping
tax
}
urls {
checkout
storefront
}
useSingleAddress
}
}

Variables

{
"id": "08a16b83-9094-4e89-8c05-2ccadd5c1c7e"
}

Response

{
"removeVoucher": {
"_id": "ca2fc576de699203e104eec3",
"id": "example",
"configRef": "6ed00f92c8228e00d51c9b19",
"origin": "example",
"created": 1754496824982,
"shipping": {
"status": "example",
"date": 1733906039458,
"method": "example",
"freeShippingThreshold": 1.23,
"tracking": "example",
"shopCollection": true,
"weight": "example"
},
"billing": {
"status": "example",
"paymentDate": 1716256818647,
"refundDate": 1746775040123
},
"orderId": "example",
"note": {
"date": 1745722970570,
"content": "example"
},
"items": [
{
"_id": "04a43626fcde042469f5d59e",
"id": "70a7d62b6be0c0c38bcd6162",
"quantity": 1.23,
"added": 1734756305838,
"total": 29.99,
"unavailable": true
}
],
"buyer": {
"_id": "3b4db5238497ee8b98771407",
"email": "email@example.com",
"firstName": "example",
"id": 1.23,
"lastName": "example",
"name": "example",
"telephone": "example",
"organisation": "example",
"taxNumber": "example",
"isGuest": true
},
"seller": {
"_id": "f0d3483463ea203d7daf4e57",
"id": "example",
"firstName": "example",
"lastName": "example",
"name": "example",
"email": "email@example.com",
"telephone": "example",
"taxNumber": "example"
},
"updated": 1747873454100,
"expires": 1733360112501,
"status": "example",
"message": "example",
"totals": {
"grand": 1.23,
"leftToPay": 1.23,
"discount": 0.1,
"itemsQuantity": 1.23,
"itemQuantity": 42,
"subtotal": 1.23,
"subtotalBeforeTaxes": 1.23,
"shipping": 1.23,
"tax": 1.23
},
"urls": {
"checkout": "example",
"storefront": "example"
},
"useSingleAddress": true
}
}

Arguments

NameTypeDescription
idString!Checkout identifier string.

Returns

Checkout!