younifyd
Menu

site_giftCertificate

Details of a gift certificate.

Use it in a workflow

  1. Add a step and choose the BigCommerce Storefront connector.
  2. Pick the site_giftCertificate action (under Gift).
  3. 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.

graphql
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.

codestringrequired

The gift certificate code.

json
{
  "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}}.

amountobject
currencyCodestring
valuestring
formattedstring
formattedV2string
balanceobject
currencyCodestring
valuestring
formattedstring
formattedV2string
codestring
currencyCodestring
messagestring
statusstring

One ofACTIVEDISABLEDEXPIREDPENDING

recipientobject
namestring
emailstring
senderobject
namestring
emailstring
purchasedAtobject
utcstring
expiresAtobject
utcstring
themestring

One ofBIRTHDAYBOYCELEBRATIONCHRISTMASGENERALGIRL

htmlstring

Need more? See the BigCommerce Storefront guide for connection setup and behaviour shared by every action.

Was this page helpful?