Legalinvoice

Electronic Invoicing Solutions for Businesses, Professionals and Forfeiters

Activate via API and in seconds Legalinvoice, the B2B and PA Electronic Invoicing software.

All the knowledge you need

Here you can find some advice to consider to approach this API. If you prefer, we provide code samples, OAS3 documentation, the ability to try the API live via the Swagger UI or import the entire collection into Postman. We also offer a Sandbox environment where you can experiment with all kinds of requests completely free of charge.

Useful tips to start with Legalinvoice

Get the token in the appropriate section before you start.

Use the the online tool or generate it via API. Set the expire date, a usefull name and now add a bunch of scopes to limit the possible actions your token can do.

Legal Invoice (1.0.0)

Web service that allows you to activate an account for electronic invoicing.

Create

Methods that allow you to activate a new account

Register a new 'forfettario' legal invoice account

This method allows you to register a new legal invoice account of type 'forfettario'. 'forfettario' means that you have 50 starting invoices. For the documents the system will call from the following ip: 34.76.237.249

Authorizations:
bearerAuth
Request Body schema: application/json
cf_piva_titolare
required
string

cf/piva holder

denominazione_titolare
required
string

name of the holder

comune_titolare
required
string

holder city

indirizzo_titolare
required
string

holder address

cap_titolare
required
string

holder postal code

provincia_titolare
required
string

holder province

email
required
string

holder email

nome_richiedente
required
string

customer name

cognome_richiedente
required
string

customer surname

sesso_richiedente
required
string
Enum: "M" "F"

gender

cf_richiedente
required
string

customer fiscal code

data_nascita_richiedente
string

customer date of birth (accepted format: dd/mm/yyyy)

telefono
string

customer phone

cellulare
string

customer mobile phone

documento_identita
required
string

Url where the system can download a customer identity document; accepted format: pdf. The system will call from the following ip: 34.76.237.249

modulo_attivazione
required
string

Url where the system can download the activation form; accepted format: pdf. The system will call from the following ip: 34.76.237.249

object (Callback)
autorinnovo
boolean
Default: false

if set to true, it allows the system to renew the account automatically upon expiration, trying to withdraw credit from the owner's purse

Responses

Response Schema: application/json
object (Account)
success
boolean
message
string
error
integer

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "success": true,
  • "message": "",
  • "error": null
}

Register a new 'start' legal invoice account

This method allows you to register a new legal invoice account of type 'start'. 'start' means that you have 200 starting invoices. For the documents the system will call from the following ip: 34.76.237.249

Authorizations:
bearerAuth
Request Body schema: application/json
cf_piva_titolare
required
string

cf/piva holder

denominazione_titolare
required
string

name of the holder

comune_titolare
required
string

holder city

indirizzo_titolare
required
string

holder address

cap_titolare
required
string

holder postal code

provincia_titolare
required
string

holder province

email
required
string

holder email

nome_richiedente
required
string

customer name

cognome_richiedente
required
string

customer surname

sesso_richiedente
required
string
Enum: "M" "F"

gender

cf_richiedente
required
string

customer fiscal code

data_nascita_richiedente
string

customer date of birth (accepted format: dd/mm/yyyy)

telefono
string

customer phone

cellulare
string

customer mobile phone

documento_identita
required
string

Url where the system can download a customer identity document; accepted format: pdf. The system will call from the following ip: 34.76.237.249

modulo_attivazione
required
string

Url where the system can download the activation form; accepted format: pdf. The system will call from the following ip: 34.76.237.249

object (Callback)
autorinnovo
boolean
Default: false

if set to true, it allows the system to renew the account automatically upon expiration, trying to withdraw credit from the owner's purse

Responses

Response Schema: application/json
object (Account)
success
boolean
message
string
error
integer

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "success": true,
  • "message": "",
  • "error": null
}

Register a new 'pro' legal invoice account

This method allows you to register a new legal invoice account of type 'pro'. 'pro' means that you have 400 starting invoices and the possibility of adding extra company names. For the documents the system will call from the following ip: 34.76.237.249

Authorizations:
bearerAuth
Request Body schema: application/json
cf_piva_titolare
required
string

cf/piva holder

denominazione_titolare
required
string

name of the holder

comune_titolare
required
string

holder city

indirizzo_titolare
required
string

holder address

cap_titolare
required
string

holder postal code

provincia_titolare
required
string

holder province

email
required
string

holder email

nome_richiedente
required
string

customer name

cognome_richiedente
required
string

customer surname

