latestOpenAPI 3.0.02026-08-1056429755.6 KB

a6efafc1669c

Manage Offer (Synchronous API)

Create an offer

Creates a new offer.

post/v1/offers

Headers

x-siteIdstring required

The site ID associated with the offer.

Request body

namestring required

Name of an offer.

descriptionstring

A description of the offer.

externalReferenceOfferIdstring

The external reference identifier of the offer.

offerTypestring required

Type of the offer.

offerTriggerstring required

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

couponTypestring required

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

offerStartDatestring

Start date of an offer.

offerEndDatestring

End date of an offer.

totalUsageLimitnumber

Total usuage limit of an offer.

shopperUsageLimitnumber

Shopper usage limit of an offer.

catalogIdstring

The catalog associated to the offer.

currencystring required

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

priceListTypestring

The price list of the offer.

Example request

{
  "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
    }
  ]
}

Response

Offer successfully created.

idstring

Identifier of an offer..

statusstring

Status of an offer.

namestring

The name of the offer.

descriptionstring

Description of an offer.

externalReferenceOfferIdstring

The external reference identifier of the offer.

siteIdstring

The site ID associated with the offer.

offerTypestring

The type of the offer.

offerTriggerstring

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

offerStartDatestring

Start date of an offer.

offerEndDatestring

End date of an offer. End date must be a future date.

creationDatestring

The date of creation of an offer.

modificationDatestring

The date of modification of an offer.

defaultLocalestring

Default locale of an offer.

totalUsageLimitnumber

Total usuage limit of an offer.

shopperUsageLimitnumber

Shopper usage limit of an offer.

catalogIdstring

The catalog associated to the offer.

currencystring

The currency of an offer.

priceListTypestring

The price list of an offer.

Example response

{
  "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
    }
  ]
}