Factuarea APIDevelopers
Added

ERP import, task links and overdue purchase orders

Import warehouses, opening stock, sales orders and purchase orders from a file through the API and MCP, link tasks to fourteen kinds of entity, receive purchase_order.overdue, propose a transport document from shipments and transfers, and match scanned invoices to purchase orders. 20 new operations, 37 updated ones.

2 December 2026 — The omnichannel ERP families gain four file imports, a wider set of task links, a new event for late purchase orders and a few additions to the transport document, the purchase scanner and the PDF template catalog. The contract goes from 830 to 850 operations over 62 resources and 686 paths. Nothing that was already published is removed or renamed.

Import the ERP from a file

Four entities can be loaded from a CSV file, each with the same five operations: a template to download, a preview that creates nothing, the import itself, the status of an import and the report of the rows that were rejected. See the bulk import guide and Export and import.

  • Warehouses. Scope warehouses:write to preview and import, warehouses:read for the template, the status and the report.
  • Opening stock per warehouse. One opening movement per balance, with reason initial. A second load of the same file is skipped (already_exists) and never adds to the stock. Same scopes as warehouses.
  • Sales orders. Scopes sales_orders:write and sales_orders:read.
  • Purchase orders. Scopes purchase_orders:write and purchase_orders:read.

How an import behaves:

  • The preview describes what would be created, skipped or rejected. The import returns 201 when it runs in the request (up to 200 rows) or 202 when it is queued, always with a Location to the status of the import.
  • Rows that do not pass validation go to the rejection report; they never stop the rest of the batch.
  • Repeating the call with the same Idempotency-Key returns the same response and the same Location, with Idempotent-Replayed: true, and creates no rows.
  • A second import of the same entity while one is running responds 409 import_in_progress.
  • A request body over 10 MB responds 413 payload_too_large; a file over 10 MB that fits the envelope responds 422 invalid_param_value on file.
  • On a plan with a monthly limit of sales orders, rows beyond the limit are reported with the row code sales_orders_monthly_limit_exceeded and the reason plan_limit_reached; the request itself still succeeds with the rows that fit.
  • The modules decide who can use each entity: sales orders, warehouses and purchase orders from the Avanzado plan upwards.

Through MCP there are sixteen new tools, four per entity (preview, import, status and rejection report); the template download has no tool. Their file_base64 argument admits up to 10 MB once decoded, and above that the tool answers 422 business_rule_violation with subcode media_too_large. See the tool catalog.

A task can now be linked to a sales_order, a purchase_order, a return_order, a goods_receipt or a stock_transfer, in addition to the nine kinds it already accepted (invoice, quote, proforma, delivery_note, purchase_invoice, recurring_invoice, contact, product and employee).

  • Creating a task with entity_link, creating and listing the links of a task, and listing the tasks linked to an entity (entity_type) all take the fourteen values.
  • The entity_id of a link accepts any UUID version: a sales order that came from a connected store carries a deterministic v5.
  • An entity that does not exist, belongs to another company or sits in a module that is not available answers the same 404 linked_entity_not_found, without telling the cases apart. Each of the five new kinds needs the module of its resource: sales_orders, purchase_orders (purchase orders and goods receipts), returns or warehouses (stock transfers), all from the Avanzado plan upwards.
  • The employee portal does not return task links.
  • An automation rule with the trigger sales_order.confirmed can create a task linked to the order. See Tasks and Automations.

purchase_order.overdue

A new event for webhooks, automations and n8n. It is emitted once per expected delivery date that has passed on a purchase order that has not been received; if the expected date changes, it can be emitted again for the new date. It only emits: the status of the order does not change, and it creates no notification of its own in the application.

data.object is the purchase order captured at that moment, and data.days_overdue is an integer next to object. Automation conditions can evaluate it (days_overdue >= 5). The event is in the live catalog and in the event-name enumerations of the webhook endpoints. See Events.

Transport document from shipments and transfers

Creating a transport document can propose its shipments from delivery notes and from stock transfers; proposing never issues it.

  • stock_transfer_ids (on creation) and shipments[].stock_transfer_id (on creation, edit and modify) take a transfer as the source of a shipment, exclusive with shipments[].delivery_note_id. Together with delivery_note_ids they add up to 50 sources.
  • The origin can come from a warehouse (origin_warehouse_id) or from an address.
  • Each shipment returns source_type (delivery_note, stock_transfer or null) and stock_transfer_id; source_changed, source_changes and source_missing apply to transfers too.
  • The document returns warnings, a list of TransportDocumentWarning (code, param, message) that is empty when there is nothing to report and always empty on an issued document. The codes are incomplete_parties, origin_missing, origin_not_supported and destination_not_supported.
  • No new scope: warehouses:read is needed besides the scope of the operation when the body carries transfers, and delivery_notes:read for a delivery note with a physical cycle.
  • The ten transport_document.* events carry the same resource, with no change of payload version.

See Transport documents.

Purchase scanner and purchase orders

A scanned purchase invoice can be matched to a purchase order.

  • The detail of a scan (order_matching) lists the order reference read from the document, the chosen order, the suggested one and the candidates, only when the company has purchase orders and the key covers purchase_orders:read.
  • The review accepts fields.order_reference and fields.purchase_order_id; converting a scan accepts purchase_order_id. Sending the order requires purchase_orders:write in addition to purchase_invoices:write.
  • A purchase order that does not exist or belongs to another company answers 404 purchase_order_not_found.
  • For SDK generators, the request type ConvertPurchaseScanRequest is now ConvertPurchaseScanV1Request.

See Document scanner.

