LogoLogo
System status
Admin APIs reference
Admin APIs reference
  • Admin APIs reference
  • Order management
    • Refunds
    • Retrieve an order (synchronous API)
    • Retrieve an invoice (synchronous API)
    • Manage orders (synchronous API)
  • Customer management
    • Retrieve a customer (synchronous API)
    • Manage a customer (synchronous API)
  • Subscription mangement
    • Manage a subscription
    • Renew a subscription
    • Apply an immediate midterm change
    • Manage subscription payments
    • Modify the subscription's external reference ID
    • Manage the subscription's address
    • Get all orders
    • Retrieve subscriptions with pending actions
    • Retrieve subscriptions
    • Manage a perpetual price
    • Update a subscription's email address
  • Site management
    • Get authorized countries
  • Product management
    • Manage products (asynchronous API)
    • Retrieve a product (synchronous API)
    • Retrieve the product task status (synchronous API)
  • Offer Management
    • Manage offers (synchronous API)
    • Retrieve an offer (synchronous API)
  • Webhook management
    • Manage webhook events
  • Payment source
    • Source management
  • File management
    • Retrieve a file
Powered by GitBook
On this page
  1. Offer Management

Manage offers (synchronous API)

PreviousRetrieve the product task status (synchronous API)NextRetrieve an offer (synchronous API)

Last updated 10 months ago

Create an offer

post

Creates a new offer.

Authorizations
Header parameters
x-siteIdstringRequired

The site ID associated with the offer.

Body
namestringRequired

Name of an offer.

Example: Offer_New_1
descriptionstringOptional

A description of the offer.

Example: Offer_New_1
externalReferenceOfferIdstringOptional

The external reference identifier of the offer.

Example: Offer_New_1
offerTypestringRequired

Type of the offer.

Example: discount
offerTriggerstringRequired

Determines how the offer is triggered. Possible values are promotionalUrlOrExternalTriggered, alwaysTriggered, couponCode, siteTest.

Example: promotionalUrlOrExternalTriggered
couponTypestringRequired

Type of the added coupon. If offerTrigger is couponCode then couponType field is required. Possible values are importCouponCodes, enterCouponCodes, generateCouponCodes, rangeCouponCodes.

Example: importCouponCodes
offerStartDatestringOptional

Start date of an offer.

Example: 2024-05-12T00:00:00.000Z
offerEndDatestringOptional

End date of an offer.

Example: 2024-05-13T00:00:00.000Z
totalUsageLimitnumberOptional

Total usuage limit of an offer.

Example: 18
shopperUsageLimitnumberOptional

Shopper usage limit of an offer.

Example: 12
catalogIdstringOptional

The catalog associated to the offer.

Example: 823600
currencystringRequired

The currency of an offer. It is required only when we have product’s discountType either 'Amount' or 'Amount Off'.

Example: USD
priceListTypestringOptional

The price list of the offer.

Example: listPrice
Responses
201
Offer successfully created.
application/json
400
* Bad request.
application/json
401
* Please verify your API key and secret (if applicable) is correct.
post
POST /v1/offers HTTP/1.1
Host: api.digitalriver.com
Authorization: Basic username:password
x-siteId: text
Content-Type: application/json
Accept: */*
Content-Length: 508

{
  "name": "Offer_New_1",
  "description": "Offer_New_1",
  "externalReferenceOfferId": "Offer_New_1",
  "offerType": "discount",
  "offerTrigger": "promotionalUrlOrExternalTriggered",
  "couponType": "importCouponCodes",
  "offerStartDate": "2024-05-12T00:00:00.000Z",
  "offerEndDate": "2024-05-13T00:00:00.000Z",
  "supportedLocales": [
    {
      "locale": "en_GB"
    }
  ],
  "totalUsageLimit": 18,
  "shopperUsageLimit": 12,
  "catalogId": "823600",
  "currency": "USD",
  "priceListType": "listPrice",
  "products": [
    {
      "id": "287656800",
      "discountType": "Amount",
      "discountValue": 2
    }
  ]
}
{
  "id": "426368220289",
  "status": "Draft",
  "name": "Key_New_315511",
  "description": "New_Release_Offer_5",
  "externalReferenceOfferId": "Key_New_315511",
  "siteId": "paytest2",
  "offerType": "discount",
  "offerTrigger": "promotionalUrlOrExternalTriggered",
  "offerStartDate": "2024-05-12T00:00:00.000Z",
  "offerEndDate": "2024-05-13T00:00:00.000Z",
  "creationDate": "2024-05-02T08:29:00.275Z",
  "modificationDate": "2024-05-02T08:29:00.275Z",
  "defaultLocale": "en_US",
  "supportedLocales": [
    {
      "locale": "en_CA"
    }
  ],
  "totalUsageLimit": 1,
  "shopperUsageLimit": 1,
  "catalogId": "823600",
  "currency": "USD",
  "priceListType": "listPrice",
  "products": [
    {
      "id": "287656800",
      "discountType": "Amount",
      "discountValue": 2
    }
  ]
}