Cart offers

Retrieve all POP offers for a cart

get

Retrieve all offers for a cart with the specified point-of-promotion in the {popName} URI path parameter. For example, specify a popName "CandyRack_ShoppingCart", a cart-specific offer returned by this method is a candy rack offer.

The retrieved offers include:

  • Trigger type is Always Triggered offers
  • Trigger type is User Triggered (Promotional URL / External Triggered Offers) and has been triggered

The retrieved offers does not include:

  • Coupon Code offers, even the coupon code offer has been triggered
Path parameters
popNamestringRequired

Provide the name of the point of Promotion (POP).

Query parameters
tokenstringOptional

Provide the authorized or anonymous token for a shopper.

fieldsstringOptional

Specify the fields that you want to appear in the response. Filtering the fields returned in the response can conserve bandwidth and accelerate response time.

formatstringOptional

Override the default format of XML for the Authorize Shopper API. Valid values are XML and JSON.

Responses
get
GET /v1/shoppers/me/carts/active/point-of-promotions/{popName}/offers HTTP/1.1
Host: api.digitalriver.com
Accept: */*
{
  "offers": {
    "uri": "https://api.digitalriver.com/v1/shoppers/me/carts/active/point-of-promotions/Interstitial_CrossSell/offers",
    "offer": [
      {
        "uri": "https://api.digitalriver.com/v1/shoppers/me/point-of-promotions/Interstitial_CrossSell/offers/19351557308",
        "id": 19351557308,
        "productOffers": {
          "uri": "https://api.digitalriver.com/v1/shoppers/me/point-of-promotions/Interstitial_CrossSell/offers/19351557308/product-offers"
        }
      }
    ]
  }
}

Retrieve cart applied offers

get

Retrieve all offers applied to the cart. A cart can have below offers be applied:

  • Order Level Discount – Discounts the total costs for an order. When the cart has multiple Order Level Discount offers, only the one that provide the best discount to the shopper is used.
  • Order Level Shipping Discount – Discounts shipping costs for an entire order. When the cart has multiple Order Level Shipping Discount offers, only the one that provide the best discount to the shopper is used.
  • Item Level Discount – Discounts costs associated with a single line item (product). When the item has multiple Item Level Discount offers, only the one that provide the best discount to the shopper is used. If there are multiple line items in the cart, every line item can have its own best Item Level Discount offers.
  • Product Level Shipping Discount – Discounts shipping costs for a specific product in the order. When the product has multiple Product Level Shipping Discount offers, only the one that provide the best discount to the shopper is used. If there are multiple products in the cart, every product can have its own best Product Level Shipping Discount offers.
Query parameters
apiKeystringOptional

The client identifier used to authorize the request. You must specify either an apiKey or token.

tokenstringOptional

The customer's ID. You must specify either an apiKey or token.

Responses
get
GET /v1/shoppers/me/carts/active/applied-offers HTTP/1.1
Host: api.digitalriver.com
Accept: */*
200

Successful response.

{
  "appliedOffers": [
    {
      "id": "19383398500",
      "cartDescription": "Description of the cart",
      "appliedCouponCode": "CouponCodeExample",
      "appliedTo": {
        "appliedLevel": "Product(s) (Line Item)",
        "cartId": "33478770190",
        "lineItemId": "15217540193"
      },
      "type": "Discount"
    }
  ]
}

Delete specific cart applied offer

delete

Delete the specific offer applied to the customer's cart. If the offer type of the specific offer is bundle, the line item group will be break and the line item may be removed base on the bundle type.

Path parameters
offerIdstringRequired

Offer ID.

Query parameters
tokenstringOptional

Authorized or anonymous token for a customer.

Responses
delete
DELETE /v1/shoppers/me/carts/active/applied-offers/{offerId} HTTP/1.1
Host: api.digitalriver.com
Accept: */*

No content

Delete cart eligible offers

delete

Reset the promotions of the cart, clear all discounts and offers, including:

  • Always Trigger Offers (Site Level)
  • Promotional URL / External Trigger offers (User Level)
  • Coupon code (User Level)
  • Bundle offers, all product bundle offers, cross-sell offers and custom bundle offers
Query parameters
tokenstringOptional

Authorized or anonymous token for a customer.

Responses
delete
DELETE /v1/shoppers/me/carts/active/eligible-offers HTTP/1.1
Host: api.digitalriver.com
Accept: */*
204

Successful response.

No content

Last updated