Get started with our Projects API.

To create a new routing project in the Routific web app, make a POST request to the following endpoint with a valid JSON payload (example below) in the body.

https://product-api.routific.com/v1.0/project

In your request header make sure to include Authorization: Bearer YOUR_API_KEY Content-Type: application/json.

{
	"name": "Vancouver Delivery",
	"date": "2018-10-01",
	"drivers": [{
		"name": "John Doe",
		"start_location": {
			"address": "555 west hastings, vancouver bc, canada",
			"coords": {
				"lat": 49.2847001,
				"lng": -123.1141236
			}
		},
		"end_location": {
			"address": "555 west hastings, vancouver bc, canada",
			"coords": {
				"lat": 49.2847001,
				"lng": -123.1141236
			}
		},
		"shift_start": "09:00",
		"shift_end": "17:00",
		"phone_number": "+16042597686",
		"speed": 1,
		"capacity": 10,
		"types": ["a", "b"],
		"break": {
			"start": "12:00",
			"end": "13:00"
		}
	}],
	"stops": [{
		"name": "Jane Doe",
		"location": {
			"address": "2148 Main St, Vancouver, BC V5T 3C5",
			"coords": {
				"lat": 49.2657634,
				"lng": -123.1004459
			}
		},
		"start": "10:00",
		"end": "11:00",
		"duration": 20,
		"types": ["a"],
		"load": 1,
		"priority": true,
		"phone_number": "+16046204589",
		"email": "[email protected]",
		"notes": "Press 304 at buzzer.",
		"custom_notes": {
    	"orderId": "ABC123"
    }
	}],
	"settings": {
		"max_stop_lateness": 320,
		"max_driver_overtime": 320,
		"shortest_distance": true,
		"traffic": 1.4,
		"strict_start": true,
		"auto_balance": true,
		"default_load": 1,
		"default_duration": 10
	}
}
PROPERTYTYPENOTES
nameStringrequired
dateString ("YYYY-MM-DD")required

This will create the project with name "Vancouver Delivery" for date "2018-10-01" on your Routific web app. You can now press "Optimize" to let Routific optimize your delivery schedule.

2704

Copy and paste the code sample below in Command Prompt (Windows) or Terminal (Mac) to get started.

curl http://serene-lake-49273.herokuapp.com/routific_platform_api_demo.json | \
curl https://product-api.routific.com/v1.0/project \
      -X POST \
      -H "Content-Type: application/json" \
      -H "Authorization: bearer YOUR_API_KEY" \
      -d @-