---
schema_version: "1"
id: 828dbc24b848531a7a62cf19a7b84ca6ecced98a13cbfa59673fe83a86e3df73
title: Shop Gift Certificate (deprecated)
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/commerce-cloud/b2c-commerce/references/generated-api-specs/ocapi-shop-gift-certificate.md
canonical_url: https://developer.salesforce.com/docs/commerce/b2c-commerce/references/ocapi-shop-gift-certificate
source_site: developer.salesforce.com
content_type: documentation
content_hash: 0bfae8969ae4cb3b5cea8be431159bb20d21ec752284a4201add28c14075d444
products:
  - B2C Commerce
  - Salesforce APIs
---
Shop Gift Certificate (deprecated)

# Shop Gift Certificate (deprecated)

The Shop API endpoints enable developers to build full shopper-experience applications such as storefronts. They are designed for high-scale usage, and include a number of areas such as Baskets & Orders, Customers, Products and Pricing. Shop API endpoints are typically read-only APIs, with the exception of baskets and orders.

**Version:** 25.6

## Servers

*   `https://{host}/s/{siteId}/dw/shop/v25_6`

Protocols: https.

## Security

*   `customers_auth` (basic) User authentication either for a registered or a guest customer (selectable in request body). Access via Base64 encoded customer:password string as 'Authorization: Basic' header.
*   `oauth2_application` (oauth2) Authentication flow with client ID and password with account manager.
    *   OAuth flow application (tokenUrl: https://account.demandware.com:443/dwsso/oauth2/access\_token)
    *   Scope x-info: Scopes are NOT supported. This is just a dummy, because the 'scopes' field is required.
*   `client_id` (apiKey) Add client ID for application identification. Alternative as 'client\_id' query parameter.
    *   API key in header: x-dw-client-id

## Operations

### POST Get Gift Certificate

`POST /gift_certificate`

Operation ID: `Get Gift Certificate`. Tags: gift\_certificate. Security: customers\_auth; oauth2\_application; client\_id.

Action to retrieve an existing gift certificate.

This endpoint may return the following faults:

*   404 - GiftCertificateNotFoundException - Thrown if the given gift certificate code is not valid.

#### Request body

Media type: `application/json, text/xml`. Schema: `gift_certificate_request`.

#### Responses

*   **404** `GiftCertificateNotFoundException` - Thrown if the given gift certificate code is not valid.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `gift_certificate`.
    

## Schemas

### gift\_certificate\_request

Document representing a gift certificate request data.

*   `gift_certificate_code` (_string_) The gift certificate code.

_Example_

```
{
  "gift_certificate_code": "123456789012"
}
```

### fault

Document representing a fault message that is returned whenever the HTTP status code is greater than or equal to 400 (which indicates an error).

*   `arguments` (_object_)
    
    A map that provides fault arguments.
    
    Data can be used to provide error messages on the client side.
    
    Additional properties: `object`.
    
*   `cause` (_cause_)
*   `display_message_pattern` (_string_) The localized display message pattern, if the request parameter display\_locale was given
*   `message` (_string_) The message text of the java exception.
*   `stack_trace` (_string_)
*   `type` (_string_) The name of the java exception.

### gift\_certificate

Document representing a gift certificate.

*   `amount` (_number (double)_) The gift certificate original amount.
*   `balance` (_number (double)_) The gift certificate balance.
*   `description` (_string_) The gift certificate description.
*   `enabled` (_boolean_) Is the gift certificate is enabled?
*   `masked_gift_certificate_code` (_string_) The masked gift certificate code.
*   `merchant_id` (_string_) The merchant ID.
*   `message` (_string_) The message.
*   `recipient_email` (_string_) The recipient email.
*   `recipient_name` (_string_) The recipient name.
*   `sender_name` (_string_) The sender name.
*   `status` (_string_) The gift certificate status.  
    Allowed values: `pending`, `issued`, `partially_redeemed`, `redeemed`.

_Example_

```
{
  "balance": 30,
  "description": "Enabled gift certificate",
  "enabled": true,
  "masked_gift_certificate_code": "********9012",
  "merchant_id": "00000001",
  "message": "...",
  "recipient_email": "jdoe@example.com",
  "recipient_name": "Joe Doe",
  "status": "pending"
}
```

### cause

*   `cause` (_cause_)
*   `message` (_string_)
*   `type` (_string_)