Branch
Update Branch
Update an existing branch.
Authorization
default AuthorizationBearer <token>
You can retrieve your token by logging in.
In: header
Path Parameters
branchId*string
Header Parameters
X-API-Version*string
API contract version to target. See the Changelog for what changed in each version.
Default
"2.0.0"Value in
"2.3.0" | "2.2.0" | "2.1.0" | "2.0.0"Request Body
application/json
includes*array<>
name_en?|
English name. Must not be greater than 191 characters.
name_ar?|
Arabic name. Must not be greater than 191 characters.
address?|
Branch address. Must not be greater than 500 characters.
latitude?|
Geographic latitude. Must be between -90 and 90.
longitude?|
Geographic longitude. Must be between -180 and 180.
is_active?|
Active status.
is_kitchen_active?|
Kitchen active status.
is_pay_later?|
Enable pay later feature.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "http://localhost:8000/api/v2/branches/quia" \ -H "X-API-Version: 2.3.0" \ -H "Content-Type: application/json" \ -d '{ "includes": [ "nihil" ] }'{
"meta": {
"code": 200,
"status": "success",
"message": "Branch updated successfully."
},
"data": {
"id": "370c09a0-a777-4f9d-aab1-796e5b8ce647",
"market_id": "07928d80-350c-46eb-8786-91a40ca509a0",
"name_en": "Bode, Reynolds and Rath",
"name_ar": "Bode, Reynolds and Rath",
"address": "416 Barbara Parks\nNorth Vicenta, NJ 48456",
"latitude": 63.831936,
"longitude": 127.949789,
"is_active": false,
"created_at": 1782824834305,
"updated_at": 1782824834532,
"deleted_at": null,
"expired_at": null,
"is_online": false,
"level": null,
"shift": null,
"days": {
"SUN": 0,
"MON": 0,
"TUE": 0,
"WED": 0,
"THU": 0,
"FRI": 0,
"SAT": 0
},
"location": null,
"plans": [],
"schedules": [],
"out_of_stock_products": [],
"waiting_orders": [],
"process_orders": [],
"canceled_orders": [],
"completed_orders": [],
"market": {
"id": "07928d80-350c-46eb-8786-91a40ca509a0",
"sector_id": 13,
"name_en": "Donnelly-Swaniawski",
"name_ar": "Donnelly-Swaniawski",
"description_en": null,
"description_ar": null,
"logo_img": "https://via.placeholder.com/200x200.png/00ffff?text=business+logo+et",
"cover_img": "https://via.placeholder.com/200x200.png/00ee66?text=business+cover+animi",
"email": "[email protected]",
"phone_prefix": "212",
"phone_number": "4769320137",
"crn": "124-313-2863",
"tax_number": "72043015227",
"created_by": null,
"email_verified_at": 1782824824410,
"phone_verified_at": 1782824824410,
"created_at": 1782824824152,
"updated_at": 1782824824152,
"deleted_at": null,
"is_active": true,
"merchant_id": null,
"reseller_id": null,
"slug": "donnelly-swaniawski",
"code": "ENT-0000000001",
"links": {
"website": null,
"instagram": null,
"youtube": null,
"x": null,
"call_center": null
},
"phone": "4769320137",
"setting": null
},
"setting": {
"id": 3,
"market_id": "07928d80-350c-46eb-8786-91a40ca509a0",
"branch_id": "370c09a0-a777-4f9d-aab1-796e5b8ce647",
"is_kitchen_active": true,
"is_pay_later": false,
"invoice_prefix": null,
"zatca_otp": null,
"extension": {
"has_cleartax": false,
"has_zatca": false,
"has_qoyod": false
},
"payment": {
"has_apple": true,
"has_card": true,
"has_cash": true
},
"service": {
"has_dining": true,
"has_take_away": true
},
"active_plan": null,
"active_subscription": null
}
}
}{
"meta": {
"code": 401,
"status": "error",
"message": "Unauthenticated."
},
"data": null
}{
"meta": {
"code": 403,
"status": "error",
"message": "Unauthorized."
},
"data": null
}{
"meta": {
"code": 404,
"status": "error",
"message": "Resource not found."
},
"data": null
}{
"meta": {
"code": 422,
"status": "error",
"message": "The name en must be a string. (and 3 more errors)"
},
"data": [
{
"code": 0,
"message": "The name en must be a string.",
"field": "name_en"
},
{
"code": 0,
"message": "The latitude must be a number.",
"field": "latitude"
},
{
"code": 0,
"message": "The longitude must be a number.",
"field": "longitude"
},
{
"code": 0,
"message": "The is active field must be true or false.",
"field": "is_active"
}
]
}{
"meta": {
"code": 500,
"status": "error",
"message": "Internal server error."
},
"data": null
}