List of invoices

GET/invoices

Returns a list of invoices for given sorting and pagination parameters.

Audit event:

  • invoice.list

Privilege (one of):

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

Filters

  • domainCodeName – invoice domain. Supported values:
    • BULK – Bulk SMS
    • BULK-MNP – Bulk MNP
  • dataSourceCodeName – invoice data source. Supported values:
    • PREPAID
    • POSTPAID
    • FINANCE
    • SUPPLIER-INVOICE
    • POSTPAID-SUPPLIER-INVOICE
    • POSTPAID-CONTROL
  • classCodeName – document class; key for listing different kinds of invoices. Each class has distinct properties and behavior. Common values:
    • CUSTOMER_INVOICE
    • SUPPLIER_INVOICE
    • NETTING_INVOICE
    • CONTROL_INVOICE
    • CREDIT_DEBIT_NOTE
    • SUPPLIER_CR_DB_NOTE
  • dtsSelectorCodeName – subprocess of data source. Supported values:
    • PART-PAYMENT – POSTPAID customer part-payment invoices
    • 0 – POSTPAID invoices without part-payment subprocess

Filter fields:

  • custName
  • invoice
  • instanceId
  • custShortName
  • invNumber
  • invDate
  • invoicingDate
  • invoicingDatePolicy
  • invDueDate
  • overDueDate
  • total
  • totalUnpaid
  • totalPaid
  • invType
  • invTypeName
  • invPeriod
  • invPeriodStart
  • invPeriodEnd
  • status
  • statusDt
  • bpInstanceId
  • nettingInvoiceId
  • PaymentStatus
  • currency
  • custId
  • id
  • disputeStatus
  • classCodeName
  • customerType
  • dataSourceCodeName
  • domainCodeName
  • docsDeliveryStatus
  • selfBilling
  • collectionLeadId
  • processingStatus
  • collectionMode
  • domainName
  • syncStatus
  • syncStatusDt
  • syncMode
  • nettingInvoicePaymentStatus
  • nettingInvoiceStatus
  • amountVat
  • amountNoVat
  • vat
  • rounding
  • collectionLeadNumber
  • custCountry
  • custPOBox
  • dtsSelectorId
  • dtsSelectorCodeName
  • invUid
  • ownerId
  • ownerBpName
  • ownerBpBriefName
  • documentSync
  • externalRefId

Sortable fields:

  • custName
  • invoice
  • custShortName
  • invNumber
  • invDate
  • invoicingDate
  • invoicingDatePolicy
  • invDueDate
  • overDueDate
  • total
  • totalUnpaid
  • totalPaid
  • invType
  • invTypeName
  • invPeriod
  • invPeriodStart
  • invPeriodEnd
  • status
  • statusDt
  • nettingInvoiceId
  • PaymentStatus
  • currency
  • custId
  • id
  • disputeStatus
  • classCodeName
  • customerType
  • dataSourceCodeName
  • domainCodeName
  • docsDeliveryStatus
  • selfBilling
  • collectionLeadId
  • processingStatus
  • collectionMode
  • domainName
  • syncStatus
  • syncStatusDt
  • syncMode
  • nettingInvoicePaymentStatus
  • nettingInvoiceStatus
  • amountVat
  • amountNoVat
  • vat
  • rounding
  • collectionLeadNumber
  • custCountry
  • custPOBox
  • dtsSelectorId
  • dtsSelectorCodeName
  • invUid
  • ownerId
  • ownerBpName
  • ownerBpBriefName
  • documentSync
  • externalRefId

Searchable attributes:

  • custShortName
  • status
  • custName
  • invNumber
  • invDate
  • invoicingDate
  • invoicingDatePolicy
  • invDueDate
  • currencyCode
  • invTypeName
  • invPeriod
  • paymentStatus
  • disputeStatus
  • invUid
  • custID
  • externalRefId
  • ownerId
  • ownerBpName
  • ownerBpBriefName

Errors:

  • INVOICE_NOTFOUND: Invoice not found
  • NOT_AUTHORIZED: Not authorized
  • NOT_AUTHENTICATED: Not authenticated
  • INT_APP_ERROR - Internal server 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

