KEYSTONE API Standard
  1. Transport Operation
KEYSTONE API Standard
  • Overview
  • Data Schema
    • Diagram
    • Transport Operation
    • Vehicle
    • Driver
  • Paths
    • Transport Operation
      • Create new transport operation data
        POST
      • Get all ongoing transport operation data
        GET
      • Get a specific transport operation data by ID
        GET
      • Update data for a specific transport operation by ID
        PUT
      • Delete specific transport operation data by ID
        DELETE
      • Get schedule data related to a specific transport operation by ID
        GET
      • Update schedule data for a specific transport operation by ID
        PUT
      • Get all phase data related to a specific transport operation by ID
        GET
      • Append phase data for a specific transport operation by ID
        PATCH
      • Get specific phase data by transport operation ID and phase ID
        GET
      • Update specific phase data by transport operation ID and phase ID
        PUT
      • Get all international consignment notes related to a specific transport operation by ID
        GET
      • Append international consignment notes data for a specific transport operation by ID
        PATCH
      • Get specific international consignment notes data by transport operation ID and reference code
        GET
      • Update specific international consignment notes data by transport operation ID and reference code
        PUT
      • Delete specific international consignment notes data by transport operation ID and reference code
        DELETE
      • Get ongoing transport operation data by country code and license plate number
        GET
      • Get details about the schedule of the ongoing transport operation by country code and license plate number
        GET
      • Get details about all the phases of the ongoing transport operation by country code and license plate number
        GET
      • Get specific phase data related to the ongoing transport operation by country code, license plate number, and phase ID
        GET
      • Get all international consignment notes related to the ongoing transport operation by country code and license plate number
        GET
      • Get specific international consignment notes data related to the ongoing transport operation by country code, license plate number, and reference code
        GET
      • Get all locations related to transport operations
        GET
      • Get all locations related to transport operations by location mode
        GET
    • Vehicle
      • Create new vehicle data
      • Get all vehicle data
      • Get vehicle data by country code and license plate number
      • Update vehicle data by country code and license plate number
      • Delete specific vehicle data by country code and license plate number
      • Get details about the geolocation of vehicle by country code and license plate number
      • Append new vehicle's geolocation data by country code and license plate number
      • Get details about the owner of vehicle by country code and license plate number
      • Get details about the insurances of vehicle by country code and license plate number
      • Get details about the insurance of vehicle by country code, license plate number and insurance id
      • Get details about the revisions of vehicle by country code and license plate number
      • Get details about the revision of vehicle by country code, license plate number and revision id
    • Driver
      • Create new driver data
      • Get all driver data
      • Get driver data by country code and vat number
      • Update driver data by country code and vat number
      • Delete specific driver data
      • Get details about the driver's license by country code and vat number
      • Get details about the driver's traffic violations by country code and vat number
      • Get specific driver's traffic violation data by country code, vat number and traffic violation id
      • Get details about the driver's tachograph cards data by country code and vat number
      • Get specific driver's tachograph card data by country code, vat number and tachograph card id
  1. Transport Operation

Create new transport operation data

POST
https://api.company-server/v1/transport-operations/

Request

Body Params application/json

