---
title: "Upload a document (PDF)"
method: POST
path: "/consumers/{consumer_id}/invoicing/upload-document"
tags: ["Invoicing"]
---

# Upload a document (PDF)

`POST /consumers/{consumer_id}/invoicing/upload-document`

Upload a document (PDF)

## Path parameters

- `consumer_id` string, uuid, required

## Request body

- AttachmentItemIn
  - `base64_string` string, required
  - `document_type` 'customer_document' | 'supplier_document' | 'employee_expense', required

## Response `201`

Successful Response

- UploadDocumentItemOut
  - `id` string, required — Technical id in Chift
  - `source_ref` Ref, required
    - `id` string, nullable — Technical id in the target software
    - `model` string, nullable — Name of the model/entity in the target software
  - `currency` string, nullable — Currency of the uploaded document
  - `invoice_type` 'customer_invoice' | 'customer_refund' | 'supplier_invoice' | 'supplier_refund' | 'all'
  - `status` 'cancelled' | 'draft' | 'posted' | 'paid'
  - `invoice_date` string, date, nullable — Invoicing date
  - `tax_amount` number, nullable — Taxes amount
  - `untaxed_amount` number, nullable — Untaxed amount
  - `total` number, nullable — Total amount incl. taxes
  - `lines` InvoiceLineItem[], nullable — Invoice lines
    - `description` string, nullable — Line description
    - `unit_price` number, required — Unit price excl. taxes
    - `quantity` number, required — Quantity
    - `discount_amount` number — Line discount amount excl. taxes, (unit_price * quantity) - discount_amount = untaxed_amount
    - `tax_amount` number, required — Line total taxes amount
    - `untaxed_amount` number, required — Line total untaxed amount
    - `total` number, required — Line total amount incl. taxes, total = tax_amount + untaxed_amount
    - `tax_rate` number, nullable — Tax rate (e.g. 21.0)
    - `account_number` string, nullable — Number of the accounting account used (e.g. 701000)
    - `tax_id` string, nullable — Technical id of the tax in Chift
    - `tax_exemption_reason` string, nullable — Tax exemption reason
    - `unit_of_measure` string, nullable — Unit of measure matching target sofware name
    - `product_id` string, nullable — Technical id of the product in Chift
    - `product_code` string, nullable — Product reference
    - `product_name` string, nullable — Product name
  - `partner_id` string, nullable — Technical id of the vendor/customer in Chift
  - `invoice_number` string, nullable — Number/sequence
  - `due_date` string, date, nullable — Due date
  - `reference` string, nullable — Reference
  - `payment_communication` string, nullable — Payment communication
  - `customer_memo` string, nullable — Customer note/memo
  - `journal_ref` FieldRef
    - `id` string, nullable — Technical id in the target software
    - `model` string, nullable — Name of the model/entity in the target software
    - `name` string, nullable — Value the field in the target software
  - `italian_specificities` ItalianSpecificitiesOutput
    - `stamp_duty_amount` number, nullable — Documentary stamp tax (specific to Italy)
    - `withholding_tax` InvoicingWithholdingTax
      - `rate` number, required — Rate
      - `amount` number, required — Amount
      - `reason` 'RT01' | 'RT02' | 'RT03' | 'RT04' | 'RT05' | 'RT06'
      - `payment_reason` 'A' | 'U' | 'R' | 'Q' | 'H' | 'V' | 'V2' | 'I' | 'J' | 'K' | 'P' | 'S' | 'T' | 'W' | 'X' | 'Y' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'L' | 'L1' | 'M' | 'M1' | 'M2' | 'IN' | 'O' | 'O1' | 'V1'
    - `welfare_fund` WelfareFund
      - `rate` number, required — Rate
      - `amount` number, required — Amount
      - `type` 'TC01' | 'TC02' | 'TC03' | 'TC04' | 'TC05' | 'TC06' | 'TC07' | 'TC08' | 'TC09' | 'TC10' | 'TC11' | 'TC12' | 'TC13' | 'TC14' | 'TC15' | 'TC16' | 'TC17' | 'TC18' | 'TC19' | 'TC20' | 'TC21' | 'TC22'
    - `payment_reporting` PaymentReporting
      - `method` 'MP01' | 'MP02' | 'MP03' | 'MP04' | 'MP05' | 'MP06' | 'MP07' | 'MP08' | 'MP09' | 'MP10' | 'MP11' | 'MP12' | 'MP13' | 'MP14' | 'MP15' | 'MP16' | 'MP17' | 'MP18' | 'MP19' | 'MP20' | 'MP21' | 'MP22' | 'MP23'
      - `conditions` 'TP01' | 'TP02' | 'TP03'
  - `last_updated_on` string, date-time, nullable
  - `outstanding_amount` number, nullable — Amount left to be paid
  - `last_payment_date` string, date, nullable — Date of the last payment linked to the invoice
  - `accounting_date` string, date, nullable — Accounting date
  - `payment_method_id` string, nullable — Technical id of the payment method in Chift
  - `currency_exchange_rate` number, nullable — Indicates the exchange rate at the date of the invoice.

## Other responses

- `400` — Bad Request
- `422` — Validation Error

---

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