1. Schemas
GraphHopper Directions API
  • Routing
    • Calculate a route
    • Calculate a route
  • Isochrones
    • Compute an isochrone
  • Matrices
    • Compute a matrix
    • Compute a matrix
    • Submit a matrix computation job
    • Retrieve result of a matrix computation job
  • Map Matching
    • Map-match a GPX file
  • Geocoding
    • Geocoding Endpoint
  • Route Optimization
    • Solve a route optimization problem
    • Submit a route optimization job
    • Retrieve solution of a route optimization job
  • Clustering
    • Solve a clustering problem
    • Submit a clustering job
    • Retrieve solution of a clustering job
  • Custom Profiles
    • Create a custom routing profile
    • List your custom routing profiles
    • Submit a profile creation job
    • Retrieve result of a profile creation job
    • Delete a custom routing profile
  • 数据模型
    • Schemas
      • ClusterResponse
      • Cluster
      • ClusterRequest
      • ClusterConfiguration
      • Clusters
      • ClusterCustomer
      • ClusterCustomerAddress
      • ClusterConfigurationRouting
      • ClusterConfigurationClustering
      • GeocodingResponse
      • GeocodingLocation
      • GeocodingPoint
      • MatrixRequest
      • SymmetricalMatrixRequest
      • MatrixResponse
      • RouteRequest
      • CustomModel
      • CustomModelForProfile
      • ProfileRequest
      • ProfileResponse
      • ProfileGetResponse
      • RouteResponse
      • EncodedLineString
      • BBox
      • FeatureCollection
      • RouteResponsePath
      • ResponseInfo
      • IsochroneResponse
      • IsochroneResponsePolygon
      • LineString
      • Polygon
      • GHError
      • JobId
      • BadRequest
      • ErrorMessage
      • InternalErrorMessage
      • Request
      • Vehicle
      • VehicleProfileId
      • Shift
      • Algorithm
      • Address
      • ResponseAddress
      • SnappedWaypoint
      • DriveTimeBreak
      • TimeWindowBreak
      • VehicleType
      • Service
      • Shipment
      • Pickup
      • Stop
      • TimeWindow
      • PreferredVehicle
      • Configuration
      • Optimization
      • Routing
      • Objective
      • CostMatrix
      • GroupRelation
      • JobRelation
      • Response
      • Solution
      • Detail
      • Route
      • RoutePoint
      • Activity
  1. Schemas

Request

