MENU navbar-image

Introduction

This documentation aims to provide all the information you need to work with our API.

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer {YOUR_AUTH_KEY}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

You can retrieve your token by visiting your dashboard and clicking Generate API token.

Alive

Alive

Verifica se il servizio รจ on-line

Example request:
$client = new \GuzzleHttp\Client();
$url = 'http://localhost/api/alive';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "http://localhost/api/alive" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/alive"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": "",
    "message": "Service on-line",
    "status": 200
}
 

Request      

GET api/alive

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Authentication

Login

Autentica l'utente e restituisce l'API token

Example request:
$client = new \GuzzleHttp\Client();
$url = 'http://localhost/api/login';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'email' => null,
            'password' => null,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request POST \
    "http://localhost/api/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": null,
    \"password\": null
}"
const url = new URL(
    "http://localhost/api/login"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": null,
    "password": null
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "data": {
        "token": "{YOUR_API_TOKEN}"
    },
    "message": "authenticated",
    "status": 200
}
 

Request      

POST api/login

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   string   

email dell'utente.

password   string   

password dell'utente.

Request

Tutte le Regioni

requires authentication

Restituisce l'elenco di tutte le Regioni

Example request:
$client = new \GuzzleHttp\Client();
$url = 'http://localhost/api/v1/regions';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'filter[name]' => 'Ca*',
            'filter[active]' => 'true,false',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "http://localhost/api/v1/regions?filter%5Bname%5D=Ca%2A&filter%5Bactive%5D=true%2Cfalse" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/regions"
);

const params = {
    "filter[name]": "Ca*",
    "filter[active]": "true,false",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "data": [
        {
            "type": "region",
            "id": 0,
            "attributes": {
                "name": "Estero",
                "createdAt": null,
                "updatedAt": null
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/regions/0"
                }
            ]
        },
        {
            "type": "region",
            "id": 1,
            "attributes": {
                "name": "Piemonte",
                "createdAt": null,
                "updatedAt": null
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/regions/1"
                }
            ]
        },
        {
            "type": "region",
            "id": 2,
            "attributes": {
                "name": "Valle d'Aosta",
                "createdAt": null,
                "updatedAt": null
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/regions/2"
                }
            ]
        },
        {
            "type": "region",
            "id": 3,
            "attributes": {
                "name": "Lombardia",
                "createdAt": null,
                "updatedAt": null
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/regions/3"
                }
            ]
        },
        {
            "type": "region",
            "id": 4,
            "attributes": {
                "name": "Trentino-Alto Adige",
                "createdAt": null,
                "updatedAt": null
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/regions/4"
                }
            ]
        },
        {
            "type": "region",
            "id": 5,
            "attributes": {
                "name": "Veneto",
                "createdAt": null,
                "updatedAt": null
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/regions/5"
                }
            ]
        },
        {
            "type": "region",
            "id": 6,
            "attributes": {
                "name": "Friuli-Venezia Giulia",
                "createdAt": null,
                "updatedAt": null
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/regions/6"
                }
            ]
        },
        {
            "type": "region",
            "id": 7,
            "attributes": {
                "name": "Liguria",
                "createdAt": null,
                "updatedAt": null
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/regions/7"
                }
            ]
        },
        {
            "type": "region",
            "id": 8,
            "attributes": {
                "name": "Emilia-Romagna",
                "createdAt": null,
                "updatedAt": null
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/regions/8"
                }
            ]
        },
        {
            "type": "region",
            "id": 9,
            "attributes": {
                "name": "Toscana",
                "createdAt": null,
                "updatedAt": null
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/regions/9"
                }
            ]
        },
        {
            "type": "region",
            "id": 10,
            "attributes": {
                "name": "Umbria",
                "createdAt": null,
                "updatedAt": null
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/regions/10"
                }
            ]
        },
        {
            "type": "region",
            "id": 11,
            "attributes": {
                "name": "Marche",
                "createdAt": null,
                "updatedAt": null
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/regions/11"
                }
            ]
        },
        {
            "type": "region",
            "id": 12,
            "attributes": {
                "name": "Lazio",
                "createdAt": null,
                "updatedAt": null
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/regions/12"
                }
            ]
        },
        {
            "type": "region",
            "id": 13,
            "attributes": {
                "name": "Abruzzo",
                "createdAt": null,
                "updatedAt": null
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/regions/13"
                }
            ]
        },
        {
            "type": "region",
            "id": 14,
            "attributes": {
                "name": "Molise",
                "createdAt": null,
                "updatedAt": null
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/regions/14"
                }
            ]
        },
        {
            "type": "region",
            "id": 15,
            "attributes": {
                "name": "Campania",
                "createdAt": null,
                "updatedAt": null
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/regions/15"
                }
            ]
        },
        {
            "type": "region",
            "id": 16,
            "attributes": {
                "name": "Puglia",
                "createdAt": null,
                "updatedAt": null
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/regions/16"
                }
            ]
        },
        {
            "type": "region",
            "id": 17,
            "attributes": {
                "name": "Basilicata",
                "createdAt": null,
                "updatedAt": null
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/regions/17"
                }
            ]
        },
        {
            "type": "region",
            "id": 18,
            "attributes": {
                "name": "Calabria",
                "createdAt": null,
                "updatedAt": null
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/regions/18"
                }
            ]
        },
        {
            "type": "region",
            "id": 19,
            "attributes": {
                "name": "Sicilia",
                "createdAt": null,
                "updatedAt": null
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/regions/19"
                }
            ]
        },
        {
            "type": "region",
            "id": 20,
            "attributes": {
                "name": "Sardegna",
                "createdAt": null,
                "updatedAt": null
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/regions/20"
                }
            ]
        }
    ]
}
 

