Operations

List operations

Returns the operations of a company. By default only the operations created through this API are returned (generatedFrom erp or external); use the generatedFrom filter to also list operations created by hand in Embat (manual) or generated by the debt module (internal) — these are read-only and cannot be created or modified through the API. Results are paginated: use limit to control page size and pass the returned nextPageToken to fetch the next page. startIssuanceDate/endIssuanceDate filter by issuance date and are inclusive on the start bound and exclusive on the end bound; the range cannot exceed 90 days.

get/operations/{companyId}

Path parameters

companyIdstring required

Query parameters

status'paymentOrder' | 'cancel' | 'paid' | 'payment_in_progress' | 'overdue' | 'pending' | 'shipped'

Filter operations by their current status.

syncboolean

Filter by your own synchronization flag. false also matches operations where the value is not set.

Filter by your own synchronization flag. false also matches operations where the value is not set.

generatedFromOperationGeneratedFromFilterEnum[]

Filter by the origin of the operations; repeat the parameter to combine values. Defaults to erp and external (operations created through this API). manual returns operations created by hand in Embat (documentType manual or recurringChild) and internal the ones generated by the debt module (documentType amortizationQuote, amortizationInterest, amortizationTax or amortizationQuoteDebt); both are read-only through this API.

Filter by the origin of the operations; repeat the parameter to combine values. Defaults to erp and external (operations created through this API). manual returns operations created by hand in Embat (documentType manual or recurringChild) and internal the ones generated by the debt module (documentType amortizationQuote, amortizationInterest, amortizationTax or amortizationQuoteDebt); both are read-only through this API.

startIssuanceDatestring date

Only return operations issued on or after this date (inclusive). The range cannot exceed 90 days: if endIssuanceDate is also given, the span between the two cannot exceed 90 days; if endIssuanceDate is omitted, startIssuanceDate cannot be more than 90 days in the past.

Only return operations issued on or after this date (inclusive). The range cannot exceed 90 days: if endIssuanceDate is also given, the span between the two cannot exceed 90 days; if endIssuanceDate is omitted, startIssuanceDate cannot be more than 90 days in the past.

endIssuanceDatestring date

Only return operations issued before this date (exclusive). Combined with startIssuanceDate, the range cannot exceed 90 days. If used without startIssuanceDate, results start 90 days before this date.

Only return operations issued before this date (exclusive). Combined with startIssuanceDate, the range cannot exceed 90 days. If used without startIssuanceDate, results start 90 days before this date.

limitinteger

Maximum number of objects to return in the response. Default 500, maximum 2000.

Maximum number of objects to return in the response. Default 500, maximum 2000.

nextPageTokenstring

Token to fetch the next page of results, taken from the nextPageToken returned by the previous request with the same filters. Omit it to fetch the first page. An invalid or malformed token is rejected with 404.

Token to fetch the next page of results, taken from the nextPageToken returned by the previous request with the same filters. Omit it to fetch the first page. An invalid or malformed token is rejected with 404.

Response

Successful Response

nextPageTokenstring nullable

Token to fetch the next page of results. null when there are no more pages.

Example response

{
  "data": [
    {
      "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",
      "generatedFrom": "erp",
      "treasuryPendingAmount": 1250.5,
      "categoryId": "998"
    }
  ]
}

Changes