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
Attribute | Description | Type |
---|---|---|
id | the unique identifier of that table entity | Integer |
logo | Branch Logo URL | String or Null |
commercial_record | Branch Commercial record | String or Null |
about_en | About Branch in English | String or Null |
about_ar | About Branch in Arabic | String or Null |
name_en | Branch name in English | String |
name_ar | Branch name in Arabic | String or Null |
brand_ids | Array of ids that represents all brands under which this branch exists. | Integer Array |
menu_ids | Array of ids that represents all menus assigned to this branch | Integer Array |
is_force_closed | Boolean 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_brands | Integer Array that represents the brand ids under which this branch is force closed. | Integer Array |
default_opening_hour_group_id | The 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_ids | Array of Ids that represents all the branch_special_timings assigned to that branch | Integer Array |
address | JSON object that represents the Branch address, this contains the full address of the branch, latitude, longitude, city and country | Object |
timezone | JSON object that represents The Timezone under which the branch operates, Note that the timezone affects opening_hours | Object |
currency | JSON object that represents the Branch Currency | Object |
services | Array of JSON objects that represents all the services a branch can handle. | Object Array |
Force ClosureIn 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_brandsBranch 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_idsT-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 TimezoneOpening 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 Type | Description |
---|---|
dine_in | Service for customers who choose to eat within the restaurant premises. |
delivery | Service for delivering orders to customers' specified locations. |
pick_up | Service allowing customers to place orders and pick them up at the restaurant. |
curbside | Service 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_activeeach 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.