Fiscal Documents

Get document creation rules for a given document kind

Returns field definitions that the UI must collect when creating a document of the given kind. Uses the same FieldDefinition schema as action.fields on document actions.

get/fiscal-document/v1/fiscal-documents/rules

Request

  • Base URL
    https://api.cloudbeds.com
  • URL
    https://api.cloudbeds.com/fiscal-document/v1/fiscal-documents/rules
  • Auth
    • HTTP bearer
    • or OAuth 2
      Authorization code: https://api.cloudbeds.com/auth/oauth/authorize
      Token URL: https://api.cloudbeds.com/auth/oauth/token scopes: read:reservation

Query parameters

documentKind'INVOICE' | 'CREDIT_NOTE' | 'RECEIPT' | 'RECTIFY_INVOICE' | 'PRO_FORMA_INVOICE' | 'REFUND_RECEIPT' | 'INVOICE_RECEIPT' | 'ADVANCE_INVOICE' | 'SETTLEMENT_INVOICE' | 'TAX_WITHHOLDING' required

Kind of fiscal document

Headers

X-Property-IDinteger required

Property id

Accept-Languagestring

Desired language of exported PDF

Response

List of field definitions for document creation

pathstring required

Field path (e.g., "name", "tax_id.code", "addresses")

labelstring required

Display label for the field

type'text' | 'email' | 'password' | 'file' | 'select' | 'boolean' | 'array' | 'object' required

Field input type

category'company' | 'tax' | 'address' | 'contact' | 'supplementary' | 'custom'

Field grouping category

sectionKeystring

Key of the RulesSection that hosts this field. Defaults to "registration" when absent. Nested fields inside arrays/objects inherit the parent's section and should omit this attribute.

requiredboolean required

Whether field is required

primaryboolean

Indicates primary tax ID field

editableboolean

Whether this field can still be edited once the property is a connected provider. Defaults to false; the registration email and any country-specific editable fields (e.g. Croatia's Business Premises Code and POS Device Code) are true.

propertiesobject

Object properties for object type fields

descriptionstring

Field description

Example response

[
  {
    "path": "name",
    "label": "Legal Name",
    "sectionKey": "customization.invoicing",
    "requiredIf": {
      "field": "taxId",
      "pattern": "^[^123]"
    }
  }
]

Changes

No recorded changes to this operation across all 1 revision of this API.