Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ShopperGiftCertificates<ConfigParameters>

*# 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:

  import { ShopperGiftCertificates } from "commerce-sdk-isomorphic";

  const clientConfig = {
    parameters: {
      clientId: "XXXXXX",
      organizationId: "XXXX",
      shortCode: "XXX",
      siteId: "XX"
    }
  };
  const shopperGiftCertificatesClient = new ShopperGiftCertificates(clientConfig);
API Version: 0.0.33
Last Updated:

Type parameters

Hierarchy

  • ShopperGiftCertificates

Index

Constructors

Properties

Methods

Object literals

Constructors

constructor

Properties

clientConfig

clientConfig: ClientConfig<ConfigParameters> & { baseUri: string }

Static Readonly defaultBaseUri

defaultBaseUri: "https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-gift-certificates/v1" = currentBaseUri

Static Readonly paramKeys

paramKeys: { getGiftCertificate: ["organizationId", "siteId"]; getGiftCertificateRequired: ["organizationId", "siteId"] } = {getGiftCertificate: ['organizationId','siteId',],getGiftCertificateRequired: ['organizationId','siteId',],} as const

Type declaration

  • getGiftCertificate: ["organizationId", "siteId"]
  • getGiftCertificateRequired: ["organizationId", "siteId"]

Methods

getGiftCertificate

Object literals

Static Readonly apiPaths

apiPaths: object

getGiftCertificate

getGiftCertificate: string = "/organizations/{organizationId}/gift-certificate"

Generated using TypeDoc