Expense

Retrieves the collection of Expense resources.

SecurityBearer
Request
query Parameters
createdAt[before]
string
createdAt[strictly_before]
string
createdAt[after]
string
createdAt[strictly_after]
string
codiceFiscaleProprietario
string
codiceFiscaleProprietario[]
Array of strings
codiceFiscaleCittadino
string
codiceFiscaleCittadino[]
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

Encrypted tax code of the structure or of the professional.

required
object (Spesa)
data_pagamento
required
string

Date of payment pertaining to the 'tax document' issued. 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 01/01/2015).

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",
  • "spesa": {
    },
  • "data_pagamento": "string",
  • "flag_pagamento_anticipato": 0,
  • "cf_cittadino": "string",
  • "pagamento_tracciato": "string",
  • "tipo_documento": "string",
  • "flag_opposizione": 0
}
Response samples
{
  • "uuid": "string",
  • "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": "string",
  • "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

Encrypted tax code of the structure or of the professional.

required
object (Spesa)
data_pagamento
required
string

Date of payment pertaining to the 'tax document' issued. 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 01/01/2015).

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",
  • "spesa": {
    },
  • "data_pagamento": "string",
  • "flag_pagamento_anticipato": 0,
  • "cf_cittadino": "string",
  • "pagamento_tracciato": "string",
  • "tipo_documento": "string",
  • "flag_opposizione": 0
}
Response samples
{
  • "uuid": "string",
  • "outcome": "string",
  • "messages": [
    ],
  • "protocol": "string"
}

Creates a Expense resource.

SecurityBearer
Request
path Parameters
id
required
string
Request Body schema:

The new Expense resource

dispositivo
integer

Sequential number of the device generating the document.

num_documento
string

Identification number of the document issued.

Responses
201

Expense resource created

400

Invalid input

404

Resource not found

post/sistema-ts/expenses/{id}/credit-note
Request samples
{
  • "dispositivo": 0,
  • "num_documento": "string"
}
Response samples
{
  • "id": "string",
  • "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"
}

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