Imports

Import customers, suppliers, products, invoices and expenses from Excel: templates, upfront validation, processing and per-row results.

Imports load data in bulk from an Excel file (.xlsx, up to 10 MB) with the same validations as the app. The flow has two steps: upload and validate (creates nothing) and process.

Scopes: imports:read / imports:write plus the write scope of the imported resource:

import_typeAdditional scope
customers, suppliers, contactscontacts:write
productsproducts:write
invoices, external_invoicesinvoices:write
expensesexpenses:write

If one is missing, the API returns 403 insufficient_scope with the missing scope in required_scope.

Templates and columns

  • GET /imports/types/ returns the supported types with their columns (name, example and whether it is required).
  • GET /imports/template/{import_type}/ downloads the Excel template for that type.

Upload and validate

POST/api/v1/imports/upload/imports:write
curl https://api.billora.app/api/v1/imports/upload/ \
  -H "Authorization: Bearer $BILLORA_API_KEY" \
  -F "file=@customers.xlsx" \
  -F "import_type=customers" \
  -F "skip_duplicates=true"
bash

Returns 201 with the job: status (validated or validation_error), total_rows, validation_errors and preview_data (first rows). Options: update_existing (updates existing records), skip_duplicates (skips them) and import_as_issued (invoices: import them already issued).

Process

POST/api/v1/imports/{id}/process/imports:write

Accepts the same options in the JSON body. Up to 200 rows are processed immediately; larger files are processed in the background: poll GET /imports/{id}/ until status is completed, completed_with_errors or failed (or wait for the webhook). Rows with errors are skipped and the rest are imported.

OperationEndpoint
Per-row resultGET /imports/{id}/rows/?status=success (success, error, skipped)
List / delete jobsGET /imports/ · DELETE /imports/{id}/

Each row returns row_number, status, error_message and, if created, created_object_type and created_object_id.

Events

import.completed (also with partial errors) and import.failed. See webhooks.