v1

latestOpenAPI 3.1.02026-07-24920300.7 KB

Create

Creates a one-time discount and attaches it to a specific item, order, or shipping rate for an individual customer.

post/one_time_incentives/create/

Request body

merchantstring required

Merchant ID

customerstring required

Customer ID

descriptionstring

Description

expiresstring date

Date by which Order Must Place to Apply discount

itemstring

Send Item ID to apply a One Time Incentive to a specific item. This field and order are mutually exclusive, but one is required.

orderstring

Send Order ID to apply a One Time Incentive to a specific order. This field and item are mutually exclusive, but one is required.

stacking_typestring

Choose 'base' or 'additional' for a standard discount or an additive one (defaults to 'base')

external_codestring

External Code

Response

201

OR
OR
OR
OR

Example response

{
  "public_id": "8637c3fe9b7011eaa2c1bc764e107990",
  "external_code": "one_time_item_discount",
  "description": "One-Time Item Incentive",
  "merchant": "ac4f7938383a11e89ecbbc764e1107f2",
  "customer": "00026001",
  "item": "a6f7305aed3511eebfaf6a353c182723",
  "created": "2020-05-21 09:36:57",
  "last_updated": "2020-05-21 09:36:57",
  "incentive": {
    "type": "Discount",
    "public_id": "c34a8c03eae641d0ab7015bedec6fbd0",
    "discount_type": "Discount Percent",
    "target": "item",
    "field": "total_price",
    "name": "One Time Item Discount",
    "value": "75.00"
  }
}