{
    "vehicles": [
        {
            "vehicle_id": "vehicle-1",
            "type_id": "default-type",
            "shifts": [
                {
                    "shift_id": "string",
                    "start_address": {
                        "location_id": "550e8400-e29b-11d4-a716-446655440000",
                        "name": "Queens Victoria Street 70, Second Floor, Flat 245",
                        "lon": -0.092869,
                        "lat": 51.512665,
                        "street_hint": "Queens Victoria Street 70",
                        "curbside": "any"
                    },
                    "end_address": {
                        "location_id": "550e8400-e29b-11d4-a716-446655440000",
                        "name": "Queens Victoria Street 70, Second Floor, Flat 245",
                        "lon": -0.092869,
                        "lat": 51.512665,
                        "street_hint": "Queens Victoria Street 70",
                        "curbside": "any"
                    },
                    "earliest_start": 0,
                    "latest_end": 9223372036854776000,
                    "return_to_depot": true,
                    "break": {
                        "earliest": 1550136467,
                        "latest": 1550148467,
                        "duration": 2700
                    }
                }
            ],
            "start_address": {
                "location_id": "550e8400-e29b-11d4-a716-446655440000",
                "name": "Queens Victoria Street 70, Second Floor, Flat 245",
                "lon": -0.092869,
                "lat": 51.512665,
                "street_hint": "Queens Victoria Street 70",
                "curbside": "any"
            },
            "end_address": {
                "location_id": "550e8400-e29b-11d4-a716-446655440000",
                "name": "Queens Victoria Street 70, Second Floor, Flat 245",
                "lon": -0.092869,
                "lat": 51.512665,
                "street_hint": "Queens Victoria Street 70",
                "curbside": "any"
            },
            "break": {
                "earliest": 1550136467,
                "latest": 1550148467,
                "duration": 2700
            },
            "return_to_depot": true,
            "earliest_start": 0,
            "latest_end": 9223372036854776000,
            "skills": [
                "drilling_mashine",
                "screw_driver"
            ],
            "max_distance": 400000,
            "max_driving_time": 28800,
            "max_jobs": 12,
            "min_jobs": 12,
            "max_activities": 24,
            "move_to_end_address": true
        }
    ],
    "vehicle_types": [
        {
            "type_id": "my-own-type",
            "profile": "car",
            "capacity": [
                0
            ],
            "speed_factor": 1,
            "service_time_factor": 1,
            "cost_per_meter": 0,
            "cost_per_second": 0,
            "cost_per_activation": 0,
            "consider_traffic": false,
            "network_data_provider": "openstreetmap"
        }
    ],
    "services": [
        {
            "id": "7fe77504-7df8-4497-843c-02d70b6490ce",
            "type": "service",
            "priority": 2,
            "name": "delivery pizza",
            "address": {
                "location_id": "550e8400-e29b-11d4-a716-446655440000",
                "name": "Queens Victoria Street 70, Second Floor, Flat 245",
                "lon": -0.092869,
                "lat": 51.512665,
                "street_hint": "Queens Victoria Street 70",
                "curbside": "any"
            },
            "duration": 0,
            "preparation_time": 0,
            "time_windows": [
                {
                    "earliest": 32400,
                    "latest": 36000
                },
                {
                    "earliest": 50400,
                    "latest": 54000
                }
            ],
            "size": [
                0
            ],
            "required_skills": [
                "drilling_machine",
                "screw_driver"
            ],
            "allowed_vehicles": [
                "technician_peter",
                "technician_stefan"
            ],
            "disallowed_vehicles": [
                "driver-A",
                "driver-B"
            ],
            "preferred_vehicles": [
                {
                    "vehicle_id": "string",
                    "priority": 2
                }
            ],
            "max_time_in_vehicle": 9223372036854776000,
            "group": "group-A"
        }
    ],
    "shipments": [
        {
            "id": "7fe77504-7df8-4497-843c-02d70b6490ce",
            "name": "pickup and deliver pizza to Peter",
            "priority": 2,
            "pickup": {
                "address": {
                    "location_id": "550e8400-e29b-11d4-a716-446655440000",
                    "name": "Queens Victoria Street 70, Second Floor, Flat 245",
                    "lon": -0.092869,
                    "lat": 51.512665,
                    "street_hint": "Queens Victoria Street 70",
                    "curbside": "any"
                },
                "duration": 0,
                "preparation_time": 0,
                "time_windows": [
                    {
                        "earliest": 32400,
                        "latest": 36000
                    },
                    {
                        "earliest": 50400,
                        "latest": 54000
                    }
                ],
                "group": "ASAP"
            },
            "delivery": {
                "address": {
                    "location_id": "550e8400-e29b-11d4-a716-446655440000",
                    "name": "Queens Victoria Street 70, Second Floor, Flat 245",
                    "lon": -0.092869,
                    "lat": 51.512665,
                    "street_hint": "Queens Victoria Street 70",
                    "curbside": "any"
                },
                "duration": 0,
                "preparation_time": 0,
                "time_windows": [
                    {
                        "earliest": 32400,
                        "latest": 36000
                    },
                    {
                        "earliest": 50400,
                        "latest": 54000
                    }
                ],
                "group": "ASAP"
            },
            "size": [
                0
            ],
            "required_skills": [
                "drilling_machine",
                "screw_driver"
            ],
            "allowed_vehicles": [
                "technician_peter",
                "technician_stefan"
            ],
            "disallowed_vehicles": [
                "driver-A",
                "driver-B"
            ],
            "preferred_vehicles": [
                {
                    "vehicle_id": "string",
                    "priority": 2
                }
            ],
            "max_time_in_vehicle": 9223372036854776000
        }
    ],
    "relations": [
        {
            "type": "in_direct_sequence",
            "ids": [
                "pickup-1",
                "pickup-2"
            ],
            "vehicle_id": "driver-Peter"
        }
    ],
    "algorithm": {
        "problem_type": "min",
        "objective": "transport_time"
    },
    "objectives": [
        {
            "type": "min",
            "value": "vehicles"
        },
        {
            "type": "min",
            "value": "completion_time"
        }
    ],
    "cost_matrices": [
        {
            "type": "default",
            "location_ids": [
                "string"
            ],
            "data": {
                "times": [
                    [
                        0
                    ]
                ],
                "distances": [
                    [
                        0
                    ]
                ],
                "info": {
                    "copyrights": [
                        "string"
                    ],
                    "took": 0
                }
            },
            "profile": "string"
        }
    ],
    "configuration": {
        "routing": {
            "calc_points": false,
            "consider_traffic": false,
            "network_data_provider": "openstreetmap",
            "curbside_strictness": "soft",
            "fail_fast": true,
            "return_snapped_waypoints": false,
            "snap_preventions": [
                "motorway",
                "trunk",
                "bridge",
                "tunnel",
                "ferry",
                "ford"
            ]
        },
        "optimization": {
            "free_insertion": false
        }
    }
}
Built with