---
title: "Get fiscal document preview of the type invoice"
method: POST
path: "/fiscal-document/v1/fiscal-documents/invoice/preview"
tags: ["Fiscal Documents"]
---

# Get fiscal document preview of the type invoice

`POST /fiscal-document/v1/fiscal-documents/invoice/preview`

## Request

- Base URL: `https://api.cloudbeds.com`
- URL: `https://api.cloudbeds.com/fiscal-document/v1/fiscal-documents/invoice/preview`
- Auth: one of:
  - HTTP bearer
  - OAuth 2
    - Authorization code: `https://api.cloudbeds.com/auth/oauth/authorize`
    - Token URL: `https://api.cloudbeds.com/auth/oauth/token` scopes: `read:reservation`

Get fiscal document preview of the type invoice.

## Headers

- `X-Property-ID` integer, required

## Request body

- GetInvoicePreviewRequest
  - `transactionIdToAmount` object, nullable: Map of transaction ID to amount (in major currency units, e.g., 10.50 for $10.50) for partial transaction inclusion
  - `transactionIdToDisplayAmount` object, nullable: Map of transaction ID to amount in the invoice currency (major units, as in displayAmount) for partial transaction inclusion, recorded on the document exactly as given. Takes precedence over transactionIdToAmount for the same transaction. When the invoice currency is the property currency it behaves like transactionIdToAmount.
  - `transactionIds` integer[], required: Include transactions with the specified IDs (deprecated, use `includeTransactionIds` instead)
  - `sourceId` integer, required
  - `sequenceId` integer, nullable
  - `sourceKind` 'GROUP_PROFILE' | 'RESERVATION' | 'HOUSE_ACCOUNT' | 'ACCOUNTS_RECEIVABLE_LEDGER', required: Kind of the source entity
  - `userId` integer, nullable: Ignored. The document is attributed to the authenticated user.
  - `currency` string, nullable: Invoice currency. Selected transactions are converted into this currency at creation using the property's current exchange rate, which is locked on the issued document, and the converted amounts are fiscalized. Defaults to the property currency when omitted.
  - `recipient` RecipientRequest
    - `type` 'GUEST' | 'CONTACT' | 'GROUP' | 'COMPANY' | 'GROUP_PROFILE' | 'GROUP_PROFILE_CONTACT', required: Type of the recipient.
    - `id` integer, required: ID of the recipient, references guestId, contactId, groupId, etc. depending on type.
    - `taxDocumentSource` 'GUEST_TAX_ID' | 'GUEST_DOCUMENT_NUMBER': Source of the tax document number.
  - `manualRecipient` ManualRecipientRequest
    - `type` 'PERSON' | 'COMPANY', required: Type of recipient (person or company)
    - `name` string, required: Name of the recipient
    - `gender` 'M' | 'F' | 'N/A': Gender of the guest
    - `email` string, email, nullable: Email address of the recipient
    - `birthday` string, date, nullable: Birthday of the recipient
    - `phone` string, nullable: Phone number
    - `cellPhone` string, nullable: Cell phone number
    - `taxId` string, required: Tax ID / VAT number
    - `address` object, nullable
      - `country` string, nullable: Country code
      - `state` string, nullable: State or province
      - `city` string, nullable: City
      - `address1` string, nullable: Primary street address
      - `address2` string, nullable: Secondary street address
      - `zip` string, nullable: Zip/postal code
    - `document` object, nullable
      - `type` 'na' | 'driver_licence' | 'student_id' | 'passport' | 'dni' | 'nie': Type of guest identification document
      - `number` string, nullable: Document number
      - `issueDate` string, date, nullable: Document issue date
      - `issuingCountry` string, nullable: Country that issued the document
      - `expirationDate` string, date, nullable: Document expiration date
    - `countryData` object, nullable: Country-specific recipient fields collected from country requirements (e.g. Argentina "ar_iva_condition"), stored on the recipient's countryData.
  - `folioIds` integer[]: Include all transactions from the specified folio IDs
  - `excludeTransactionIds` integer[]: Exclude transactions with the specified IDs
  - `includeTransactionIds` integer[]: Include transactions with the specified IDs
  - `simplified` boolean
  - `packageBreakdown` boolean, nullable: Per-document override for package breakdown. Null means use property default.
  - `lineGroupingSelection` LineGroupingSelectionRequest: Per-document grouping chosen in the create modal. Each omitted field keeps the property default. lineGrouping and posGrouping must be inside the property allowed set; otherwise the request is rejected. groupByRoom and groupByBusinessDate are free per-document modifiers: the property has no allowed set for them, only a default. Locked on the document once created.
    - `lineGrouping` 'NONE' | 'TRANSACTION' | 'RATE_PLAN_SHOW_ADDONS' | 'RATE_PLAN_HIDE_ADDONS'
    - `posGrouping` 'NONE' | 'CHECK_NUMBER'
    - `groupByRoom` boolean, nullable
    - `groupByBusinessDate` boolean, nullable
  - `dueDatePropertyTimezone` string, date

## Response `200`

Successful file download

## Other responses

- `400`: The property reports to a fiscal journal that admits no unissued document, so nothing may be rendered before it is issued. No document was created or submitted.

---

[API](https://skmtc.dev/cloudbeds/apis/fiscal-document-service-api.md) - [All operations](https://skmtc.dev/cloudbeds/apis/fiscal-document-service-api/llms.txt) - [OpenAPI document](https://skmtc.dev/cloudbeds/apis/fiscal-document-service-api/revisions/9c2a47775e5e?raw)