sesso_richiedente
required
string
Enum: "M" "F"

gender

cf_richiedente
required
string

customer fiscal code

data_nascita_richiedente
string

customer date of birth (accepted format: dd/mm/yyyy)

telefono
string

customer phone

cellulare
string

customer mobile phone

documento_identita
required
string

Url where the system can download a customer identity document; accepted format: pdf. The system will call from the following ip: 34.76.237.249

modulo_attivazione
required
string

Url where the system can download the activation form; accepted format: pdf. The system will call from the following ip: 34.76.237.249

object (Callback)
autorinnovo
boolean
Default: false

if set to true, it allows the system to renew the account automatically upon expiration, trying to withdraw credit from the owner's purse

Responses

Response Schema: application/json
object (Account)
success
boolean
message
string
error
integer

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "success": true,
  • "message": "",
  • "error": null
}

Download the activation form

This method allows you to directly download the activation form. Once compiled and signed it will be passed in the form of a base 64 encoded string using the POST method together with an identity document.

Authorizations:
bearerAuth

Responses

Response Schema: application/pdf
string <binary>

Request samples

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "https://legalinvoice.openapi.it/modulo_attivazione");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);

Modify

Methods that allow you to modify your account

List of your legal invoice accounts

This method shows you the list of legal invoice accounts that belong to your username

Authorizations:
bearerAuth

Responses

Response Schema: application/json
Array of objects (Accounts)
success
boolean
message
string
error
integer

Request samples

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "https://legalinvoice.openapi.it/account");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "success": true,
  • "message": "",
  • "error": null
}

Specific legal invoice account

This method shows you the specific legal invoice account related to the id

Authorizations:
bearerAuth
path Parameters
id
required
string
Example: 62b19eea2f7b5264ce34ac29

Account id

Responses

Response Schema: application/json
object (Account)
success
boolean
message
string
error
integer

Request samples

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "https://legalinvoice.openapi.it/account/%7Bid%7D");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);

Response samples

Content type
application/json
{
  • "data": {
    },
  • "success": true,
  • "message": "",
  • "error": null
}

Add extra invoices or extra company names

This method allows you to add extra invoices or extra company names. Invoices can be added for all types of accounts while company names can only be added for those of the 'pro' type.

Authorizations:
bearerAuth
path Parameters
id
required
string
Example: 62b19eea2f7b5264ce34ac29

Account id

Request Body schema: application/json
fatture_extra
integer [ 50 .. 900 ]

number of extra invoices, only accepted multiples of 50 for forfettario and 100 for start/pro

ragioni_sociali_extra
integer [ 1 .. 1000 ]

number of extra company names

Responses

Response Schema: application/json
object (Account)
success
boolean
message
string
error
integer

Request samples

Content type
application/json
{
  • "fatture_extra": 200
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "success": true,
  • "message": "",
  • "error": null
}

Revocation of a legal invoice account

This method allows you to revoke the specific legal invoice account related to the id

Authorizations:
bearerAuth
path Parameters
id
required
string
Example: 62b19eea2f7b5264ce34ac29

Account id

Responses

Response Schema: application/json
object (Account)
success
boolean
message
string
error
integer

Request samples

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "https://legalinvoice.openapi.it/account/%7Bid%7D");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);

Response samples

Content type
application/json
{
  • "data": {
    },
  • "success": true,
  • "message": "",
  • "error": null
}

Renewal of legal invoice account

This method allows you to renew for one or more year the legal invoice account identified by the id

Authorizations:
bearerAuth
path Parameters
id
required
string
Example: 62b19eea2f7b5264ce34ac29

Account id

query Parameters
anni
integer
Example: anni=2

Number of years for which you want to renew the account. If not passed it is 1 by default

Responses

Response Schema: application/json
object (Account)
success
boolean
message
string
error
integer

Request samples

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "https://legalinvoice.openapi.it/account/%7Bid%7D/rinnovo?anni=2");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);

Response samples

Content type
application/json
{
  • "data": {
    },
  • "success": true,
  • "message": "",
  • "error": null
}

Specific legal invoice account

This method shows you the the legal invoice account or accounts related to the email

Authorizations:
bearerAuth
path Parameters
email
required
string

Account email

Responses

Response Schema: application/json
Account (object) or Accounts (object)
success
boolean
message
string
error
integer

Request samples

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "https://legalinvoice.openapi.it/account/%7Bemail%7D");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);

Response samples

Content type
application/json
Example
{
  • "data": {
    },
  • "success": true,
  • "message": "",
  • "error": null
}