v1
latestOpenAPI 3.1.02026-08-04103211436.0 KBCreate operation
Creates an operation (invoice/bill) with an optional customId; if omitted, Embat auto-generates one. Sending an operation whose customId already exists updates it, except when the existing operation already has a payment recorded against it in Embat: in that case the request has no effect on most fields — only dueDate and/or paymentDate are applied, and only when the operation's current status is pending or overdue; any other field in the payload is silently discarded. An operation with amount equal to 0 is silently discarded and not created. While an operation belongs to an invoice group (remittance), resending it through this endpoint leaves it unchanged (200 is still returned): its status is managed by the remittance that groups it — see the tag description for the remittance flow.
Path parameters
Request body
Example request
{
"concept": "Invoice #2024-001",
"amount": 1250.5,
"accountingAmount": 1250.5,
"pendingAmount": 1250.5,
"pendingAccountingAmount": 1250.5,
"exchangeRate": 1,
"paymentMethod": "bank-transaction",
"contact": {
"tradeName": "Acme Supplies",
"legalName": "Acme Supplies S.L.",
"taxId": "B12345678",
"contact": {
"phone": "+34600000000",
"email": "billing@acme-supplies.com",
"name": "John",
"surname": "Doe"
},
"address": {
"postalCode": "28001",
"address": "Calle Mayor 10, 3B",
"province": "Madrid",
"city": "Madrid",
"country": "Spain"
},
"accounts": [
{
"swift": "BBVAESMMXXX",
"iban": "ES9121000418450200051332"
}
],
"paymentsAccounts": [
{
"details": {
"iban": "ES9121000418450200051332",
"bic": "BBVAESMMXXX",
"swift": "BBVAESMMXXX",
"accountNumber": "123456789",
"routingNumber": "021000021",
"sortCode": "040004",
"institutionNumber": "001",
"transitNumber": "12345",
"bsb": "062-000"
}
}
],
"accountingCode": "4300001",
"paymentMethod": "bank-transaction",
"paymentTerms": 30,
"attributes": [
{
"customId": "cost-center",
"value": "Marketing",
"valueCustomId": "marketing"
}
],
"customId": "erp-contact-001"
},
"attributes": [
{
"customId": "cost-center",
"value": "Marketing",
"valueCustomId": "marketing"
}
],
"customId": "invoice-2024-001"
}Response
Successful Response