Request      

GET api/v1/regions

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

filter[name]   string  optional  

Filtra per nome Example: Ca*

filter[active]   string  optional  

Filtra per stato Example: true,false

Regione

requires authentication

Restituisce la singola provincia

Example request:
$client = new \GuzzleHttp\Client();
$url = 'http://localhost/api/v1/regions/0';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "http://localhost/api/v1/regions/0" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/regions/0"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "data": {
        "type": "region",
        "id": 0,
        "attributes": {
            "name": "Estero",
            "createdAt": null,
            "updatedAt": null
        }
    }
}
 

Request      

GET api/v1/regions/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the region. Example: 0

Tutte le Provincie

requires authentication

Restituisce l'elenco di tutte le provincie

Example request:
$client = new \GuzzleHttp\Client();
$url = 'http://localhost/api/v1/provinces';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'filter[name]' => 'Ca*',
            'filter[abbreviation]' => 'MI',
            'filter[active]' => 'true,false',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "http://localhost/api/v1/provinces?filter%5Bname%5D=Ca%2A&filter%5Babbreviation%5D=MI&filter%5Bactive%5D=true%2Cfalse" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/provinces"
);

const params = {
    "filter[name]": "Ca*",
    "filter[abbreviation]": "MI",
    "filter[active]": "true,false",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "data": [
        {
            "type": "province",
            "id": 1,
            "attributes": {
                "name": "Torino",
                "abbreviation": "TO",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 1
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/1"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/1"
                }
            ]
        },
        {
            "type": "province",
            "id": 2,
            "attributes": {
                "name": "Vercelli",
                "abbreviation": "VC",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 1
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/1"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/2"
                }
            ]
        },
        {
            "type": "province",
            "id": 3,
            "attributes": {
                "name": "Novara",
                "abbreviation": "NO",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 1
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/1"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/3"
                }
            ]
        },
        {
            "type": "province",
            "id": 4,
            "attributes": {
                "name": "Cuneo",
                "abbreviation": "CN",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 1
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/1"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/4"
                }
            ]
        },
        {
            "type": "province",
            "id": 5,
            "attributes": {
                "name": "Asti",
                "abbreviation": "AT",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 1
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/1"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/5"
                }
            ]
        },
        {
            "type": "province",
            "id": 6,
            "attributes": {
                "name": "Alessandria",
                "abbreviation": "AL",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 1
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/1"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/6"
                }
            ]
        },
        {
            "type": "province",
            "id": 7,
            "attributes": {
                "name": "Valle d'Aosta/Vallée d'Aoste",
                "abbreviation": "AO",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 2
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/2"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/7"
                }
            ]
        },
        {
            "type": "province",
            "id": 8,
            "attributes": {
                "name": "Imperia",
                "abbreviation": "IM",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 7
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/7"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/8"
                }
            ]
        },
        {
            "type": "province",
            "id": 9,
            "attributes": {
                "name": "Savona",
                "abbreviation": "SV",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 7
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/7"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/9"
                }
            ]
        },
        {
            "type": "province",
            "id": 10,
            "attributes": {
                "name": "Genova",
                "abbreviation": "GE",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 7
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/7"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/10"
                }
            ]
        },
        {
            "type": "province",
            "id": 11,
            "attributes": {
                "name": "La Spezia",
                "abbreviation": "SP",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 7
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/7"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/11"
                }
            ]
        },
        {
            "type": "province",
            "id": 12,
            "attributes": {
                "name": "Varese",
                "abbreviation": "VA",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 3
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/3"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/12"
                }
            ]
        },
        {
            "type": "province",
            "id": 13,
            "attributes": {
                "name": "Como",
                "abbreviation": "CO",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 3
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/3"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/13"
                }
            ]
        },
        {
            "type": "province",
            "id": 14,
            "attributes": {
                "name": "Sondrio",
                "abbreviation": "SO",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 3
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/3"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/14"
                }
            ]
        },
        {
            "type": "province",
            "id": 15,
            "attributes": {
                "name": "Milano",
                "abbreviation": "MI",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 3
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/3"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/15"
                }
            ]
        },
        {
            "type": "province",
            "id": 16,
            "attributes": {
                "name": "Bergamo",
                "abbreviation": "BG",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 3
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/3"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/16"
                }
            ]
        },
        {
            "type": "province",
            "id": 17,
            "attributes": {
                "name": "Brescia",
                "abbreviation": "BS",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 3
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/3"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/17"
                }
            ]
        },
        {
            "type": "province",
            "id": 18,
            "attributes": {
                "name": "Pavia",
                "abbreviation": "PV",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 3
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/3"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/18"
                }
            ]
        },
        {
            "type": "province",
            "id": 19,
            "attributes": {
                "name": "Cremona",
                "abbreviation": "CR",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 3
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/3"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/19"
                }
            ]
        },
        {
            "type": "province",
            "id": 20,
            "attributes": {
                "name": "Mantova",
                "abbreviation": "MN",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 3
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/3"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/20"
                }
            ]
        },
        {
            "type": "province",
            "id": 21,
            "attributes": {
                "name": "Bolzano/Bozen",
                "abbreviation": "BZ",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 4
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/4"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/21"
                }
            ]
        },
        {
            "type": "province",
            "id": 22,
            "attributes": {
                "name": "Trento",
                "abbreviation": "TN",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 4
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/4"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/22"
                }
            ]
        },
        {
            "type": "province",
            "id": 23,
            "attributes": {
                "name": "Verona",
                "abbreviation": "VR",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 5
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/5"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/23"
                }
            ]
        },
        {
            "type": "province",
            "id": 24,
            "attributes": {
                "name": "Vicenza",
                "abbreviation": "VI",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 5
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/5"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/24"
                }
            ]
        },
        {
            "type": "province",
            "id": 25,
            "attributes": {
                "name": "Belluno",
                "abbreviation": "BL",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 5
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/5"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/25"
                }
            ]
        },
        {
            "type": "province",
            "id": 26,
            "attributes": {
                "name": "Treviso",
                "abbreviation": "TV",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 5
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/5"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/26"
                }
            ]
        },
        {
            "type": "province",
            "id": 27,
            "attributes": {
                "name": "Venezia",
                "abbreviation": "VE",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 5
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/5"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/27"
                }
            ]
        },
        {
            "type": "province",
            "id": 28,
            "attributes": {
                "name": "Padova",
                "abbreviation": "PD",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 5
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/5"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/28"
                }
            ]
        },
        {
            "type": "province",
            "id": 29,
            "attributes": {
                "name": "Rovigo",
                "abbreviation": "RO",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 5
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/5"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/29"
                }
            ]
        },
        {
            "type": "province",
            "id": 30,
            "attributes": {
                "name": "Udine",
                "abbreviation": "UD",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 6
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/6"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/30"
                }
            ]
        },
        {
            "type": "province",
            "id": 31,
            "attributes": {
                "name": "Gorizia",
                "abbreviation": "GO",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 6
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/6"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/31"
                }
            ]
        },
        {
            "type": "province",
            "id": 32,
            "attributes": {
                "name": "Trieste",
                "abbreviation": "TS",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 6
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/6"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/32"
                }
            ]
        },
        {
            "type": "province",
            "id": 33,
            "attributes": {
                "name": "Piacenza",
                "abbreviation": "PC",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 8
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/8"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/33"
                }
            ]
        },
        {
            "type": "province",
            "id": 34,
            "attributes": {
                "name": "Parma",
                "abbreviation": "PR",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 8
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/8"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/34"
                }
            ]
        },
        {
            "type": "province",
            "id": 35,
            "attributes": {
                "name": "Reggio nell'Emilia",
                "abbreviation": "RE",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 8
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/8"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/35"
                }
            ]
        },
        {
            "type": "province",
            "id": 36,
            "attributes": {
                "name": "Modena",
                "abbreviation": "MO",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 8
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/8"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/36"
                }
            ]
        },
        {
            "type": "province",
            "id": 37,
            "attributes": {
                "name": "Bologna",
                "abbreviation": "BO",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 8
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/8"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/37"
                }
            ]
        },
        {
            "type": "province",
            "id": 38,
            "attributes": {
                "name": "Ferrara",
                "abbreviation": "FE",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 8
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/8"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/38"
                }
            ]
        },
        {
            "type": "province",
            "id": 39,
            "attributes": {
                "name": "Ravenna",
                "abbreviation": "RA",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 8
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/8"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/39"
                }
            ]
        },
        {
            "type": "province",
            "id": 40,
            "attributes": {
                "name": "Forlì-Cesena",
                "abbreviation": "FC",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 8
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/8"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/40"
                }
            ]
        },
        {
            "type": "province",
            "id": 41,
            "attributes": {
                "name": "Pesaro e Urbino",
                "abbreviation": "PU",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 11
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/11"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/41"
                }
            ]
        },
        {
            "type": "province",
            "id": 42,
            "attributes": {
                "name": "Ancona",
                "abbreviation": "AN",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 11
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/11"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/42"
                }
            ]
        },
        {
            "type": "province",
            "id": 43,
            "attributes": {
                "name": "Macerata",
                "abbreviation": "MC",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 11
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/11"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/43"
                }
            ]
        },
        {
            "type": "province",
            "id": 44,
            "attributes": {
                "name": "Ascoli Piceno",
                "abbreviation": "AP",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 11
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/11"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/44"
                }
            ]
        },
        {
            "type": "province",
            "id": 45,
            "attributes": {
                "name": "Massa-Carrara",
                "abbreviation": "MS",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 9
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/9"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/45"
                }
            ]
        },
        {
            "type": "province",
            "id": 46,
            "attributes": {
                "name": "Lucca",
                "abbreviation": "LU",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 9
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/9"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/46"
                }
            ]
        },
        {
            "type": "province",
            "id": 47,
            "attributes": {
                "name": "Pistoia",
                "abbreviation": "PT",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 9
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/9"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/47"
                }
            ]
        },
        {
            "type": "province",
            "id": 48,
            "attributes": {
                "name": "Firenze",
                "abbreviation": "FI",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 9
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/9"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/48"
                }
            ]
        },
        {
            "type": "province",
            "id": 49,
            "attributes": {
                "name": "Livorno",
                "abbreviation": "LI",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 9
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/9"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/49"
                }
            ]
        },
        {
            "type": "province",
            "id": 50,
            "attributes": {
                "name": "Pisa",
                "abbreviation": "PI",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 9
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/9"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/50"
                }
            ]
        },
        {
            "type": "province",
            "id": 51,
            "attributes": {
                "name": "Arezzo",
                "abbreviation": "AR",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 9
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/9"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/51"
                }
            ]
        },
        {
            "type": "province",
            "id": 52,
            "attributes": {
                "name": "Siena",
                "abbreviation": "SI",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 9
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/9"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/52"
                }
            ]
        },
        {
            "type": "province",
            "id": 53,
            "attributes": {
                "name": "Grosseto",
                "abbreviation": "GR",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 9
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/9"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/53"
                }
            ]
        },
        {
            "type": "province",
            "id": 54,
            "attributes": {
                "name": "Perugia",
                "abbreviation": "PG",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 10
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/10"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/54"
                }
            ]
        },
        {
            "type": "province",
            "id": 55,
            "attributes": {
                "name": "Terni",
                "abbreviation": "TR",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 10
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/10"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/55"
                }
            ]
        },
        {
            "type": "province",
            "id": 56,
            "attributes": {
                "name": "Viterbo",
                "abbreviation": "VT",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 12
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/12"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/56"
                }
            ]
        },
        {
            "type": "province",
            "id": 57,
            "attributes": {
                "name": "Rieti",
                "abbreviation": "RI",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 12
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/12"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/57"
                }
            ]
        },
        {
            "type": "province",
            "id": 58,
            "attributes": {
                "name": "Roma",
                "abbreviation": "RM",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 12
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/12"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/58"
                }
            ]
        },
        {
            "type": "province",
            "id": 59,
            "attributes": {
                "name": "Latina",
                "abbreviation": "LT",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 12
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/12"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/59"
                }
            ]
        },
        {
            "type": "province",
            "id": 60,
            "attributes": {
                "name": "Frosinone",
                "abbreviation": "FR",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 12
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/12"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/60"
                }
            ]
        },
        {
            "type": "province",
            "id": 61,
            "attributes": {
                "name": "Caserta",
                "abbreviation": "CE",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 15
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/15"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/61"
                }
            ]
        },
        {
            "type": "province",
            "id": 62,
            "attributes": {
                "name": "Benevento",
                "abbreviation": "BN",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 15
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/15"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/62"
                }
            ]
        },
        {
            "type": "province",
            "id": 63,
            "attributes": {
                "name": "Napoli",
                "abbreviation": "NA",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 15
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/15"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/63"
                }
            ]
        },
        {
            "type": "province",
            "id": 64,
            "attributes": {
                "name": "Avellino",
                "abbreviation": "AV",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 15
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/15"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/64"
                }
            ]
        },
        {
            "type": "province",
            "id": 65,
            "attributes": {
                "name": "Salerno",
                "abbreviation": "SA",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 15
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/15"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/65"
                }
            ]
        },
        {
            "type": "province",
            "id": 66,
            "attributes": {
                "name": "L'Aquila",
                "abbreviation": "AQ",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 13
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/13"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/66"
                }
            ]
        },
        {
            "type": "province",
            "id": 67,
            "attributes": {
                "name": "Teramo",
                "abbreviation": "TE",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 13
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/13"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/67"
                }
            ]
        },
        {
            "type": "province",
            "id": 68,
            "attributes": {
                "name": "Pescara",
                "abbreviation": "PE",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 13
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/13"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/68"
                }
            ]
        },
        {
            "type": "province",
            "id": 69,
            "attributes": {
                "name": "Chieti",
                "abbreviation": "CH",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 13
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/13"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/69"
                }
            ]
        },
        {
            "type": "province",
            "id": 70,
            "attributes": {
                "name": "Campobasso",
                "abbreviation": "CB",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 14
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/14"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/70"
                }
            ]
        },
        {
            "type": "province",
            "id": 71,
            "attributes": {
                "name": "Foggia",
                "abbreviation": "FG",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 16
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/16"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/71"
                }
            ]
        },
        {
            "type": "province",
            "id": 72,
            "attributes": {
                "name": "Bari",
                "abbreviation": "BA",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 16
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/16"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/72"
                }
            ]
        },
        {
            "type": "province",
            "id": 73,
            "attributes": {
                "name": "Taranto",
                "abbreviation": "TA",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 16
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/16"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/73"
                }
            ]
        },
        {
            "type": "province",
            "id": 74,
            "attributes": {
                "name": "Brindisi",
                "abbreviation": "BR",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 16
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/16"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/74"
                }
            ]
        },
        {
            "type": "province",
            "id": 75,
            "attributes": {
                "name": "Lecce",
                "abbreviation": "LE",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 16
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/16"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/75"
                }
            ]
        },
        {
            "type": "province",
            "id": 76,
            "attributes": {
                "name": "Potenza",
                "abbreviation": "PZ",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 17
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/17"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/76"
                }
            ]
        },
        {
            "type": "province",
            "id": 77,
            "attributes": {
                "name": "Matera",
                "abbreviation": "MT",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 17
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/17"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/77"
                }
            ]
        },
        {
            "type": "province",
            "id": 78,
            "attributes": {
                "name": "Cosenza",
                "abbreviation": "CS",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 18
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/18"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/78"
                }
            ]
        },
        {
            "type": "province",
            "id": 79,
            "attributes": {
                "name": "Catanzaro",
                "abbreviation": "CZ",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 18
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/18"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/79"
                }
            ]
        },
        {
            "type": "province",
            "id": 80,
            "attributes": {
                "name": "Reggio Calabria",
                "abbreviation": "RC",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 18
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/18"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/80"
                }
            ]
        },
        {
            "type": "province",
            "id": 81,
            "attributes": {
                "name": "Trapani",
                "abbreviation": "TP",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 19
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/19"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/81"
                }
            ]
        },
        {
            "type": "province",
            "id": 82,
            "attributes": {
                "name": "Palermo",
                "abbreviation": "PA",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 19
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/19"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/82"
                }
            ]
        },
        {
            "type": "province",
            "id": 83,
            "attributes": {
                "name": "Messina",
                "abbreviation": "ME",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 19
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/19"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/83"
                }
            ]
        },
        {
            "type": "province",
            "id": 84,
            "attributes": {
                "name": "Agrigento",
                "abbreviation": "AG",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 19
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/19"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/84"
                }
            ]
        },
        {
            "type": "province",
            "id": 85,
            "attributes": {
                "name": "Caltanissetta",
                "abbreviation": "CL",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 19
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/19"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/85"
                }
            ]
        },
        {
            "type": "province",
            "id": 86,
            "attributes": {
                "name": "Enna",
                "abbreviation": "EN",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 19
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/19"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/86"
                }
            ]
        },
        {
            "type": "province",
            "id": 87,
            "attributes": {
                "name": "Catania",
                "abbreviation": "CT",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 19
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/19"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/87"
                }
            ]
        },
        {
            "type": "province",
            "id": 88,
            "attributes": {
                "name": "Ragusa",
                "abbreviation": "RG",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 19
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/19"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/88"
                }
            ]
        },
        {
            "type": "province",
            "id": 89,
            "attributes": {
                "name": "Siracusa",
                "abbreviation": "SR",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 19
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/19"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/89"
                }
            ]
        },
        {
            "type": "province",
            "id": 90,
            "attributes": {
                "name": "Sassari",
                "abbreviation": "SS",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 20
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/20"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/90"
                }
            ]
        },
        {
            "type": "province",
            "id": 91,
            "attributes": {
                "name": "Nuoro",
                "abbreviation": "NU",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 20
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/20"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/91"
                }
            ]
        },
        {
            "type": "province",
            "id": 92,
            "attributes": {
                "name": "Cagliari",
                "abbreviation": "CA",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 20
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/20"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/92"
                }
            ]
        },
        {
            "type": "province",
            "id": 93,
            "attributes": {
                "name": "Pordenone",
                "abbreviation": "PN",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 6
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/6"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/93"
                }
            ]
        },
        {
            "type": "province",
            "id": 94,
            "attributes": {
                "name": "Isernia",
                "abbreviation": "IS",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 14
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/14"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/94"
                }
            ]
        },
        {
            "type": "province",
            "id": 95,
            "attributes": {
                "name": "Oristano",
                "abbreviation": "OR",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 20
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/20"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/95"
                }
            ]
        },
        {
            "type": "province",
            "id": 96,
            "attributes": {
                "name": "Biella",
                "abbreviation": "BI",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 1
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/1"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/96"
                }
            ]
        },
        {
            "type": "province",
            "id": 97,
            "attributes": {
                "name": "Lecco",
                "abbreviation": "LC",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 3
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/3"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/97"
                }
            ]
        },
        {
            "type": "province",
            "id": 98,
            "attributes": {
                "name": "Lodi",
                "abbreviation": "LO",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 3
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/3"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/98"
                }
            ]
        },
        {
            "type": "province",
            "id": 99,
            "attributes": {
                "name": "Rimini",
                "abbreviation": "RN",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 8
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/8"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/99"
                }
            ]
        },
        {
            "type": "province",
            "id": 100,
            "attributes": {
                "name": "Prato",
                "abbreviation": "PO",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 9
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/9"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/100"
                }
            ]
        },
        {
            "type": "province",
            "id": 101,
            "attributes": {
                "name": "Crotone",
                "abbreviation": "KR",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 18
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/18"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/101"
                }
            ]
        },
        {
            "type": "province",
            "id": 102,
            "attributes": {
                "name": "Vibo Valentia",
                "abbreviation": "VV",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 18
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/18"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/102"
                }
            ]
        },
        {
            "type": "province",
            "id": 103,
            "attributes": {
                "name": "Verbano-Cusio-Ossola",
                "abbreviation": "VB",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 1
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/1"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/103"
                }
            ]
        },
        {
            "type": "province",
            "id": 108,
            "attributes": {
                "name": "Monza e della Brianza",
                "abbreviation": "MB",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 3
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/3"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/108"
                }
            ]
        },
        {
            "type": "province",
            "id": 109,
            "attributes": {
                "name": "Fermo",
                "abbreviation": "FM",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 11
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/11"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/109"
                }
            ]
        },
        {
            "type": "province",
            "id": 110,
            "attributes": {
                "name": "Barletta-Andria-Trani",
                "abbreviation": "BT",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 16
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/16"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/110"
                }
            ]
        },
        {
            "type": "province",
            "id": 111,
            "attributes": {
                "name": "Sud Sardegna",
                "abbreviation": "SU",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 20
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/20"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/111"
                }
            ]
        },
        {
            "type": "province",
            "id": 998,
            "attributes": {
                "name": "Repubblica di San Marino",
                "abbreviation": "SM",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 0
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/0"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/998"
                }
            ]
        },
        {
            "type": "province",
            "id": 999,
            "attributes": {
                "name": "Città del Vaticano",
                "abbreviation": "CV",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 0
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/0"
                    }
                }
            },
            "links": [
                {
                    "self": "http://localhost/api/v1/provinces/999"
                }
            ]
        }
    ]
}
 

