Saltar al contenido
Krezkadev
POST/products

Crear un producto

name y price son obligatorios. El stock inicial entra como ajuste y queda en el kardex. Con sk_test_ devuelve el producto simulado (id: null, livemode: false).

Cuerpo de la solicitud

namestringrequerido
pricenumberrequerido

Con IGV.

skustring

Si no viene, Krezka asigna uno.

barcodestring
descriptionstring
category_idinteger
brand_idinteger
unitstring
taxenum

taxedexemptunaffected

currencyenum

PENUSD

sale_pricenumber
sale_starts_onstring
sale_ends_onstring
published_in_storeboolean
stocknumber
location_idinteger
typeenum

productservice

imagesstring[]
costnumber
wholesale_pricesobject[]
min_quantitynumber
pricenumber
packsobject[]
barcodestring
unitsinteger
pricenumber
namestring
pharmacyobject
batchobject
numberstringrequerido
expires_onstring

Obligatorio si el lote es nuevo.

costnumber
variant_optionsobject[]
namestring
valuesstring[]
variantsobject[]
attributesobject
skustring
barcodestring
pricenumber
imagestring
stocknumber

Respuestas

  • 201Producto creado
  • 400Error 400
  • 401Error 401
  • 403Error 403
  • 409Error 409
  • 429Error 429
POST /products
curl -X POST https://api.krezka.com/api/v1/erp/products \
  -H "Authorization: Bearer $FALCONEXT_API_KEY" \
  -H "Idempotency-Key: <Idempotency-Key>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "price": 0,
    "sku": "string",
    "barcode": "string",
    "description": "string",
    "category_id": 0,
    "brand_id": 0,
    "unit": "NIU",
    "tax": "taxed",
    "currency": "PEN",
    "sale_price": 0,
    "sale_starts_on": "string",
    "sale_ends_on": "string",
    "published_in_store": true,
    "stock": 0,
    "location_id": 0,
    "type": "product",
    "images": [
      "string"
    ],
    "cost": 0,
    "wholesale_prices": [
      {
        "min_quantity": 0,
        "price": 0
      }
    ],
    "packs": [
      {
        "barcode": "string",
        "units": 0,
        "price": 0,
        "name": "string"
      }
    ],
    "pharmacy": {},
    "batch": {
      "number": "string",
      "expires_on": "string",
      "cost": 0
    },
    "variant_options": [
      {
        "name": "string",
        "values": [
          "string"
        ]
      }
    ],
    "variants": [
      {
        "attributes": {},
        "sku": "string",
        "barcode": "string",
        "price": 0,
        "image": "string",
        "stock": 0
      }
    ]
  }'
Respuesta · 201
JSON
{
  "object": "product",
  "id": 0,
  "livemode": true,
  "type": "product",
  "sku": "string",
  "barcode": "string",
  "name": "string",
  "description": "string",
  "price": 0,
  "sale_price": 0,
  "sale_starts_on": "string",
  "sale_ends_on": "string",
  "currency": "PEN",
  "tax_included": true,
  "unit": "string",
  "category": {},
  "brand": {},
  "images": [
    "string"
  ],
  "stock": 0,
  "reserved": 0,
  "available": 0,
  "stock_by_location": [
    {
      "location_id": 0,
      "location": "string",
      "quantity": 0,
      "reserved": 0,
      "available": 0
    }
  ],
  "availability": "in_stock",
  "wholesale_prices": [
    {}
  ],
  "packs": [
    {}
  ],
  "pharmacy": {},
  "batches": [
    {}
  ],
  "published_in_store": true,
  "variants": [
    {
      "id": 0,
      "sku": "string",
      "barcode": "string",
      "attributes": {},
      "price": 0,
      "image": "string",
      "stock": 0,
      "reserved": 0,
      "available": 0,
      "stock_by_location": [
        {
          "location_id": 0,
          "location": "string",
          "quantity": 0,
          "reserved": 0,
          "available": 0
        }
      ]
    }
  ]
}
Pruébalo
API de Krezka (ERP)2026-10-22

Se guarda solo en tu navegador (localStorage). Nunca se incluye en el código copiable.

POSThttps://api.krezka.com/api/v1/erp/products
curl -X POST https://api.krezka.com/api/v1/erp/products \
  -H "Authorization: Bearer $FALCONEXT_API_KEY"
Respuesta

Envía una solicitud para ver la respuesta