---
title: "Create Mapping"
method: POST
path: "/api/admin/stelorder/mappings"
tags: ["copilot_frontend", "admin", "Admin Stelorder"]
---

# Create Mapping

`POST /api/admin/stelorder/mappings`

Crea un nuevo mapeo Stelorder.

Args:
    mapping_data: Datos del nuevo mapeo
    db: Sesión de base de datos

Returns:
    Mapeo creado

Raises:
    400: Si ya existe un mapeo con la misma categoría y label
    500: Error al crear el mapeo

## Request body

- StelorderMappingCreate — Schema para crear un nuevo mapeo.
  - `category` string, required — Categoría del mapeo: technician_calendar, incident_type, etc.
  - `hubspot_label` string, required — Etiqueta legible en HubSpot
  - `hubspot_value` string, nullable — Valor técnico (ej: email para técnicos)
  - `stelorder_id` integer, nullable — ID numérico del recurso en Stelorder
  - `stelorder_name` string, nullable — Nombre del recurso en Stelorder
  - `is_default` boolean — Si es el valor por defecto para esta categoría
  - `is_active` boolean — Si el mapeo está activo
  - `notes` string, nullable — Notas adicionales sobre este mapeo

## Response `201`

Successful Response

- StelorderMappingResponse — Schema de respuesta para un mapeo.
  - `category` string, required — Categoría del mapeo: technician_calendar, incident_type, etc.
  - `hubspot_label` string, required — Etiqueta legible en HubSpot
  - `hubspot_value` string, nullable — Valor técnico (ej: email para técnicos)
  - `stelorder_id` integer, nullable — ID numérico del recurso en Stelorder
  - `stelorder_name` string, nullable — Nombre del recurso en Stelorder
  - `is_default` boolean — Si es el valor por defecto para esta categoría
  - `is_active` boolean — Si el mapeo está activo
  - `notes` string, nullable — Notas adicionales sobre este mapeo
  - `id` integer, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/hogarsolar/apis/hogarsolar-backend-api.md) · [All operations](https://skmtc.dev/hogarsolar/apis/hogarsolar-backend-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/hogarsolar/hogarsolar-backend-api/revisions/d9861e46bef8/schema)
