Flavours API Documentation
  1. Discounts
Flavours API Documentation
  • Readme
  • Developer Guide
  • Authorization
  • Includables
  • Pagination
  • Sorting
  • Retrieve Market Information
  • Retrieve Branch Information
  • Me
    • Overview
    • Detail
      GET
  • Branches
    • Overview
    • List
      GET
    • Detail
      GET
    • Create
      POST
    • Update
      POST
    • Delete
      DELETE
  • Orders
    • Overview
    • List
      GET
    • Detail
      GET
    • Create
      POST
    • Calculate
      POST
    • Checkout
      POST
    • Update
      POST
    • Sync
      POST
  • Customers
    • Overview
    • List
    • Detail
    • Create
    • Update
  • Products
    • Overview
    • List
    • Detail
    • Create
    • Update
    • Delete
  • Product Categories
    • Overview
    • List
    • Detail
  • Discounts
    • Overview
    • List
      GET
    • Detail
      GET
    • Verify
      POST
  • Payment Methods
    • Overview
    • List
    • Detail
  • Table
    • Overview
    • List
    • Detail
    • Create
    • Update
    • Delete
  • Printer
  • Webhook
    • Orders Webhooks
      • Webhook Events
      • Payload
    • Product Webhooks
      • Webhook Events
      • Payload
    • Loyalty Webhooks
      • Promotional Coupon
    • Customers Webhooks
      • Webhook Events
      • Payload
    • Error Webhook
      • Stay Alert to Connectivity Issues
    • Third-Party
      • Ballurh
        • Install Ballurh
      • Loyapro
        • Loyalty
          • Check Reward
          • Redeem Reward
      • Bonat
        • Check Reward
        • Redeem Reward
      • Fai
        • Register Entity
  1. Discounts

Detail

Developing
DEVELOPMENT
https://api.flavours.sa/dev/api/v2
DEVELOPMENT
https://api.flavours.sa/dev/api/v2
GET
https://api.flavours.sa/dev/api/v2
/discounts/{discountId}
Its retrieves comprehensive information about a specific discount or promotion identified by a unique discountId

Request Body#

Validation :#

FieldTypeRuleDescription
discountIdstringrequiredId from Discount model

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Path Params
discountId
string 
required
Example:
6137915e-213a-490b-940b-4f02f777500e

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://api.flavours.sa/dev/api/v2/discounts/6137915e-213a-490b-940b-4f02f777500e'

Responses

