- Readme
- Developer Guide
- Authorization
- Includables
- Pagination
- Sorting
- Retrieve Market Information
- Retrieve Branch Information
- Me
- Branches
- Orders
- Customers
- Products
- Product Categories
- Discounts
- Payment Methods
- Table
- Printer
- Webhook
Create
Developing
DEVELOPMENT
DEVELOPMENT
POST
https://api.flavours.sa/dev/api/v2/branches
Validation#
Field | Type | Rule | Description |
---|---|---|---|
market_id | string | required | Id from Market model |
name_en | string | required | |
name_ar | string | nullable | |
address | string | required | |
latitude | numeric | required | |
longitude | numeric | required |
Request
Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.Example:
Authorization: Bearer ********************
Body Params application/json
market_id
string
required
name_en
string
required
name_ar
string
required
address
string
required
latitude
number
required
longitude
number
required
Example
{
"market_id": "b5d70a92-5d2e-4f89-8e52-1827cfbd01f4",
"longitude": -73.935242,
"latitude": 40.73061,
"address": "2081 Sally Stravenue, Port Christinaberg",
"name_ar": "Port Christinaberg",
"name_en": "Port Christinaberg"
}
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 POST 'https://api.flavours.sa/dev/api/v2/branches' \
--header 'Content-Type: application/json' \
--data-raw '{
"market_id": "b5d70a92-5d2e-4f89-8e52-1827cfbd01f4",
"longitude": -73.935242,
"latitude": 40.730610,
"address": "2081 Sally Stravenue, Port Christinaberg",
"name_ar": "Port Christinaberg",
"name_en": "Port Christinaberg"
}'
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
name_en
string
required
name_ar
string
required
address
string
required
latitude
number
required
longitude
number
required
is_active
boolean
required
created_at
integer
required
updated_at
integer
required
deleted_at
null
required
expired_at
integer
required
waiting_orders_count
string
required
process_orders_count
string
required
completed_orders_count
string
required
canceled_orders_count
string
required
market
object
required
setting
object
required
location
null
required
plans
array[string]
required
schedules
array[string]
required
out_of_stock_products
array[string]
required
Example
{
"meta": {
"code": 0,
"status": "string",
"message": "string"
},
"data": {
"id": "string",
"market_id": "string",
"name_en": "string",
"name_ar": "string",
"address": "string",
"latitude": 0,
"longitude": 0,
"is_active": true,
"created_at": 0,
"updated_at": 0,
"deleted_at": null,
"expired_at": 0,
"waiting_orders_count": "string",
"process_orders_count": "string",
"completed_orders_count": "string",
"canceled_orders_count": "string",
"market": {
"id": "string",
"sector_id": 0,
"slug": null,
"name_en": "string",
"name_ar": "string",
"description_en": "string",
"description_ar": "string",
"logo_img": "string",
"cover_img": null,
"email": "string",
"phone_prefix": "string",
"phone": "string",
"crn": null,
"tax_number": "string",
"created_by": "string",
"email_verified_at": null,
"phone_verified_at": 0,
"created_at": 0,
"updated_at": 0,
"deleted_at": null,
"is_active": true,
"merchant_id": null,
"reseller_id": null,
"setting": {
"id": 0,
"market_id": "string",
"balance": 0,
"income": 0,
"receipt_message_en": null,
"receipt_message_ar": null,
"currency": "string",
"order_num_start": 0,
"is_tax_details": true,
"is_offline_calculate": true,
"country_code": "string",
"country_id": 0,
"subscription_key": "string",
"subscription_option_key": "string"
}
},
"setting": {
"id": 0,
"market_id": "string",
"branch_id": "string",
"is_kitchen_active": true,
"is_pay_later": true,
"invoice_prefix": null,
"zatca_otp": null,
"active_subscription": null
},
"location": null,
"plans": [
"string"
],
"schedules": [
"string"
],
"out_of_stock_products": [
"string"
]
}
}
Modified at 2025-03-23 02:55:23