Request      

GET api/v1/provinces

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

filter[name]   string  optional  

Filtra per nome Example: Ca*

filter[abbreviation]   string  optional  

Filtra per sigla Example: MI

filter[active]   string  optional  

Filtra per stato Example: true,false

Provincia

requires authentication

Restituisce la singola provincia

Example request:
$client = new \GuzzleHttp\Client();
$url = 'http://localhost/api/v1/provinces/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "http://localhost/api/v1/provinces/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/provinces/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "data": {
        "type": "province",
        "id": 1,
        "attributes": {
            "name": "Torino",
            "abbreviation": "TO",
            "createdAt": null,
            "updatedAt": null
        },
        "relationships": {
            "region": {
                "data": {
                    "type": "region",
                    "id": 1
                },
                "link": {
                    "self": "http://localhost/api/v1/regions/1"
                }
            }
        }
    }
}
 

Request      

GET api/v1/provinces/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the province. Example: 1

Tutti i comuni

requires authentication

Restituisce l'elenco di tutti i comuni

Example request:
$client = new \GuzzleHttp\Client();
$url = 'http://localhost/api/v1/municipalities';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'filter[name]' => 'Ca*',
            'filter[active]' => 'true,false',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "http://localhost/api/v1/municipalities?filter%5Bname%5D=Ca%2A&filter%5Bactive%5D=true%2Cfalse" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/municipalities"
);

