REST API FATTURA ELETTRONICA - EFFATTA

Descriptions

The following APIs expect a JSON containing a token its owner’s userId (“idMittente”). Both are automatically assigned on login. The output will be a JSON wrapped in a single key called “d”, as follows:

Every API returns an errCode and an errMsg (brief error description) as output. Possible errCode values:

Login

Login API, takes username and password as input and returns a token to be used in subsequent API calls.

  • Input JSON:

  • Output JSON:

User Header Data

Retrieves data relative to a user, identified with the “dataUserId” key. Used in order to evaluate the sender or recipient of an invoice

  • Input JSON:

  • Output JSON:

User Invoice List

Used to retrieve a list of invoice documents related to a specific user, identified by the “dataUserId” key. The type (“Tipo”) field indicates wheter the invoice has been issued/sent (“I”) or received (“R”).

  • Input JSON:

  • Output JSON:

Create Invoice for Merchant / Professional

Used to issue a new invoice for a Merchant and/or a professional. Requires the user to set up an invoice as the web application’s model. The input field “idDestinatario” can either be:

  • an email address, in case the invoice needs to be received by a private user;
    a unique code representing the public administration in case of a PA;

Alternatively, you need to send a qrCode field containing the JSON read by the qrCode released by the Revenue Agency, or from the app itself if the user happens to be registered.

  • Input JSON:

  • Output JSON:

Calculate Document’s Total Amount

Used to calculate the total amount from a document to show. Takes a list of products as input.
The API takes into account the user’s tax profile as well as any social security funds and / or withholding taxes set in the user’s registry. 

  • Input JSON:

  • Output JSON:

Get Document Receipts

Used to retrieve a receipts list from a document. Returns a JSON with the desired list as output.

  • Input JSON:

  • Output JSON:

Create Credit Note

Used to issue a new Credit Note for a Merchant and/or a Professional. Requires the user to set up an invoice as the web application’s model. The input field “idDestinatario” can either be:

  • an email address, in case the invoice needs to be received by a private user;
    a unique code representing the public administration in case of a PA;

Alternatively, you need to transfer a qrCode field containing the JSON read by the qrCode released by the Revenue Agency, or from the app itself if the user happens to be registered.

  • Input JSON:

  • Output JSON:

Create Total Credit Note

Used to issue a new Credit Note relative to an entire existing invoice.

  • Input JSON:

  • Output JSON:

Create full document

Used to issue a new invoice, along with rounding and payment type specifications.

  • Input JSON:

  • Output JSON:

Send XML

Used to issue a new invoice from XML.

  • Input JSON:

  • Output JSON: