EN/API/Subjects

From Smart Biogas Wiki
(Redirected from EN/API/Soggetti)
Jump to navigation Jump to search

◀ Back to API Menu

List of subjects linked to SB

GET https://smartbiogas.it/api/v1/subjects

Result: Json with an array of results

[
	{
		"soggetto_id": subjectId,
		"f_soggetto_name": "Company Name or Full Name",
		"f_vat": "VAT number",
		"ts_last_edit": timestamp of last modification
	},
	{
		"soggetto_id": 1979,
		"f_soggetto_name": "Cma Srl",
		"f_vat": "04199860232",
		"ts_last_edit": "2026-06-10 16:03:10"
	},
	...
]

You can add a 'timestamp' parameter to receive data modified after the timestamp.  

Example: http://smartbiogas.it/api/v1/subjects/?timestamp=2026-06-10 16:02:13


Single subject details:

GET https://smartbiogas.it/api/v1/subjects/{subjectId}

Example: https://smartbiogas.it/api/v1/subjects/595

Result: Same Json as above but with a single record and more details


Search by VAT number:

GET https://smartbiogas.it/api/v1/subjects?f_vat={full VAT number}

Example: https://smartbiogas.it/api/v1/subjects?f_vat=10178660014

Result: Same Json as above but with a single record


Search by description:

GET https://smartbiogas.it/api/v1/subjects?f_soggetto_name={string to search in the name}

Example: https://smartbiogas.it/api/v1/subjects?f_soggetto_name=CMA

Result: Same Json as above with 0 or more records