ops
ops-discounts

Create a discount

Changed on

Create a discount

post/ops/discount

Request

  • Base URL
    https://api.topi-staging.eu
  • URL
    https://api.topi-staging.eu/ops/discount
  • Auth
    OAuth 2
    Authorization code: /oauth2/authorize
    Token URL: /oauth2/token scopes: discount:edit

Request body

allowed_usage_countinteger required

how many times this discount code can be used

codestring

discount code

descriptionstring

discount description (campaign, seller ...

rulesobject required

How this discount will be applied

seller_idstring regexp required

seller ID

type'fixed_initial_rent_waiver' required
valid_fromstring date-time required
valid_untilstring date-time required

Example request

{
  "allowed_usage_count": 1,
  "code": "abc123",
  "description": "abc123",
  "minimum_merchandise_value": {
    "amount": 34000,
    "currency": "EUR"
  },
  "rules": {
    "abc123": "abc123"
  },
  "seller_id": "739b63c2-9e58-4964-b38d-4ebb424de242",
  "type": "fixed_initial_rent_waiver",
  "valid_from": "1970-01-01T00:00:01Z",
  "valid_until": "1970-01-01T00:00:01Z"
}

Response

OK response.

Changes

    • info

      api operation id discount.createDiscount removed and replaced with discount#createDiscount

    • info

      api operation id discount#createDiscount removed and replaced with discount.createDiscount

    • info

      api tag ops-discounts added