Reference
Locations
The workspace's branches, and the address they are shown with.
The workspace's branches, and the address they are shown with.
The chapter that explains this resource, with runnable examples, is here — in Spanish for now.
| Method | Path | What it does |
|---|---|---|
GET | /locations | List locations (branches / stores / clinics / offices) |
POST | /locations | Create a location |
DELETE | /locations/{id} | Soft-delete a location |
GET | /locations/{id} | Get a location (uuid or B- display id) |
PATCH | /locations/{id} | Update a location (is_active=false soft-deletes) |
GET /locations
List locations (branches / stores / clinics / offices)
| Parameter | In | Type | Required | Constraints |
|---|---|---|---|---|
include_inactive | query | string | no |
curl https://api.vitrinadev.com/api/v1/locations \
-H "Authorization: Bearer $VITRINA_KEY"Answers: 200 · 400 · 401 · 403 · 404 · 409 · 429
POST /locations
Create a location
Body
| Field | Type | Required | Constraints |
|---|---|---|---|
name | string | yes | mín. 1, máx. 200 |
address | string | null | — | máx. 500 |
address_street | string | null | — | máx. 200 |
address_number | string | null | — | máx. 40 |
address_unit | string | null | — | máx. 60 |
comuna_code | string | null | — | patrón ^[0-9]{5}$ |
phone | string | null | — | máx. 60 |
email | string | null | — | email, máx. 200 |
manager_name | string | null | — | máx. 200 |
hours | object | null | — | |
timezone | string | null | — | máx. 80 |
geo | object | null | — | |
notes | string | null | — | máx. 5000 |
arrival_info | object | null | — | |
metadata | object | — |
curl -X POST https://api.vitrinadev.com/api/v1/locations \
-H "Authorization: Bearer $VITRINA_KEY" \
-H "Content-Type: application/json" \
-d '{ … }'Answers: 201 · 400 · 401 · 403 · 404 · 409 · 429
DELETE /locations/{id}
Soft-delete a location
| Parameter | In | Type | Required | Constraints |
|---|---|---|---|---|
id | path | string | yes | mín. 1, máx. 80 |
curl -X DELETE https://api.vitrinadev.com/api/v1/locations/<id> \
-H "Authorization: Bearer $VITRINA_KEY"Answers: 204 · 400 · 401 · 403 · 404 · 409 · 429
GET /locations/{id}
Get a location (uuid or B- display id)
| Parameter | In | Type | Required | Constraints |
|---|---|---|---|---|
id | path | string | yes | mín. 1, máx. 80 |
curl https://api.vitrinadev.com/api/v1/locations/<id> \
-H "Authorization: Bearer $VITRINA_KEY"Answers: 200 · 400 · 401 · 403 · 404 · 409 · 429
PATCH /locations/{id}
Update a location (is_active=false soft-deletes)
| Parameter | In | Type | Required | Constraints |
|---|---|---|---|---|
id | path | string | yes | mín. 1, máx. 80 |
Body
| Field | Type | Required | Constraints |
|---|---|---|---|
name | string | — | mín. 1, máx. 200 |
address | string | null | — | máx. 500 |
address_street | string | null | — | máx. 200 |
address_number | string | null | — | máx. 40 |
address_unit | string | null | — | máx. 60 |
comuna_code | string | null | — | patrón ^[0-9]{5}$ |
phone | string | null | — | máx. 60 |
email | string | null | — | email, máx. 200 |
manager_name | string | null | — | máx. 200 |
hours | object | null | — | |
timezone | string | null | — | máx. 80 |
geo | object | null | — | |
notes | string | null | — | máx. 5000 |
arrival_info | object | null | — | |
metadata | object | — | |
is_active | boolean | — |
curl -X PATCH https://api.vitrinadev.com/api/v1/locations/<id> \
-H "Authorization: Bearer $VITRINA_KEY" \
-H "Content-Type: application/json" \
-d '{ … }'Answers: 200 · 400 · 401 · 403 · 404 · 409 · 429