Query parameters

allstring

Returns all matching records (e.g. yes/no)

Possible values: yes, no
page_sizeinteger

Page size for pagination

Default: 10
page_numberinteger

Page number for pagination

Default: 1
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" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <access_token>"

Responses

A list of invoices

application/json
dataobject[]
Show child attributes
accountManagerIdinteger | null

Account manager ID (populated when showAccountManager=yes filter is used)

accountManagerNamestring | null

Account manager name (populated when showAccountManager=yes filter is used)

amountNoVatnumber (float)

Invoice amount without VAT (net amount). Can be negative when selfBilling is 'yes'

amountVatnumber (float)

Invoice VAT amount. Can be negative when selfBilling is 'yes'

billingBalanceoneOf

Billing balance information (for PREPAID, POSTPAID, POSTPAID-CONTROL invoices) (for PREPAID, POSTPAID, POSTPAID-CONTROL invoices)

Show child attributes
oneOf of:
BillingBalance · object

Billing balance information

idinteger

Balance ID

namestring

Balance name

resourceUrlstring

Resource URL to access the balance

Option 2 · null
billingTypeNamestring | null

Billing type name. Required and returned for control invoice only

classAreastring

Document class area (sales or purchase)

Possible values: sales, purchase
classCodeNamestring

Document class code name. Supported values include CUSTOMER_INVOICE, SUPPLIER_INVOICE, NETTING_INVOICE, CONTROL_INVOICE, CREDIT_DEBIT_NOTE, SUPPLIER_CR_DB_NOTE

classDomainstring

Document class domain (typically "invoice" or "netting")

collectionLeadIdinteger

If document is a member of collection, this value contains ID of collection lead document (0 if not applicable)

collectionLeadNettingInvoiceIdinteger

Netting statement ID of collection lead (0 if not applicable)

collectionLeadNettingInvoiceNumberstring

Netting statement number of collection lead (empty if not applicable)

collectionLeadNettingInvoicePaymentStatusstring

Netting statement payment status of collection lead (empty if not applicable)

collectionLeadNettingInvoiceStatusstring

Netting statement status of collection lead (empty if not applicable)

collectionLeadNettingInvoiceTotalnumber (float)

Netting statement total amount of collection lead

collectionLeadNettingInvoiceTotalPaidnumber (float)

Netting statement total paid amount of collection lead

collectionLeadNettingInvoiceTotalUnpaidnumber (float)

Netting statement total unpaid amount of collection lead

collectionLeadNumberstring

If document is a member of collection, this value contains number of collection lead document (empty if not applicable)

collectionModestring

Document collection mode (none if not part of collection)

Possible values: none, member, lead
commentstring | null

Description or comment in case invoice is credit or debit note. Not available when invoice list is returned

currencyinteger

Currency ID (ISO 4217 numeric)

currencyCodestring

ISO 4217 currency code

custAddressstring

Customer primary address

custAddress2string

Customer secondary address line

custAttnstring

Customer attention/contact person

custCitystring

Customer city

custCountryinteger

Customer country code/ID

custIDinteger

Customer/Business Partner ID

custNamestring

Full customer name

custPOBoxstring

Customer P.O. Box

custPoststring

Customer postal code

custShortNamestring

Customer short name or abbreviation

custVatNumberstring

Customer VAT/Tax number

customerTypestring

Type of customer (e.g., business, individual, Enterprise)

dataSourceCodeNamestring

Data source code name. Supported values include PREPAID, POSTPAID, FINANCE, SUPPLIER-INVOICE, POSTPAID-SUPPLIER-INVOICE, POSTPAID-CONTROL

dataSourceIdinteger

Data source identifier

deliveryDatestring (date)

Document delivery date

disputeNextIdinteger

ID of next related dispute document if applicable

disputeStatusstring

Dispute status if applicable (e.g., "none" when no dispute)

disputeStatusDatestring | null (date-time)

Timestamp of dispute status change

docsDeliveryDlrStatusstring

DLR (delivery receipt) status (e.g., "none", "success", "failed")

