---
title: "Update a fiscal document by id"
method: PUT
path: "/fiscal-document/v1/fiscal-documents/{id}"
tags: ["Fiscal Documents"]
---

# Update a fiscal document by id

`PUT /fiscal-document/v1/fiscal-documents/{id}`

## Request

- Base URL: `https://api.cloudbeds.com`
- URL: `https://api.cloudbeds.com/fiscal-document/v1/fiscal-documents/{id}`
- 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: `write:reservation`

Update a fiscal document status, government integration details, or failure reason.
Used by integration partners to update document lifecycle and government processing status.

**Common Updates:**
- Update status (PENDING_INTEGRATION, COMPLETED_INTEGRATION, FAILED, etc.)
- Set government integration details (series, number, external ID, QR codes)
- Record failure reasons for failed integrations

**Invoice Cancellation:**
- Set status to CANCEL_REQUESTED to cancel invoices
- Only invoices in OPEN, PAID, PARTIALLY_PAID or CORRECTION_NEEDED status can be canceled
- Invoices with rectifying documents cannot be canceled
- Integration partners must handle CANCEL_REQUESTED and update to CANCELED (success) or revert to previous status (failure)
- For a fiscalized Mexico invoice (CFDI tipo I), provide `reason` as SAT motivo "02" or "03"; it defaults to "03"
- For a Mexico invoice fiscalized through Fonoa, the service sends the cancellation to SAT itself: the invoice
  stays CANCEL_REQUESTED until SAT's verdict, then becomes CANCELED or returns to its previous status, and
  setting CANCELED manually is rejected
- Such an invoice cannot be canceled while it has active payment complements or credit notes

## Path parameters

- `id` integer, required

## Headers

- `X-Property-ID` integer, required

## Request body

- FiscalDocumentPatchRequest
  - `status` 'COMPLETED' | 'VOIDED' | 'PAID' | 'PENDING_INTEGRATION' | 'PARTIALLY_PAID' | 'COMPLETED_INTEGRATION' | 'FAILED_INTEGRATION' | 'CORRECTION_NEEDED' | 'CANCELED' | 'CANCEL_REQUESTED' | 'OPEN' | 'REQUESTED' | 'VOID_REQUESTED' | 'FAILED' | 'MANUALLY_RECONCILED' | 'REJECTED' | 'ACCEPTED' | 'PENDING_TRANSACTION' | 'ALLOCATED' | 'APPLIED': Status of the fiscal document
  - `reason` string: SAT cancellation motive when cancelling a fiscalized Mexico invoice (CFDI tipo I): "02" (issued with errors, no substitute) or "03" (operation not carried out). Defaults to "03" when omitted and is ignored elsewhere.
  - `failReason` string
  - `governmentIntegration` GovernmentIntegration
    - `number` string
    - `series` string
    - `invoiceType` string, nullable: AR ARCA invoice class (A/B/C/T) for this document, used to disambiguate documents that share series + number across classes. Null for non-AR documents.
    - `status` string
    - `qr` object
      - `url` string, uri
      - `string` string
    - `url` string, uri
    - `officialId` string
    - `externalId` string
    - `rectifyingInvoiceType` string
    - `cancellationFailedFallbackStatus` 'COMPLETED' | 'VOIDED' | 'PAID' | 'PENDING_INTEGRATION' | 'PARTIALLY_PAID' | 'COMPLETED_INTEGRATION' | 'FAILED_INTEGRATION' | 'CORRECTION_NEEDED' | 'CANCELED' | 'CANCEL_REQUESTED' | 'OPEN' | 'REQUESTED' | 'VOID_REQUESTED' | 'FAILED' | 'MANUALLY_RECONCILED' | 'REJECTED' | 'ACCEPTED' | 'PENDING_TRANSACTION' | 'ALLOCATED' | 'APPLIED': Status of the fiscal document
    - `cancellationStatus` 'PENDING' | 'CANCELLED' | 'FAILED': Outcome of the latest cancellation request sent to the tax authority.
    - `pdfFileBase64` string, byte: Base64-encoded PDF file content. Only allowed when status is COMPLETED_INTEGRATION.
    - `handwritten` boolean: Indicates this is a handwritten receipt created during POS unavailability.
    - `signatures` IntegrationSignature[]: Array of semantic signatures/response data from the government integration.
      - `type` string: Semantic type (JWT_TOKEN, QR_CODE_DATA, TRANSACTION_ID, COMPLIANCE_CHECK, etc.)
      - `label` string: Human-readable display label.
      - `value` string: The actual signature data/value.
      - `format` 'TEXT' | 'BASE64' | 'HEX' | 'URL' | 'UNKNOWN': Format of the value.
      - `source` string: Source integration (FISKALTRUST_FR, FISKALTRUST_IT, etc.)
      - `rawMetadata` object: Original integration-specific codes for debugging/auditing.
    - `folioFiscal` string: MX SAT UUID (Folio Fiscal) — populated after CFDI acceptance by Fonoa.
    - `satQrCode` string: MX SAT validation URL used to verify a CFDI at verificacfdi.facturaelectronica.sat.gob.mx.
    - `ext` object: Provider-returned extension values for the document, keyed by extension or stamp code (e.g. AR "ar-arca-doc-type", and "arca-cae-expiry" for the CAE expiry date as YYYY-MM-DD; the CAE itself is in officialId). Read-only.
    - `connectionId` integer: The fiscalization connection this document was dispatched through; its provider and channel are those of the connection. Read-only — a partner reporting an outcome cannot change where the document was routed, and uses this to confirm the document was addressed to it before acting on it.

