Skip to main content
PATCH
Patch Document Draft Endpoint

Headers

authorization
string | null
x-api-key
string | null
x-tenant-id
string | null

Path Parameters

document_id
string<uuid>
required

Cookies

factio_access_token
string | null

Body

application/json
lines
DraftLineInput · object[]
required
taxes
DraftTaxInput · object[]
required
subtotal
required
total_discount
required
total_tax
required
total
required

Response

Successful Response

Schema for Document response — current state and authorization info.

id
string<uuid>
required
tenant_id
string<uuid>
required
issuer_id
string<uuid>
required
establishment_id
string<uuid>
required
emission_point_id
string<uuid>
required
document_type
enum<string>
required

Types of fiscal documents supported by the SRI.

Available options:
01,
04,
05,
06,
07
sequential
integer | null
required
access_key
string | null
required
status
enum<string>
required

Status values for document lifecycle.

Available options:
DRAFT,
VALIDATED,
NUMBER_RESERVED,
XML_GENERATED,
SIGNED,
RECEPTION_PENDING,
SUBMITTED_TO_SRI,
RECEIVED_BY_SRI,
AUTHORIZATION_PENDING,
AUTHORIZED,
REJECTED,
RECEPTION_RETRY_SCHEDULED,
AUTHORIZATION_RETRY_SCHEDULED,
RECEPTION_UNKNOWN,
AUTHORIZATION_UNKNOWN,
MANUAL_REVIEW_REQUIRED,
FAILED_PERMANENT,
CANCELLATION_REQUESTED,
CANCELLED,
VOIDED_BY_NC
idempotency_key
string | null
required
issue_date
string<date>
required
subtotal
string
required
Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
total_discount
string
required
Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
total_tax
string
required
Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
total
string
required
Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
buyer_id_type
string | null
required
buyer_id
string | null
required
buyer_name
string | null
required
buyer_email
string | null
required
buyer_address
string | null
required
modified_document_id
string<uuid> | null
required
modified_document_type
string | null
required
modified_document_number
string | null
required
modified_document_issue_date
string<date> | null
required
reason
string | null
required
authorization_number
string | null
required
authorization_date
string<date-time> | null
required
sri_environment
enum<string>
required

SRI environment types.

Available options:
TEST,
PRODUCTION
created_at
string<date-time>
required
updated_at
string<date-time>
required
payments
DocumentPaymentResponse · object[]