PUT /branches/{branchRef}
Changes the data of one of the client's branches: its name, its address, its phone, its email.
The branchRef is your reference — the same one you declare in
branches[] on the ficha. You name the branch the way you have
always named it and we resolve where the write has to go.
| Resource information | |
|---|---|
| Authentication | Required (API Token, Bearer) |
| Scope | property-api-update |
| HTTP Method | PUT |
| Response | JSON |
| Version | 1 |
One rule decides where the write goes
| If the branch… | The write goes to | And in the response |
|---|---|---|
exists in the client's Mapaprop account (the ficha has its mapapropBranchId) | Mapaprop — which is where the contact data comes from when publishing — and then its ficha | "scope": "mapaprop" |
| lives only on the ficha (your client has no Mapaprop account) | the ficha, which is its registry | "scope": "ficha" |
You do not have to choose: it is resolved automatically, and the response tells you what happened.
ℹ️ If your client does have a Mapaprop account, you can also name the branch by its numeric
branchId, exactly asGET /branchesreturns it, without declaring anything on the ficha.
🔴 It replaces the whole branch
It is the same contract as the PUT of a property: what you
send IS the branch. A field you omit is left empty, it is not preserved.
Always send it whole. If you only want to change the phone, send the name, the email and the address it already had as well.
The call
PUT https://property-api.mapaprop.com/property-v1/branches/centro
Authorization: Bearer {access_token}
x-client-ref: {your client reference}
Content-Type: application/json
{
"name": "Sucursal Centro",
"email": "centro@inmobiliaria.com",
"phone1": "2234000111",
"mobile": "2235000111",
"address": "San Martín 100",
"zipcode": "7600",
"zone0": 1,
"zone1": 2,
"zone2": 137,
"zone3": 1137
}
| Field | Type | Description |
|---|---|---|
name | string | The branch name |
email | string | The contact email. It is the one shown to whoever enquires about the ad |
phone1 · phone2 · mobile | string | The contact phone numbers |
address | string | The address |
zipcode | string | The postal code |
zone0 … zone3 | number | Its location, in Mapaprop's zones |
The response
{
"branchRef": "centro",
"mapapropBranchId": 12122,
"updated": true,
"scope": "mapaprop"
}
| Field | Type | Description |
|---|---|---|
branchRef | string | Your reference, the same one you sent |
mapapropBranchId | number | The branch id in Mapaprop. It is only present if the branch exists there |
updated | boolean | true |
scope | string | mapaprop or ficha — where the write went |
Errors
| Code | What happened | What to do |
|---|---|---|
400 | The body is not valid JSON | Check the Content-Type and the body |
403 | The token does not have the property-api-update scope | It is a permission on your token: write to us |
404 | That branchRef is not a branch of the client (rule: branch_not_found) | The error lists the refs it does have. They are declared with PUT /customers |
404 | There is no ficha for that x-client-ref (error: customer_not_declared) | Create it with POST /customers |
409 | The account reached its plan's branch limit (code: BRANCH_LIMIT_REACHED) | The limit is set by the Mapaprop account's plan |
503 | We could not write it at this moment | It is transient and on our side: retry. Nothing was written |
Related
- Delete a branch
- GET /branches — the account's branches, with their
branchId - PUT /customers — declare the branches on the ficha
- Several branches on the ficha