Example
{
    "id": 123456789,
    "operator": {
        "name": "ABC Logistics",
        "countryCode": "IT",
        "vat": "IT1234567890",
        "address": "123 Main St, City, Country"
    },
    "schedule": {
        "departureDateTime": "2023-06-25T10:00:00Z",
        "realDepartureDateTime": "2023-06-27T10:30:00Z",
        "estimatedDateTimeOfArrival": "2023-06-27T17:00:00Z",
        "realArrivalDateTime": "2023-06-27T17:20:00Z"
    },
    "driver": {
        "id": 123456789,
        "firstName": "John",
        "lastName": "Doe",
        "countryCode": "IT",
        "vat": "IT0011228901",
        "license": {
            "id": "IT1234567890",
            "countryCode": "IT",
            "category": [
                {
                    "type": "AM",
                    "description": "Goods Vehicle",
                    "issueDate": "2020-01-01",
                    "expiryDate": "2025-12-31",
                    "status": "VALID",
                    "code95": "95 (13.02.25)"
                }
            ]
        },
        "trafficViolation": [
            {
                "id": 123456789,
                "description": "Speeding",
                "code": "SV-123",
                "countryCode": "IT",
                "fine": 150,
                "paymentDueDate": "2023-07-15",
                "paymentDate": "2023-07-10",
                "isPaid": true,
                "validityPoints": 1,
                "payload": {
                    "additionInformation": "Information XX"
                }
            }
        ],
        "tachographCard": [
            {
                "id": "IT1234567890123456",
                "drivingInterval": [
                    {
                        "startDateTime": "2023-06-20T08:00:00Z",
                        "endDateTime": "2023-06-20T18:00:00Z",
                        "etl": [
                            {
                                "type": "Daily driving limit",
                                "hours": 1,
                                "minutes": 1,
                                "seconds": 20
                            }
                        ]
                    }
                ]
            }
        ]
    },
    "vehicle": {
        "id": 123456789,
        "countryCode": "IT",
        "plateNumber": "AA1232",
        "type": "Truck",
        "model": "XX Model",
        "geolocation": [
            {
                "dateTime": "2023-06-25T10:00:00Z",
                "coordinates": {
                    "latitude": 34.052235,
                    "longitude": -118.243683
                }
            }
        ],
        "owner": {
            "id": 123456789,
            "name": "Acme Trucking",
            "vat": "IT2345678901",
            "payload": {
                "additionInformation": "Information XX"
            }
        },
        "insurance": [
            {
                "id": 123456789,
                "name": "AB Insurance",
                "number": "KST-123456789",
                "isInsured": true,
                "activationDate": "2023-01-15",
                "expirationDate": "2024-01-14",
                "payload": {
                    "additionInformation": "Information XX"
                }
            }
        ],
        "revision": [
            {
                "id": 123456789,
                "name": "Revision Comp",
                "number": "A-2211",
                "executionDate": "2023-01-15",
                "expirationDate": "2024-01-14",
                "payload": {
                    "additionInformation": "Information XX"
                }
            }
        ]
    },
    "phase": [
        {
            "id": 1,
            "location": {
                "id": 123456789,
                "description": "Place X",
                "mode": "GENERIC",
                "coordinates": {
                    "latitude": 34.052235,
                    "longitude": -118.243683
                }
            },
            "dateTime": "2023-06-25T10:00:00Z",
            "state": "PLANNING",
            "payload": {
                "additionInformation": "Information XX"
            }
        }
    ],
    "document": [
        {
            "referenceCode": "DOC-123456789",
            "senderOrganization": {
                "name": "ABC Logistics",
                "countryCode": "IT",
                "vat": "IT1234567890",
                "address": "123 Main St, City, Country"
            },
            "receiverOrganization": {
                "name": "ABC Logistics",
                "countryCode": "IT",
                "vat": "IT1234567890",
                "address": "123 Main St, City, Country"
            },
            "startingPoint": {
                "id": 123456789,
                "description": "Place X",
                "mode": "GENERIC",
                "coordinates": {
                    "latitude": 34.052235,
                    "longitude": -118.243683
                }
            },
            "endingPoint": {
                "id": 123456789,
                "description": "Place X",
                "mode": "GENERIC",
                "coordinates": {
                    "latitude": 34.052235,
                    "longitude": -118.243683
                }
            },
            "load": {
                "type": "Electronics",
                "description": "Laptops, tablets, and smartphones",
                "weight": 500,
                "umWeight": "kg",
                "component": [
                    {
                        "type": "Laptop",
                        "description": "Brand X Laptop",
                        "width": 30,
                        "height": 20,
                        "depth": 5,
                        "unitary": true,
                        "um": "cm"
                    }
                ]
            },
            "report": "report.pdf",
            "payload": {
                "additionInformation": "Information XX"
            }
        }
    ],
    "payload": {
        "additionInformation": "Information XX"
    }
}

Responses

🟢201Created
application/json
Transport operation data created successfully
Body

