---
title: "Crear producto"
method: POST
path: "/api/v1/products"
tags: ["API"]
---

# Crear producto

`POST /api/v1/products`

Crea un producto simple, servicio, combo o kit, o un producto con hasta tres opciones y 250 variantes. En la creación con variantes, cada variante define su combinación, SKU, precios y stock inicial.

## Headers

- `Idempotency-Key` string, required
- `X-Request-Id` string

## Request body

- union
  - object
    - `name` string, required
    - `description` string, nullable
    - `category_id` string, uuid, nullable
    - `visibility` 'both' | 'sales' | 'purchases'
    - `image_url` string, nullable — External product image URL reference. La Pyme displays it best effort and does not copy, ingest, or host the image.
    - `product_type` 'product' | 'service' | 'combo' | 'kit'
    - `sku` string, required
    - `barcode` string, nullable
    - `unit_of_measure` '10' | '11' | '12' | '13' | '14' | '15' | '16' | '17' | '18' | '19' | '20' | '21' | '22' | '23' | '24' | '25' | '26' | '27' | '28' | '29' | '30' | '31' | '32' | '33' | '34' | '35' | '36' | '37' | '41' | '47' | '48' | '49' | '50' | '51' | '52' | '53' | '54' | '55' | '61' | '62' | '63' | '97' | '98' | '99' | '00' | '01' | '02' | '03' | '04' | '05' | '06' | '07' | '08' | '09'
    - `currency` 'PES' | 'DOL'
    - `cost` integer
    - `price` integer — Manual sale price in cents. Mutually exclusive with markup_percentage; send price for manual pricing or markup_percentage for markup pricing.
    - `promotional_price` integer, nullable
    - `markup_percentage` number, nullable — Markup percentage used to calculate the sale price from cost, tax, and organization rounding rules. Mutually exclusive with price; send null to switch back to manual pricing.
    - `tax_rate_id` integer
    - `is_exempt` boolean
    - `default_supplier_id` string, uuid, nullable
    - `default_sales_account_id` string, uuid, nullable
    - `default_purchase_account_id` string, uuid, nullable
    - `warehouse_stocks` ApiSharedObject6dbe49c4ef[]
      - `warehouse_id` string, uuid, required
      - `quantity` number, required
    - `is_active` boolean
    - `metafields` ApiSharedObject0347948139[] — Group-level custom field values addressed by canonical key. Requires Max or Enterprise.
      - `key` string, required
      - `value` string, required
  - object
    - `name` string, required
    - `description` string, nullable
    - `category_id` string, uuid, nullable
    - `visibility` 'both' | 'sales' | 'purchases'
    - `image_url` string, nullable — External product image URL reference. La Pyme displays it best effort and does not copy, ingest, or host the image.
    - `default_supplier_id` string, uuid, nullable
    - `default_sales_account_id` string, uuid, nullable
    - `default_purchase_account_id` string, uuid, nullable
    - `is_active` boolean
    - `metafields` ApiSharedObject0347948139[] — Group-level custom field values addressed by canonical key. Requires Max or Enterprise.
      - `key` string, required
      - `value` string, required
    - `product_type` 'product'
    - `options` string[], required — Nombres ordenados de las opciones de variantes, por ejemplo Material, Color y Talle.
    - `variants` object[], required — Variantes vendibles que se crearán dentro del producto.
      - `image_url` string, nullable — External product image URL reference. La Pyme displays it best effort and does not copy, ingest, or host the image.
      - `sku` string, required
      - `barcode` string, nullable
      - `unit_of_measure` '10' | '11' | '12' | '13' | '14' | '15' | '16' | '17' | '18' | '19' | '20' | '21' | '22' | '23' | '24' | '25' | '26' | '27' | '28' | '29' | '30' | '31' | '32' | '33' | '34' | '35' | '36' | '37' | '41' | '47' | '48' | '49' | '50' | '51' | '52' | '53' | '54' | '55' | '61' | '62' | '63' | '97' | '98' | '99' | '00' | '01' | '02' | '03' | '04' | '05' | '06' | '07' | '08' | '09'
      - `currency` 'PES' | 'DOL'
      - `cost` integer
      - `price` integer — Manual sale price in cents. Mutually exclusive with markup_percentage; send price for manual pricing or markup_percentage for markup pricing.
      - `promotional_price` integer, nullable
      - `markup_percentage` number, nullable — Markup percentage used to calculate the sale price from cost, tax, and organization rounding rules. Mutually exclusive with price; send null to switch back to manual pricing.
      - `tax_rate_id` integer
      - `is_exempt` boolean
      - `warehouse_stocks` ApiSharedObject6dbe49c4ef[]
        - `warehouse_id` string, uuid, required
        - `quantity` number, required
      - `option_values` object, required — Mapa con exactamente un valor por cada nombre declarado en options.

## Response `200`

Producto creado exitosamente

- ApiProductCreateResponse
  - `request_id` string, required
  - `data` object, required
    - `product` ApiSharedObjectc99e480838, required
      - `id` string, uuid, required
      - `name` string, required
      - `description` string, nullable, required
      - `category` ApiSharedObject8aeeceaf0f, required
        - `id` string, uuid, required
        - `name` string, required
      - `sku` string, required
      - `barcode` string, nullable, required
      - `currency` string, required
      - `cost` number, required
      - `price` number, required
      - `tax_rate` ApiSharedObjectee5eae48b0, required
        - `id` number, required
        - `value` number, required
      - `default_supplier` ApiSharedObject8aeeceaf0f, required
        - `id` string, uuid, required
        - `name` string, required
      - `product_type` 'product' | 'service' | 'combo' | 'kit', required
      - `is_active` boolean, required
      - `organization_slug` string, required
      - `created_at` string, date-time, required
      - `updated_at` string, date-time, required
      - `effective_price` number
      - `price_source` 'automatic' | 'manual_override' | 'manual_fallback' | 'base'
      - `applied_price_list` ApiSharedObjectfc277c542a
        - `id` string, uuid, required
        - `name` string, required
        - `is_automatic` boolean, required
        - `automatic_pricing_mode` 'base_price_adjustment' | 'cost_markup', required
        - `adjustment_percentage` number, nullable, required
        - `tax_inclusive` boolean, required
      - `object` 'product', required
      - `variant_group_id` string, uuid, required
      - `variant_options` object, nullable, required
      - `is_exempt` boolean, required
      - `metafields` ApiSharedObject0347948139[], required
        - `key` string, required
        - `value` string, required
      - `stock_summary` ApiSharedObjecta9f7340006, required
        - `total_quantity` number, required
        - `warehouse_count` integer, required
        - `by_warehouse` ApiSharedObjectf20bf16616[], required
          - `warehouse_id` string, uuid, required
          - `warehouse_name` string, required
          - `quantity` number, required
          - `on_hand` number, required
          - `reserved_quantity` number, required
          - `incoming_quantity` number, required
    - `idempotent_replay` boolean, required
  - `warnings` unknown[], required
    - unknown

## Other responses

- `400` — Solicitud inválida
- `401` — API key faltante o inválida
- `403` — Scopes insuficientes
- `404` — Recurso relacionado inexistente
- `409` — Conflicto de negocio o idempotencia
- `429` — Límite de solicitudes excedido para la organización
- `500` — Error interno del servidor

---

[API](https://skmtc.net/lapyme/apis/la-pyme-api.md) · [All operations](https://skmtc.net/lapyme/apis/la-pyme-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lapyme/la-pyme-api/versions/414f57f28498/schema)