docsDeliveryDlrStatusDatestring | null (date-time)

Timestamp of DLR status change

docsDeliveryStatusstring

Status of document delivery (e.g., "none", "pending", "delivered")

docsDeliveryStatusDatestring | null (date-time)

Timestamp of last delivery status change

documentSyncobject | null

Arbitrary JSON object holding document synchronization data. Returned if syncStatus is done, error, misc, exported or invalid

domainCodeNamestring

Domain code name. Supported values include BULK

domainIdinteger

Domain identifier

domainNamestring

Domain display name

domainProductinteger

Product ID associated with domain

domesticCurrencyinteger

Domestic currency ID for multi-currency support (0 if not used)

domesticCurrencyAmountNoVATnumber (float)

Amount in domestic currency without VAT (0 if not used)

domesticCurrencyAmountVATnumber (float)

Amount in domestic currency including VAT (0 if not used)

domesticCurrencyCodestring

Domestic currency ISO code (empty if not used)

domesticCurrencyRatenumber (float)

Exchange rate used to calculate domestic currency amounts (0 if not used)

domesticCurrencyRoundingnumber (float)

Rounding difference in domestic currency (0 if not used)

domesticCurrencyTotalnumber (float)

Total in domestic currency (0 if not used)

dtsSelectorCodeNamestring

DTS selector code name (empty if not applicable)

dtsSelectorIdinteger

DTS selector ID (0 if not applicable)

extentarray | null

Extended invoice data (present on invoice get; may be omitted in invoice list)

Show child attributes
datastring

Extent value stored as JSON string

fieldTypeinteger

Field type ID

fieldTypeCodeNamestring

Field type code name

insertDatestring | null (date-time)

Insert timestamp

invoiceIdinteger

Invoice ID

updateDatestring | null (date-time)

Update timestamp

externalRefIdstring

External reference ID for integration

filesarray | null

Associated invoice files/documents (present on invoice get; may be omitted in invoice list)

Show child attributes
dataSourceFileTypeCodeNamestring

Data source file type code (e.g. INVOICE_PDF, ATTACHMENT)

dataSourceFileTypeidinteger

Data source file type ID (note: API returns this key with lowercase 'i' in 'id')

fileSystemFileFilenamestring

File system / storage file name

fileSystemFileStatusstring

File system storage status

Possible values: stored, cached, volatile
fileSystemFileStatusDtstring | null (date-time)

File system status timestamp

filenamestring

Original file name

idinteger

File record ID

insertDtstring | null (date-time)

When the file was registered

invoiceIdinteger

Invoice ID this file is attached to

sizeinteger

File size in bytes

min: 0
statusstring

File availability status

Possible values: available, archived, deleted, misc
statusDtstring | null (date-time)

Status timestamp

statusInfostring

Optional status message or error info

idinteger

Unique invoice identifier

industryNamestring

Customer industry classification

insertDtstring (date-time)

Invoice creation timestamp

instanceIDinteger

System instance ID

invDatestring (date)

Invoice issuance date

invDueDatestring (date)

Payment due date

invNumberstring

Full invoice number

invNumberFixstring

Invoice number prefix/format string

invNumberNuminteger

Invoice number sequence

invPeriodstring

Invoice billing period display string (e.g., "12.12.2025 - 12.12.2025")

invPeriodEndstring | null (date)

Invoice period end date

invPeriodStartstring | null (date)

Invoice period start date

invTypeinteger

Invoice type identifier

invTypeNamestring

Invoice type name

invUidstring

Unique invoice UID (universal identifier)

invoicingDatestring (date)

Date used for invoicing period

invoicingDatePolicystring

Invoicing date calculation policy

Possible values: delivery, creation, approval
itemsarray | null

Invoice line items (present on invoice get; may be omitted in invoice list)

Show child attributes
dataSourceForeignKeyinteger

Foreign key to data source record

dataSourceIdinteger

Data source ID

dtsSelectorCodeNamestring

DTS selector code name

dtsSelectorIdinteger

DTS selector ID

dtsSelectorNamestring

DTS selector display name