const params = {
    "filter[name]": "Ca*",
    "filter[active]": "true,false",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "type": "municipality",
            "id": 1001,
            "attributes": {
                "name": "Agliè",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "province": {
                    "data": {
                        "type": "province",
                        "id": 1
                    },
                    "link": {
                        "self": "http://localhost/api/v1/provinces/1"
                    }
                },
                "region": {
                    "data": {
                        "type": "region",
                        "id": 1
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/1"
                    }
                }
            }
        }
    ]
}
 

Request      

GET api/v1/municipalities

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

filter[name]   string  optional  

Filtra per nome Example: Ca*

filter[active]   string  optional  

Filtra per stato Example: true,false

Comune

requires authentication

Restituisce il singolo comune

Example request:
$client = new \GuzzleHttp\Client();
$url = 'http://localhost/api/v1/municipalities/1001';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "http://localhost/api/v1/municipalities/1001" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/municipalities/1001"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": {
        "type": "municipality",
        "id": 1001,
        "attributes": {
            "name": "Agliè",
            "createdAt": null,
            "updatedAt": null
        },
        "relationships": {
            "province": {
                "data": {
                    "type": "province",
                    "id": 1
                },
                "link": {
                    "self": "http://localhost/api/v1/provinces/1"
                }
            },
            "region": {
                "data": {
                    "type": "region",
                    "id": 1
                },
                "link": {
                    "self": "http://localhost/api/v1/regions/1"
                }
            }
        }
    }
}
 

