Invoice

Retrieves the collection of Invoice resources.

Currently the Invoice resource contains a notification index with a list of notification for the invoice. The notification index is deprecated in favour of using the endpoint /invoices/{uuid}/notifications

You can get an invoice collection in many different formats just specifying a different Accept header:

  • application/json, default, you get some metadata information together with the json payload that represent the invoice
  • application/zip, get a zip file with invoices collection (ZIP format)
SecurityBearer
Request
query Parameters
createdAt[before]
string
createdAt[strictly_before]
string
createdAt[after]
string
createdAt[strictly_after]
string
signed
boolean
downloaded
boolean
toPa
string

Search invoices that was sent to PA.

type
string

When type is 0 search for invoices sent to a customer, when type is 1 search for invoice received by a supplier

sender
string

Search by sender (vat number OR fiscal code). You can specify more values at once comma separated.

recipient
string

Search by recipient (vat number OR fiscal code). You can specify more values at once comma separated.

invoiceDate[before]
string
invoiceDate[strictly_before]
string
invoiceDate[after]
string
invoiceDate[strictly_after]
string
invoiceNumber
string
recipient.businessName
string
recipient.businessVatNumberCode
string
recipient.businessVatNumberCode[]
Array of strings
recipient.businessFiscalCode
string
recipient.businessFiscalCode[]
Array of strings
sender.businessName
string
sender.businessVatNumberCode
string
sender.businessVatNumberCode[]
Array of strings
sender.businessFiscalCode
string
sender.businessFiscalCode[]
Array of strings
marking
string
marking[]
Array of strings
page
integer

The collection page number

Responses
200

Invoice collection response

get/invoices
Request samples
Response samples
[
  • {
    }
]

Creates a Invoice resource.

Create a new invoice and send it to the government channel

SecurityBearer
Request
Request Body schema:

The new Invoice resource

required
object (FatturaPAFatturaElettronicaHeader-read)
required
Array of objects (FatturaPAFatturaElettronicaBody-read)
Responses
201

Invoice resource created

400

Invalid input

404

Resource not found

post/invoices
Request samples
{
  • "fattura_elettronica_header": {
    },
  • "fattura_elettronica_body": [
    ]
}
Response samples
{
  • "uuid": "string"
}

Convert an invoice between supported formats

Convert an invoice between supported formats.

Sending header Content-Type: application/json you will receive back the XML file, while sending Content-Type: application/xml you will receive the JSON content.

SecurityBearer
Responses
200

OK

400

Invalid input

post/invoices/convert
Request samples

Setup the downloaded flag for a collection of invoices.

Setup the downloaded flag for a collection of invoices.
Note: the downloaded flag is automatically set when an invoice is successfully received with the web-hook

SecurityBearer
Request
Request Body schema:

The new DownloadedEntity resource

uuids
Array of strings
downloaded
any
Responses
200

The downloaded flag has been set

400

Invalid input

404

Resource not found

post/invoices/downloaded
Request samples
{
  • "uuids": [
    ],
  • "downloaded": null
}

Retrieves a Invoice resource.

You can get an invoice in many different formats just specifying a different Accept header:

  • application/json, default, you get some metadata information together with the json payload that represent the invoice
  • application/xml, you get the XML format
  • text/html, you get the invoice formatted with the chosen stylesheet (via X-PrintTheme header, see below)
  • application/pdf, same as HTML but as a PDF file
  • application/octet-stream, get the raw file (P7M or XML format)

In case of HTML and PDF you can choose the printing theme specifying the X-PrintTheme header:

  • standard, default printing theme
  • assosoftware, AssoSoftware printing theme
  • acube, A-Cube printing theme (derived from AssoSoftware theme)

In case you choose A-Cube printing theme, you can write dynamic text within the output file, at the very beginning or in the file footer: you must provide the URL query paramter dynamic[head-notes] or dynamic[foot-notes].

Example: GET /invoices/{uuid}?dynamic[head-notes]=some text in the header&dynamic[foot-notes]=some text in the footer

SecurityBearer
Request
path Parameters
id
required
string
Responses
200

Invoice resource response

404

Resource not found

get/invoices/{id}
Request samples
Response samples
{
  • "created_at": "2019-08-24T14:15:22Z",
  • "uuid": "string",
  • "type": 0,
  • "payload": "string",
  • "sender": {
    },
  • "recipient": {
    },
  • "notifications": [
    ],
  • "sdi_file_name": "string",
  • "sdi_file_id": "string",
  • "signed": true,
  • "legally_stored": true,
  • "preserved_document": {
    },
  • "downloaded": true,
  • "downloaded_at": "2019-08-24T14:15:22Z",
  • "marking": "string",
  • "notice": "string",
  • "retry_information": "string",
  • "transmission_format": "string",
  • "to_pa": true
}

Notify your configured webhook for an invoice notifications

SecurityBearer
Request
path Parameters
id
required
string
Responses
200

OK

404

Not found

post/invoices/{id}/notifications/notify
Request samples

Notify your configured webhook for an invoice

SecurityBearer
Request
path Parameters
id
required
string
Responses
200

OK

404

Not found

post/invoices/{id}/notify
Request samples

Retrieves a PreservedDocument resource.

SecurityBearer
Request
path Parameters
id
required
string
Responses
200

PreservedDocument resource response

404

Resource not found

get/invoices/{id}/preserved-document
Request samples
Response samples
{
  • "created_at": "2019-08-24T14:15:22Z",
  • "uuid": "string",
  • "status": "string",
  • "receipt_received_at": "2019-08-24T14:15:22Z",
  • "object_type": "string",
  • "object_id": "string",
  • "message": "string",
  • "preserved_object_id": "string",
  • "weight": 0
}