List files for invoice

GET/invoices/{invoiceId}/files

Returns all registered files related to the given invoice.

Audit event:

  • invoice.files.list

Privilege (one of):

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

Errors:

  • NOT_AUTHORIZED - Missing required privilege or not owner
  • INVOICE_NOTFOUND - Invoice not found or wrong instance
  • 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

invoiceIdintegerrequired

Invoice ID

Request example

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

Responses

List of invoice files

application/json
dataobject[]required
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

metaobjectrequired
Show child attributes
paginationobjectrequired
Show child attributes
countintegerrequired
currentPageintegerrequired
perPageintegerrequired
totalintegerrequired
totalPagesintegerrequired
Example response
{
  "data": [
    {
      "dataSourceFileTypeCodeName": "INVOICE_PDF",
      "dataSourceFileTypeid": 2,
      "fileSystemFileFilename": "fs_abc123.pdf",
      "fileSystemFileStatus": "stored",
      "fileSystemFileStatusDt": "2026-01-15T11:05:00Z",
      "filename": "invoice-140126.pdf",
      "id": 1,
      "insertDt": "2026-01-15T11:00:05Z",
      "invoiceId": 6065,
      "size": 1024,
      "status": "available",
      "statusDt": "2026-01-15T11:00:05Z",
      "statusInfo": ""
    },
    {
      "dataSourceFileTypeCodeName": "ATTACHMENT",
      "dataSourceFileTypeid": 3,
      "fileSystemFileFilename": "fs_def456.pdf",
      "fileSystemFileStatus": "cached",
      "fileSystemFileStatusDt": null,
      "filename": "attachment.pdf",
      "id": 2,
      "insertDt": "2026-01-15T12:00:00Z",
      "invoiceId": 6065,
      "size": 512,
      "status": "available",
      "statusDt": null,
      "statusInfo": ""
    }
  ],
  "meta": {
    "pagination": {
      "count": 2,
      "currentPage": 1,
      "perPage": 2,
      "total": 2,
      "totalPages": 1
    }
  }
}