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

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
  - `primary` boolean — Indicates primary tax ID field
  - `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.net/cloudbeds/apis/cloudbeds-api.md) · [All operations](https://skmtc.net/cloudbeds/apis/cloudbeds-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cloudbeds/cloudbeds-api/revisions/2faa857793e8/schema)