Example
{
    "id": 123456789,
    "operator": {
        "name": "ABC Logistics",
        "countryCode": "IT",
        "vat": "IT1234567890",
        "address": "123 Main St, City, Country"
    },
    "schedule": {
        "departureDateTime": "2023-06-25T10:00:00Z",
        "realDepartureDateTime": "2023-06-27T10:30:00Z",
        "estimatedDateTimeOfArrival": "2023-06-27T17:00:00Z",
        "realArrivalDateTime": "2023-06-27T17:20:00Z"
    },
    "driver": {
        "id": 123456789,
        "firstName": "John",
        "lastName": "Doe",
        "countryCode": "IT",
        "vat": "IT0011228901",
        "license": {
            "id": "IT1234567890",
            "countryCode": "IT",
            "category": [
                {
                    "type": "AM",
                    "description": "Goods Vehicle",
                    "issueDate": "2020-01-01",
                    "expiryDate": "2025-12-31",
                    "status": "VALID",
                    "code95": "95 (13.02.25)"
                }
            ]
        },
        "trafficViolation": [
            {
                "id": 123456789,
                "description": "Speeding",
                "code": "SV-123",
                "countryCode": "IT",
                "fine": 150,
                "paymentDueDate": "2023-07-15",
                "paymentDate": "2023-07-10",
                "isPaid": true,
                "validityPoints": 1,
                "payload": {
                    "additionInformation": "Information XX"
                }
            }
        ],
        "tachographCard": [
            {
                "id": "IT1234567890123456",
                "drivingInterval": [
                    {
                        "startDateTime": "2023-06-20T08:00:00Z",
                        "endDateTime": "2023-06-20T18:00:00Z",
                        "etl": [
                            {
                                "type": "Daily driving limit",
                                "hours": 1,
                                "minutes": 1,
                                "seconds": 20
                            }
                        ]
                    }
                ]
            }
        ]
    },
    "vehicle": {
        "id": 123456789,
        "countryCode": "IT",
        "plateNumber": "AA1232",
        "type": "Truck",
        "model": "XX Model",
        "geolocation": [
            {
                "dateTime": "2023-06-25T10:00:00Z",
                "coordinates": {
                    "latitude": 34.052235,
                    "longitude": -118.243683
                }
            }
        ],
        "owner": {
            "id": 123456789,
            "name": "Acme Trucking",
            "vat": "IT2345678901",
            "payload": {
                "additionInformation": "Information XX"
            }
        },
        "insurance": [
            {
                "id": 123456789,
                "name": "AB Insurance",
                "number": "KST-123456789",
                "isInsured": true,
                "activationDate": "2023-01-15",
                "expirationDate": "2024-01-14",
                "payload": {
                    "additionInformation": "Information XX"
                }
            }
        ],
        "revision": [
            {
                "id": 123456789,
                "name": "Revision Comp",
                "number": "A-2211",
                "executionDate": "2023-01-15",
                "expirationDate": "2024-01-14",
                "payload": {
                    "additionInformation": "Information XX"
                }
            }
        ]
    },
    "phase": [
        {
            "id": 1,
            "location": {
                "id": 123456789,
                "description": "Place X",
                "mode": "GENERIC",
                "coordinates": {
                    "latitude": 34.052235,
                    "longitude": -118.243683
                }
            },
            "dateTime": "2023-06-25T10:00:00Z",
            "state": "PLANNING",
            "payload": {
                "additionInformation": "Information XX"
            }
        }
    ],
    "document": [
        {
            "referenceCode": "DOC-123456789",
            "senderOrganization": {
                "name": "ABC Logistics",
                "countryCode": "IT",
                "vat": "IT1234567890",
                "address": "123 Main St, City, Country"
            },
            "receiverOrganization": {
                "name": "ABC Logistics",
                "countryCode": "IT",
                "vat": "IT1234567890",
                "address": "123 Main St, City, Country"
            },
            "startingPoint": {
                "id": 123456789,
                "description": "Place X",
                "mode": "GENERIC",
                "coordinates": {
                    "latitude": 34.052235,
                    "longitude": -118.243683
                }
            },
            "endingPoint": {
                "id": 123456789,
                "description": "Place X",
                "mode": "GENERIC",
                "coordinates": {
                    "latitude": 34.052235,
                    "longitude": -118.243683
                }
            },
            "load": {
                "type": "Electronics",
                "description": "Laptops, tablets, and smartphones",
                "weight": 500,
                "umWeight": "kg",
                "component": [
                    {
                        "type": "Laptop",
                        "description": "Brand X Laptop",
                        "width": 30,
                        "height": 20,
                        "depth": 5,
                        "unitary": true,
                        "um": "cm"
                    }
                ]
            },
            "report": "report.pdf",
            "payload": {
                "additionInformation": "Information XX"
            }
        }
    ],
    "payload": {
        "additionInformation": "Information XX"
    }
}
🟠400Bad Request
🔴500Server Error
Previous
Transport Operation
Next
Get all ongoing transport operation data
Built with