For the complete documentation index, see llms.txt. This page is also available as Markdown.

Promotions

Retrieve all promotions set for a product

get
Path parameters
ProductCodestringRequired

The editable code that you control at product-level, not the unique, system-generated product ID

Example: my_subscription_1
Header parameters
Acceptstring · enumRequiredDefault: application/jsonExample: application/jsonPossible values:
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Responses
200

OK

application/json
get/products/{ProductCode}/promotions/
GET /rest/6.0/products/{ProductCode}/promotions/ HTTP/1.1
Host: api.2checkout.com
Accept: application/json
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
200

OK

{
  "Items": [
    {
      "ChannelType": "ECOMMERCE",
      "Code": "62B7F22FC5",
      "Coupon": {
        "Code": "FDIHREE",
        "Type": "SINGLE"
      },
      "Description": "",
      "Discount": {
        "Type": "PERCENT",
        "Values": [
          "10%"
        ],
        "DefaultCurrency": "USD"
      },
      "Enabled": true,
      "InstantDiscount": false,
      "Name": "Early Adopter 10%",
      "PriceThreshold": {},
      "Translations": [
        {
          "Name": "testpromotion",
          "Language": "EN"
        }
      ],
      "Type": "REGULAR",
      "Sources": [],
      "PublishToAffiliatesNetwork": 0,
      "ApplyRecurring": "NONE",
      "RecurringChargesNumber": 0
    }
  ],
  "Pagination": {
    "Page": 1,
    "Limit": 10,
    "Count": 1
  }
}

Retrieve a product's promotion

get
Path parameters
ProductCodestringRequired

The editable code that you control at product-level, not the unique, system-generated product ID

Example: my_subscription_1
PromotionCodestringRequired

Unique, system-generated identifier 2Checkout associates with promotion campaigns.

Example: 62B7F22FC5
Header parameters
Acceptstring · enumRequiredDefault: application/jsonExample: application/jsonPossible values:
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Responses
200

OK

application/json
get/products/{ProductCode}/promotions/{PromotionCode}/
GET /rest/6.0/products/{ProductCode}/promotions/{PromotionCode}/ HTTP/1.1
Host: api.2checkout.com
Accept: application/json
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
200

OK

{
  "ChannelType": "ECOMMERCE",
  "Code": "62B7F22FC5",
  "Coupon": {
    "Code": "FDIHREE",
    "Type": "SINGLE"
  },
  "Description": "",
  "Discount": {
    "Type": "PERCENT",
    "Values": [
      "10%"
    ],
    "DefaultCurrency": "USD"
  },
  "Enabled": true,
  "InstantDiscount": false,
  "Name": "Early Adopter 10%",
  "PriceThreshold": {},
  "Translations": [
    {
      "Name": "testpromotion",
      "Language": "EN"
    }
  ],
  "Type": "REGULAR",
  "Sources": [],
  "PublishToAffiliatesNetwork": 0,
  "ApplyRecurring": "NONE",
  "RecurringChargesNumber": 0
}

Retrieve all active promotions

get
Query parameters
Typesstring · enumOptionalExample: REGULARPossible values:
Channelstring · enumOptionalExample: CHANNEL_MANAGERPossible values:
EnabledbooleanOptionalExample: true
CouponsstringOptionalExample: 81XS55D1,E14S5F17
ProductCodestringOptionalExample: 8DD3031DA7
PagenumberOptionalExample: 1
LimitnumberOptionalExample: 10
Header parameters
Acceptstring · enumRequiredDefault: application/jsonExample: application/jsonPossible values:
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Responses
200

OK

application/json
get/promotions/
GET /rest/6.0/promotions/ HTTP/1.1
Host: api.2checkout.com
Accept: application/json
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
200

OK

