Expense

Retrieves the collection of Expense resources.

SecurityBearer
Request
query Parameters
created_at[before]
string
created_at[strictly_before]
string
created_at[after]
string
created_at[strictly_after]
string
codice_fiscale_proprietario
string
codice_fiscale_proprietario[]
Array of strings
codice_fiscale_cittadino
string
codice_fiscale_cittadino[]
Array of strings
page
integer

The collection page number

Responses
200

Expense collection response

get/sistema-ts/expenses
Request samples
Response samples
[
  • {
    }
]

Creates a Expense resource.

SecurityBearer
Request
Request Body schema:

The new Expense resource

opzionale1
string

Field currently used by users who:

  • are attested to the SistemaTS with Client certificate (contains the IDENTIFICATION CODE)
  • use Entratel credentials (tax intermediaries: contains tax code - SEAT code).
opzionale2
string
opzionale3
string
cf_proprietario
required
string

Tax code of the structure or of the professional.

codice_regione
codice_asl
string

The 3 chars ASL code (this is not needed for professionals).

codice_ssa
string

The 5 or 6 chars SSA code (this is not needed for professionals).

partita_iva
string

VAT number of the pharmacy/facility or doctor issuing the tax document.

data_emissione
required
string

Date of issue of the "fiscal document" relating to the expenditure incurred by the citizen in yyyy-mm-dd format.

dispositivo
required
string

Sequential number of the device generating the document. A device is defined as the sequence of the cash register used by merchants issuing commercial documents; for the issuance of invoices or tax receipts the field takes the recommended value = 1.

numero_documento_fiscale
required
string

Identification number of the document issued. Unique within of the date. It is unique by day (receipts) or by year (invoice).

Array of objects (Spesa)
data_pagamento
required
string

Date of payment pertaining to the 'tax document' issued in yyyy-mm-dd format. It must be on or after the issue date and it can only be earlier than the issue date if the advance payment flag is set to 1 (and in any case not less than 2015-01-01).

flag_pagamento_anticipato
integer

The field must be set to "1" to indicate payment of the expenditure incurred by the citizen on a date before the date of issue of the "tax document'.

cf_cittadino
string

Citizen's tax code taken from the Tessera Sanitaria card.

pagamento_tracciato
required
string

The field describes the payment method and accepts the values SI/NO:

  • SI: in the manner provided for in paragraph 679 of Article 1 of Law 160 of 27 /12/2019 (Budget Law 2020)
  • NO: in cash".
tipo_documento
required
string

Type of document certifying payment of the service or of the health care item:

  • F: Invoice
  • D: Commercial Document.
flag_opposizione
required
integer

Indicates the citizen's wish not to allow the expenditure data to be sent to the Revenue Agency for the purpose of preparing the Precompiled declaration:

  • 0: the citizen does NOT oppose
  • 1: the citizen does oppose.
Responses
201

Expense resource created

400

Invalid input

404

Resource not found

post/sistema-ts/expenses
Request samples
{
  • "opzionale1": "string",
  • "opzionale2": "string",
  • "opzionale3": "string",
  • "cf_proprietario": "string",
  • "codice_regione": "string",
  • "codice_asl": "string",
  • "codice_ssa": "string",
  • "partita_iva": "string",
  • "data_emissione": "string",
  • "dispositivo": "string",
  • "numero_documento_fiscale": "string",
  • "spesa": [
    ],
  • "data_pagamento": "string",
  • "flag_pagamento_anticipato": 0,
  • "cf_cittadino": "string",
  • "pagamento_tracciato": "string",
  • "tipo_documento": "string",
  • "flag_opposizione": 0
}
Response samples
{
  • "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
  • "outcome": "string",
  • "messages": [
    ],
  • "protocol": "string"
}

Retrieves a Expense resource.

SecurityBearer
Request
path Parameters
id
required
string
Responses
200

Expense resource response

404

Resource not found

get/sistema-ts/expenses/{id}
Request samples
Response samples
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "requests": [
    ],
  • "codice_fiscale_proprietario": "string",
  • "codice_fiscale_cittadino": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "amount": "string"
}

Removes the Expense resource.

SecurityBearer
Request
path Parameters
id
required
string
Responses
204

Expense resource deleted

404

Resource not found

delete/sistema-ts/expenses/{id}
Request samples

Replaces the Expense resource.

