Branches

A branch in the T-Gate platform represents a physical location or outlet. It is a key component of the platform, linking the abstract concept of a brand to a tangible, operational entity.

For more details on the hierarchical structure and how different entities relate to each other, please refer to General → High Level Structure Guides.

Model Attributes

AttributeDescriptionType
idthe unique identifier of that table entityInteger
logoBranch Logo URLString or Null
commercial_recordBranch Commercial recordString or Null
about_enAbout Branch in EnglishString or Null
about_arAbout Branch in ArabicString or Null
name_enBranch name in EnglishString
name_arBranch name in ArabicString or Null
brand_idsArray of ids that represents all brands under which this branch exists.Integer Array
menu_idsArray of ids that represents all menus assigned to this branchInteger Array
is_force_closedBoolean attribute that informs if a branch is force closed (under all brands). Note that force_closed branches cannot be used to create orders.Boolean
force_closed_in_brandsInteger Array that represents the brand ids under which this branch is force closed.Integer Array
default_opening_hour_group_idThe id to an opening_hour_group instance that represents the default opening_hours for that branch, this means that these opening_hours will take effect if no special timings are currently running.Integer
branch_special_timing_idsArray of Ids that represents all the branch_special_timings assigned to that branchInteger Array
addressJSON object that represents the Branch address, this contains the full address of the branch, latitude, longitude, city and countryObject
timezoneJSON object that represents The Timezone under which the branch operates, Note that the timezone affects opening_hoursObject
currencyJSON object that represents the Branch CurrencyObject
servicesArray of JSON objects that represents all the services a branch can handle.Object Array
📘

Force Closure

In Busy days where companies can't handle the amount of orders or needs to stop accepting orders from a specific branch, T-Gate offers the company a way to force close it's branch which prevents new orders from being created from these branches regardless of the opening hours of that branch.

Check Partner API → Force Closure Guides to learn more.

📘

is_force_closed VS force_closed_in_brands

Branch Force Closure can be done either on all brands or on specific brands.

is_force_closed is a status related to the branch regardless which brands its assigned to, this means that if branch.is_force_closed = True, the branch status across all brands will be "Closed". However, a branch can be force_closed under specific brands, These brands will have there IDs in the force_closed_under_brands Array.

📘

brand_ids

T-Gate adds a bi-directional link between brands and their branches to allow applications to fetch and link data in the order that best suits their needs.

This means if you navigate to the brand entity using a brand_id found in a brand_ids array, you will find the id of that branch in the array of branch_ids. This bi-directional link ensures that you can start from either the brand or the branch and establish their relationship effectively.

🕑

Opening Hours And Timezone

Opening Hours are relative to the branch current timezone, this means that if you are using the UTC time, you will need to add the utc_offset of the branch timezone to correctly calculate the status of a branch.

Note that the timezone object contains a utc_offset attribute that represents the difference in seconds between the branch time and UTC time.

Services

A branch specifies a set of services to offer to his clients.

Available services are:

Service TypeDescription
dine_inService for customers who choose to eat within the restaurant premises.
deliveryService for delivering orders to customers' specified locations.
pick_upService allowing customers to place orders and pick them up at the restaurant.
curbsideService where customers place orders and have them brought to their vehicles at a designated curbside location.

a branch must support at least one service.

🕙

Service: is_active

each service has an attribute called is_active that defines whether this service is currently active and usable within that branch or not.

Inactive services cannot be used to create orders.