Vitrina API
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.

MethodPathWhat it does
GET/locationsList locations (branches / stores / clinics / offices)
POST/locationsCreate 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)

ParameterInTypeRequiredConstraints
include_inactivequerystringno
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

FieldTypeRequiredConstraints
namestringyesmín. 1, máx. 200
addressstring | nullmáx. 500
address_streetstring | nullmáx. 200
address_numberstring | nullmáx. 40
address_unitstring | nullmáx. 60
comuna_codestring | nullpatrón ^[0-9]{5}$
phonestring | nullmáx. 60
emailstring | nullemail, máx. 200
manager_namestring | nullmáx. 200
hoursobject | null
timezonestring | nullmáx. 80
geoobject | null
notesstring | nullmáx. 5000
arrival_infoobject | null
metadataobject
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

ParameterInTypeRequiredConstraints
idpathstringyesmí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)

ParameterInTypeRequiredConstraints
idpathstringyesmí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)

ParameterInTypeRequiredConstraints
idpathstringyesmín. 1, máx. 80

Body

FieldTypeRequiredConstraints
namestringmín. 1, máx. 200
addressstring | nullmáx. 500
address_streetstring | nullmáx. 200
address_numberstring | nullmáx. 40
address_unitstring | nullmáx. 60
comuna_codestring | nullpatrón ^[0-9]{5}$
phonestring | nullmáx. 60
emailstring | nullemail, máx. 200
manager_namestring | nullmáx. 200
hoursobject | null
timezonestring | nullmáx. 80
geoobject | null
notesstring | nullmáx. 5000
arrival_infoobject | null
metadataobject
is_activeboolean
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

On this page