Request      

GET api/v1/municipalities/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the municipality. Example: 1001

Tutti i comuni in provincia

requires authentication

Restituisce l'elenco di tutti i comuni di una specifica provincia

Example request:
$client = new \GuzzleHttp\Client();
$url = 'http://localhost/api/v1/provinces/1/municipalities';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'filter[name]' => 'Ca*',
            'filter[active]' => 'true,false',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "http://localhost/api/v1/provinces/1/municipalities?filter%5Bname%5D=Ca%2A&filter%5Bactive%5D=true%2Cfalse" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/provinces/1/municipalities"
);

const params = {
    "filter[name]": "Ca*",
    "filter[active]": "true,false",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "data": [
        {
            "type": "municipality",
            "id": 1001,
            "attributes": {
                "name": "Agliè",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "province": {
                    "data": {
                        "type": "province",
                        "id": 1
                    },
                    "link": {
                        "self": "http://localhost/api/v1/provinces/1"
                    }
                },
                "region": {
                    "data": {
                        "type": "region",
                        "id": 1
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/1"
                    }
                }
            }
        }
    ]
}
 

Request      

GET api/v1/provinces/{province_id}/municipalities

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

province_id   integer   

The ID of the province. Example: 1

Query Parameters

filter[name]   string  optional  

Filtra per nome Example: Ca*

