Branches are the physical operational units of a business on Zippi. Each branch has its own operating schedule, status, team, and — optionally — its own catalog availability overlay. A branch must be in theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/CRISTIANCAMACH34/Zippi/llms.txt
Use this file to discover all available pages before exploring further.
operando state and within its scheduled hours for the marketplace to show it as available for new orders.
All branch state transitions are audited: every pause, closure, or reopening records the actor, timestamp, and reason in the platform audit log.
Zippi maintains a strict separation between business branches (
business_branch) and Zippi-owned branches (zippi_branch). A business_branch_admin operates only within the scope of their assigned business branch and cannot interact with Zippi’s own branch infrastructure, and vice versa.Branch states
| State | Meaning | Operational effect |
|---|---|---|
operando | Open and active | Receives new orders from the marketplace |
pausada | Temporarily paused | No new orders accepted; orders already in progress continue |
cerrada | Out of service | Does not operate; invisible to customers |
| (soft-deleted) | Logically removed | Hidden from all views; can be restored by owner or city admin |
cerrada → operando without going through an operando unlock flow).
Permission matrix
| Action | business_owner / business_admin | business_branch_admin | City / Ops admin |
|---|---|---|---|
| Open / set operando | ✓ | (per policy) | ✓ |
| Pause branch | ✓ | (per policy) | ✓ |
| Close branch | ✓ | ✗ | ✓ |
| Request new branch | ✓ | ✗ | (approves) |
| Create branch directly | ✓ | ✗ | ✓ |
| Soft delete / restore | ✓ | ✗ | ✓ |
| Set operating schedule | ✓ | ✓ | ✓ |
| Assign branch admin | ✓ | ✗ | ✓ |
GET /api/v1/business/branches
Returns all branches for the authenticated business scope. Abusiness_owner or business_admin sees all branches under their business. A business_branch_admin sees only their assigned branch.
200 OK
POST /api/v1/business/branches
Creates a new branch directly under the business scope. This path bypasses the city-ops approval flow and should only be used when the business has a pre-authorized agreement with city operations. Returns201 Created.
Display name for the branch (max 140 characters).
Human-readable physical address.
Branch contact phone (max 30 characters).
City scope identifier. Must match an active city in the platform.
Latitude coordinate for map display (-90 to 90).
Longitude coordinate for map display (-180 to 180).
POST /api/v1/business/branches/request
Submits a new branch request tocity_ops for review and approval. The request is audited from creation through approval or rejection. Returns 201 Created with the pending request record.
Proposed display name for the new branch.
Physical address of the proposed location.
Optional business justification text. Helps city ops evaluate the request faster.
When a request is submitted via this endpoint, the branch does not exist yet and cannot receive orders. The business portal will show the request status as
pendiente_aprobacion. Only after city_ops approves does the branch record get created and become operational.PATCH /api/v1/business/branches/:id
Updates the mutable details of an existing branch (name, address, phone, image). Does not change the branch state or schedule.Updated branch display name.
Updated physical address.
Updated contact phone.
Absolute URL to the branch image or banner.
PATCH /api/v1/business/branches/:id/status
Changes the operational state of a branch. Transitions are validated against the FSM and the caller’s role permissions.Target state for the branch. Accepted values:
operando, pausada, cerrada.Human-readable reason for the transition. Required when setting
cerrada. Stored in the audit log.Pausing a branch (
pausada) stops new orders from being created for that location. Orders already accepted and in-progress are not affected and must be completed normally. In some city configurations, transitioning from pausada back to operando may require a city-ops confirmation signal.PUT /api/v1/business/branches/:id/schedule
Replaces the full operating schedule for a branch. The schedule is a list of weekday time windows. Branches outside their scheduled hours do not accept new orders even when their state isoperando.
Array of schedule blocks. This is a full replacement — any existing weekday blocks not included are deactivated.
POST /api/v1/business/branches/:id/admins
Assigns abusiness_branch_admin role to a user for the specified branch. Returns 201 Created.
Platform user ID of the person to assign as branch admin.
Role to grant. Currently only
business_branch_admin is accepted via this endpoint.GET /api/v1/business/team
Returns all team members visible to the authenticated business scope — owners, admins, branch admins, kitchen staff, cashiers, and waiters.POST /api/v1/business/team
Adds a new team member to the business scope. Returns201 Created.
Platform user ID of the person to add to the team.
Role to grant. Accepted values:
business_admin, business_branch_admin, kitchen_staff, cashier, waiter.Branch to scope the role to. Required for
business_branch_admin, kitchen_staff, cashier, and waiter roles.