Embat Operations API
`Operation` represents an accounting operation with a pending amount to settle — typically an invoice or bill due from or to a `Contact` (client or supplier). An invoice with several due dates is modeled as several operations, one per due date. `customId` is the unique identifier of an operation: set your own value to use as your ERP operation ID, or let Embat auto-generate one.Operations are the counterpart of `Payment`s: each payment created against an operation reduces its `pendingAmount`, and once the full amount is settled the operation's `status` automatically becomes `paid`. Operations can also be grouped into an invoice group or remittance (see `operationsCustomIds`), reference a `Contact`, be classified with a `Category`, and carry custom `attributes`.**Typical flow:**1. **Notify Embat of invoices/bills issued in your ERP.** Create the operation with its due date and amount:```jsonPOST /operations/{companyId}{ "customId": "invoice-2024-001", "issuanceDate": "2024-01-01T00:00:00Z", "dueDate": "2024-01-31T00:00:00Z", "currency": "EUR", "concept": "Consulting services January", "amount": 1250.50}```2. **Track settlement.** As payments are recorded against the operation (see `Payments`), its `pendingAmount` decreases and `status` moves from `pending`/`overdue` to `paid`. Once an operation already has a payment recorded against it in Embat, most of its fields can no longer be updated — see the create/update endpoint descriptions for the exact rules.3. **Keep dates and status in sync.** Use `PATCH /operations/{companyId}/{customId}` (or the bulk variant) to correct `dueDate`/`paymentDate`, update `status`, or attach `attributes` — or resend the full operation with `POST`, since sending a `customId` that already exists updates the operation instead of duplicating it.4. **Group operations into a remittance (invoice group).** Create the individual operations as usual. When your ERP later groups and pays them together, send one more operation representing the remittance — `documentType: invoiceGroup`, the grouped total as `amount`, and the grouped operations' IDs in `operationsCustomIds`:```jsonPOST /operations/{companyId}{ "customId": "remittance-2024-07", "documentType": "invoiceGroup", "amount": 3750.0, "issuanceDate": "2024-07-01T00:00:00Z", "dueDate": "2024-07-31T00:00:00Z", "paymentDate": "2024-07-31T00:00:00Z", "operationsCustomIds": ["invoice-2024-001", "invoice-2024-002", "invoice-2024-003"]}```Embat marks every grouped operation as `paid` with `pendingAmount: 0` and links it to the remittance. From then on, the grouped operations' lifecycle is managed through the remittance: updating them directly has no effect, and resending the remittance without some of them releases those operations back to `pending` with their full pending amount. Use `DELETE /operations/{companyId}/{customId}` to cancel an operation that no longer applies.
Embat Operations API is one of 22 APIs that Embat publishes on the APIs.io network, described by a machine-readable OpenAPI specification.
Tagged areas include Operations. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, and an API reference.
This API exposes 10 operations across 4 paths, and defines 36 schemas. It is described by OpenAPI 3.1.0, at version 2.120.3.
Requests are made against the base URL https://api.embat.io.
Metadata
The identity and technical contract details declared by the specification.
Authentication & Security 1
Embat Operations API declares
1 security scheme
for authenticating requests.
It accepts HTTP bearer tokens (HTTPBearer).
Paths & Operations 10
Across 4 paths, the API surfaces 10 operations — 3 DELETE, 2 GET, 2 PATCH, 3 POST. Each is listed below with its method, path, parameters, and response codes.
Operation represents an accounting operation with a pending amount to settle — typically an invoice or bill due from or to a Contact (client or supplier). An invoice with several…
Schemas 36
The contract defines 36 schemas that model the data the API accepts and returns. The most detailed are GetOperationsResponseSchema (37 properties), PostOperationsRequestSchema (27 properties), AuxBulkPatchOperationsRequestSchema (26 properties), PatchOperationsRequestSchema (25 properties). Each schema is shown below with its type and property counts.
Specification
The full machine-readable OpenAPI contract behind this narrative.
Source
More from Embat 12
Other APIs Embat publishes across the network.