POST
/
v1
/
discounts
curl --request POST \
  --url https://vanilla-dev02-loyalty.fabric.zone/api/v1/discounts \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "profileId": "67460e74-02e3-11e8-b443-00163e990bdb",
  "entityReference": "Company_Club",
  "transactionTimestamp": "2020-02-08 09:30:26",
  "taxAmount": 1,
  "grossAmount": 6,
  "netAmount": 5,
  "transactionItems": [
    {
      "grossAmount": 6,
      "taxAmount": 1,
      "netAmount": 5,
      "categories": [
        "Proteins",
        "Adults"
      ],
      "itemName": "Whey",
      "itemPrice": 5,
      "itemQuantity": 1,
      "SKU": "123456"
    }
  ]
}'
{
  "status": 200,
  "message": "Created",
  "errors": {},
  "data": [
    {
      "grossAmount": 6,
      "taxAmount": 1,
      "netAmount": 4,
      "discounts": [
        {
          "type": "tier",
          "description": "20.0% discount from tier rule.",
          "value": 1,
          "id": 23,
          "ruleName": "tier-discount-rule",
          "discountPercentage": 20,
          "discountAmount": 1
        }
      ],
      "transactionItems": [
        {
          "SKU": "123456",
          "discounts": []
        }
      ],
      "miscellaneous": []
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Response

200
application/json
Ok

Response of the Discounts API