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

# Store

`POST /api/v3/calcular-total`

## Request body

- AppSchemasCalculateTotalDocumentCreate
  - `tipo_documento` string, nullable
  - `tasa_de_cambio` number, nullable
  - `tipo_operacion` string, required
  - `moneda` string, nullable
  - `moneda_id` string, nullable
  - `moneda_local_id` string, 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_impuestos` 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
  - `descuento` AppSchemasCalculateTotalDiscount
    - `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
  - `taxe` number, nullable
  - `id` integer, nullable
  - `items` AppSchemasCalculateTotalDocumentItemCreate[], required
    - `item_id` integer, nullable
    - `unidad` string, nullable, required
    - `codigo` union
      - integer
      - string
    - `descripcion` string, nullable
    - `nota` string, nullable
    - `documento_id` integer, nullable
    - `cantidad` number
    - `precio` number, required
    - `total` number, nullable
    - `tipo_tax` string, nullable, required
    - `igv` number, nullable, required
    - `porcentaje_igv` number, nullable
    - `descuento` number, required
    - `codigo_descuento` string, nullable
    - `descuento_con_impuesto` boolean, nullable
    - `precio_con_igv` boolean, nullable
    - `discount` AppSchemasCalculateTotalDiscount
      - `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
  - `totales` AppSchemasCalculateTotalDocumentTotalCreate
    - `monto_descuento_global` number
    - `descuento_con_impuesto` boolean, nullable
    - `monto_otros_cargos` number
    - `porcentaje_rc` number
    - `total_rc` number
    - `monto_anticipo` number
  - `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
  - `retencion` DocumentRetentionCreate
    - `codigo` string, nullable
  - `codigo_retencion` string, nullable
  - `detraccion` AppSchemasCalculateTotalDocumentDetractionCreate
    - `codigo` string, nullable
    - `forma_de_pago` string, nullable
    - `porcentaje` number, nullable
    - `monto` number, nullable
    - `datos_transporte_carga` unknown
  - `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` AppSchemasCalculateTotalDocumentAnticipationCreate[], nullable
    - `tipo_documento` string, nullable
    - `codigo_tipo_documento` string, nullable
    - `serie` string, nullable
    - `numero` integer, nullable
    - `total` number, nullable
  - `anticipo` AppSchemasCalculateTotalAnticipationCreate
    - `total` number, nullable, required
    - `total_value` number, nullable, required
    - `total_taxed` number, nullable, required
    - `documents` AppSchemasCalculateTotalDocumentAnticipationCreate[], nullable, required
      - `tipo_documento` string, nullable
      - `codigo_tipo_documento` string, nullable
      - `serie` string, nullable
      - `numero` integer, nullable
      - `total` number, nullable
  - `tipo_nota` string, nullable

## Response `200`

Successful Response

- DocumentCreateOut
  - `tipo_documento` string, nullable
  - `tasa_de_cambio` number, nullable
  - `tipo_operacion` string, required
  - `moneda` string, nullable
  - `moneda_id` string, nullable
  - `moneda_local_id` string, 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_impuestos` 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
  - `descuento` AppSchemasCalculateTotalDiscount
    - `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
  - `taxe` number, nullable
  - `id` integer, nullable
  - `items` Item[], required
    - `cantidad` number
    - `valor_unitario` number
    - `unidad` string, nullable, required
    - `codigo` union
      - integer
      - string
    - `descripcion` string
    - `note` string, nullable
    - `precio` number, nullable
    - `impuesto` TaxeOut
      - `nombre` string, required
      - `ambito` string
      - `tipo` string
      - `codigo` string, nullable
      - `importe` number, required
      - `id` integer, required
      - `tag` string, required
    - `precio_con_igv` boolean, nullable
    - `total_descuento` number, nullable
    - `codigo_descuento` string, nullable
    - `descuento_con_impuesto` boolean, nullable
    - `descuento` AppSchemasCalculateTotalDiscount
      - `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
    - `has_plastic_bag_taxes` boolean, nullable
    - `amount_plastic_bag_taxes` number, nullable
    - `total_plastic_bag_taxes` number, nullable
    - `tipo_precio_id` string
    - `tipo_impuesto` number, nullable
    - `valor` number, nullable
    - `total_valor` number, nullable
    - `total_base_igv` number, nullable
    - `total_igv` number, nullable
    - `total_gravado` number, nullable
    - `total` number, nullable
    - `document_id` integer, nullable
    - `item_id` integer, nullable
    - `rc` number, nullable
  - `totales` DocumentTotalCreateOutput
    - `monto_descuento_global` number
    - `descuento_con_impuesto` boolean, nullable
    - `monto_otros_cargos` number
    - `porcentaje_rc` number
    - `total_rc` number
    - `monto_anticipo` number
  - `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
  - `retencion` DocumentRetentionCreate
    - `codigo` string, nullable
  - `codigo_retencion` string, nullable
  - `detraccion` AppSchemasCalculateTotalDocumentDetractionCreate
    - `codigo` string, nullable
    - `forma_de_pago` string, nullable
    - `porcentaje` number, nullable
    - `monto` number, nullable
    - `datos_transporte_carga` unknown
  - `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` AppSchemasCalculateTotalDocumentAnticipationCreate[], nullable
    - `tipo_documento` string, nullable
    - `codigo_tipo_documento` string, nullable
    - `serie` string, nullable
    - `numero` integer, nullable
    - `total` number, nullable
  - `anticipo` AnticipationCreateOutput
    - `total` number, nullable, required
    - `total_value` number, nullable, required
    - `total_taxed` number, nullable, required
    - `documents` AppSchemasCalculateTotalDocumentAnticipationCreate[], nullable, required
      - `tipo_documento` string, nullable
      - `codigo_tipo_documento` string, nullable
      - `serie` string, nullable
      - `numero` integer, nullable
      - `total` number, nullable
  - `tipo_nota` string, nullable

## 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)
