These endpoints are use case methods that have the objective of creating, obtaining information or deleting an upload and download zone.
Create loading and unloading zone
-
Method: POST
-
URL: {baseUrl}/v1/area
-
Body:
{ "municipalityIneCode":50297, "loadingAreaId":2, "address":"abc", "postalCode":1, "timetable":"abc", "capacity":0, "width": 2.5, "length": 4.7, "observations": "Observaciones", "timestamp": "2023-09-26 00:00:00", "geoJsonAddress":{ "type":"Polygon", "coordinates":[ [ [-0.864299,41.646176],[-0.864162,41.646250], [-0.864135,41.646412],[-0.864408,41.646432], [-0.864453,41.646200],[-0.864299,41.646176] ] ] } }
Update of loading and unloading zone
The event is the main part of this data ingestion API. With this event it will be possible to update the information of each loading and unloading area.
-
Method: PUT
-
URL: {baseUrl}/v1/area
-
Updates the data of a loading and unloading area
{ "municipalityIneCode":50297, "loadingAreaId":2, "address":"abcdef", "postalCode":1, "timetable":"newTimeTable", "capacity":0, "width": 2.5, "length": 4.7, "observations": "Observaciones", "timestamp": "2023-09-26 00:00:00", "geoJsonAddress":{ "type":"Polygon", "coordinates":[ [ [-0.864299,41.646176],[-0.864162,41.646250], [-0.864135,41.646412],[-0.864408,41.646432], [-0.864453,41.646200],[-0.864299,41.646176] ] ] } }
*** = Required field**
-
municipalityIneCode * (integer): identifier of the municipality where the event is generated according to INE
-
loadingAreaId * (integer): loading and unloading area identifier
-
address (string): address of the loading and unloading area
-
postalCode (integer): zip code of the loading and unloading area
-
timetable (string): loading and unloading zone hours
-
capacity (integer): loading and unloading zone capacity
-
geoJsonAddress: geospatial information of the loading and unloading zone
-
type (string): type of loading and unloading area
-
coordinates (decimal number): array of loading and unloading area coordinates
-
Obtain information on the loading and unloading areas of a municipality
-
Method: GET
-
URL: {baseUrl}/v1/area/{municipalityIneCode}
-
Response:
[ { "municipalityIneCode": 50297, "loadingAreaId": "1", "postalCode": 1, "observations": "Observaciones", "address": "abcdef", "timetable": "newTimeTable", "capacity": 0, "geoJsonAddress": { "type": "Polygon", "coordinates": [ [ [-0.864299,41.646176],[-0.864162,41.646250], [-0.864135,41.646412],[-0.864408,41.646432], [-0.864453,41.646200],[-0.864299,41.646176] ] ] }, "timestamp": "2023-09-26 00:00:00" }, { "municipalityIneCode": 50297, "loadingAreaId": "2", "postalCode": 1, "observations": "Observaciones", "address": "abcdefg", "timetable": "abc", "capacity": 10, "length": 4.7, "width": 2.5, "geoJsonAddress": { "type": "Polygon", "coordinates": [ [ [-0.864299,41.646176],[-0.864162,41.646250], [-0.864135,41.646412],[-0.864408,41.646432], [-0.864453,41.646200],[-0.864299,41.646176] ] ] }, "timestamp": "2023-09-26 00:00:00" } ]
Obtain information about a loading and unloading area
-
Method: GET
-
URL: {baseUrl}/v1/area/{municipalityIneCode}/{loadingAreaId}
-
Response:
[ { "municipalityIneCode": 50297, "loadingAreaId": "1", "postalCode": 1, "address": "abcdef", "timetable": "newTimeTable", "capacity": 0, "geoJsonAddress": { "type": "Polygon", "coordinates": [ [ [-0.864299,41.646176],[-0.864162,41.646250], [-0.864135,41.646412],[-0.864408,41.646432], [-0.864453,41.646200],[-0.864299,41.646176] ] ] }, "timestamp": "2023-09-26 00:00:00" } ]
Delete loading and unloading area
-
Method: DEL
-
URL: {baseUrl}/v1/area/{municipalityIneCode}/{loadingAreaId}