---
title: "Criar Cabeçalho de Documentos de Compra"
method: POST
path: "/api/commercial_purchases_documents"
tags: ["Versões Anteriores", "Compras1", "Documentos de Compra1"]
---

# Criar Cabeçalho de Documentos de Compra

`POST /api/commercial_purchases_documents`

Criar Cabeçalho de Documentos de Compra

## Request body

- object
  - `data` object
    - `attributes` object
      - `company_id` number
      - `document_series_id` number
      - `document_type` string
    - `type` string

## Response `200`

Criar Cabeçalho de Documentos de Compra

- object
  - `data` object
    - `attributes` object
      - `acts_as_shipment_document` unknown
      - `apply_retention_when_paid` unknown
      - `base_currency_gross_total` unknown
      - `base_currency_net_total` unknown
      - `base_currency_pending_total` unknown
      - `base_currency_retention_total` unknown
      - `base_currency_settlement_total` unknown
      - `base_currency_vat_incidence_int` unknown
      - `base_currency_vat_incidence_ise` unknown
      - `base_currency_vat_incidence_nor` unknown
      - `base_currency_vat_incidence_red` unknown
      - `base_currency_vat_total_int` unknown
      - `base_currency_vat_total_nor` unknown
      - `base_currency_vat_total_red` unknown
      - `cashed_vat` unknown
      - `child_documents_ids` unknown
      - `communication_code` unknown
      - `communication_code_source` unknown
      - `communication_status` unknown
      - `created_at` string
      - `currency_conversion_rate` number
      - `currency_iso_code` string
      - `date` string
      - `document_area` string
      - `document_hash_sum` unknown
      - `document_no` unknown
      - `document_series_prefix` string
      - `document_type` string
      - `due_date` string
      - `emailed` unknown
      - `external_reference` string
      - `gross_total` number
      - `hash_control` unknown
      - `is_third_party` unknown
      - `line_settlement_with_tax` number
      - `line_settlement_with_tax_unrounded` number
      - `line_settlement_without_tax` number
      - `line_settlement_without_tax_unrounded` number
      - `net_total` number
      - `notes` string
      - `operation_country` unknown
      - `parent_document_area` unknown
      - `parent_documents_ids` unknown
      - `payments_ids` unknown
      - `pending_retention_value` number
      - `pending_total` number
      - `printed` unknown
      - `public_link` string
      - `retention` unknown
      - `retention_type` unknown
      - `retention_value` number
      - `retention_value_unrounded` number
      - `settlement_expression` unknown
      - `settlement_percentage` number
      - `settlement_total` number
      - `settlement_with_tax` number
      - `settlement_with_tax_unrounded` number
      - `settlement_without_tax` number
      - `settlement_without_tax_unrounded` number
      - `shipment_country` unknown
      - `shipment_loading_address_detail` unknown
      - `shipment_loading_city` unknown
      - `shipment_loading_country` unknown
      - `shipment_loading_postcode` unknown
      - `shipment_loading_time` unknown
      - `shipment_unloading_address_detail` unknown
      - `shipment_unloading_city` unknown
      - `shipment_unloading_country` unknown
      - `shipment_unloading_postcode` unknown
      - `shipment_unloading_time` unknown
      - `status` number
      - `supplier_address_detail` string
      - `supplier_business_name` string
      - `supplier_city` string
      - `supplier_country` string
      - `supplier_postcode` string
      - `supplier_tax_country_region` string
      - `supplier_tax_registration_number` string
      - `system_entry_date` unknown
      - `tax_payable` number
      - `third_party_type` unknown
      - `total_pending_quantity` unknown
      - `updated_at` string
      - `vat_incidence_int` number
      - `vat_incidence_int_unrounded` number
      - `vat_incidence_ise` number
      - `vat_incidence_ise_unrounded` number
      - `vat_incidence_nor` number
      - `vat_incidence_nor_unrounded` number
      - `vat_incidence_red` number
      - `vat_incidence_red_unrounded` number
      - `vat_included_prices` boolean
      - `vat_percentage_int` unknown
      - `vat_percentage_nor` unknown
      - `vat_percentage_red` unknown
      - `vat_total_int` number
      - `vat_total_int_unrounded` number
      - `vat_total_nor` number
      - `vat_total_nor_unrounded` number
      - `vat_total_red` number
      - `vat_total_red_unrounded` number
      - `vehicle_registration` unknown
      - `voided_reason` unknown
    - `id` string
    - `relationships` object
      - `commercial_document_series` object
        - `data` object
          - `id` string
          - `type` string
      - `company` object
        - `data` object
          - `id` string
          - `type` string
      - `currency` object
        - `data` object
          - `id` string
          - `type` string
      - `lines` object
        - `data` unknown[]
          - unknown
      - `supplier` object
        - `data` object
          - `id` string
          - `type` string
      - `tax_exemption_reasons` object
        - `data` unknown
      - `user` object
        - `data` object
          - `id` string
          - `type` string
    - `type` string
  - `meta` object
    - `observed` object
      - `scalar` number

---

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