Creates a new invoice record or updates an existing one based on its unique identifier (id). This endpoint supports multiple invoice types (e.g. heat, fuel, electricity, wastes, etc.). - If the id exists, the record is updated. - If the id does not exist, a new record is inserted.
⚠️ Special rules: - emissionFactor in lines is optional. - companySplitOriginalValues is optional. - wasteType and wasteDisposalMethod are required only when type = waste.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Invoice data to be inserted or updated.
Unique identifier of the invoice.
Type of the invoice.
heat, fuel, electricity, generated-energy, process-emissions, water, wastes, wastes-expenses, others, waste-water Company associated with the invoice.
Total cost of the invoice.
Currency of the invoice (e.g., USD, EUR).
Start date of the invoice period.
End date of the invoice period.
Building associated with the invoice.
Unique identifier for the invoice (e.g., CUP code).
Supplier name.
Raw provider for the invoice.
Waste type (⚠️ required only if type = waste).
Waste disposal method (⚠️ required only if type = waste).
Invoice status.
valid, draft Line items associated with the invoice.
Path to the attached file.
Date when the invoice was removed.
ISO country code of the company (e.g., ES, FR).
External identifier for the invoice.
Percentage for splitting the invoice.
Year associated with the split.
Identifier of the split.
Indicates if the invoice was validated.
Validation data for the invoice.
Relational ID for the invoice.
Snapshot of values before splitting. ⚠️ Optional: only provided if the invoice was split.