Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

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.

10 operations 4 paths 36 schemas 3 DELETE2 GET2 PATCH3 POST

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.1.0
API Version
2.120.3
Base URL
https://api.embat.io
Authentication
HTTP Bearer
Resource Areas
1

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.

Operations 10

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…

GET
/operations/{companyId}
List operations
list_operations_operations__companyId__get 7 params → 200400401404422
POST
/operations/{companyId}
Create operation
create_operation_operations__companyId__post 1 param body → 200401404500422
PATCH
/operations/{companyId}
Update operations in bulk
update_operations_bulk_operations__companyId__patch 1 param body → 200401404500422
DELETE
/operations/{companyId}
Delete operations in bulk
delete_operations_bulk_operations__companyId__delete 1 param body → 200401404500422
GET
/operations/{companyId}/{customId}
Retrieve operation
read_operation_operations__companyId___customId__get 2 params → 200401404422
PATCH
/operations/{companyId}/{customId}
Update operation
update_operation_operations__companyId___customId__patch 2 params body → 200401404500422
DELETE
/operations/{companyId}/{customId}
Delete operation
delete_operation_operations__companyId___customId__delete 2 params → 200401404500422
POST
/operations/{companyId}/bulk
Create operations in bulk
create_operations_bulk_operations__companyId__bulk_post 1 param body → 200401404500422
POST
/operations/{companyId}/attributes/bulk
Add internal attributes to operations in bulk
add_attribute_values_operations__companyId__attributes_bulk_post 1 param body → 200401404500422
DELETE
/operations/{companyId}/attributes/bulk
Remove internal attributes from operations in bulk
delete_contacts_bulk_operations__companyId__attributes_bulk_delete 1 param body → 200401404500422

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.

BulkDeleteOperationsAttributesRequestSchema
object
1 property 1 required
ContactTypeEnum
string
ContactContactTypeEnum
string
CurrencyEnum
string
ContactNewAccount
object
3 properties
BaseContactSchema-Output
object
15 properties
BulkModifyOperationsResponseSchema
object
1 property 1 required
ValidationError
object
5 properties 3 required
PostOperationsRequestSchema
object
27 properties 5 required
ModifyOperationsResponseSchema
object
1 property 1 required
ContactAccounts
object
3 properties
app__schemas__contacts__ContactSchema
object
4 properties
OperationStatusEnum
string
PostOperationsAttributesRequestSchema
object
2 properties 2 required
GetOperationsResponseSchema
object
37 properties 6 required
AuxBulkPatchOperationsRequestSchema
object
26 properties 1 required
ContactAddressSchema
object
5 properties
ISOCountryCodes
string
OperationDocumentTypeEnum
string
ContactNewAccountDetails
object
13 properties
BulkPatchOperationsRequestSchema
object
1 property 1 required
AttributeValueRequestSchema
object
Attaches an attribute value to another entity (payment, contact, operation, transaction, accounting entry...).
4 properties 2 required
DeleteOperationsAttributesRequestSchema
object
2 properties 2 required
ListOperationsResponseSchema
object
2 properties 1 required
DeleteOperationsRequestSchema
object
1 property 1 required
AccountTypeEnum
string
ContactSchema-Input
object
4 properties
BulkPostOperationsAttributesRequestSchema
object
1 property 1 required
BulkPostOperationsRequestSchema
object
1 property 1 required
ErrorResponse
object
Error payload returned by the API (FastAPI detail convention).
1 property 1 required
HTTPValidationError
object
1 property
BulkUpsertOperationsResponseSchema
object
1 property 1 required
BulkDeleteOperationsRequestSchema
object
1 property 1 required
BaseContactSchema-Input
object
15 properties
PatchOperationsRequestSchema
object
25 properties
UpsertOperationsResponseSchema
object
2 properties 2 required

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

embat-operations-api-openapi.yml Raw ↑

Other APIs Embat publishes across the network.

Embat AccountingAccounts API
Embat AccountingEntries API
Embat Attributes API
Embat Authentication API
Embat Balances API
Embat Banks API
Embat Categories API
Embat Companies API
Embat Contacts API
Embat DebtScheduleConfigs API
Embat Files API
Embat Forecasts API