If you would like to get a raw Response object use the other getGiftCertificate function.
An object containing the options for this method.
A promise of type GiftCertificate.
An object containing the options for this method.
Set to true to return entire Response object instead of DTO.
A promise of type Response if rawResponse is true, a promise of type GiftCertificate otherwise.
Generated using TypeDoc
Shopper Gift Certificates
*# API Overview
Use the Shopper Gift Certificates API to obtain gift certificate details.
Authentication & Authorization
The Shopper Gift Certificates API requires a JSON Web Token acquired via the Shopper Customers endpoint:
https://{{shortCode}}.api.commercecloud.salesforce.com/customer/shopper-customers/v1/organizations/{{organizationId}}/customers/actions/login
You must include the relevant scope(s) in the client ID used to generate the SLAS token. For details, see Authorization Scopes Catalog.
Use Cases
Retrieve Existing Gift Certificate Details
A shopper who received a code identifying a gift certificate can use the gift certificate code to query information, such as the status or remaining balance.
Use Hooks
For details working with hooks, see Extensibility with Hooks.*
Simple example:
API Version: 0.0.33import { ShopperGiftCertificates } from "commerce-sdk-isomorphic"; const clientConfig = { parameters: { clientId: "XXXXXX", organizationId: "XXXX", shortCode: "XXX", siteId: "XX" } }; const shopperGiftCertificatesClient = new ShopperGiftCertificates(clientConfig);
Last Updated: