How to use offers

Learn how to provide offers.

Offers are promotions or discounts that can be applied to products or services within your Digital River store. They can boost sales, engage customers, and drive traffic to your platform. In this section, you will learn how to manage and retrieve offers using the Digital River API, including creating, updating, and fetching offer details by their unique identifiers.

Getting an offer by identifier

When you need to retrieve specific details of an offer, you can obtain it using its unique identifier. This section explains how to send a request to get an offer by its ID, detailing the necessary API endpoint, request method, and required headers for authentication.

To get an offer by its identifier, send a GET /shoppers/me/offers/{offerId} request. Replace {offerId} with the actual offer ID you want to retrieve. Include a valid API key in the authorization header.

Example:

curl --location --request GET 
'https://api.digitalriver.com/shoppers/me/offers/{offerId}' \
--header 'Authorization: Bearer {API_key}' 

A successful 200 OK response returns the offer details in JSON format, including its status, discount amount, and terms.

Getting the product for the offer

You can access precise details about the product offer, including its pricing, images, and additional promotional information. This can be particularly useful for shoppers who wish to evaluate individual products within a broader promotional offer.

To retrieve a specific product for an offer, send a GET /shoppers/me/offers/{offerId}/product-offers/{productOfferId} request. Replace {offerId} and {productOfferId} with the respective IDs. Include a valid API key in the authorization header.

Example:

curl --location --request GET 
'https://api.digitalriver.com/shoppers/me/offers/{offerId}/product-offers/{productOfferId}' \
--header 'Authorization: Bearer {API_key}'

A successful request returns a 200 OK response.

Retrieving all offers for a product

Retrieving all offers for a specific product can be useful when displaying available promotions or deals associated with that product. Below, you'll find the necessary endpoint and an example of how to make the request and handle the response.

To retrieve all offers for a product, send a GET /shoppers/me/products/{productId}/offers request. Replace {productId} with the respective product ID. Include a valid API key in the authorization header.

Example:

curl --location --request GET 
'https://api.digitalriver.com/shoppers/me/products/{productId}/offers' \
--header 'Authorization: Bearer {API_key}' \

A successful request returns a 200 OK response.

Retrieving all offers

Retrieving all offers for a specific product is essential for showcasing various promotions, deals, and discounts available. This allows customers to take advantage of special pricing and other promotional benefits. The following guide explains retrieving these offers.

The retrieved offers include:

  • All always-triggered offers

  • All user-triggered promotional URLs and externally triggered offers

  • All user-triggered coupon code offers

To retrieve all offers for a specific product, send a GET /shoppers/me/offers request. Additionally, ensure a valid API key is included in the authorization header. This request retrieves all available offers for the specified product.

Example:

curl --location --request GET 
'https://api.digitalriver.com/shoppers/me/offers' \
--header 'Authorization: Bearer {API_key}' \

A successful request returns a 200 OK response.

Getting all products for the offer

You can gather comprehensive information about the products included in the offer, ensuring you have all the necessary data for further processing or display.

To get all products for an offer, send a GET /shoppers/me/offers/{offerId}/product-offers request. Replace {offerId} with the appropriate offer ID. Include a valid API key in the authorization header. This request retrieves all products associated with the specified offer.

Example:

curl --location --request GET 
'https://api.digitalriver.com/shoppers/me/offers/{offerId}/product-offers' \
--header 'Authorization: Bearer {API_key}' \

A successful request returns a 200 OK response.

Last updated