🟢200OK
application/json
Body
meta
object 
required
code
integer 
required
status
string 
required
message
string 
required
data
object 
required
id
string 
required
market_id
string 
required
branch_id
string  | null 
required
type
string 
required
max
integer  | null 
required
code
string  | null 
required
value
integer 
required
value_type
string 
required
expired_at
integer 
required
created_at
integer 
required
updated_at
integer 
required
deleted_at
null 
required
target
string 
required
max_amount
null 
required
modifiers_count
string 
required
is_fast_offer
boolean 
required
market
object 
required
branch
object  | null 
required
customers
array[string]
required
modifiers
array [object {9}] 
required
requires
array[string]
required
obtains
array [object {8}] 
required
Example
{
    "meta": {
        "code": 200,
        "status": "success",
        "message": "Data Loaded Successfully"
    },
    "data": {
        "id": "6137915e-213a-490b-940b-4f02f777500e",
        "market_id": "b5d70a92-5d2e-4f89-8e52-1827cfbd01f4",
        "branch_id": "6b14ac8c-8f23-4473-beb5-6777116363a1",
        "type": "COUPON",
        "max": 1,
        "code": "UNIPAL002",
        "value": 50,
        "value_type": "PERCENT",
        "expired_at": 1735578000000,
        "created_at": 1733263242854,
        "updated_at": 1733263422743,
        "deleted_at": null,
        "target": "ORDER_PRODUCT",
        "max_amount": null,
        "modifiers_count": "1",
        "is_fast_offer": false,
        "market": {
            "id": "b5d70a92-5d2e-4f89-8e52-1827cfbd01f4",
            "sector_id": 3,
            "slug": null,
            "name_en": "flavours",
            "name_ar": "فليفرز",
            "description_en": "res",
            "description_ar": "مطعم",
            "logo_img": "https://flavours-files.s3.me-south-1.amazonaws.com/img/uploads/markets/logos/1720926739.jpg",
            "cover_img": null,
            "email": "[email protected]",
            "phone_prefix": "966",
            "phone": "581157875",
            "crn": null,
            "tax_number": "10101010101020",
            "created_by": "ad3ffe2c-0986-439e-a519-2f5032af3c6c",
            "email_verified_at": null,
            "phone_verified_at": 1713453448327,
            "created_at": 1700933589182,
            "updated_at": 1741327188815,
            "deleted_at": null,
            "is_active": true,
            "merchant_id": null,
            "reseller_id": null
        },
        "branch": {
            "id": "6b14ac8c-8f23-4473-beb5-6777116363a1",
            "market_id": "b5d70a92-5d2e-4f89-8e52-1827cfbd01f4",
            "name_en": "Ar Rawdah, Riyadh",
            "name_ar": "الروضة، الرياض",
            "address": "7596 الديوان, Riyadh, Riyadh, Saudi Arabia",
            "latitude": 24.774265,
            "longitude": 46.738586,
            "is_active": true,
            "created_at": 1700933589256,
            "updated_at": 1721012385150,
            "deleted_at": null,
            "expired_at": 1736195824688
        },
        "customers": [],
        "modifiers": [
            {
                "id": 3584,
                "modifierable_id": "6137915e-213a-490b-940b-4f02f777500e",
                "modifierable_type": "DISCOUNT_MODIFIER_DISCOUNT",
                "product_id": "04c5fccf-c9b8-4b47-bb00-10a54770996d",
                "type": "OBTAIN",
                "qty": null,
                "discount_id": "6137915e-213a-490b-940b-4f02f777500e",
                "product": {
                    "id": "04c5fccf-c9b8-4b47-bb00-10a54770996d",
                    "market_id": "b5d70a92-5d2e-4f89-8e52-1827cfbd01f4",
                    "branch_id": null,
                    "product_category_id": 88,
                    "name_en": "Fries",
                    "name_ar": "بطاطس",
                    "description_en": null,
                    "description_ar": null,
                    "preparation_time": 10,
                    "stock": 0,
                    "order": 2,
                    "images": null,
                    "is_active": true,
                    "created_at": 1700934456441,
                    "updated_at": 1742047345806,
                    "deleted_at": null,
                    "rating_amount": 0,
                    "rating_avg": "0.00",
                    "sold_amount": 1,
                    "sold_revenue": 0,
                    "qoyod_id": null,
                    "options": [
                        {
                            "id": 21517,
                            "modifierable_id": "04c5fccf-c9b8-4b47-bb00-10a54770996d",
                            "name_en": "small",
                            "name_ar": "صغير",
                            "type": "OPTION",
                            "calorie": null,
                            "price": 8.6956521739,
                            "tax": 1.3043478261,
                            "total": 10,
                            "cost": null,
                            "profit": null,
                            "is_tax_included": true,
                            "deleted_at": null,
                            "barcode": null,
                            "barcode_img": "https://flavours-files.s3.me-south-1.amazonaws.com/img/uploads/product-modifiers/1737944695-8806173420377.png",
                            "weight_amount": null,
                            "weight_unit": null,
                            "market_id": "b5d70a92-5d2e-4f89-8e52-1827cfbd01f4",
                            "branch_id": null,
                            "modifierable_type": "PRODUCT_MODIFIER_PRODUCT",
                            "stock": 0,
                            "product_id": "04c5fccf-c9b8-4b47-bb00-10a54770996d"
                        }
                    ],
                    "additionals": []
                },
                "alternatives": []
            }
        ],
        "requires": [],
        "obtains": [
            {
                "id": 3584,
                "modifierable_id": "6137915e-213a-490b-940b-4f02f777500e",
                "modifierable_type": "DISCOUNT_MODIFIER_DISCOUNT",
                "product_id": "04c5fccf-c9b8-4b47-bb00-10a54770996d",
                "type": "OBTAIN",
                "qty": null,
                "discount_id": "6137915e-213a-490b-940b-4f02f777500e",
                "product": {
                    "id": "04c5fccf-c9b8-4b47-bb00-10a54770996d",
                    "market_id": "b5d70a92-5d2e-4f89-8e52-1827cfbd01f4",
                    "branch_id": null,
                    "product_category_id": 88,
                    "name_en": "Fries",
                    "name_ar": "بطاطس",
                    "description_en": null,
                    "description_ar": null,
                    "preparation_time": 10,
                    "stock": 0,
                    "order": 2,
                    "images": null,
                    "is_active": true,
                    "created_at": 1700934456441,
                    "updated_at": 1742047345806,
                    "deleted_at": null,
                    "rating_amount": 0,
                    "rating_avg": "0.00",
                    "sold_amount": 1,
                    "sold_revenue": 0,
                    "qoyod_id": null,
                    "options": [
                        {
                            "id": 21517,
                            "modifierable_id": "04c5fccf-c9b8-4b47-bb00-10a54770996d",
                            "name_en": "small",
                            "name_ar": "صغير",
                            "type": "OPTION",
                            "calorie": null,
                            "price": 8.6956521739,
                            "tax": 1.3043478261,
                            "total": 10,
                            "cost": null,
                            "profit": null,
                            "is_tax_included": true,
                            "deleted_at": null,
                            "barcode": null,
                            "barcode_img": "https://flavours-files.s3.me-south-1.amazonaws.com/img/uploads/product-modifiers/1737944695-8806173420377.png",
                            "weight_amount": null,
                            "weight_unit": null,
                            "market_id": "b5d70a92-5d2e-4f89-8e52-1827cfbd01f4",
                            "branch_id": null,
                            "modifierable_type": "PRODUCT_MODIFIER_PRODUCT",
                            "stock": 0,
                            "product_id": "04c5fccf-c9b8-4b47-bb00-10a54770996d"
                        }
                    ],
                    "additionals": []
                }
            }
        ]
    }
}
Previous
List
Next
Verify
Built with