idinteger

Item ID

insertDtstring (date-time)

Insert timestamp (UTC)

invoiceIdinteger

Invoice ID this item belongs to

itemTypestring

Item type code (e.g., ITEM-1, ITEM-2)

measureUnitinteger

Measurement unit ID

namestring

Item name/description (may be JSON string for structured data)

ordNuminteger

Order number of the item on the invoice

pricenumber (float)

Item unit price

quantitynumber (float)

Item quantity

quantityModeinteger

Quantity calculation mode (0=comment, 1=use quantity, 2=use quantity_more, 3=use both)

quantityMorenumber (float)

Additional quantity parameter

statusstring

Item status (e.g., active, deleted)

statusDtstring (date-time)

Status timestamp (UTC)

totalNoVatnumber (float)

Total net amount for item

totalVatnumber (float)

Total VAT for item

vatInPriceinteger

VAT included in price (0=no, 1=yes)

Possible values: 0, 1
langstring

Invoice language code

nettingInvoiceIdinteger

Related netting invoice ID (0 if not applicable)

nettingInvoiceNumberstring

Related netting invoice number (empty if not applicable)

nettingInvoiceStatusstring

Status of related netting invoice (empty if not member of netting)

nettingPaymentStatusstring

Payment status of netting invoice (empty if not member of netting)

nettingTotalnumber (float)

Total amount for netting. Can be negative when selfBilling is 'yes'

nettingTotalPaidnumber (float)

Paid netting amount

nettingTotalUnpaidnumber (float)

Unpaid netting amount

overDueDateinteger

Days overdue (negative if not yet overdue)

ownerBpBriefNamestring

Owner business partner brief name

ownerBpNamestring

Owner business partner full name

ownerIdinteger

Owner business partner ID

ownerNamestring

Owner/Company name

ownerVatNumberstring

Owner/Company VAT number

paymentStatusstring

Payment status of the invoice

Possible values: none, open, on-hold, closed
paymentStatusDatestring | null (date-time)

Timestamp of payment status change

processingStatusstring

Processing status if document has recalculation or other processing tasks

Possible values: none, scheduled, running, done, canceled
reminderStatusstring

Reminder status for payment

Possible values: enabled, disabled, open, closed, misc
roundingnumber (float)

Difference between invoice total and amount including VAT value

selfBillingstring

Indicator that invoice is credit note or not. If value is 'yes' and document is netting statement, it indicates that document is in favor of buyer but issued by seller.

Possible values: yes, no
sitInvoiceEmailImportIdinteger

Email import ID if invoice was imported

smsCountinteger | null (int64)

Amount of messages. Required and returned for postpaid and control invoices only

statusstring

Invoice status

Possible values: draft, approved, rejected, deleted, misc, canceled, archived, imported
statusDtstring | null (date-time)

Timestamp of last status change

syncModestring

Synchronization mode

Possible values: disabled, primary, secondary
syncStatusstring

Synchronization status

Possible values: none, waiting, syncing, done, error, misc, exported, invalid
syncStatusDtstring | null (date-time)

Timestamp of sync status change

templateIDinteger

Template used for invoice generation

totalnumber (float)

Invoice gross amount. Can be negative when selfBilling is 'yes'

totalPaidnumber (float)

Invoice paid amount

totalUnpaidnumber (float)

Invoice unpaid amount

vatnumber (float)

Total VAT amount (same as amountVat)

vatInPriceinteger

Whether VAT is included in unit price (0=no, 1=yes)

Possible values: 0, 1
vatInTotalinteger

Whether VAT is included in total (0=no, 1=yes)

Possible values: 0, 1
vatPercentnumber (float)

VAT percentage rate