{
  "Items": [
    {
      "Code": "62B7F22FC5",
      "Name": "Early Adopter 10%",
      "Description": "",
      "StartDate": "2019-09-11",
      "EndDate": "2019-10-10",
      "MaximumOrdersNumber": -1,
      "MaximumQuantity": -1,
      "InstantDiscount": false,
      "Coupon": {
        "Type": "SINGLE",
        "Code": "EarlyAdopter123456"
      },
      "Enabled": true,
      "ChannelType": "ECOMMERCE",
      "Type": "REGULAR",
      "Discount": {
        "Type": "PERCENT",
        "Value": 10,
        "DefaultCurrency": "EUR"
      },
      "Products": [
        {
          "Code": "BKG20193"
        }
      ],
      "PriceThreshold": {},
      "Translations": [
        {
          "Name": "Early Adopter 10%",
          "Language": "EN"
        }
      ],
      "PublishToAffiliatesNetwork": 0,
      "ApplyRecurring": "NONE",
      "RecurringChargesNumber": 0
    }
  ],
  "Pagination": {
    "Page": 1,
    "Limit": 10,
    "Count": 1
  }
}

Add a new promotion

post
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Acceptstring · enumRequiredExample: application/jsonPossible values:
Body
or
or
or
Responses
200

OK

application/json
or
or
or
post/promotions/
POST /rest/6.0/promotions/ HTTP/1.1
Host: api.2checkout.com
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Accept: application/json
Content-Type: application/json
Content-Length: 430

{
  "Type": "REGULAR",
  "ApplyRecurring": "NONE",
  "ChannelType": "ECOMMERCE",
  "Coupon": {
    "Codes": [
      "code1",
      "code2"
    ],
    "Type": "MULTIPLE"
  },
  "Description": "Promo description1",
  "Discount": {
    "Type": "PERCENT",
    "Value": 41
  },
  "Enabled": true,
  "EndDate": "2019-12-31",
  "InstantDiscount": 0,
  "MaximumOrdersNumber": 0,
  "MaximumQuantity": 0,
  "Name": "Promo percentage REST",
  "Products": [
    {
      "Code": "my_subscription_1"
    }
  ],
  "PublishToAffiliatesNetwork": 0,
  "StartDate": "2019-11-30"
}
200

OK

{
  "Type": "REGULAR",
  "Code": "36232FD883",
  "Name": "Regular Promotion with multiple coupons",
  "Description": "",
  "StartDate": "2019-11-30",
  "EndDate": "2019-12-31",
  "MaximumOrdersNumber": -1,
  "MaximumQuantity": -1,
  "InstantDiscount": false,
  "Coupon": {
    "Type": "MULTIPLE",
    "Codes": [
      "BB200PROM0491",
      "BB200PROM0580"
    ]
  },
  "Enabled": true,
  "ChannelType": "ALL",
  "Discount": {
    "Type": "PERCENT",
    "Value": 41
  },
  "Products": [
    {
      "Code": "BKG20193,",
      "PricingOptionCodes": "null,"
    }
  ],
  "PriceThreshold": {
    "Amount": "null,"
  },
  "Translations": {
    "Name": "Regular Promotion with multiple coupons",
    "Language": "EN"
  },
  "Sources": [
    "source1234_test4",
    "source5678_test8"
  ],
  "PublishToAffiliatesNetwork": "0,",
  "ApplyRecurring": "NONE",
  "RecurringChargesNumber": 0
}

Retrieve a promotion

get
Path parameters
PromotionCodestringRequired

Unique, system-generated identifier 2Checkout associates with promotion campaigns.

Example: 62B7F22FC5
Header parameters
Acceptstring · enumRequiredDefault: application/jsonExample: application/jsonPossible values:
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Responses
200

OK

application/json
or
or
or
get/promotions/{PromotionCode}/
GET /rest/6.0/promotions/{PromotionCode}/ HTTP/1.1
Host: api.2checkout.com
Accept: application/json
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
200

OK

