---
title: "Get document creation rules for a given document kind"
method: GET
path: "/fiscal-document/v1/fiscal-documents/rules"
tags: ["Fiscal Documents"]
---

# Get document creation rules for a given document kind

`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: 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`

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.

## 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-ID` integer, required
- `Accept-Language` string

## Response `200`

List of field definitions for document creation

- FieldDefinition[]
  - `path` string, required: Field path (e.g., "name", "tax_id.code", "addresses")
  - `label` string, 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
  - `sectionKey` string: 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.
  - `required` boolean, required: Whether field is required
  - `requiredIf` FieldCondition
    - `field` string, required: Path of the sibling field whose value is tested (e.g. "taxId").
    - `pattern` string, required: Regex applied to the referenced field's value. The owning field is required only when the referenced value matches this pattern.
  - `primary` boolean: Indicates primary tax ID field
  - `editable` boolean: 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.
  - `validation` FieldValidation
    - `pattern` string: Regex pattern for validation
    - `min` integer: Minimum length or items
    - `max` integer: Maximum length
    - `checksum` boolean: Whether field has checksum validation
    - `format` string: Display format mask (e.g., XX.XXX.XXX/XXXX-XX)
    - `message` string: Human-readable description of the rule, suitable for FE error messages (e.g. "NFS-e series must be 1-5 alphanumeric characters").
    - `example` string: A valid example value that can be shown as a placeholder hint (e.g. "ABC12" for NFS-e, "1" for NFC-e).
  - `data` FieldData
    - `placeholder` string: Input placeholder text
    - `help` string: Help text for the field
    - `alternatives` string[]: Alternative accepted formats (e.g., CPF for CNPJ fields)
  - `options` SelectOption[]
    - `value` string, required
    - `label` string, required
  - `item` ArrayItemDefinition
    - `type` 'object', required
    - `fields` FieldDefinition[], required
  - `properties` object: Object properties for object type fields
  - `default` union
    - string
    - boolean
    - number
  - `description` string: Field description

---

[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)
