GET /branches
Returns the branches of the agency that owns the token, each one with its branchId.
An agency may have several, and each one is a Mapaprop entity with its own id. We assign that id when the branch is created: it cannot be derived or built from your system, it is read from here.
Do not identify it by name. Two branches can have similar names, the name is edited from the web app without notifying you, and "Centro" is not "Casa Central". It is the same reason zones are mapped by id and not by text.
| Resource information | |
|---|---|
| Authentication | Required (API Token, Bearer) |
| Scope | property-api-read |
| HTTP Method | GET |
| Response | JSON |
| Version | 1 |
The call
GET https://property-api.mapaprop.com/property-v1/branches
Authorization: Bearer {access_token}
It takes no parameters: the client comes from the token.
The response
{
"branches": [
{
"branchId": 8468,
"main": true,
"name": "Rodrigo Prop Test",
"address": "Av Barce Lona 123",
"zip": "123443",
"phone1": "011 666 7114",
"email": "rodrigo.asensio@mapaprop.com",
"zone0": 1,
"zone0Description": "Argentina",
"zone1": 2,
"zone1Description": "Buenos Aires",
"zone2": 137,
"zone2Description": "Adolfo Alsina",
"zone3": 1137,
"zone3Description": "Adelina Grande"
}
]
}
| Object | Field | Type | Description |
|---|---|---|---|
| Response | branches | Array | The account's branches. It is never empty: every account has at least the main one |
| Branch | branchId | number | The id you have to use. It is the one that relates the branch to a property |
main | boolean | true on the main branch. There is exactly one | |
name | string | The name, so a human can pick on your screen. It is not a key | |
address | string | The branch address | |
zip | string | The postal code | |
phone1 · email | string | The branch contact details | |
zone0 … zone3 | number | Its location, in Mapaprop's zones | |
zone0Description … zone3Description | string | The same zones as text, for display. To map, use the ids |
When to call it
Once per client, when you onboard them — just like the zone catalogue: you store the branchId
against the branch in your system and it stays mapped.
Call it again if the agency tells you they opened a new branch.
ℹ️ Today the property object does not carry the branch:
branchIdis a field of ours and it is ignored if you send it. The branch that travels today is the one on the client record, with its contact details for the portals. This endpoint exists so that you already have the mapping done.
Errors
| Code | What happened | What to do |
|---|---|---|
400 | The token does not belong to a Mapaprop account (rule: customer_not_declared) | Branches belong to an account. If your clients have no Mapaprop account, write to us: there is no way yet to resolve their branches through this path |
401 | The token is missing or invalid | Check the Authorization header |
403 | The token does not have the property-api-read scope | It is a permission of your token: write to us |
503 | We could not read them at this moment | It is transient and on our side: retry |
Related
- Onboarding a client — the moment this is read
- Zones — the other catalogue that is mapped once
- The property object — which fields Mapaprop sets and which ones are ignored