List clearing records for invoice (by invoice UID)

GET/invoices-by-uid/{invoiceUid}/clearingrecords

Returns clearing records that belong to the invoice's clearing. The invoice is identified by invoice UID. Invoice clearing is created when invoice status is approved and payment status is set to 'open'.

By default only active clearing records are returned. To include other statuses: Status filter:

  • Operator: in
  • Example: in(status)=active,canceled

Audit event:

  • invoice.by.uid.clearing.record.list

Privilege (one of):

  • finance-invoices.view
  • finance-invoices-own.view

Filter/Sort fields:

  • id
  • clearingId
  • clearingTypeId
  • clearingTypeCodeName
  • recordDate
  • paymentTypeId
  • paymentTypeName
  • amountIncrement
  • paidAmount
  • paymentReference
  • comment
  • status
  • statusDate
  • bankAccountId
  • bankAccountName
  • bankAccountNumber
  • bankAccountIban
  • bankAccountSwiftBic
  • revokeUserId
  • revokeUserName
  • revokeComment

Searchable attributes:

  • status
  • paymentReference
  • comment
  • revokeUserId
  • revokeUserName
  • revokeComment
  • clearingTypeCodeName
  • paymentTypeName
  • bankAccountName
  • bankAccountNumber
  • bankAccountIban
  • bankAccountSwiftBic

Errors:

  • INVOICE_NOTFOUND - Invoice not found
  • INVOICE_CLEARING_NOTFOUND - Invoice clearing not found
  • INVOICE_CLEARING_RECORD_NOTFOUND - Invoice clearing record not found
  • TOO_MANY_RECORDS_FOR_INV_UID - There are multiple invoices for the given invoice UID
  • NOT_AUTHORIZED - Not authorized
  • NOT_AUTHENTICATED - Not authenticated
  • INT_APP_ERROR - Unexpected internal error
Base URL
https://api-cpaas.sms.es/finance/sit/v1
Authentication

OAuth2 — send Authorization: Bearer <access_token>. Token URL: https://accounts-cpaas.sms.es/oauth2/access-token

Request

Path parameters

invoiceUidstringrequired

Invoice UID. If value contains %, it is URL-decoded.

Query parameters

statusstring

Default status filter; use in(status)=active,canceled to include multiple. If status is also in data-filters, filter has priority.

Default: "active"
page_numberinteger

Page number for pagination

Default: 1
page_sizeinteger

Page size for pagination

Default: 10
pagingstring

Paging options as page_num,page_size (value only; e.g. 1,10). Use with page_number and page_size or alone.

Example: 1,10
sortstring

Sort options as comma-separated attributes; prefix with - for DESC (value only; e.g. -insertDt,filename).

Example: -insertDt,filename
qstring
  • Quick-search term matched against the operation Searchable attributes
  • q=term or eq(q)=term
  • Searchable field names use camelCase (listed per operation)
operator(fieldName)string

This endpoint accepts query parameters for search as described in the URL Filtering Guidelines.

Search criteria can be specified using the following operators and attributes:

Available Operators:

  • isnull, isnotnull
  • isempty, isnotempty
  • eq, neq
  • startswith, endswith, contains, doesnotcontain
  • lt, lte, gt, gte
  • in, notin
  • between, notbetween

Special Cases:

  1. For operators [isnull, isnotnull, isempty, isnotempty]: field value can be omitted.
  2. For operators [in, notin]: field value must be a comma-separated list. Example: in(status)=active,pending,deleted
  3. For operators [between, notbetween]: field value must be two comma-separated values. Example: between(statusDt)=2024-01-01,2024-12-31

Default Behavior:

  • If operator is omitted, 'eq' is assumed
  • Example: fieldName=fieldValue is equivalent to eq(fieldName)=fieldValue

Example Usage:

  • eq(status)=active
  • startswith(filename)=invoice

Request example

cURL · cURL
curl -L -X GET "https://api-cpaas.sms.es/finance/sit/v1/invoices-by-uid/{invoiceUid}/clearingrecords" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <access_token>"

Responses

List of clearing records

application/json
dataobject[]required
Show child attributes
amountIncrementnumber (float)
bankAccountIbanstring
bankAccountIdinteger
bankAccountNamestring
bankAccountNumberstring
bankAccountSwiftBicstring
clearingIdinteger
clearingTypeCodeNamestring
clearingTypeIdinteger
commentstring
idinteger
paidAmountnumber (float)
paymentReferencestring
paymentTypeIdinteger
paymentTypeNamestring
recordDatestring (date)
revokeCommentstring
revokeUserIdstring
revokeUserNamestring
statusstring

active or canceled

statusDatestring | null (date-time)
metaobjectrequired
Show child attributes
paginationobjectrequired
Show child attributes
countintegerrequired
currentPageintegerrequired
perPageintegerrequired
totalintegerrequired
totalPagesintegerrequired
Example response
{
  "data": [
    {
      "amountIncrement": 100.5,
      "bankAccountIban": "CH9300762011623852957",
      "bankAccountId": 1,
      "bankAccountName": "Main account",
      "bankAccountNumber": "123456",
      "bankAccountSwiftBic": "CRESCHZZ",
      "clearingId": 100,
      "clearingTypeCodeName": "PAYMENT",
      "clearingTypeId": 1,
      "comment": "",
      "id": 1,
      "paidAmount": 100.5,
      "paymentReference": "REF-001",
      "paymentTypeId": 2,
      "paymentTypeName": "Bank transfer",
      "recordDate": "2026-01-15",
      "revokeComment": "",
      "revokeUserId": "",
      "revokeUserName": "",
      "status": "active",
      "statusDate": "2026-01-15T10:00:00.000Z"
    }
  ],
  "meta": {
    "pagination": {
      "count": 1,
      "currentPage": 1,
      "perPage": 10,
      "total": 1,
      "totalPages": 1
    }
  }
}