{
  "Code": "62B7F22FC5",
  "Name": "Early Adopter 10%",
  "Description": "",
  "StartDate": "2019-09-11",
  "EndDate": "2019-10-10",
  "MaximumOrdersNumber": -1,
  "MaximumQuantity": -1,
  "InstantDiscount": false,
  "Coupon": {
    "Type": "SINGLE",
    "Code": "EarlyAdopter123456"
  },
  "Enabled": true,
  "ChannelType": "ECOMMERCE",
  "Type": "REGULAR",
  "Discount": {
    "Type": "PERCENT",
    "Value": 10
  },
  "Products": [
    {
      "Code": "BKG20193"
    }
  ],
  "PriceThreshold": {},
  "Translations": [
    {
      "Name": "Early Adopter 10%",
      "Language": "EN"
    }
  ],
  "PublishToAffiliatesNetwork": 0,
  "ApplyRecurring": "NONE",
  "RecurringChargesNumber": 0,
  "ProductTaxCategoryUUID": null,
  "Cumulative": false
}

Update a promotion

put
Path parameters
PromotionCodestringRequired

Unique, system-generated identifier 2Checkout associates with promotion campaigns.

Example: 62B7F22FC5
Header parameters
Acceptstring · enumRequiredDefault: application/jsonExample: application/jsonPossible values:
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Body
or
or
or
Responses
200

OK

application/json
or
or
or
put/promotions/{PromotionCode}/
PUT /rest/6.0/promotions/{PromotionCode}/ HTTP/1.1
Host: api.2checkout.com
Accept: application/json
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Content-Type: application/json
Content-Length: 430

{
  "Type": "REGULAR",
  "ApplyRecurring": "NONE",
  "ChannelType": "ECOMMERCE",
  "Coupon": {
    "Codes": [
      "code1",
      "code2"
    ],
    "Type": "MULTIPLE"
  },
  "Description": "Promo description1",
  "Discount": {
    "Type": "PERCENT",
    "Value": 22
  },
  "Enabled": true,
  "EndDate": "2019-12-31",
  "InstantDiscount": 0,
  "MaximumOrdersNumber": 0,
  "MaximumQuantity": 0,
  "Name": "Promo percentage REST",
  "Products": [
    {
      "Code": "my_subscription_1"
    }
  ],
  "PublishToAffiliatesNetwork": 0,
  "StartDate": "2019-11-30"
}
200

OK

{
  "Code": "62B7F22FC5",
  "Name": "Early Adopter 10%",
  "Description": "",
  "StartDate": "2019-09-11",
  "EndDate": "2019-10-10",
  "MaximumOrdersNumber": -1,
  "MaximumQuantity": -1,
  "InstantDiscount": false,
  "Coupon": {
    "Type": "SINGLE",
    "Code": "EarlyAdopter123456"
  },
  "Enabled": true,
  "ChannelType": "ECOMMERCE",
  "Type": "REGULAR",
  "Discount": {
    "Type": "PERCENT",
    "Value": 10
  },
  "Products": [
    {
      "Code": "BKG20193"
    }
  ],
  "PriceThreshold": {},
  "Translations": [
    {
      "Name": "Early Adopter 10%",
      "Language": "EN"
    }
  ],
  "PublishToAffiliatesNetwork": 0,
  "ApplyRecurring": "NONE",
  "RecurringChargesNumber": 0
}

Add promotion coupon

post
Path parameters
PromotionCodestringRequired

Unique system generated promotion code

Example: EF61BCB8AF
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Acceptstring · enumRequiredExample: application/jsonPossible values:
Body
CodestringOptional
TypestringOptional
Responses
200

OK

application/json
post/promotions/{PromotionCode}/coupons/
POST /rest/6.0/promotions/{PromotionCode}/coupons/ HTTP/1.1
Host: api.2checkout.com
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Accept: application/json
Content-Type: application/json
Content-Length: 31

{
  "Code": "CODE",
  "Type": "SINGLE"
}
200

OK

{
  "Code": "CODE",
  "Type": "SINGLE"
}

Update promotion coupon

put
Path parameters
PromotionCodestringRequired

Unique system generated promotion code

