Legal identity
The dealership's legal identity (legal name, RUT, line of business, address, representative and deed) and its powers of attorney. Without it, printing a sale note or a compraventa answers 409.
Download the full API pública projection: openapi.json.
Sell a unit explains this resource in prose, with runnable examples.
| Method | Path | What it does |
|---|---|---|
GET | /organization-legal | This workspace’s legal entities |
POST | /organization-legal | Record the house’s legal identity |
DELETE | /organization-legal/{id} | Remove a legal entity |
GET | /organization-legal/{id} | Fetch one legal entity |
PATCH | /organization-legal/{id} | Edit a legal entity |
GET | /organization-legal/{organizationLegalId}/powers-of-attorney | List the poderes granted for this legal entity |
GET /organization-legal
This workspace’s legal entities
The dealership’s legal identity — razón social, RUT, giro, domicilio, representante legal and (optionally) the escritura de personería — the facts every printed document states about the house (nota de venta, compraventa, mandato de consignación). A LIST, 0 or 1 entries in practice: an empty list is what makes printing answer 409 automotora_identity_missing / «Falta la identidad legal de la automotora». Requires organization_legal:read.
curl https://api.vitrinadev.com/api/v1/organization-legal \
-H "Authorization: Bearer $VITRINA_KEY"Example response (200)
{
"data": [
{
"id": "4e2a9c71-8b3d-4f5e-a1c6-2d7b9e0f3a58",
"tenant_id": "6c3f1a2b-9d8e-4b7a-8c5d-1e2f3a4b5c6d",
"legal_name": "Comercial Autos del Sur SpA",
"tax_id": "76543210-3",
"tax_id_kind": "rut",
"giro": "Compraventa de vehículos motorizados",
"address_street": "Av. Apoquindo",
"address_number": "5400",
"address_unit": null,
"comuna_code": "13114",
"region_code": "13",
"address_source": "manual",
"representative_name": "María Fernanda Rojas",
"representative_tax_id": "13456789-0",
"representative_tax_id_kind": "rut",
"escritura_date": "2019-03-12",
"escritura_notary": "Notaría de Santiago de don Pedro Ejemplo",
"escritura_comuna_code": "13101",
"created_at": "2026-09-28T13:00:00.000Z",
"updated_at": "2026-09-28T13:00:00.000Z"
}
],
"meta": {
"total": 1
}
}Answers: 200 · 400 · 401 · 403 · 404 · 409 · 429
POST /organization-legal
Record the house’s legal identity
Records the dealership’s legal identity. RUTs are accepted formatted or bare and stored normalised; the region is derived from the comuna. The escritura trio (escritura_date, escritura_notary, escritura_comuna_code) is all-or-nothing, and the representative’s RUT travels with its kind. With this row in place the nota de venta prints; the compraventa additionally needs the representative’s RUT and the escritura (or a poder). Requires organization_legal:write.
Body
| Field | Type | Required | Constraints |
|---|---|---|---|
legal_name | string | yes | mín. 1, máx. 300 |
tax_id | string | yes | mín. 1, máx. 64 |
tax_id_kind | rut \ | passport \ | foreign_tax_id |
giro | string | yes | mín. 1, máx. 300 |
address_street | string | yes | mín. 1, máx. 200 |
address_number | string | null | — | máx. 40 |
address_unit | string | null | — | máx. 60 |
comuna_code | string | yes | patrón ^[0-9]{5}$ |
representative_name | string | yes | mín. 1, máx. 300 |
representative_tax_id | string | null | — | mín. 1, máx. 64 |
representative_tax_id_kind | rut \ | passport \ | foreign_tax_id |
escritura_date | string | null | — | patrón ^\d{4}-\d{2}-\d{2}$ |
escritura_notary | string | null | — | máx. 200 |
escritura_comuna_code | string | null | — | patrón ^[0-9]{5}$ |
curl -X POST https://api.vitrinadev.com/api/v1/organization-legal \
-H "Authorization: Bearer $VITRINA_KEY" \
-H "Content-Type: application/json" \
-d '{
"legal_name": "Comercial Autos del Sur SpA",
"tax_id": "76.543.210-3",
"giro": "Compraventa de vehículos motorizados",
"address_street": "Av. Apoquindo",
"address_number": "5400",
"comuna_code": "13114",
"representative_name": "María Fernanda Rojas",
"representative_tax_id": "13.456.789-0",
"representative_tax_id_kind": "rut",
"escritura_date": "2019-03-12",
"escritura_notary": "Notaría de Santiago de don Pedro Ejemplo",
"escritura_comuna_code": "13101"
}'Example response (201)
{
"data": {
"id": "4e2a9c71-8b3d-4f5e-a1c6-2d7b9e0f3a58",
"tenant_id": "6c3f1a2b-9d8e-4b7a-8c5d-1e2f3a4b5c6d",
"legal_name": "Comercial Autos del Sur SpA",
"tax_id": "76543210-3",
"tax_id_kind": "rut",
"giro": "Compraventa de vehículos motorizados",
"address_street": "Av. Apoquindo",
"address_number": "5400",
"address_unit": null,
"comuna_code": "13114",
"region_code": "13",
"address_source": "manual",
"representative_name": "María Fernanda Rojas",
"representative_tax_id": "13456789-0",
"representative_tax_id_kind": "rut",
"escritura_date": "2019-03-12",
"escritura_notary": "Notaría de Santiago de don Pedro Ejemplo",
"escritura_comuna_code": "13101",
"created_at": "2026-09-28T13:00:00.000Z",
"updated_at": "2026-09-28T13:00:00.000Z"
}
}Answers: 201 · 400 · 401 · 403 · 404 · 409 · 429
DELETE /organization-legal/{id}
Remove a legal entity
Costs nothing today (nothing references this table by id yet), but is on a clock: the day a document records which entity it named, this starts refusing for a named entity. Cascades to its powers of attorney.
| Parameter | In | Type | Required | Constraints |
|---|---|---|---|---|
id | path | uuid | yes |
curl -X DELETE https://api.vitrinadev.com/api/v1/organization-legal/<id> \
-H "Authorization: Bearer $VITRINA_KEY"Answers: 204 · 400 · 401 · 403 · 404 · 409 · 429
GET /organization-legal/{id}
Fetch one legal entity
One of this workspace’s legal entities by id. Another workspace’s is a 404. Requires organization_legal:read.
| Parameter | In | Type | Required | Constraints |
|---|---|---|---|---|
id | path | uuid | yes |
curl https://api.vitrinadev.com/api/v1/organization-legal/<id> \
-H "Authorization: Bearer $VITRINA_KEY"Example response (200)
{
"data": {
"id": "4e2a9c71-8b3d-4f5e-a1c6-2d7b9e0f3a58",
"tenant_id": "6c3f1a2b-9d8e-4b7a-8c5d-1e2f3a4b5c6d",
"legal_name": "Comercial Autos del Sur SpA",
"tax_id": "76543210-3",
"tax_id_kind": "rut",
"giro": "Compraventa de vehículos motorizados",
"address_street": "Av. Apoquindo",
"address_number": "5400",
"address_unit": null,
"comuna_code": "13114",
"region_code": "13",
"address_source": "manual",
"representative_name": "María Fernanda Rojas",
"representative_tax_id": "13456789-0",
"representative_tax_id_kind": "rut",
"escritura_date": "2019-03-12",
"escritura_notary": "Notaría de Santiago de don Pedro Ejemplo",
"escritura_comuna_code": "13101",
"created_at": "2026-09-28T13:00:00.000Z",
"updated_at": "2026-09-28T13:00:00.000Z"
}
}Answers: 200 · 400 · 401 · 403 · 404 · 409 · 429
PATCH /organization-legal/{id}
Edit a legal entity
Sparse. The NOT NULL columns are optional but not nullable — sending null for one is a 400, not a clear.
| Parameter | In | Type | Required | Constraints |
|---|---|---|---|---|
id | path | uuid | yes |
Body
| Field | Type | Required | Constraints |
|---|---|---|---|
legal_name | string | — | mín. 1, máx. 300 |
tax_id | string | — | mín. 1, máx. 64 |
tax_id_kind | rut \ | passport \ | foreign_tax_id |
giro | string | — | mín. 1, máx. 300 |
address_street | string | — | mín. 1, máx. 200 |
address_number | string | null | — | máx. 40 |
address_unit | string | null | — | máx. 60 |
comuna_code | string | — | patrón ^[0-9]{5}$ |
representative_name | string | — | mín. 1, máx. 300 |
representative_tax_id | string | null | — | mín. 1, máx. 64 |
representative_tax_id_kind | rut \ | passport \ | foreign_tax_id |
escritura_date | string | null | — | patrón ^\d{4}-\d{2}-\d{2}$ |
escritura_notary | string | null | — | máx. 200 |
escritura_comuna_code | string | null | — | patrón ^[0-9]{5}$ |
curl -X PATCH https://api.vitrinadev.com/api/v1/organization-legal/<id> \
-H "Authorization: Bearer $VITRINA_KEY" \
-H "Content-Type: application/json" \
-d '{
"giro": "Compraventa y consignación de vehículos motorizados"
}'Example response (200)
{
"data": {
"id": "4e2a9c71-8b3d-4f5e-a1c6-2d7b9e0f3a58",
"tenant_id": "6c3f1a2b-9d8e-4b7a-8c5d-1e2f3a4b5c6d",
"legal_name": "Comercial Autos del Sur SpA",
"tax_id": "76543210-3",
"tax_id_kind": "rut",
"giro": "Compraventa y consignación de vehículos motorizados",
"address_street": "Av. Apoquindo",
"address_number": "5400",
"address_unit": null,
"comuna_code": "13114",
"region_code": "13",
"address_source": "manual",
"representative_name": "María Fernanda Rojas",
"representative_tax_id": "13456789-0",
"representative_tax_id_kind": "rut",
"escritura_date": "2019-03-12",
"escritura_notary": "Notaría de Santiago de don Pedro Ejemplo",
"escritura_comuna_code": "13101",
"created_at": "2026-09-28T13:00:00.000Z",
"updated_at": "2026-09-28T14:10:00.000Z"
}
}Answers: 200 · 400 · 401 · 403 · 404 · 409 · 429
GET /organization-legal/{organizationLegalId}/powers-of-attorney
List the poderes granted for this legal entity
The powers of attorney (poderes) on file for one of this workspace’s legal entities, revoked and expired ones included. When a poder is in force on the signing date, printing names its delegate as the representative, so the entity’s own representante RUT and escritura are no longer required. Requires organization_legal:read.
| Parameter | In | Type | Required | Constraints |
|---|---|---|---|---|
organizationLegalId | path | uuid | yes |
curl https://api.vitrinadev.com/api/v1/organization-legal/<id>/powers-of-attorney \
-H "Authorization: Bearer $VITRINA_KEY"Example response (200)
{
"data": [
{
"id": "9b1d4c7e-2f3a-4e5b-8c6d-7a8b9c0d1e2f",
"tenant_id": "6c3f1a2b-9d8e-4b7a-8c5d-1e2f3a4b5c6d",
"organization_legal_id": "4e2a9c71-8b3d-4f5e-a1c6-2d7b9e0f3a58",
"delegate_name": "Andrea Soto Reyes",
"delegate_tax_id": "12345678-5",
"delegate_tax_id_kind": "rut",
"escritura_date": "2024-03-12",
"escritura_notary": "Notaría de ejemplo",
"escritura_comuna_code": "13132",
"escritura_comuna_name": "Vitacura",
"valid_from": "2024-03-12",
"valid_until": null,
"revoked_at": null,
"revoked_by": null,
"revoked_reason": null,
"created_at": "2024-03-14T15:02:11.000Z",
"updated_at": "2024-03-14T15:02:11.000Z"
}
],
"meta": {
"total": 1
}
}Answers: 200 · 400 · 401 · 403 · 404 · 409 · 429