Shopper Gift Certificates

POST Retrieve an existing gift certificate.

POST /organizations/{organizationId}/gift-certificate

Operation ID: getGiftCertificate. Security: ShopperToken (sfcc.shopper-gift-certificates, sfcc.shopper-standard); ShopperClientContextToken (sfcc.shopper-gift-certificates, sfcc.shopper-standard).

Parameters

  • organizationId (path, OrganizationId, required) An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character realm identifier and a 3-character instance type identifier.

    Example

    f_ecom_zzxy_prd
  • siteId (query, SiteId, required) The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.

    Example: SiteId

    RefArch
  • sfdc_usid (header, string (uuid)) A unique shopper identifier (USID) for tracking client context. Used with endpoints secured with ShopperClientContextToken. This header is required for all endpoints secured with ShopperClientContextToken.
    Example: 550e8400-e29b-41d4-a716-446655440000.
  • sfdc_shopper_context (header, string) Shopper context information (for example clientIP, sourceCode, and customQualifiers) passed in from a trusted backend application.

Request body

Media type: application/json. Schema: GiftCertificateRequest.

Example: Gift-Certificates

{
  "giftCertificateCode": "MYGIFTCERTIFICATECODE"
}

Responses

  • 200 Gift certificate retrieved successfully.

    Media type: application/json. Schema: GiftCertificate.

    Example: CreateGiftCertificate A newly issued gift certificate with full balance.

    {
      "amount": 100,
      "balance": 100,
      "enabled": true,
      "maskedGiftCertificateCode": "************FJWQ",
      "merchantId": "00000001",
      "recipientEmail": "jane.doe@example.com",
      "recipientName": "Jane Doe",
      "senderName": "John Smith",
      "status": "issued",
      "description": "Happy Birthday!"
    }
  • 404 Returned when the given gift certificate code is not valid.

    Media type: application/problem+json. Schema: ErrorResponse.

    Example: GiftCertificate404

    {
      "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/not-found",
      "title": "Gift Certificate Not Found Exception",
      "detail": "The gift certificate with the provided code could not be retrieved."
    }