POST Discounts

​

Get Discounts

Headers

  • Unique request identifier

  • Application key

  • Accept header

  • Api version

  • Authorization header

  • Local language code (in format xx-XX, or simpler xx) for translation purposes

Body

application/json
  • Integer numbers.

Responses

  • application/json
Request Example for post/discounts
curl https://api-public-demo.menu.app/api/discounts \
  --request POST \
  --header 'X-Request-ID: c10b4a70-6274-490d-80a0-03e7bb826937' \
  --header 'Application: ' \
  --header 'Accept: application/json' \
  --header 'API-version: 5.0.0' \
  --header 'Authorization: ' \
  --header 'Content-Language: en' \
  --header 'Content-Type: application/json' \
  --data '{
  "type_id": 2
}'
{
  "status": "OK",
  "code": 200,
  "data": {
    "discounts": [
      {
        "id": "775992c5-89be-4027-81fc-a6554e293fc4",
        "type_id": 2,
        "reference_type": "LoyaltyReward",
        "brand_id": "31237bf8-e25d-4417-977d-5027bc34c217",
        "position": 0,
        "name": "Percentage Off Regular Item Reward",
        "description": "Test description",
        "tracking_code": "",
        "max_redemption_count": null,
        "date_from": null,
        "date_to": null,
        "reduction_type": 3,
        "reduction_level_type": 2,
        "reduction_price": 0,
        "reduction_amount": null,
        "reduction_percentage": 50,
        "is_registered_only": true,
        "show_only_in_ordering_flow": false,
        "image": {
          "thumbnail_small": "/storage/images/discount_images/_thumbs280/2022-10-31/5f7249ed8a4a605c4adfd98e4afa3bf1.png",
          "thumbnail_medium": "/storage/images/discount_images/_thumbs720/2022-10-31/5f7249ed8a4a605c4adfd98e4afa3bf1.png",
          "fullsize": "/storage/images/discount_images/2022-10-31/5f7249ed8a4a605c4adfd98e4afa3bf1.png"
        },
        "channels": [
          {
            "id": "6048024d-2f66-4147-a158-392c47759fe6",
            "type_id": 3,
            "reference_type": "DiscountMobileChannel",
            "properties": null
          }
        ],
        "discount_tags": [
          {
            "id": "0b9b1f65-363d-463b-815a-e77baf5eb086",
            "discount_tag_group_id": "aee69310-8718-4006-9323-7d6a50077868",
            "name": "0.3",
            "position": 2,
            "is_visible": true,
            "translations": {
              "name": "0.3"
            },
            "created_at": "2022-12-19 09:33:55",
            "updated_at": "2022-12-19 09:33:55",
            "is_primary": true
          }
        ],
        "discount_conditions": [],
        "translations": {
          "name": "Percentage Off Regular Item Reward",
          "description": "Test description",
          "image": {
            "thumbnail_small": "/storage/images/discount_images/_thumbs280/2022-10-31/5f7249ed8a4a605c4adfd98e4afa3bf1.png",
            "thumbnail_medium": "/storage/images/discount_images/_thumbs720/2022-10-31/5f7249ed8a4a605c4adfd98e4afa3bf1.png",
            "fullsize": "/storage/images/discount_images/2022-10-31/5f7249ed8a4a605c4adfd98e4afa3bf1.png"
          }
        },
        "created_at": "2022-10-31 11:00:41",
        "updated_at": "2022-10-31 11:00:41",
        "redemption_availability": null
      }
    ]
  }
}