---
title: "Save cash-basis document components"
method: POST
path: "/reports/cash-basis-components"
tags: ["Reports"]
---

# Save cash-basis document components

`POST /reports/cash-basis-components`

## Request

- Base URL: `https://ledgerhq.pro/api/v1`
- URL: `https://ledgerhq.pro/api/v1/reports/cash-basis-components`
- Auth: one of:
  - HTTP bearer and API key in header `x-organization-id`
  - HTTP bearer and API key in header `x-organization-id`

## Request body

- CashBasisComponentsInput
  - `documentType` 'invoice' | 'bill' | 'credit_note' | 'debit_note', required
  - `documentId` string, uuid, required
  - `components` object[], required
    - `accountId` string, uuid, required
    - `componentType` 'principal' | 'tax' | 'discount' | 'other', required
    - `amountCents` integer, required: Integer cents. Example: 1250 means $12.50.
    - `sortOrder` integer

## Response `200`

Saved cash-basis components

## Other responses

- `default`: Error response

---

[API](https://skmtc.dev/ledgerhq-pro/apis/ledgerhq-bookkeeping-api.md) · [All operations](https://skmtc.dev/ledgerhq-pro/apis/ledgerhq-bookkeeping-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ledgerhq-pro/apis/ledgerhq-bookkeeping-api/revisions/9a8269f0a586?raw)
