[{"data":1,"prerenderedAt":1689},["ShallowReactive",2],{"navigation":3,"\u002Fbooki-documentation\u002Fguides\u002Fguides-branch-management":303,"\u002Fbooki-documentation\u002Fguides\u002Fguides-branch-management-surround":1684},[4,55,105],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":54},"Nuxt Guide","i-lucide-layout","\u002Fnuxt-guide","1.nuxt-guide",[10,14,19,24,29,34,39,44,49],{"title":11,"path":12,"stem":13,"icon":6},"Overview","\u002Fnuxt-guide\u002Foverview","1.nuxt-guide\u002F1.overview",{"title":15,"path":16,"stem":17,"icon":18},"Folder Structure","\u002Fnuxt-guide\u002Ffolder-structure","1.nuxt-guide\u002F2.folder-structure","i-lucide-folder-tree",{"title":20,"path":21,"stem":22,"icon":23},"Components","\u002Fnuxt-guide\u002Fcomponents","1.nuxt-guide\u002F3.components","i-lucide-component",{"title":25,"path":26,"stem":27,"icon":28},"Composables","\u002Fnuxt-guide\u002Fcomposables","1.nuxt-guide\u002F4.composables","i-lucide-puzzle",{"title":30,"path":31,"stem":32,"icon":33},"Pages & Routing","\u002Fnuxt-guide\u002Fpages-routing","1.nuxt-guide\u002F5.pages-routing","i-lucide-file-text",{"title":35,"path":36,"stem":37,"icon":38},"Middleware","\u002Fnuxt-guide\u002Fmiddleware","1.nuxt-guide\u002F6.middleware","i-lucide-shield-check",{"title":40,"path":41,"stem":42,"icon":43},"Plugins","\u002Fnuxt-guide\u002Fplugins","1.nuxt-guide\u002F7.plugins","i-lucide-plug",{"title":45,"path":46,"stem":47,"icon":48},"State Management","\u002Fnuxt-guide\u002Fstate-management","1.nuxt-guide\u002F8.state-management","i-lucide-database",{"title":50,"path":51,"stem":52,"icon":53},"TypeScript","\u002Fnuxt-guide\u002Ftypescript","1.nuxt-guide\u002F9.typescript","i-lucide-braces",false,{"title":56,"icon":57,"path":58,"stem":59,"children":60,"page":54},"Node \u002F Express Guide","i-lucide-server","\u002Fnode-express-guide","2.node-express-guide",[61,64,69,72,77,82,86,91,96,100],{"title":11,"path":62,"stem":63,"icon":57},"\u002Fnode-express-guide\u002Foverview","2.node-express-guide\u002F1.overview",{"title":65,"path":66,"stem":67,"icon":68},"Error Handling","\u002Fnode-express-guide\u002Ferror-handling","2.node-express-guide\u002F10.error-handling","i-lucide-alert-triangle",{"title":15,"path":70,"stem":71,"icon":18},"\u002Fnode-express-guide\u002Ffolder-structure","2.node-express-guide\u002F2.folder-structure",{"title":73,"path":74,"stem":75,"icon":76},"Controllers","\u002Fnode-express-guide\u002Fcontrollers","2.node-express-guide\u002F3.controllers","i-lucide-cpu",{"title":78,"path":79,"stem":80,"icon":81},"Services","\u002Fnode-express-guide\u002Fservices","2.node-express-guide\u002F4.services","i-lucide-workflow",{"title":83,"path":84,"stem":85,"icon":48},"Repositories","\u002Fnode-express-guide\u002Frepositories","2.node-express-guide\u002F5.repositories",{"title":87,"path":88,"stem":89,"icon":90},"Models","\u002Fnode-express-guide\u002Fmodels","2.node-express-guide\u002F6.models","i-lucide-boxes",{"title":92,"path":93,"stem":94,"icon":95},"Routes","\u002Fnode-express-guide\u002Froutes","2.node-express-guide\u002F7.routes","i-lucide-route",{"title":35,"path":97,"stem":98,"icon":99},"\u002Fnode-express-guide\u002Fmiddleware","2.node-express-guide\u002F8.middleware","i-lucide-shield",{"title":101,"path":102,"stem":103,"icon":104},"Validation","\u002Fnode-express-guide\u002Fvalidation","2.node-express-guide\u002F9.validation","i-lucide-check-circle",{"title":106,"icon":107,"path":108,"stem":109,"children":110,"page":54},"Booki Documentation","i-lucide-book-open","\u002Fbooki-documentation","3.booki-documentation",[111,115,120,125,130,229,244,257],{"title":112,"path":113,"stem":114,"icon":107},"Project Overview","\u002Fbooki-documentation\u002Foverview","3.booki-documentation\u002F1.overview",{"title":116,"path":117,"stem":118,"icon":119},"Installation","\u002Fbooki-documentation\u002F1.installation","3.booki-documentation\u002F2.1.installation","i-lucide-download",{"title":121,"path":122,"stem":123,"icon":124},"Development Overview","\u002Fbooki-documentation\u002F2.architecture","3.booki-documentation\u002F2.2.architecture","i-lucide-layers",{"title":126,"path":127,"stem":128,"icon":129},"Local Development","\u002Fbooki-documentation\u002F3.local-development","3.booki-documentation\u002F2.3.local-development","i-lucide-monitor",{"title":131,"icon":57,"path":132,"stem":133,"children":134,"page":54},"API","\u002Fbooki-documentation\u002Fapi","3.booki-documentation\u002F3.api",[135,139,144,149,154,159,163,168,173,178,183,188,192,197,202,206,211,216,220,224],{"title":136,"path":137,"stem":138,"icon":57},"Booki API Reference","\u002Fbooki-documentation\u002Fapi\u002Fbooki-api","3.booki-documentation\u002F3.api\u002F1.booki-api",{"title":140,"path":141,"stem":142,"icon":143},"Auth - Login & Refresh","\u002Fbooki-documentation\u002Fapi\u002Fauth","3.booki-documentation\u002F3.api\u002F2.auth","i-lucide-key",{"title":145,"path":146,"stem":147,"icon":148},"Auth - Customer Registration","\u002Fbooki-documentation\u002Fapi\u002Fauth-customer-register","3.booki-documentation\u002F3.api\u002F2.auth-customer-register","i-lucide-user-check",{"title":150,"path":151,"stem":152,"icon":153},"Auth - Owner Registration","\u002Fbooki-documentation\u002Fapi\u002Fauth-owner-register","3.booki-documentation\u002F3.api\u002F2.auth-owner-register","i-lucide-user-plus",{"title":155,"path":156,"stem":157,"icon":158},"Bookings","\u002Fbooki-documentation\u002Fapi\u002Fbookings","3.booki-documentation\u002F3.api\u002F3.bookings","i-lucide-calendar-check",{"title":160,"path":161,"stem":162,"icon":158},"Bookings - Authenticated","\u002Fbooki-documentation\u002Fapi\u002Fbookings-auth","3.booki-documentation\u002F3.api\u002F3.bookings-auth",{"title":164,"path":165,"stem":166,"icon":167},"Bookings - Public & Guest","\u002Fbooki-documentation\u002Fapi\u002Fbookings-public","3.booki-documentation\u002F3.api\u002F3.bookings-public","i-lucide-calendar-plus",{"title":169,"path":170,"stem":171,"icon":172},"Booking Services","\u002Fbooki-documentation\u002Fapi\u002Fbooking-services","3.booki-documentation\u002F3.api\u002F4.booking-services","i-lucide-box",{"title":174,"path":175,"stem":176,"icon":177},"Organizations - Branches","\u002Fbooki-documentation\u002Fapi\u002Fbranches","3.booki-documentation\u002F3.api\u002F5.branches","i-lucide-git-branch",{"title":179,"path":180,"stem":181,"icon":182},"Organizations - Business Hours","\u002Fbooki-documentation\u002Fapi\u002Fbusiness-hours","3.booki-documentation\u002F3.api\u002F5.business-hours","i-lucide-clock",{"title":184,"path":185,"stem":186,"icon":187},"Organizations - Base","\u002Fbooki-documentation\u002Fapi\u002Forganizations","3.booki-documentation\u002F3.api\u002F5.organizations","i-lucide-building-2",{"title":189,"path":190,"stem":191,"icon":172},"Organizations - Packages","\u002Fbooki-documentation\u002Fapi\u002Fpackages","3.booki-documentation\u002F3.api\u002F5.packages",{"title":193,"path":194,"stem":195,"icon":196},"Organizations - Payments & Integrations","\u002Fbooki-documentation\u002Fapi\u002Fpayments","3.booki-documentation\u002F3.api\u002F5.payments","i-lucide-credit-card",{"title":198,"path":199,"stem":200,"icon":201},"Users - Profile & Settings","\u002Fbooki-documentation\u002Fapi\u002Fusers","3.booki-documentation\u002F3.api\u002F6.users","i-lucide-user",{"title":203,"path":204,"stem":205,"icon":196},"Maya Payments","\u002Fbooki-documentation\u002Fapi\u002Fmaya","3.booki-documentation\u002F3.api\u002F7.maya",{"title":207,"path":208,"stem":209,"icon":210},"Owner - Booking Management","\u002Fbooki-documentation\u002Fapi\u002Fowner-bookings","3.booki-documentation\u002F3.api\u002F7.owner-bookings","i-lucide-calendar",{"title":212,"path":213,"stem":214,"icon":215},"Owner - Customer Management","\u002Fbooki-documentation\u002Fapi\u002Fowner-customers","3.booki-documentation\u002F3.api\u002F7.owner-customers","i-lucide-users",{"title":217,"path":218,"stem":219,"icon":196},"Admin - Billing & Subscriptions","\u002Fbooki-documentation\u002Fapi\u002Fadmin-billing","3.booki-documentation\u002F3.api\u002F8.admin-billing",{"title":221,"path":222,"stem":223,"icon":187},"Admin - Organizations Management","\u002Fbooki-documentation\u002Fapi\u002Fadmin-organizations","3.booki-documentation\u002F3.api\u002F8.admin-organizations",{"title":225,"path":226,"stem":227,"icon":228},"Admin - User Management","\u002Fbooki-documentation\u002Fapi\u002Fadmin-users","3.booki-documentation\u002F3.api\u002F8.admin-users","i-lucide-shield-admin",{"title":230,"icon":231,"path":232,"stem":233,"children":234,"page":54},"Shared","i-lucide-package","\u002Fbooki-documentation\u002Fshared","3.booki-documentation\u002F4.shared",[235,240],{"title":236,"path":237,"stem":238,"icon":239},"codi-node-utils","\u002Fbooki-documentation\u002Fshared\u002Fcodi-node-utils","3.booki-documentation\u002F4.shared\u002F1.codi-node-utils","i-lucide-wrench",{"title":241,"path":242,"stem":243,"icon":124},"codi-layer","\u002Fbooki-documentation\u002Fshared\u002Fcodi-layer","3.booki-documentation\u002F4.shared\u002F2.codi-layer",{"title":245,"path":246,"stem":247,"children":248,"page":54},"Flowcharts","\u002Fbooki-documentation\u002Fflowcharts","3.booki-documentation\u002F5.flowcharts",[249,253],{"title":250,"path":251,"stem":252,"icon":158},"Owner Booking Management Flow","\u002Fbooki-documentation\u002Fflowcharts\u002Fowner-booking-management","3.booki-documentation\u002F5.flowcharts\u002F1.owner-booking-management",{"title":254,"path":255,"stem":256,"icon":167},"Customer Booking Flow","\u002Fbooki-documentation\u002Fflowcharts\u002Fcustomer-booking-flow","3.booki-documentation\u002F5.flowcharts\u002F2.customer-booking-flow",{"title":258,"path":259,"stem":260,"children":261,"page":54},"Guides","\u002Fbooki-documentation\u002Fguides","3.booki-documentation\u002Fguides",[262,267,271,275,280,285,290,294,298],{"title":263,"path":264,"stem":265,"icon":266},"Guide - Authentication Flow & Sessions","\u002Fbooki-documentation\u002Fguides\u002Fguides-auth-flow","3.booki-documentation\u002Fguides\u002Fguides-auth-flow","i-lucide-lock",{"title":268,"path":269,"stem":270,"icon":177},"Guide - Branch Management","\u002Fbooki-documentation\u002Fguides\u002Fguides-branch-management","3.booki-documentation\u002Fguides\u002Fguides-branch-management",{"title":272,"path":273,"stem":274,"icon":196},"Guide - Customer Payment Methods","\u002Fbooki-documentation\u002Fguides\u002Fguides-customer-payments","3.booki-documentation\u002Fguides\u002Fguides-customer-payments",{"title":276,"path":277,"stem":278,"icon":279},"Guide - Environment Setup","\u002Fbooki-documentation\u002Fguides\u002Fguides-environment-setup","3.booki-documentation\u002Fguides\u002Fguides-environment-setup","i-lucide-settings",{"title":281,"path":282,"stem":283,"icon":284},"Guide - Common Error Responses","\u002Fbooki-documentation\u002Fguides\u002Fguides-errors","3.booki-documentation\u002Fguides\u002Fguides-errors","i-lucide-alert-circle",{"title":286,"path":287,"stem":288,"icon":289},"Guide - Gmail SMTP Setup","\u002Fbooki-documentation\u002Fguides\u002Fguides-gmail-setup","3.booki-documentation\u002Fguides\u002Fguides-gmail-setup","i-lucide-mail",{"title":291,"path":292,"stem":293,"icon":124},"Guide - Multi-Tenancy & Tenant Slug Resolution","\u002Fbooki-documentation\u002Fguides\u002Fguides-multi-tenancy","3.booki-documentation\u002Fguides\u002Fguides-multi-tenancy",{"title":295,"path":296,"stem":297,"icon":48},"Guide - Redis Caching","\u002Fbooki-documentation\u002Fguides\u002Fguides-redis","3.booki-documentation\u002Fguides\u002Fguides-redis",{"title":299,"path":300,"stem":301,"icon":302},"Guide - Subscription Billing","\u002Fbooki-documentation\u002Fguides\u002Fguides-subscription-billing","3.booki-documentation\u002Fguides\u002Fguides-subscription-billing","i-lucide-receipt",{"id":304,"title":268,"body":305,"description":1677,"extension":1678,"links":1679,"meta":1680,"navigation":1681,"path":269,"seo":1682,"stem":270,"__hash__":1683},"docs\u002F3.booki-documentation\u002Fguides\u002Fguides-branch-management.md",{"type":306,"value":307,"toc":1659},"minimark",[308,312,315,320,328,465,487,489,493,496,506,511,541,546,557,559,563,568,620,625,662,664,668,682,686,832,834,838,852,856,882,884,888,902,906,932,934,938,941,950,953,955,959,1045,1050,1076,1078,1082,1101,1105,1357,1359,1363,1370,1385,1413,1417,1443,1448,1485,1487,1491,1497,1559,1561,1565,1568,1606,1608,1612,1635,1637,1641,1655],[309,310,311],"p",{},"Each organization can have multiple branches. Branches are created through an invite-based flow — the owner invites a branch manager by email, the manager accepts, and the branch is created during that process.",[313,314],"hr",{},[316,317,319],"h2",{"id":318},"data-model","Data Model",[309,321,322,323,327],{},"Each branch (",[324,325,326],"code",{},"IBranch",") stores:",[329,330,331,347],"table",{},[332,333,334],"thead",{},[335,336,337,341,344],"tr",{},[338,339,340],"th",{},"Field",[338,342,343],{},"Type",[338,345,346],{},"Description",[348,349,350,364,376,392,405,417,430,452],"tbody",{},[335,351,352,358,361],{},[353,354,355],"td",{},[324,356,357],{},"_id",[353,359,360],{},"ObjectId",[353,362,363],{},"Unique branch ID",[335,365,366,371,373],{},[353,367,368],{},[324,369,370],{},"organizationId",[353,372,360],{},[353,374,375],{},"Parent organization",[335,377,378,383,385],{},[353,379,380],{},[324,381,382],{},"managerId",[353,384,360],{},[353,386,387,388,391],{},"Linked ",[324,389,390],{},"BRANCH_MANAGER"," user",[335,393,394,399,402],{},[353,395,396],{},[324,397,398],{},"name",[353,400,401],{},"string",[353,403,404],{},"Human-readable name",[335,406,407,412,414],{},[353,408,409],{},[324,410,411],{},"slug",[353,413,401],{},[353,415,416],{},"URL-safe identifier (auto-generated from name)",[335,418,419,424,427],{},[353,420,421],{},[324,422,423],{},"address",[353,425,426],{},"object",[353,428,429],{},"Region, province, city, barangay, zip",[335,431,432,437,439],{},[353,433,434],{},[324,435,436],{},"status",[353,438,401],{},[353,440,441,444,445,448,449],{},[324,442,443],{},"active",", ",[324,446,447],{},"suspended",", or ",[324,450,451],{},"closed",[335,453,454,459,462],{},[353,455,456],{},[324,457,458],{},"deletedAt",[353,460,461],{},"Date | null",[353,463,464],{},"Soft delete timestamp",[466,467,468],"blockquote",{},[309,469,470,474,475,478,479,482,483,486],{},[471,472,473],"strong",{},"Note:"," The branch → manager relationship lives in ",[324,476,477],{},"Branch.managerId",", not in the user document. ",[324,480,481],{},"IUser"," has no ",[324,484,485],{},"branchId"," field.",[313,488],{},[316,490,492],{"id":491},"invite-flow-creating-a-branch","Invite Flow (Creating a Branch)",[309,494,495],{},"Branches are not created directly. Instead, owners invite a branch manager by email and the branch is created when the manager accepts.",[497,498,503],"pre",{"className":499,"code":501,"language":502},[500],"language-text","1. Owner POSTs invite (email + branch name)\n        ↓\n2. Manager receives email with invite link (contains token)\n        ↓\n3. Manager verifies token via GET endpoint\n        ↓\n4. Manager POSTs branch details (address, personal info)\n        ↓\n5. Branch + BRANCH_MANAGER user created together\n","text",[324,504,501],{"__ignoreMap":505},"",[309,507,508],{},[471,509,510],{},"Auto-generated on creation:",[512,513,514,528,535],"ul",{},[515,516,517,519,520,523,524,527],"li",{},[324,518,411],{}," — derived from branch name (e.g. ",[324,521,522],{},"\"Manila Branch\""," → ",[324,525,526],{},"\"manila-branch\"",")",[515,529,530,532,533],{},[324,531,436],{}," — defaults to ",[324,534,443],{},[515,536,537,540],{},[324,538,539],{},"createdAt"," timestamp",[309,542,543],{},[471,544,545],{},"Uniqueness constraints:",[512,547,548,551,554],{},[515,549,550],{},"Branch name must be unique within the organization",[515,552,553],{},"Branch slug must be unique within the organization",[515,555,556],{},"Manager email must be unique across the entire system",[313,558],{},[316,560,562],{"id":561},"api-endpoints","API Endpoints",[564,565,567],"h3",{"id":566},"send-branch-invite","Send Branch Invite",[497,569,573],{"className":570,"code":571,"language":572,"meta":505,"style":505},"language-http shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","POST \u002Fapi\u002Forganizations\u002Fbranches\u002Finvite\nAuthorization: Bearer \u003Cowner_token>\nContent-Type: application\u002Fjson\n\n{\n  \"email\": \"manager@example.com\"\n}\n","http",[324,574,575,583,589,595,602,608,614],{"__ignoreMap":505},[576,577,580],"span",{"class":578,"line":579},"line",1,[576,581,582],{},"POST \u002Fapi\u002Forganizations\u002Fbranches\u002Finvite\n",[576,584,586],{"class":578,"line":585},2,[576,587,588],{},"Authorization: Bearer \u003Cowner_token>\n",[576,590,592],{"class":578,"line":591},3,[576,593,594],{},"Content-Type: application\u002Fjson\n",[576,596,598],{"class":578,"line":597},4,[576,599,601],{"emptyLinePlaceholder":600},true,"\n",[576,603,605],{"class":578,"line":604},5,[576,606,607],{},"{\n",[576,609,611],{"class":578,"line":610},6,[576,612,613],{},"  \"email\": \"manager@example.com\"\n",[576,615,617],{"class":578,"line":616},7,[576,618,619],{},"}\n",[309,621,622],{},[471,623,624],{},"Response (200):",[497,626,630],{"className":627,"code":628,"language":629,"meta":505,"style":505},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{ \"message\": \"Branch manager invite sent successfully.\" }\n","json",[324,631,632],{"__ignoreMap":505},[576,633,634,638,641,645,648,651,653,657,659],{"class":578,"line":579},[576,635,637],{"class":636},"sMK4o","{",[576,639,640],{"class":636}," \"",[576,642,644],{"class":643},"spNyl","message",[576,646,647],{"class":636},"\"",[576,649,650],{"class":636},":",[576,652,640],{"class":636},[576,654,656],{"class":655},"sfazB","Branch manager invite sent successfully.",[576,658,647],{"class":636},[576,660,661],{"class":636}," }\n",[313,663],{},[564,665,667],{"id":666},"list-branch-invites","List Branch Invites",[497,669,671],{"className":570,"code":670,"language":572,"meta":505,"style":505},"GET \u002Fapi\u002Forganizations\u002Fbranches\u002Finvite\nAuthorization: Bearer \u003Cowner_token>\n",[324,672,673,678],{"__ignoreMap":505},[576,674,675],{"class":578,"line":579},[576,676,677],{},"GET \u002Fapi\u002Forganizations\u002Fbranches\u002Finvite\n",[576,679,680],{"class":578,"line":585},[576,681,588],{},[309,683,684],{},[471,685,624],{},[497,687,689],{"className":627,"code":688,"language":629,"meta":505,"style":505},"{\n  \"invites\": [\n    {\n      \"_id\": \"507f1f77bcf86cd799439014\",\n      \"email\": \"manager@example.com\",\n      \"branchName\": \"Manila Branch\",\n      \"status\": \"pending\",\n      \"createdAt\": \"2026-02-21T00:00:00.000Z\"\n    }\n  ]\n}\n",[324,690,691,695,710,715,737,757,777,796,815,821,827],{"__ignoreMap":505},[576,692,693],{"class":578,"line":579},[576,694,607],{"class":636},[576,696,697,700,703,705,707],{"class":578,"line":585},[576,698,699],{"class":636},"  \"",[576,701,702],{"class":643},"invites",[576,704,647],{"class":636},[576,706,650],{"class":636},[576,708,709],{"class":636}," [\n",[576,711,712],{"class":578,"line":591},[576,713,714],{"class":636},"    {\n",[576,716,717,720,723,725,727,729,732,734],{"class":578,"line":597},[576,718,719],{"class":636},"      \"",[576,721,357],{"class":722},"sBMFI",[576,724,647],{"class":636},[576,726,650],{"class":636},[576,728,640],{"class":636},[576,730,731],{"class":655},"507f1f77bcf86cd799439014",[576,733,647],{"class":636},[576,735,736],{"class":636},",\n",[576,738,739,741,744,746,748,750,753,755],{"class":578,"line":604},[576,740,719],{"class":636},[576,742,743],{"class":722},"email",[576,745,647],{"class":636},[576,747,650],{"class":636},[576,749,640],{"class":636},[576,751,752],{"class":655},"manager@example.com",[576,754,647],{"class":636},[576,756,736],{"class":636},[576,758,759,761,764,766,768,770,773,775],{"class":578,"line":610},[576,760,719],{"class":636},[576,762,763],{"class":722},"branchName",[576,765,647],{"class":636},[576,767,650],{"class":636},[576,769,640],{"class":636},[576,771,772],{"class":655},"Manila Branch",[576,774,647],{"class":636},[576,776,736],{"class":636},[576,778,779,781,783,785,787,789,792,794],{"class":578,"line":616},[576,780,719],{"class":636},[576,782,436],{"class":722},[576,784,647],{"class":636},[576,786,650],{"class":636},[576,788,640],{"class":636},[576,790,791],{"class":655},"pending",[576,793,647],{"class":636},[576,795,736],{"class":636},[576,797,799,801,803,805,807,809,812],{"class":578,"line":798},8,[576,800,719],{"class":636},[576,802,539],{"class":722},[576,804,647],{"class":636},[576,806,650],{"class":636},[576,808,640],{"class":636},[576,810,811],{"class":655},"2026-02-21T00:00:00.000Z",[576,813,814],{"class":636},"\"\n",[576,816,818],{"class":578,"line":817},9,[576,819,820],{"class":636},"    }\n",[576,822,824],{"class":578,"line":823},10,[576,825,826],{"class":636},"  ]\n",[576,828,830],{"class":578,"line":829},11,[576,831,619],{"class":636},[313,833],{},[564,835,837],{"id":836},"resend-branch-invite","Resend Branch Invite",[497,839,841],{"className":570,"code":840,"language":572,"meta":505,"style":505},"PUT \u002Fapi\u002Forganizations\u002Fbranches\u002Finvite\u002F:id\u002Fresend\nAuthorization: Bearer \u003Cowner_token>\n",[324,842,843,848],{"__ignoreMap":505},[576,844,845],{"class":578,"line":579},[576,846,847],{},"PUT \u002Fapi\u002Forganizations\u002Fbranches\u002Finvite\u002F:id\u002Fresend\n",[576,849,850],{"class":578,"line":585},[576,851,588],{},[309,853,854],{},[471,855,624],{},[497,857,859],{"className":627,"code":858,"language":629,"meta":505,"style":505},"{ \"message\": \"Invite resent successfully.\" }\n",[324,860,861],{"__ignoreMap":505},[576,862,863,865,867,869,871,873,875,878,880],{"class":578,"line":579},[576,864,637],{"class":636},[576,866,640],{"class":636},[576,868,644],{"class":643},[576,870,647],{"class":636},[576,872,650],{"class":636},[576,874,640],{"class":636},[576,876,877],{"class":655},"Invite resent successfully.",[576,879,647],{"class":636},[576,881,661],{"class":636},[313,883],{},[564,885,887],{"id":886},"cancel-branch-invite","Cancel Branch Invite",[497,889,891],{"className":570,"code":890,"language":572,"meta":505,"style":505},"PUT \u002Fapi\u002Forganizations\u002Fbranches\u002Finvite\u002F:id\u002Fcancel\nAuthorization: Bearer \u003Cowner_token>\n",[324,892,893,898],{"__ignoreMap":505},[576,894,895],{"class":578,"line":579},[576,896,897],{},"PUT \u002Fapi\u002Forganizations\u002Fbranches\u002Finvite\u002F:id\u002Fcancel\n",[576,899,900],{"class":578,"line":585},[576,901,588],{},[309,903,904],{},[471,905,624],{},[497,907,909],{"className":627,"code":908,"language":629,"meta":505,"style":505},"{ \"message\": \"Invite cancelled successfully.\" }\n",[324,910,911],{"__ignoreMap":505},[576,912,913,915,917,919,921,923,925,928,930],{"class":578,"line":579},[576,914,637],{"class":636},[576,916,640],{"class":636},[576,918,644],{"class":643},[576,920,647],{"class":636},[576,922,650],{"class":636},[576,924,640],{"class":636},[576,926,927],{"class":655},"Invite cancelled successfully.",[576,929,647],{"class":636},[576,931,661],{"class":636},[313,933],{},[564,935,937],{"id":936},"verify-invite-token-public","Verify Invite Token (Public)",[309,939,940],{},"Called by the manager's invite link before submitting branch creation form.",[497,942,944],{"className":570,"code":943,"language":572,"meta":505,"style":505},"GET \u002Fapi\u002Forganizations\u002Fbranches\u002Finvite\u002Ftoken\u002F:token\u002Fverify\n",[324,945,946],{"__ignoreMap":505},[576,947,948],{"class":578,"line":579},[576,949,943],{},[309,951,952],{},"Returns invite details (email, branch name) if valid. Returns 400 if expired or already used.",[313,954],{},[564,956,958],{"id":957},"create-branch-from-token","Create Branch (from Token)",[497,960,962],{"className":570,"code":961,"language":572,"meta":505,"style":505},"POST \u002Fapi\u002Forganizations\u002Fbranches\u002Ftoken\u002F:token\nContent-Type: application\u002Fjson\n\n{\n  \"address\": {\n    \"region\": \"NCR\",\n    \"province\": \"Metro Manila\",\n    \"municipalOrCity\": \"Manila\",\n    \"barangay\": \"Ermita\",\n    \"zip\": \"1000\"\n  },\n  \"firstName\": \"Juan\",\n  \"lastName\": \"Dela Cruz\",\n  \"phone\": \"09161234567\",\n  \"password\": \"SecurePassword123\"\n}\n",[324,963,964,969,973,977,981,986,991,996,1001,1006,1011,1016,1022,1028,1034,1040],{"__ignoreMap":505},[576,965,966],{"class":578,"line":579},[576,967,968],{},"POST \u002Fapi\u002Forganizations\u002Fbranches\u002Ftoken\u002F:token\n",[576,970,971],{"class":578,"line":585},[576,972,594],{},[576,974,975],{"class":578,"line":591},[576,976,601],{"emptyLinePlaceholder":600},[576,978,979],{"class":578,"line":597},[576,980,607],{},[576,982,983],{"class":578,"line":604},[576,984,985],{},"  \"address\": {\n",[576,987,988],{"class":578,"line":610},[576,989,990],{},"    \"region\": \"NCR\",\n",[576,992,993],{"class":578,"line":616},[576,994,995],{},"    \"province\": \"Metro Manila\",\n",[576,997,998],{"class":578,"line":798},[576,999,1000],{},"    \"municipalOrCity\": \"Manila\",\n",[576,1002,1003],{"class":578,"line":817},[576,1004,1005],{},"    \"barangay\": \"Ermita\",\n",[576,1007,1008],{"class":578,"line":823},[576,1009,1010],{},"    \"zip\": \"1000\"\n",[576,1012,1013],{"class":578,"line":829},[576,1014,1015],{},"  },\n",[576,1017,1019],{"class":578,"line":1018},12,[576,1020,1021],{},"  \"firstName\": \"Juan\",\n",[576,1023,1025],{"class":578,"line":1024},13,[576,1026,1027],{},"  \"lastName\": \"Dela Cruz\",\n",[576,1029,1031],{"class":578,"line":1030},14,[576,1032,1033],{},"  \"phone\": \"09161234567\",\n",[576,1035,1037],{"class":578,"line":1036},15,[576,1038,1039],{},"  \"password\": \"SecurePassword123\"\n",[576,1041,1043],{"class":578,"line":1042},16,[576,1044,619],{},[309,1046,1047],{},[471,1048,1049],{},"Response (201):",[497,1051,1053],{"className":627,"code":1052,"language":629,"meta":505,"style":505},"{ \"message\": \"Branch successfully created.\" }\n",[324,1054,1055],{"__ignoreMap":505},[576,1056,1057,1059,1061,1063,1065,1067,1069,1072,1074],{"class":578,"line":579},[576,1058,637],{"class":636},[576,1060,640],{"class":636},[576,1062,644],{"class":643},[576,1064,647],{"class":636},[576,1066,650],{"class":636},[576,1068,640],{"class":636},[576,1070,1071],{"class":655},"Branch successfully created.",[576,1073,647],{"class":636},[576,1075,661],{"class":636},[313,1077],{},[564,1079,1081],{"id":1080},"get-branches-paginated","Get Branches (Paginated)",[497,1083,1085],{"className":570,"code":1084,"language":572,"meta":505,"style":505},"GET \u002Fapi\u002Forganizations\u002Fbranches\nAuthorization: Bearer \u003Cowner_token>\nQuery: page, limit, search\n",[324,1086,1087,1092,1096],{"__ignoreMap":505},[576,1088,1089],{"class":578,"line":579},[576,1090,1091],{},"GET \u002Fapi\u002Forganizations\u002Fbranches\n",[576,1093,1094],{"class":578,"line":585},[576,1095,588],{},[576,1097,1098],{"class":578,"line":591},[576,1099,1100],{},"Query: page, limit, search\n",[309,1102,1103],{},[471,1104,624],{},[497,1106,1108],{"className":627,"code":1107,"language":629,"meta":505,"style":505},"{\n  \"data\": [\n    {\n      \"_id\": \"507f1f77bcf86cd799439011\",\n      \"name\": \"Manila Branch\",\n      \"slug\": \"manila-branch\",\n      \"organizationId\": \"507f1f77bcf86cd799439012\",\n      \"managerId\": \"507f1f77bcf86cd799439013\",\n      \"managerName\": \"Juan Dela Cruz\",\n      \"status\": \"active\",\n      \"createdAt\": \"2026-02-21T00:00:00.000Z\"\n    }\n  ],\n  \"page\": 1,\n  \"limit\": 10,\n  \"total\": 3,\n  \"totalPages\": 1\n}\n",[324,1109,1110,1114,1127,1131,1150,1168,1187,1206,1225,1245,1263,1279,1283,1288,1305,1321,1337,1352],{"__ignoreMap":505},[576,1111,1112],{"class":578,"line":579},[576,1113,607],{"class":636},[576,1115,1116,1118,1121,1123,1125],{"class":578,"line":585},[576,1117,699],{"class":636},[576,1119,1120],{"class":643},"data",[576,1122,647],{"class":636},[576,1124,650],{"class":636},[576,1126,709],{"class":636},[576,1128,1129],{"class":578,"line":591},[576,1130,714],{"class":636},[576,1132,1133,1135,1137,1139,1141,1143,1146,1148],{"class":578,"line":597},[576,1134,719],{"class":636},[576,1136,357],{"class":722},[576,1138,647],{"class":636},[576,1140,650],{"class":636},[576,1142,640],{"class":636},[576,1144,1145],{"class":655},"507f1f77bcf86cd799439011",[576,1147,647],{"class":636},[576,1149,736],{"class":636},[576,1151,1152,1154,1156,1158,1160,1162,1164,1166],{"class":578,"line":604},[576,1153,719],{"class":636},[576,1155,398],{"class":722},[576,1157,647],{"class":636},[576,1159,650],{"class":636},[576,1161,640],{"class":636},[576,1163,772],{"class":655},[576,1165,647],{"class":636},[576,1167,736],{"class":636},[576,1169,1170,1172,1174,1176,1178,1180,1183,1185],{"class":578,"line":610},[576,1171,719],{"class":636},[576,1173,411],{"class":722},[576,1175,647],{"class":636},[576,1177,650],{"class":636},[576,1179,640],{"class":636},[576,1181,1182],{"class":655},"manila-branch",[576,1184,647],{"class":636},[576,1186,736],{"class":636},[576,1188,1189,1191,1193,1195,1197,1199,1202,1204],{"class":578,"line":616},[576,1190,719],{"class":636},[576,1192,370],{"class":722},[576,1194,647],{"class":636},[576,1196,650],{"class":636},[576,1198,640],{"class":636},[576,1200,1201],{"class":655},"507f1f77bcf86cd799439012",[576,1203,647],{"class":636},[576,1205,736],{"class":636},[576,1207,1208,1210,1212,1214,1216,1218,1221,1223],{"class":578,"line":798},[576,1209,719],{"class":636},[576,1211,382],{"class":722},[576,1213,647],{"class":636},[576,1215,650],{"class":636},[576,1217,640],{"class":636},[576,1219,1220],{"class":655},"507f1f77bcf86cd799439013",[576,1222,647],{"class":636},[576,1224,736],{"class":636},[576,1226,1227,1229,1232,1234,1236,1238,1241,1243],{"class":578,"line":817},[576,1228,719],{"class":636},[576,1230,1231],{"class":722},"managerName",[576,1233,647],{"class":636},[576,1235,650],{"class":636},[576,1237,640],{"class":636},[576,1239,1240],{"class":655},"Juan Dela Cruz",[576,1242,647],{"class":636},[576,1244,736],{"class":636},[576,1246,1247,1249,1251,1253,1255,1257,1259,1261],{"class":578,"line":823},[576,1248,719],{"class":636},[576,1250,436],{"class":722},[576,1252,647],{"class":636},[576,1254,650],{"class":636},[576,1256,640],{"class":636},[576,1258,443],{"class":655},[576,1260,647],{"class":636},[576,1262,736],{"class":636},[576,1264,1265,1267,1269,1271,1273,1275,1277],{"class":578,"line":829},[576,1266,719],{"class":636},[576,1268,539],{"class":722},[576,1270,647],{"class":636},[576,1272,650],{"class":636},[576,1274,640],{"class":636},[576,1276,811],{"class":655},[576,1278,814],{"class":636},[576,1280,1281],{"class":578,"line":1018},[576,1282,820],{"class":636},[576,1284,1285],{"class":578,"line":1024},[576,1286,1287],{"class":636},"  ],\n",[576,1289,1290,1292,1295,1297,1299,1303],{"class":578,"line":1030},[576,1291,699],{"class":636},[576,1293,1294],{"class":643},"page",[576,1296,647],{"class":636},[576,1298,650],{"class":636},[576,1300,1302],{"class":1301},"sbssI"," 1",[576,1304,736],{"class":636},[576,1306,1307,1309,1312,1314,1316,1319],{"class":578,"line":1036},[576,1308,699],{"class":636},[576,1310,1311],{"class":643},"limit",[576,1313,647],{"class":636},[576,1315,650],{"class":636},[576,1317,1318],{"class":1301}," 10",[576,1320,736],{"class":636},[576,1322,1323,1325,1328,1330,1332,1335],{"class":578,"line":1042},[576,1324,699],{"class":636},[576,1326,1327],{"class":643},"total",[576,1329,647],{"class":636},[576,1331,650],{"class":636},[576,1333,1334],{"class":1301}," 3",[576,1336,736],{"class":636},[576,1338,1340,1342,1345,1347,1349],{"class":578,"line":1339},17,[576,1341,699],{"class":636},[576,1343,1344],{"class":643},"totalPages",[576,1346,647],{"class":636},[576,1348,650],{"class":636},[576,1350,1351],{"class":1301}," 1\n",[576,1353,1355],{"class":578,"line":1354},18,[576,1356,619],{"class":636},[313,1358],{},[564,1360,1362],{"id":1361},"update-branch-status","Update Branch Status",[309,1364,1365,1366,1369],{},"Status is supplied as a ",[471,1367,1368],{},"route parameter",", not a request body field.",[309,1371,1372,1375,1376,444,1379,444,1382],{},[471,1373,1374],{},"Allowed values:"," ",[324,1377,1378],{},"activate",[324,1380,1381],{},"suspend",[324,1383,1384],{},"close",[497,1386,1388],{"className":570,"code":1387,"language":572,"meta":505,"style":505},"PUT \u002Fapi\u002Forganizations\u002Fbranches\u002F:id\u002Fstatus\u002F:status\nAuthorization: Bearer \u003Cowner_token>\n\n# Example: suspend a branch\nPUT \u002Fapi\u002Forganizations\u002Fbranches\u002F507f1f77bcf86cd799439011\u002Fstatus\u002Fsuspend\n",[324,1389,1390,1395,1399,1403,1408],{"__ignoreMap":505},[576,1391,1392],{"class":578,"line":579},[576,1393,1394],{},"PUT \u002Fapi\u002Forganizations\u002Fbranches\u002F:id\u002Fstatus\u002F:status\n",[576,1396,1397],{"class":578,"line":585},[576,1398,588],{},[576,1400,1401],{"class":578,"line":591},[576,1402,601],{"emptyLinePlaceholder":600},[576,1404,1405],{"class":578,"line":597},[576,1406,1407],{},"# Example: suspend a branch\n",[576,1409,1410],{"class":578,"line":604},[576,1411,1412],{},"PUT \u002Fapi\u002Forganizations\u002Fbranches\u002F507f1f77bcf86cd799439011\u002Fstatus\u002Fsuspend\n",[309,1414,1415],{},[471,1416,624],{},[497,1418,1420],{"className":627,"code":1419,"language":629,"meta":505,"style":505},"{ \"message\": \"Branch has been suspended successfully.\" }\n",[324,1421,1422],{"__ignoreMap":505},[576,1423,1424,1426,1428,1430,1432,1434,1436,1439,1441],{"class":578,"line":579},[576,1425,637],{"class":636},[576,1427,640],{"class":636},[576,1429,644],{"class":643},[576,1431,647],{"class":636},[576,1433,650],{"class":636},[576,1435,640],{"class":636},[576,1437,1438],{"class":655},"Branch has been suspended successfully.",[576,1440,647],{"class":636},[576,1442,661],{"class":636},[309,1444,1445],{},[471,1446,1447],{},"Error responses:",[329,1449,1450,1460],{},[332,1451,1452],{},[335,1453,1454,1457],{},[338,1455,1456],{},"Status",[338,1458,1459],{},"Message",[348,1461,1462,1470,1478],{},[335,1463,1464,1467],{},[353,1465,1466],{},"404",[353,1468,1469],{},"Branch not found",[335,1471,1472,1475],{},[353,1473,1474],{},"400",[353,1476,1477],{},"Branch does not belong to your organization",[335,1479,1480,1482],{},[353,1481,1474],{},[353,1483,1484],{},"Branch is already suspended (or active \u002F closed)",[313,1486],{},[316,1488,1490],{"id":1489},"branch-status-lifecycle","Branch Status Lifecycle",[497,1492,1495],{"className":1493,"code":1494,"language":502},[500],"ACTIVE ──suspend──→ SUSPENDED\nSUSPENDED ──activate──→ ACTIVE\nACTIVE \u002F SUSPENDED ──close──→ CLOSED\n",[324,1496,1494],{"__ignoreMap":505},[329,1498,1499,1514],{},[332,1500,1501],{},[335,1502,1503,1505,1508,1511],{},[338,1504,1456],{},[338,1506,1507],{},"Accepts new bookings",[338,1509,1510],{},"Manager access",[338,1512,1513],{},"Reversible",[348,1515,1516,1531,1546],{},[335,1517,1518,1522,1525,1528],{},[353,1519,1520],{},[324,1521,443],{},[353,1523,1524],{},"Yes",[353,1526,1527],{},"Full",[353,1529,1530],{},"—",[335,1532,1533,1537,1540,1543],{},[353,1534,1535],{},[324,1536,447],{},[353,1538,1539],{},"No",[353,1541,1542],{},"Read-only",[353,1544,1545],{},"Yes (activate)",[335,1547,1548,1552,1554,1557],{},[353,1549,1550],{},[324,1551,451],{},[353,1553,1539],{},[353,1555,1556],{},"Revoked",[353,1558,1539],{},[313,1560],{},[316,1562,1564],{"id":1563},"branch-manager-permissions","Branch Manager Permissions",[309,1566,1567],{},"Branch managers are scoped to their own branch only:",[329,1569,1570,1580],{},[332,1571,1572],{},[335,1573,1574,1577],{},[338,1575,1576],{},"Can access",[338,1578,1579],{},"Cannot access",[348,1581,1582,1590,1598],{},[335,1583,1584,1587],{},[353,1585,1586],{},"Own branch bookings",[353,1588,1589],{},"Other branches' bookings or data",[335,1591,1592,1595],{},[353,1593,1594],{},"Own branch customers",[353,1596,1597],{},"Organization-level settings",[335,1599,1600,1603],{},[353,1601,1602],{},"Own branch reports",[353,1604,1605],{},"Subscription \u002F billing info",[313,1607],{},[316,1609,1611],{"id":1610},"booking-rules","Booking Rules",[512,1613,1614,1620,1626,1632],{},[515,1615,1616,1617,1619],{},"A booking must be assigned to a branch at creation (",[324,1618,485],{}," required).",[515,1621,1622,1623,1625],{},"The branch must be ",[324,1624,443],{}," to accept new bookings.",[515,1627,1628,1629,1631],{},"The branch must belong to the booking's ",[324,1630,370],{},".",[515,1633,1634],{},"Branch managers cannot see bookings from other branches.",[313,1636],{},[316,1638,1640],{"id":1639},"related","Related",[512,1642,1643,1650],{},[515,1644,1645],{},[1646,1647,1649],"a",{"href":1648},"..\u002Fapi\u002Fbranches","Organizations - Branches API",[515,1651,1652],{},[1646,1653,250],{"href":1654},"..\u002Fflowcharts\u002Fowner-booking-management",[1656,1657,1658],"style",{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}",{"title":505,"searchDepth":579,"depth":585,"links":1660},[1661,1662,1663,1673,1674,1675,1676],{"id":318,"depth":585,"text":319},{"id":491,"depth":585,"text":492},{"id":561,"depth":585,"text":562,"children":1664},[1665,1666,1667,1668,1669,1670,1671,1672],{"id":566,"depth":591,"text":567},{"id":666,"depth":591,"text":667},{"id":836,"depth":591,"text":837},{"id":886,"depth":591,"text":887},{"id":936,"depth":591,"text":937},{"id":957,"depth":591,"text":958},{"id":1080,"depth":591,"text":1081},{"id":1361,"depth":591,"text":1362},{"id":1489,"depth":585,"text":1490},{"id":1563,"depth":585,"text":1564},{"id":1610,"depth":585,"text":1611},{"id":1639,"depth":585,"text":1640},"Invite-based branch creation flow, branch status lifecycle, and API endpoints for managing multi-branch organizations in booki-api.","md",null,{},{"icon":177},{"title":268,"description":1677},"ybWGXTXMO9csLqVSSdpQl6IpR4BFD6wfa8whebFIiHg",[1685,1687],{"title":263,"path":264,"stem":265,"description":1686,"icon":266,"children":-1},"Understanding JWT tokens, refresh cycles, cookie management, and secure authentication patterns.",{"title":272,"path":273,"stem":274,"description":1688,"icon":196,"children":-1},"How customers save and manage Maya payment methods in booki-api, including payment preferences and organization-level payment method validation.",1777787844708]