## Response `200`

OK

- FiscalDocumentSummaryResponse
  - `id` string
  - `kind` 'INVOICE' | 'CREDIT_NOTE' | 'RECEIPT' | 'RECTIFY_INVOICE' | 'PRO_FORMA_INVOICE' | 'REFUND_RECEIPT' | 'INVOICE_RECEIPT' | 'ADVANCE_INVOICE' | 'SETTLEMENT_INVOICE' | 'TAX_WITHHOLDING': Kind of fiscal document
  - `status` 'COMPLETED' | 'VOIDED' | 'PAID' | 'PENDING_INTEGRATION' | 'PARTIALLY_PAID' | 'COMPLETED_INTEGRATION' | 'FAILED_INTEGRATION' | 'CORRECTION_NEEDED' | 'CANCELED' | 'CANCEL_REQUESTED' | 'OPEN' | 'REQUESTED' | 'VOID_REQUESTED' | 'FAILED' | 'MANUALLY_RECONCILED' | 'REJECTED' | 'ACCEPTED' | 'PENDING_TRANSACTION' | 'ALLOCATED' | 'APPLIED': Status of the fiscal document
  - `governmentIntegration` GovernmentIntegration
    - `number` string
    - `series` string
    - `invoiceType` string, nullable: AR ARCA invoice class (A/B/C/T) for this document, used to disambiguate documents that share series + number across classes. Null for non-AR documents.
    - `status` string
    - `qr` object
      - `url` string, uri
      - `string` string
    - `url` string, uri
    - `officialId` string
    - `externalId` string
    - `rectifyingInvoiceType` string
    - `cancellationFailedFallbackStatus` 'COMPLETED' | 'VOIDED' | 'PAID' | 'PENDING_INTEGRATION' | 'PARTIALLY_PAID' | 'COMPLETED_INTEGRATION' | 'FAILED_INTEGRATION' | 'CORRECTION_NEEDED' | 'CANCELED' | 'CANCEL_REQUESTED' | 'OPEN' | 'REQUESTED' | 'VOID_REQUESTED' | 'FAILED' | 'MANUALLY_RECONCILED' | 'REJECTED' | 'ACCEPTED' | 'PENDING_TRANSACTION' | 'ALLOCATED' | 'APPLIED': Status of the fiscal document
    - `cancellationStatus` 'PENDING' | 'CANCELLED' | 'FAILED': Outcome of the latest cancellation request sent to the tax authority.
    - `pdfFileBase64` string, byte: Base64-encoded PDF file content. Only allowed when status is COMPLETED_INTEGRATION.
    - `handwritten` boolean: Indicates this is a handwritten receipt created during POS unavailability.
    - `signatures` IntegrationSignature[]: Array of semantic signatures/response data from the government integration.
      - `type` string: Semantic type (JWT_TOKEN, QR_CODE_DATA, TRANSACTION_ID, COMPLIANCE_CHECK, etc.)
      - `label` string: Human-readable display label.
      - `value` string: The actual signature data/value.
      - `format` 'TEXT' | 'BASE64' | 'HEX' | 'URL' | 'UNKNOWN': Format of the value.
      - `source` string: Source integration (FISKALTRUST_FR, FISKALTRUST_IT, etc.)
      - `rawMetadata` object: Original integration-specific codes for debugging/auditing.
    - `folioFiscal` string: MX SAT UUID (Folio Fiscal) — populated after CFDI acceptance by Fonoa.
    - `satQrCode` string: MX SAT validation URL used to verify a CFDI at verificacfdi.facturaelectronica.sat.gob.mx.
    - `ext` object: Provider-returned extension values for the document, keyed by extension or stamp code (e.g. AR "ar-arca-doc-type", and "arca-cae-expiry" for the CAE expiry date as YYYY-MM-DD; the CAE itself is in officialId). Read-only.
    - `connectionId` integer: The fiscalization connection this document was dispatched through; its provider and channel are those of the connection. Read-only — a partner reporting an outcome cannot change where the document was routed, and uses this to confirm the document was addressed to it before acting on it.
  - `linkedTo` string

---

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