Skip to main content
GET
/
api
/
catalogs
/
areas
Areas Catalog
curl --request GET \
  --url https://api.example.com/api/catalogs/areas
{
  "id": 123,
  "AREA": "<string>",
  "CADENA": "<string>",
  "TURNO": "<string>",
  "TIPO": "<string>",
  "NOMENCLATURA": "<string>",
  "activo": 123
}

Overview

The Areas catalog stores information about production areas in the facility. Areas are used to categorize scrap records and generate area-specific reports.

Endpoints

List All Areas

curl -X GET http://localhost:3001/api/catalogs/areas \
  -H "Authorization: Bearer YOUR_TOKEN"

Create Area

curl -X POST http://localhost:3001/api/catalogs/areas \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "AREA": "Ensamble Final",
    "CADENA": "GNT1",
    "TURNO": "A",
    "TIPO": "Producción",
    "NOMENCLATURA": "ENS-FIN",
    "activo": 1
  }'

Update Area

curl -X PUT http://localhost:3001/api/catalogs/areas/1 \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"NOMENCLATURA": "ENS-FIN-V2"}'

Delete Area (Soft)

curl -X DELETE http://localhost:3001/api/catalogs/areas/1 \
  -H "Authorization: Bearer YOUR_TOKEN"

Data Structure

id
number
Unique identifier
AREA
string
required
Area name (e.g., “Ensamble”, “Moldeo”, “Inspección”)
CADENA
string
Associated production chain
TURNO
string
Default shift for this area
TIPO
string
Area type (e.g., “Producción”, “Calidad”, “Almacén”)
NOMENCLATURA
string
Short code or abbreviation for the area
activo
number
Status: 1 = active, 0 = inactive

Response Example

[
  {
    "id": 1,
    "AREA": "Ensamble Final",
    "CADENA": "GNT1",
    "TURNO": "A",
    "TIPO": "Producción",
    "NOMENCLATURA": "ENS-FIN",
    "activo": 1
  },
  {
    "id": 2,
    "AREA": "Moldeo",
    "CADENA": "GNT1",
    "TURNO": "B",
    "TIPO": "Producción",
    "NOMENCLATURA": "MOLD",
    "activo": 1
  }
]

TypeScript Interface

export interface Area {
  id: number;
  AREA: string;
  CADENA: string;
  TURNO: string;
  TIPO: string;
  NOMENCLATURA: string;
  activo: number;
}

Permissions

View

All authenticated users

Create/Edit

admin, calidad roles only

Audit Log

All create, update, and delete operations are logged in the auditoria table.

Build docs developers (and LLMs) love