metaobject
Show child attributes
paginationobjectrequired
Show child attributes
countintegerrequired
currentPageintegerrequired
perPageintegerrequired
totalintegerrequired
totalPagesintegerrequired
Example response
{
  "data": [
    {
      "amountNoVat": 1000.5,
      "amountVat": 190,
      "classArea": "sales",
      "classCodeName": "CUSTOMER_INVOICE",
      "classDomain": "invoice",
      "collectionLeadId": 0,
      "collectionLeadNettingInvoiceId": 0,
      "collectionLeadNettingInvoiceNumber": "",
      "collectionLeadNettingInvoicePaymentStatus": "",
      "collectionLeadNettingInvoiceStatus": "",
      "collectionLeadNettingInvoiceTotal": 0,
      "collectionLeadNettingInvoiceTotalPaid": 0,
      "collectionLeadNettingInvoiceTotalUnpaid": 0,
      "collectionLeadNumber": "",
      "collectionMode": "none",
      "currency": 978,
      "currencyCode": "EUR",
      "custAddress": "123 Business Street",
      "custAddress2": "Suite 100",
      "custAttn": "Contact Person",
      "custCity": "New York",
      "custCountry": 840,
      "custID": 1001,
      "custName": "Example Customer Company",
      "custPOBox": "",
      "custPost": "12345",
      "custShortName": "ExampleCust",
      "custVatNumber": "XX123456789",
      "customerType": "business",
      "dataSourceCodeName": "POSTPAID",
      "dataSourceId": 2,
      "deliveryDate": "2025-12-15",
      "disputeNextId": 0,
      "disputeStatus": "none",
      "disputeStatusDate": null,
      "docsDeliveryDlrStatus": "none",
      "docsDeliveryDlrStatusDate": null,
      "docsDeliveryStatus": "none",
      "docsDeliveryStatusDate": null,
      "domainCodeName": "BULK",
      "domainId": 1,
      "domainName": "Bulk SMS",
      "domainProduct": 1,
      "domesticCurrency": 0,
      "domesticCurrencyAmountNoVAT": 0,
      "domesticCurrencyAmountVAT": 0,
      "domesticCurrencyCode": "",
      "domesticCurrencyRate": 0,
      "domesticCurrencyRounding": 0,
      "domesticCurrencyTotal": 0,
      "externalRefId": "EXT-REF-001",
      "id": 1001,
      "industryName": "Technology",
      "insertDt": "2025-12-15T10:30:00Z",
      "instanceID": 1,
      "invDate": "2025-12-15",
      "invDueDate": "2026-01-14",
      "invNumber": "INV-1001",
      "invNumberFix": "INV-%d",
      "invNumberNum": 1001,
      "invPeriod": "12.15.2025 - 12.15.2025",
      "invPeriodEnd": "2025-12-15",
      "invPeriodStart": "2025-12-15",
      "invType": 2,
      "invTypeName": "Bulk Invoice - Postpaid",
      "invUid": "550e8400-e29b-41d4-a716-446655440000",
      "invoicingDate": "2025-12-15",
      "invoicingDatePolicy": "approval",
      "lang": "en",
      "nettingInvoiceId": 0,
      "nettingInvoiceNumber": "",
      "nettingInvoiceStatus": "",
      "nettingPaymentStatus": "",
      "nettingTotal": 0,
      "nettingTotalPaid": 0,
      "nettingTotalUnpaid": 0,
      "overDueDate": 0,
      "ownerBpBriefName": "EOI",
      "ownerBpName": "Example Owner Inc",
      "ownerId": 1,
      "ownerName": "Example Owner Company",
      "ownerVatNumber": "XX987654321",
      "paymentStatus": "none",
      "paymentStatusDate": null,
      "processingStatus": "none",
      "reminderStatus": "enabled",
      "rounding": 0,
      "selfBilling": "no",
      "sitInvoiceEmailImportId": 0,
      "status": "draft",
      "statusDt": "2025-12-15T10:30:00Z",
      "syncMode": "secondary",
      "syncStatus": "none",
      "syncStatusDt": null,
      "templateID": 2,
      "total": 1190.5,
      "totalPaid": 0,
      "totalUnpaid": 1190.5,
      "vatInPrice": 0,
      "vatInTotal": 1,
      "vatPercent": 19
    }
  ],
  "meta": {
    "pagination": {
      "count": 1,
      "currentPage": 1,
      "perPage": 10,
      "total": 1,
      "totalPages": 1
    }
  }
}