Skip to main content

Download invoice file by DTS file type

GET 

/invoice/{invoiceId}/file-type/{fileType}

Downloads the invoice file by DTS file type (PDF or traffic report XLSX)

Audit event:

  • invoice_by_type.print

Privilege (one of):

  • invoice-docs.view
  • invoice-docs-own.view

Errors:

  • INVOICE_HEADER_NOT_FOUND - Invoice header not found
  • INVOICE_FILE_DOES_NOT_EXIST - Invoice file does not exist
  • TEMPLATE_NOTFOUND - Template not found
  • INVOICE_DOCS_API_TPL_TYPE_NOT_SUPPORTED - Template type is not supported
  • INVOICE_DOCS_API_V2:TRAFFIC_REPORT_MNP_NOT_SUPPORTED - Traffic report mnp traffic not supported
  • INVOICE_DOCS_API_TRAFFIC_REPORT_NOT_SUPPORTED - Traffic report not supported
  • TRAFFIC_REPORT_FILE_DOES_NOT_EXIST - Traffic report file does not exist
  • INVOICE_DOCS_API_DTS_DOMAIN_NOT_SUPPORTED - Given dts domain not supported
  • INVOICE_DOCS_API_TPL_TYPE_CONFIG_NOT_DEFINED - Template config is not defined
  • NOT_AUTHORIZED - Not authorized
  • NOT_AUTHENTICATED - Not authenticated
  • INT_APP_ERROR - Unexpected internal error

Request

Responses

Binary file stream (PDF or XLSX). Headers typically include Content-Disposition (attachment), Content-Type, and Content-Length. Same behaviour as GET by fileId; variation is only via data-filters (e.g. address cover changes PDF bytes for html templates).