---
schema_version: "1"
id: 188a9a5b1c12c7f3b363f77cdaa4d4a419021f2459cbe92899ca28a60196b137
title: Reward SPI
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/commerce-cloud/retail-cloud/reference/generated-api-specs/reward-spi.md
canonical_url: https://developer.salesforce.com/docs/commerce/retail-cloud/references/reward-spi
source_site: developer.salesforce.com
content_type: documentation
content_hash: cf7e4f6e83b0fb303669b212447f753a5c6ae20242b0a600f07b5c0a6ac914c4
products:
  - Point of Sale for Developers
  - Salesforce APIs
---
Reward SPI

# Reward SPI

[Download specification](https://developer.salesforce.com/static/commercecloud/retail-cloud/reward-spi/reward-spi-oas-public.yaml)

Sample reward-related APIs that demonstrate how to implement API endpoints or webhooks in the merchant's system. These endpoints must be configured in the POS system.

**Version:** 2.3.4

## Tags

### Reward SPI

[Download specification](https://developer.salesforce.com/static/commercecloud/retail-cloud/reward-spi/reward-spi-oas-public.yaml)

Sample reward-related APIs that demonstrate how to implement API endpoints or webhooks in the merchant's system. These endpoints must be configured in the POS system.

## Operations

### POST Look up rewards.

`POST /merchant/sample/endpoint/reward/lookup`

Operation ID: `lookupRewards`. Tags: Reward SPI.

Fetch the available rewards for a customer that can be applied as a tender. Reward lookup is done based on the customer account (CustomerId, Card Acquisition Token, etc.). Merchants must implement this endpoint per this specification and then configure it in CMS under **CMS** > **Store Management** > **Integration** > **Custom API Connectors** > **Create**. Make sure to create the endpoint in CMS with the following details:

1.  Under **API Config**:
    *   **API Key:** `REWARD_LOOKUP`
    *   **API Endpoint:** Provide the external endpoint to get the order, for example: [https://sample/external/endpoint/lookupRewards](https://sample/external/endpoint/lookupRewards)
2.  Under **JSON Config**:
    *   **Integration Type:** `HTTP_POST`
    *   **JSON Headers:** Provide the header for the API. Headers can be Content-Type, Authorization attributes like clientId/password, for example: {"Content-Type":"application/json","client\_id":"myClientId","client\_secret":"myClientSecret"}.

#### Request body

Media type: `*/*`. Schema: `SpiRewardLookupRequest`.

#### Responses

*   **default** Default response.
    
    Media type: `application/json`. Schema: `SpiRewardLookupResponse`.
    

## Schemas

### SpiRewardLookupRequest

Request to look up rewards based on customer details such as Customer ID or Token value. At least one of the fields is required.

*   `customerId` (_string_) Customer ID.
*   `loyaltyId` (_string_) Loyalty Id of the customer.
*   `alias` (_string_) Card Alias/Token Value from the customer card acquisition response.
*   `issuerCountry` (_string_) The Card issuer country.
*   `cardCountryCode` (_string_) The country code present in card acquisition response.

### SpiRewardLookupResponse

*   `errorMessage` (_string_, nullable) Error message shown to the user.  
    Example: `Invalid request. Please check the request and try again.`.
*   `errorCode` (_string_, nullable) Error code shown to the user.  
    Example: `INTERNAL_ERROR`.
*   `rewards` (_array of Reward_, required) List of applicable/available rewards earned by the customer. Response is mandatory for a successful response, can be an empty list.
*   `error` (_boolean_)

### Reward

Earned rewards.

*   `issueDate` (_integer (int64)_)
*   `expiryDate` (_integer (int64)_)
*   `description` (_string_)
*   `amount` (_number_) Amount value of the reward. Required for reward types : Discount and Tender.
*   `rewardName` (_string_)
*   `code` (_string_)
*   `pin` (_string_)
*   `codeType` (_string_)
*   `labelText` (_string_)
*   `disclaimerText` (_string_)
*   `rewardType` (_string_)  
    Allowed values: `Discount`, `Coupon`, `Tender`.
*   `isImageOnly` (_boolean_)
*   `rewardImageURL` (_string_)
*   `rewardInputType` (_string_)
*   `status` (_string_)  
    Allowed values: `REDEEMED`, `EXPIRED`, `AVAILABLE`, `CANCELLED`.
*   `statusDesc` (_string_)
*   `canRedeemNow` (_boolean_)
*   `redeemedDate` (_integer (int64)_)
*   `customAttributes` (_object_)
    
    Additional properties: `object`.
    
*   `rewardId` (_string_, required, read-only) The ID of the loyalty reward. In the case of reward coupon,  
    it will be coupon code. In the case of discount reward, it is unique identifier.  
    Maximum length: 512.
*   `combinable` (_boolean_) Specifies whether multiple rewards can be applied to the same cart.
*   `points` (_integer (int32)_, nullable) Optional points value for the reward, if sent, it will be used for display and for validation against the current points of the customer ( loyaltyProfile.currentPoints).