All REST API endpoint are accessible via your environment subdomain endpoint, e.g: https://acme.cedalio.dev/api/v1
Authentication is done via Basic Auth
All errors are return with the following format:
Copy
{
"errors": [
{
"code": "resource_validation_error",
"message": "The resource could not be modified because is not valid",
"context": [
{
"field": "processable_data_type",
"errors": [
"can't be blank"
]
}
]
}
]
}
Where each error object has the following fields:
code
A string representing a human readable error codemessage
A string containing the error messagecontext
An optional object or array whose content depends on the type of error being returned that adds more contextual information about the errorExample cURL
curl -v -u BASIC_AUTH_USER:BASIC_AUTH_PASSWORD "https://COMPANY_ID.cedalio.dev/api/v1/files_batches" \\
-H "Content-Type: application/json" \\
-XPOST \\
-d '{"files_batch": {"name": "testing batch via API", "processable_data_type": "utility_bill"}}' | jq
Example response
{
"id": "018fe586-0cd3-7ef4-9bfc-32c8d90684ac",
"name": "testing batch via API",
"url": "https://COMPANY_ID.cedalio.dev/api/v1/files_batches/018fe586-0cd3-7ef4-9bfc-32c8d90684ac",
"inserted_at": "2024-06-04T23:11:58Z",
"is_editable": true,
"is_finalized": false,
"processable_data_type": "utility_bill",
"total_files": 0,
"processed_files": 0,
"failed_processed_files": 0,
"pending_processing_files": 0,
"updated_at": "2024-06-04T23:11:58Z",
"files_url": "https://COMPANY_ID.cedalio.dev/api/v1/files_batches/018fe586-0cd3-7ef4-9bfc-32c8d90684ac/files",
"finalize_url": "https://COMPANY_ID.cedalio.dev/api/v1/files_batches/018fe586-0cd3-7ef4-9bfc-32c8d90684ac/finalize",
"processed_data_url": "https://COMPANY_ID.cedalio.dev/api/v1/files_batches/018fe586-0cd3-7ef4-9bfc-32c8d90684ac/processed_data"
}