quoteAddCoupon
Add a coupon to a quote; it goes on the quote's subscription change (not an adjustment or an add-on), and fails unless the quote has exactly one. Use this when you only know the quote, e.g. self-service checkout and signup; to target a specific change, use quoteChangeAddCoupon. The quoteAddCoupon mutation in Bunny's GraphQL API, with its input attributes, return type and an example request.
Scope required: standard:write
mutation quoteAddCoupon ($id: ID!, $couponCode: String!) {
quoteAddCoupon (id: $id, couponCode: $couponCode) {
errors
quote {
acceptedAt
acceptedByName
acceptedByTitle
accountId
amount
amountAsCurrency
amountDue
applicationDate
applied
applyOnAccept
backdatedPeriods
backdatedQuote
billingDay
contactId
createdAt
credits
currencyId
customFieldsData
dealId
discount
discountValue
documentTemplateId
emailBody
emailSubject
endDate
evergreen
expiresAt
hasCustomFields
id
invoiceImmediately
invoiceImmediatelyAvailable
invoiceUntil
isPendingApprovalRequest
message
name
netPaymentDays
notes
number
ownerId
payToAccept
payableId
periodAmount
poNumber
requiresApproval
sharedAt
signingIntegration
skipBackdatedInvoices
smallUnitAmountDue
splitInvoice
startDate
subtotal
taxAmount
taxCode
taxationEnabled
updatedAt
userEmailBody
userEmailSubject
uuid
viewedAt
}
}
}
Arguments
{
"id": "456123",
"couponCode": ""
}
| Name | Type | Description |
|---|---|---|
| id | ID | |
| couponCode | String |
Response
| Name | Type | Description |
|---|---|---|
| errors | List (String) | |
| quote | Quote |