Vitrina API
Referencia

Sucursales

Las sucursales del workspace, y la dirección con la que se muestran.

Las sucursales del workspace, y la dirección con la que se muestran.

El capítulo que explica este recurso, con ejemplos ejecutables, está acá.

MétodoRutaQué hace
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)

ParámetroEnTipoObligatorioRestricciones
include_inactivequerystringno
curl https://api.vitrinadev.com/api/v1/locations \
  -H "Authorization: Bearer $VITRINA_KEY"

Responde: 200 · 400 · 401 · 403 · 404 · 409 · 429

POST /locations

Create a location

Cuerpo

CampoTipoObligatorioRestricciones
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
curl -X POST https://api.vitrinadev.com/api/v1/locations \
  -H "Authorization: Bearer $VITRINA_KEY" \
  -H "Content-Type: application/json" \
  -d '{ … }'

Responde: 201 · 400 · 401 · 403 · 404 · 409 · 429

DELETE /locations/{id}

Soft-delete a location

ParámetroEnTipoObligatorioRestricciones
idpathstringmín. 1, máx. 80
curl -X DELETE https://api.vitrinadev.com/api/v1/locations/<id> \
  -H "Authorization: Bearer $VITRINA_KEY"

Responde: 204 · 400 · 401 · 403 · 404 · 409 · 429

GET /locations/{id}

Get a location (uuid or B- display id)

ParámetroEnTipoObligatorioRestricciones
idpathstringmín. 1, máx. 80
curl https://api.vitrinadev.com/api/v1/locations/<id> \
  -H "Authorization: Bearer $VITRINA_KEY"

Responde: 200 · 400 · 401 · 403 · 404 · 409 · 429

PATCH /locations/{id}

Update a location (is_active=false soft-deletes)

ParámetroEnTipoObligatorioRestricciones
idpathstringmín. 1, máx. 80

Cuerpo

CampoTipoObligatorioRestricciones
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 '{ … }'

Responde: 200 · 400 · 401 · 403 · 404 · 409 · 429

En esta página