Example: EF61BCB8AF
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Acceptstring · enumRequiredExample: application/jsonPossible values:
Bodyobject · PromotionCoupon[]
TypestringOptional

coupon type (SINGLE or MULTIPLE)

Example: SINGLE
CodestringOptional

coupon code

Example: CP2019-11
Responses
200

OK

application/json
put/promotions/{PromotionCode}/coupons/
PUT /rest/6.0/promotions/{PromotionCode}/coupons/ HTTP/1.1
Host: api.2checkout.com
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Accept: application/json
Content-Type: application/json
Content-Length: 33

{
  "Code": "CODEGI",
  "Type": "SINGLE"
}
200

OK

{
  "Code": "CODEGI",
  "Type": "SINGLE"
}

Delete promotion coupons

delete
Path parameters
PromotionCodestringRequired

Unique system generated promotion code

Example: EF61BCB8A
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Acceptstring · enumRequiredExample: application/jsonPossible values:
Responses
200

OK

application/json
delete/promotions/{PromotionCode}/coupons/
DELETE /rest/6.0/promotions/{PromotionCode}/coupons/ HTTP/1.1
Host: api.2checkout.com
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Accept: application/json
200

OK

true

Add products to a promotion

post
Path parameters
PromotionCodestringRequired

Unique system generated promotion code

Example: EF61BCB8AF
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Acceptstring · enumRequiredExample: application/jsonPossible values:
Bodyobject · PromotionProduct[]
CodestringOptional

Promotion code.

Example: Black Friday promo discount
PricingConfigurationCodestringOptional

Pricing configuration code.

Example: 548AF4CD26
PricingOptionCodesstring[]Optional
Responses
200

OK

application/json
CodestringOptional

Promotion code.

Example: Black Friday promo discount
PricingConfigurationCodestringOptional

Pricing configuration code.

Example: 548AF4CD26
PricingOptionCodesstring[]Optional
post/promotions/{PromotionCode}/products/
POST /rest/6.0/promotions/{PromotionCode}/products/ HTTP/1.1
Host: api.2checkout.com
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Accept: application/json
Content-Type: application/json
Content-Length: 31

[
  {
    "Code": "YOUR_PRODUCT_CODE1"
  }
]
200

OK

[
  {
    "Code": "YOUR_PRODUCT_CODE1"
  },
  {
    "Code": "YOUR_PRODUCT_CODE2",
    "PricingConfigurationCode": "YOUR_CONFIGURATION_CODE"
  },
  {
    "Code": "YOUR_PRODUCT_CODE3",
    "PricingConfigurationCode": "YOUR_CONFIGURATION_CODE2",
    "PricingOptionCodes": [
      "YOUR_PRICING_CODE1",
      "YOUR_PRICING_CODE1"
    ]
  }
]

Remove products from a promotion

delete
Path parameters
PromotionCodestringRequired

Unique system generated promotion code

Example: EF61BCB8AF
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Acceptstring · enumRequiredExample: application/jsonPossible values:
Responses
200

OK

No content

delete/promotions/{PromotionCode}/products/
DELETE /rest/6.0/promotions/{PromotionCode}/products/ HTTP/1.1
Host: api.2checkout.com
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Accept: application/json
200

OK

No content

Add promotion sources

post
Path parameters
PromotionCodestringRequired

Unique system generated promotion code

Example: EF61BCB8AF
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Acceptstring · enumRequiredExample: application/jsonPossible values:
Body
SOURCE_1stringOptional
SOURCE_2stringOptional
SOURCE_3stringOptional
Responses
200

OK

application/json
post/promotions/{PromotionCode}/sources/
POST /rest/6.0/promotions/{PromotionCode}/sources/ HTTP/1.1
Host: api.2checkout.com
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Accept: application/json
Content-Type: application/json
Content-Length: 34

[
  "SOURCE_1",
  "SOURCE_2",
  "SOURCE_3"
]
200

OK

[
  "SOURCE_1",
  "SOURCE_2",
  "SOURCE_3"
]

