---
title: "Store"
method: POST
path: "/api/v3/documentos"
tags: ["Ventas"]
---

# Store

`POST /api/v3/documentos`

Guardar de venta

## Request body

- AppSchemasDocumentDocumentCreate
  - `tipo_documento` union
    - integer
    - string
  - `serie` string, required
  - `numero` union
    - integer
    - string
  - `fecha_de_emision` union
    - string, date
    - string
  - `hora_de_emision` union
    - string, time
    - string
  - `fecha_de_vencimiento` string, nullable
  - `inicio_ciclo_de_facturacion` string, nullable
  - `fin_ciclo_de_facturacion` string, nullable
  - `tipo_servicio_publico` string, nullable
  - `tasa_de_cambio` number, nullable
  - `tipo_operacion` union, required
    - integer
    - string
  - `moneda` string, nullable
  - `moneda_id` union
    - integer
    - string
  - `establecimiento_id` integer, nullable
  - `cliente` PersonOut, required
    - `cliente_tipo_documento` string, required
    - `cliente_denominacion` string, required
    - `cliente_numero_documento` string, required
    - `cliente_email` union
      - string, email
      - string
    - `cliente_telefono` string, nullable
    - `distrito_id` string, nullable
    - `cliente_direccion` string, nullable
    - `document_type_code` union
      - integer
      - string
    - `id` integer, nullable
    - `user_id` integer, nullable
  - `total_venta` number, nullable
  - `total_exportacion` number, nullable
  - `total_exonerado` number, nullable
  - `total_inafecto` number, nullable
  - `total_gratuito` number, nullable
  - `total_gravado` number, nullable
  - `total_igv` number, nullable
  - `total_valor` number, nullable
  - `total_pagado` number, nullable
  - `total_descuento` number, nullable
  - `total_cargo` number, nullable
  - `total_rc` number, nullable
  - `porcentaje_rc` number, nullable
  - `descuento` AppSchemasDocumentDiscount
    - `percentage` number, nullable
    - `factor` number, nullable
    - `base` number, nullable
    - `amount` number, nullable
    - `discount_type_id` string, nullable
    - `descripcion` string, nullable
    - `descuento_con_impuesto` boolean, nullable
  - `total_retencion` number, nullable
  - `total_icbp` number, nullable
  - `total_base_isc` number, nullable
  - `total_isc` number, nullable
  - `retencion_id` integer, nullable
  - `numero_orden` string, nullable
  - `taxe` number, nullable
  - `user_id` integer, nullable
  - `company_id` integer, nullable
  - `is_demo` boolean, nullable
  - `logs` unknown[], nullable
    - unknown
  - `canal_interno_de_venta` 'GRATUITO' | 'API_GLOBAL' | 'OMNICANAL_EMPRESA'
  - `id` integer, nullable
  - `cliente_id` integer, nullable
  - `items` AppSchemasDocumentDocumentItemCreate[], required
    - `item_id` integer, nullable
    - `unidad` string, nullable, required
    - `codigo` string, nullable
    - `descripcion` string, required
    - `nota` string, nullable
    - `documento_id` integer, nullable
    - `cantidad` number
    - `precio` number, required
    - `total` number, nullable
    - `tipo_tax` union, required
      - integer
      - number
    - `porcentaje_igv` number, nullable
    - `descuento` number, required
    - `codigo_descuento` string, nullable
    - `descuento_con_impuesto` boolean, nullable
    - `incluye_tax` boolean, nullable
    - `discount` AppSchemasDocumentDiscount
      - `percentage` number, nullable
      - `factor` number, nullable
      - `base` number, nullable
      - `amount` number, nullable
      - `discount_type_id` string, nullable
      - `descripcion` string, nullable
      - `descuento_con_impuesto` boolean, nullable
    - `isc` ISC
      - `codigo` string, required
      - `monto` number, required
      - `porcentaje` number
      - `base` number
      - `factor` number, nullable
      - `total` number, nullable
    - `bolsa_tax` number, nullable
    - `has_plastic_bag_taxes` boolean, nullable
    - `monto_icbper` number, nullable
    - `total_icbper` number, nullable
  - `condicion_de_pago` PaymentConditionCreate[], nullable
    - `tipo_de_condicion` union
      - string
      - integer
    - `forma_de_pago` union, required
      - integer
      - string
    - `fecha` string, nullable
    - `monto` number, required
    - `id` integer, nullable
    - `description` string
    - `name` string, nullable
  - `totales` AppSchemasDocumentDocumentTotalCreate
    - `monto_descuento_global` number
    - `descuento_con_impuesto` boolean, nullable
    - `monto_otros_cargos` number
    - `rc` number
    - `total_rc` number
    - `monto_anticipo` number
  - `retencion` DocumentRetentionCreate
    - `codigo` string, nullable
  - `codigo_retencion` string, nullable
  - `detraccion` AppSchemasDocumentDocumentDetractionCreate
    - `codigo` string, nullable
    - `forma_de_pago` string, nullable
  - `datos_transporte_carga` DocumentTransportChargeCreate
    - `ubigeo_origen` string, nullable
    - `direccion_origen` string, nullable
    - `ubigeo_destino` string, nullable
    - `direccion_destino` string, nullable
    - `valor_referencial_servicio_de_transporte` string, nullable
    - `valor_referencial_carga_efectiva` string, nullable
    - `valor_referencial_carga_util` string, nullable
    - `detalle_del_viaje` string, nullable
  - `anticipos` AppSchemasDocumentDocumentAnticipationCreate[], nullable
    - `tipo_documento` string, nullable
    - `codigo_tipo_documento` union
      - integer
      - string
    - `serie` string, nullable
    - `numero` integer, nullable
    - `total` number, nullable
  - `anticipo` AppSchemasDocumentAnticipationCreate
    - `total` number, nullable, required
    - `total_value` number, nullable, required
    - `total_taxed` number, nullable, required
    - `documents` AppSchemasDocumentDocumentAnticipationCreate[], nullable, required
      - `tipo_documento` string, nullable
      - `codigo_tipo_documento` union
        - integer
        - string
      - `serie` string, nullable
      - `numero` integer, nullable
      - `total` number, nullable
  - `tipo_nota` string, nullable
  - `motivo_nota` string, nullable
  - `documento_afectado` DocumentInvoiceCreate
    - `tipo_documento` string, nullable
    - `codigo_tipo_documento` union
      - integer
      - string
    - `serie` string, nullable
    - `numero` integer, nullable
  - `observaciones` string, nullable
  - `formato_pdf` string, nullable
  - `enviar_automaticamente_al_cliente` boolean, nullable
  - `documento_relacionados` DocumentGuideCreate[], nullable
    - `tipo_documento` string, required
    - `tipo_documento_codigo` union
      - integer
      - string
    - `serie` string, required
    - `numero` string, required
  - `body_request` unknown

## Response `200`

Successful Response

- DocumentApiOut
  - `exito` boolean
  - `mensaje` string
  - `data` DocumentDataOut, required
    - `numero` string, required
    - `archivo` string, required
    - `letras` string, nullable
    - `hash` string
    - `qr` string
    - `tipo_estado` string
    - `descripcion_estado` string
  - `archivos` DocumentFileOut, required
    - `pdf` string, nullable
    - `descargar_pdf` string
    - `xml` string
    - `cdr` string
  - `eventos` unknown[]
    - unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/factpro/apis/note-service-api.md) · [All operations](https://skmtc.net/factpro/apis/note-service-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/factpro/note-service-api/revisions/d88e14b2de42/schema)