SecurityBearer
Request
path Parameters
id
required
string
Request Body schema:

The updated Expense resource

opzionale1
string

Field currently used by users who:

  • are attested to the SistemaTS with Client certificate (contains the IDENTIFICATION CODE)
  • use Entratel credentials (tax intermediaries: contains tax code - SEAT code).
opzionale2
string
opzionale3
string
cf_proprietario
required
string

Tax code of the structure or of the professional.

codice_regione
codice_asl
string

The 3 chars ASL code (this is not needed for professionals).

codice_ssa
string

The 5 or 6 chars SSA code (this is not needed for professionals).

partita_iva
string

VAT number of the pharmacy/facility or doctor issuing the tax document.

data_emissione
required
string

Date of issue of the "fiscal document" relating to the expenditure incurred by the citizen in yyyy-mm-dd format.

dispositivo
required
string

Sequential number of the device generating the document. A device is defined as the sequence of the cash register used by merchants issuing commercial documents; for the issuance of invoices or tax receipts the field takes the recommended value = 1.

numero_documento_fiscale
required
string

Identification number of the document issued. Unique within of the date. It is unique by day (receipts) or by year (invoice).

Array of objects (Spesa)
data_pagamento
required
string

Date of payment pertaining to the 'tax document' issued in yyyy-mm-dd format. It must be on or after the issue date and it can only be earlier than the issue date if the advance payment flag is set to 1 (and in any case not less than 2015-01-01).

flag_pagamento_anticipato
integer

The field must be set to "1" to indicate payment of the expenditure incurred by the citizen on a date before the date of issue of the "tax document'.

cf_cittadino
string

Citizen's tax code taken from the Tessera Sanitaria card.

pagamento_tracciato
required
string

The field describes the payment method and accepts the values SI/NO:

  • SI: in the manner provided for in paragraph 679 of Article 1 of Law 160 of 27 /12/2019 (Budget Law 2020)
  • NO: in cash".
tipo_documento
required
string

Type of document certifying payment of the service or of the health care item:

  • F: Invoice
  • D: Commercial Document.
flag_opposizione
required
integer

Indicates the citizen's wish not to allow the expenditure data to be sent to the Revenue Agency for the purpose of preparing the Precompiled declaration:

  • 0: the citizen does NOT oppose
  • 1: the citizen does oppose.
Responses
200

Expense resource updated

400

Invalid input

404

Resource not found

put/sistema-ts/expenses/{id}
Request samples
{
  • "opzionale1": "string",
  • "opzionale2": "string",
  • "opzionale3": "string",
  • "cf_proprietario": "string",
  • "codice_regione": "string",
  • "codice_asl": "string",
  • "codice_ssa": "string",
  • "partita_iva": "string",
  • "data_emissione": "string",
  • "dispositivo": "string",
  • "numero_documento_fiscale": "string",
  • "spesa": [
    ],
  • "data_pagamento": "string",
  • "flag_pagamento_anticipato": 0,
  • "cf_cittadino": "string",
  • "pagamento_tracciato": "string",
  • "tipo_documento": "string",
  • "flag_opposizione": 0
}
Response samples
{
  • "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
  • "outcome": "string",
  • "messages": [
    ],
  • "protocol": "string"
}

Create a credit note for an expense

SecurityBearer
Request
path Parameters
id
required
string
Request Body schema:

The new Expense resource

dispositivo
required
string

Sequential number of the device generating the document.

num_documento
required
string

Identification number of the document issued.

importo
number

Amount of the expense to refund. The field can be null. In this case it will be used automatically the value from the linked expense.

Responses
201

Expense resource created

400

Invalid input

404

Resource not found

post/sistema-ts/expenses/{id}/credit-note
Request samples
{
  • "dispositivo": "string",
  • "num_documento": "string",
  • "importo": 0
}
Response samples
{
  • "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
  • "outcome": "string",
  • "messages": [
    ],
  • "protocol": "string"
}

Get the Receipt for an expense

SecurityBearer
Request
path Parameters
id
required
string
protocolId
required
string
Responses
200

OK

404

Not found

get/sistema-ts/expenses/{id}/receipt/{protocolId}
Request samples

Get the Receipts for an expense

SecurityBearer
Request
path Parameters
id
required
string
query Parameters
page
integer

The collection page number

Responses
200

OK

404

Not found

get/sistema-ts/expenses/{id}/receipts
Request samples