Create Records From File Reading
Create Records From File Reading
Create invoices or wastes from a file reading and link the created records to facilities
POST
Create Records From File Reading
Create Records From File Reading
This endpoint converts a parsed file reading into downstream business records:- water, electricity, gas, fuel delivery, or recharge invoices
- waste records
Request
Headers
string
required
Your API key for authenticationExample:
sk_live_1234567890abcdefstring
required
Your organization UUIDExample:
a8315ef3-dd50-43f8-b7ce-d839e68d51faBody
object[]
required
Array of file reading references. Each item must include an
id.string
required
File reading UUID returned in
reading.id from GET /v1/files/readings.object[]
required
Facilities to link to the created records.
string
required
Facility UUID.
number
required
Allocation percentage as a decimal between
0 and 1. The total must be less than or equal to 1.0.string
Optional project UUID. When present, created invoices are also linked to that project.
string
Optional supplier UUID. Only used for electricity readings. When provided, it overrides the
supplier_id extracted from the file reading content. Required when any target facility is
located in Spain and the reading did not resolve a supplier automatically.
Response
Returns an array of the created records (HTTP 200). The exact shape depends on the file reading category — invoices for energy categories, waste records fordocument::wastes.
Current Limitation
Example
Behavior by Category
invoice::watercreates water invoicesinvoice::electricitycreates electricity invoicesinvoice::gasandinvoice::fuel_deliverycreate combustion invoicesinvoice::rechargescreates recharge invoicesdocument::wastescreates waste records
Common Errors
401 Unauthorized
Cause: Missing or invalid API key403 Forbidden
Cause: The authenticated user is not a member of the organization422 Unprocessable Entity
Cause: Missing required fields (file_readings, facilities) or invalid allocation percentages
Notes
- This endpoint requires a successful file reading with
content.items. - For Spain electricity facilities, supplier information may still be required depending on the extracted reading.
- After records are created, the file will appear as
linked=trueinGET /v1/files/readings.
Related Endpoints
List File Readings
Retrieve readings to get file reading IDs
Update Reading
Edit extracted content before creating records
Upload Files
Upload new files via presigned S3 URLs
List Invoices
View invoices created from file readings