# Submit a clustering job Prefer the synchronous endpoint and use this Batch Cluster endpoint for long running problems only. The work flow is asynchronous: - send a POST request towards and fetch the job_id. - poll the solution every 500ms until it gives . Do this with a GET request towards . Endpoint: POST /cluster/calculate Version: 1.0.0 Security: api_key ## Request fields (application/json): - `configuration` (object) - `configuration.response_type` (string) Specifies the response format. You can either choose or . Example: "json" - `configuration.routing` (object) - `configuration.routing.profile` (string) The routing profile. It determines the network, speed and other physical attributes used when computing the route. See the section about [routing profiles](#tag/Map-Data-and-Routing-Profiles) for more details and valid profile values. - `configuration.routing.cost_per_second` (number) Cost per second (travel time) Example: 1 - `configuration.routing.cost_per_meter` (number) Cost per meter (travel distance) - `configuration.clustering` (object) - `configuration.clustering.num_clusters` (number) Specifies the number of clusters Example: 10 - `configuration.clustering.max_quantity` (number) Specifies max. quantity in a cluster Example: 50 - `configuration.clustering.min_quantity` (number) Specifies min. quantity in a cluster Example: 30 - `clusters` (array) - `clusters.name` (string) id of customer Example: "GraphHopper GmbH" - `clusters.center` (object) - `clusters.center.lon` (number) Longitude Example: 11.53941 - `clusters.center.lat` (number) Latitude Example: 48.118434 - `clusters.center.street_hint` (string) Optional parameter. Provide a hint that includes only the street name for each address to better snap the coordinates (lon,lat) to road network. E.g. if there is an address or house with two or more neighboring streets you can control for which street the closest location is looked up. Example: "Lindenschmitstraße 52" - `clusters.min_quantity` (number) Specifies min. quantity of this cluster Example: 10 - `clusters.max_quantity` (number) Specifies max. quantity of this cluster Example: 10 - `customers` (array) - `customers.id` (string) id of customer Example: "GraphHopper GmbH" - `customers.address` (object) - `customers.quantity` (number) demand of customer Example: 10 ## Response 200 fields (application/json): - `job_id` (string) UUID. Unique id for your job/request with which you can fetch your solution Example: "44886560-b584-4da5-b245-768151dacd8f" ## Response 400 fields (application/json): - `message` (string) Short error message Example: "Bad Request" - `hints` (array) Optional error information. - `hints.message` (string) error message Example: "unsupported json property [vehiles]. allowed properties: [vehicles, vehicle_types, services, shipments, relations, algorithm, objectives, cost_matrices, configuration]" - `hints.details` (string) Details Example: "class java.lang.IllegalArgumentException" - `status` (string) status Example: "finished" ## Response 500 fields (application/json): - `code` (integer) Example: 500 - `message` (string) Details Example: "There has been an internal server error."