Menu
site_giftCertificate
Details of a gift certificate.
Use it in a workflow
- Add a step and choose the BigCommerce Storefront connector.
- Pick the site_giftCertificate action (under Gift).
- Fill in the fields below, then reference the result from later steps as
{{siteGiftcertificate.response.data}}.
Query
This is the query the action sends by default. Edit it in the step's Query field to change which fields come back.
query SiteGiftCertificate($code: String!) {
site {
giftCertificate(code: $code) {
amount {
currencyCode
value
formatted
formattedV2
}
balance {
currencyCode
value
formatted
formattedV2
}
code
currencyCode
message
status
recipient {
name
email
}
sender {
name
email
}
purchasedAt {
utc
}
expiresAt {
utc
}
theme
html
}
}
}
Variables
Pass these as a JSON object in the step's Variables field.
{
"code": "string"
}
Response
Read the result with {{siteGiftcertificate.response.data.data.giftCertificate}}. If the API returns errors, the step fails and they are at {{siteGiftcertificate.response.data.errors}}.
Need more? See the BigCommerce Storefront guide for connection setup and behaviour shared by every action.
Was this page helpful?