filter[active]   string  optional  

Filtra per stato Example: true,false

Tutte le Provincie in regione

requires authentication

Restituisce l'elenco di tutte le provincie di una specifica regione

Example request:
$client = new \GuzzleHttp\Client();
$url = 'http://localhost/api/v1/regions/0/provinces';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'filter[name]' => 'Ca*',
            'filter[abbreviation]' => 'MI',
            'filter[active]' => 'true,false',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
curl --request GET \
    --get "http://localhost/api/v1/regions/0/provinces?filter%5Bname%5D=Ca%2A&filter%5Babbreviation%5D=MI&filter%5Bactive%5D=true%2Cfalse" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/v1/regions/0/provinces"
);

const params = {
    "filter[name]": "Ca*",
    "filter[abbreviation]": "MI",
    "filter[active]": "true,false",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "data": [
        {
            "type": "province",
            "id": 998,
            "attributes": {
                "name": "Repubblica di San Marino",
                "abbreviation": "SM",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 0
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/0"
                    }
                }
            }
        },
        {
            "type": "province",
            "id": 999,
            "attributes": {
                "name": "Città del Vaticano",
                "abbreviation": "CV",
                "createdAt": null,
                "updatedAt": null
            },
            "relationships": {
                "region": {
                    "data": {
                        "type": "region",
                        "id": 0
                    },
                    "link": {
                        "self": "http://localhost/api/v1/regions/0"
                    }
                }
            }
        }
    ]
}
 

Request      

GET api/v1/regions/{region_id}/provinces

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

region_id   integer   

The ID of the region. Example: 0

Query Parameters

filter[name]   string  optional  

Filtra per nome Example: Ca*

filter[abbreviation]   string  optional  

Filtra per sigla Example: MI

filter[active]   string  optional  

Filtra per stato Example: true,false