Other updates

  • PDF templates. Each template in the catalog of account personalization lists document_types, the document types it can print (seven values, sales orders and purchase orders among them). The PDF of a sales order and of a purchase order is composed with the brand template and the identity of the issuing company. See Account personalization.
  • Event catalog. The webhook endpoints, the account webhooks, the events and their deliveries list purchase_order.overdue among the event names.

New endpoints20

EndpointDescription
POST/v1/companies/{company}/purchase-orders/importImport purchase orders
GET/v1/companies/{company}/purchase-orders/import/templateDownload the purchase order import template
GET/v1/companies/{company}/purchase-orders/imports/{id}/errors.csvDownload purchase order import errors
GET/v1/companies/{company}/purchase-orders/imports/{id}Retrieve a purchase order import
POST/v1/companies/{company}/purchase-orders/import/previewPreview an import of purchase orders
POST/v1/companies/{company}/sales-orders/importImport sales orders
GET/v1/companies/{company}/sales-orders/import/templateDownload the sales order import template
GET/v1/companies/{company}/sales-orders/imports/{id}/errors.csvDownload sales order import errors
GET/v1/companies/{company}/sales-orders/imports/{id}Retrieve a sales order import
POST/v1/companies/{company}/sales-orders/import/previewPreview an import of sales orders
POST/v1/companies/{company}/warehouse-stock/importImport initial stock per warehouse
GET/v1/companies/{company}/warehouse-stock/import/templateDownload the warehouse stock import template
GET/v1/companies/{company}/warehouse-stock/imports/{id}/errors.csvDownload warehouse stock import errors
GET/v1/companies/{company}/warehouse-stock/imports/{id}Retrieve a warehouse stock import
POST/v1/companies/{company}/warehouse-stock/import/previewPreview an import of initial stock per warehouse
POST/v1/companies/{company}/warehouses/importImport warehouses
GET/v1/companies/{company}/warehouses/import/templateDownload the warehouse import template
GET/v1/companies/{company}/warehouses/imports/{id}/errors.csvDownload warehouse import errors
GET/v1/companies/{company}/warehouses/imports/{id}Retrieve a warehouse import
POST/v1/companies/{company}/warehouses/import/previewPreview an import of warehouses

Updated endpoints37

EndpointDescription
GET/v1/companies/{company}/personalization/templatesList available personalization templates
POST/v1/accounts/{account}/webhooksCreate an account webhook endpoint
POST/v1/accounts/{account}/webhooks/{webhook}/testSend a test event to an account webhook endpoint
PATCH/v1/accounts/{account}/webhooks/{webhook}Update an account webhook endpoint
GET/v1/companies/{company}/eventsList all events
GET/v1/companies/{company}/events/{event}Retrieve an event
DEL/v1/companies/{company}/purchase-scans/{purchase_scan}Archive a purchase scan
POST/v1/companies/{company}/purchase-scans/{purchase_scan}/convertCreate the expense from a scan
POST/v1/companies/{company}/purchase-scansUpload documents to the purchase scanner
POST/v1/companies/{company}/purchase-scans/{purchase_scan}/duplicate-resolutionResolve a duplicate purchase scan
POST/v1/companies/{company}/purchase-scans/{purchase_scan}/restoreRestore an archived purchase scan
POST/v1/companies/{company}/purchase-scans/{purchase_scan}/retryRetry a failed purchase scan
PATCH/v1/companies/{company}/purchase-scans/{purchase_scan}/reviewSave the review of a purchase scan
GET/v1/companies/{company}/purchase-scans/{purchase_scan}Retrieve a purchase scan
POST/v1/companies/{company}/tasksCreate a task
POST/v1/companies/{company}/tasks/{task}/entity-linksLink a task to an entity
GET/v1/companies/{company}/tasks/{task}/entity-linksList task entity links
GET/v1/companies/{company}/tasks/linkedList tasks linked to an entity
POST/v1/companies/{company}/transport-documents/{transport_document}/cancelCancel a transport document
POST/v1/companies/{company}/transport-documents/{transport_document}/closeClose a transport document
POST/v1/companies/{company}/transport-documentsCreate a transport document
GET/v1/companies/{company}/transport-documentsList all transport documents
POST/v1/companies/{company}/transport-documents/{transport_document}/issueIssue a transport document
POST/v1/companies/{company}/transport-documents/{transport_document}/modifyModify an issued transport document
POST/v1/companies/{company}/transport-documents/{transport_document}/reopenReopen a transport document
POST/v1/companies/{company}/transport-documents/{transport_document}/sendSend a transport document by email
GET/v1/companies/{company}/transport-documents/{transport_document}Retrieve a transport document
POST/v1/companies/{company}/transport-documents/{transport_document}/supersedeMark a transport document as superseded
PATCH/v1/companies/{company}/transport-documents/{transport_document}Update a draft transport document
POST/v1/companies/{company}/webhook-endpointsCreate a webhook endpoint
GET/v1/companies/{company}/webhook-endpoints/{webhook_endpoint}/deliveriesList webhook deliveries
GET/v1/companies/{company}/webhook-endpoints/{webhook_endpoint}/deliveries/{delivery}Retrieve webhook delivery
GET/v1/companies/{company}/webhook-endpointsList all webhook endpoints
POST/v1/companies/{company}/webhook-endpoints/{webhook_endpoint}/rotate-secretRotate webhook secret
GET/v1/companies/{company}/webhook-endpoints/{webhook_endpoint}Retrieve a webhook endpoint
POST/v1/companies/{company}/webhook-endpoints/{webhook_endpoint}/test-eventSend a test event
PATCH/v1/companies/{company}/webhook-endpoints/{webhook_endpoint}Update a webhook endpoint

On this page

Need a hand?Contact support