Delete promotion sources

delete
Path parameters
PromotionCodestringRequired

Unique system generated promotion code

Example: EF61BCB8AF
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Acceptstring · enumRequiredExample: application/jsonPossible values:
Responses
200

OK

application/json
delete/promotions/{PromotionCode}/sources/
DELETE /rest/6.0/promotions/{PromotionCode}/sources/ HTTP/1.1
Host: api.2checkout.com
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Accept: application/json
200

OK

true

Add promotion translations

put
Path parameters
PromotionCodestringRequired

Unique system generated promotion code

Example: EF61BCB8AF
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Acceptstring · enumRequiredExample: application/jsonPossible values:
Bodyobject · PromotionTranslation[]
NamestringOptional

Translation text.

Example: Regular promotion for October
LanguagestringOptional

Translation language code.

Example: EN
Responses
200

OK

application/json
NamestringOptional

Translation text.

Example: Regular promotion for October
LanguagestringOptional

Translation language code.

Example: EN
put/promotions/{PromotionCode}/translations/
PUT /rest/6.0/promotions/{PromotionCode}/translations/ HTTP/1.1
Host: api.2checkout.com
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Accept: application/json
Content-Type: application/json
Content-Length: 91

[
  {
    "Language": "DE",
    "Name": "Promotion DE name"
  },
  {
    "Language": "ES",
    "Name": "Promotion ES name"
  }
]
200

OK

[
  {
    "Language": "DE",
    "Name": "Promotion DE name"
  },
  {
    "Language": "ES",
    "Name": "Promotion ES name"
  }
]

Delete promotion translations

delete
Path parameters
PromotionCodestringRequired

Unique system generated promotion code

Example: EF61BCB8AF
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Acceptstring · enumRequiredExample: application/jsonPossible values:
Responses
200

OK

application/json
delete/promotions/{PromotionCode}/translations/
DELETE /rest/6.0/promotions/{PromotionCode}/translations/ HTTP/1.1
Host: api.2checkout.com
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Accept: application/json
200

OK

true

Update the discounts for a promotion

put
Path parameters
PromotionCodestringRequired

Unique system generated promotion code

Example: EF61BCB8AF
Header parameters
X-Avangate-AuthenticationstringRequired

Authentication header

Example: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Acceptstring · enumRequiredExample: application/jsonPossible values:
Body
or
Responses
200

OK

application/json
or
put/{PromotionCode}/discounts/
PUT /rest/6.0/{PromotionCode}/discounts/ HTTP/1.1
Host: api.2checkout.com
X-Avangate-Authentication: code="{VENDOR_CODE}" date="{REQUEST_DATE_TIME}" hash="{HASH}"
Accept: application/json
Content-Type: application/json
Content-Length: 328

{
  "FixedDiscount": {
    "summary": "Update a promotion with fixed discount",
    "value": {
      "Discount": {
        "Type": "FIXED",
        "DefaultCurrency": "USD",
        "Values": [
          {
            "Amount": 7,
            "Currency": "EUR"
          },
          {
            "Amount": 10,
            "Currency": "USD"
          }
        ]
      }
    }
  },
  "PercentDiscount": {
    "summary": "Update a promotion with percent discount",
    "value": {
      "Discount": {
        "Type": "PERCENT",
        "Value": 30
      }
    }
  }
}
200

OK

{
  "FixedDiscount": {
    "summary": "Fixed discount updated response",
    "value": {
      "Discount": {
        "Type": "FIXED",
        "DefaultCurrency": "USD",
        "Values": [
          {
            "Amount": 7,
            "Currency": "EUR"
          },
          {
            "Amount": 10,
            "Currency": "USD"
          }
        ]
      }
    }
  },
  "PercentDiscount": {
    "summary": "Percent discount updated response",
    "value": {
      "Discount": {
        "Type": "PERCENT",
        "Value": 30
      }
    }
  }
}

Last updated

Was this helpful?