---
title: "Update"
method: PUT
path: "/purchases/{purchase_id}"
tags: ["Purchases"]
---

# Update

`PUT /purchases/{purchase_id}`

Actualizar compra

## Path parameters

- `purchase_id` integer, required

## Headers

- `X-Company-Token` string, required

## Request body

- PurchaseCreate
  - `serie` string, nullable
  - `numero` union
    - integer
    - string
  - `fecha_de_emision` union
    - string, date
    - string
  - `hora_de_emision` union
    - string, time
    - string
  - `fecha_de_vencimiento` string, date, nullable
  - `tasa_de_cambio` number, nullable
  - `tipo_operacion` union
    - integer
    - string
  - `moneda` string, nullable
  - `moneda_id` union
    - integer
    - string
  - `establecimiento_id` integer, nullable
  - `tipo_documento_id` union
    - integer
    - string
  - `proveedor_id` integer, nullable
  - `fecha_entrega` string, date, nullable
  - `estado_doc` string, nullable
  - `estado_pago` string, nullable
  - `items` AppSchemasDocumentDocumentItemCreate[], nullable
    - `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
  - `retencion_id` integer, 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
  - `documento_relacionados` DocumentGuideCreate[], nullable
    - `tipo_documento` string, required
    - `tipo_documento_codigo` union
      - integer
      - string
    - `serie` string, required
    - `numero` string, required
  - `documento_afectado` DocumentInvoiceCreate
    - `tipo_documento` string, nullable
    - `codigo_tipo_documento` union
      - integer
      - string
    - `serie` string, nullable
    - `numero` integer, nullable
  - `observaciones` 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_igv` number, nullable
  - `total_valor` number, nullable
  - `total_pagado` number, nullable
  - `total_descuento` number, nullable
  - `total_cargo` number, nullable
  - `total_rc` number, nullable
  - `total_retencion` number, nullable
  - `total_icbp` number, nullable
  - `total_base_isc` number, nullable
  - `total_isc` 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
  - `taxe` number, nullable
  - `user_id` integer, nullable
  - `company_id` integer, nullable
  - `is_demo` boolean, nullable
  - `body_request` unknown
  - `logs` unknown[], nullable
    - unknown
  - `orden_compra_id` integer, nullable
  - `condicion_pago_id` integer, nullable, required
  - `proveedor` SupplierOut
    - `proveedor_tipo_documento` string, required
    - `proveedor_denominacion` string, required
    - `proveedor_numero_documento` string, required
    - `proveedor_email` union
      - string, email
      - string
    - `proveedor_telefono` string, nullable
    - `proveedor_distrito_id` string, nullable
    - `proveedor_direccion` string, nullable
    - `document_type_code` union
      - integer
      - string
    - `id` integer, nullable
    - `user_id` integer, nullable
  - `estado_entrega` 'pendiente' | 'parcial' | 'completo'
  - `pagos` PaymentDocumentInput[], nullable
    - `id` integer, nullable
    - `tipo_de_condicion` integer
    - `forma_de_pago` integer
    - `metodo_pago_nombre` string, nullable
    - `referencia` string, nullable
    - `monto` number, nullable
    - `moneda_id` integer, nullable
    - `fecha` string, date-time, nullable
    - `estado` string, nullable
    - `verification_status` 'por_confirmar' | 'confirmado' | 'rechazado' | 'anulado'
    - `serie` string, nullable
    - `numero` integer, nullable
    - `adjunto` PaymentAttachmentOutInput
      - `name` string, required
      - `url` string, required
      - `path` string, nullable
      - `size` integer, nullable
      - `content_type` string, nullable
      - `extension` string, nullable

## Response `200`

Successful Response

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