#Integração com python
import requests
import urllib
import json
url = 'http://api.qualp.com.br/rotas/v4'
data = {
"locations": [
"Curitiba - PR",
{
"lat":-22.263797,
"lng":-47.902534
}
],
"config":{
"vehicle":{
"type":"truck",
"axis":"all"
},
"tolls": {
"retroactive_date": ""
},
"freight_table":{
"category":"all",
"freight_load":"granel_solido",
"axis": "all"
},
"route":{
"calculate_return": False,
"optimized_route": False
},
"private_places":{
"max_distance_from_location_to_route":1000,
"categories": True,
"areas": False,
"contacts":False,
"products": False,
"services":False
},
"router": "qualp"
},
"show":{
"polyline": False,
"simplified_polyline": True,
"private_places": False,
"static_image": False,
"freight_table": True,
"link_to_qualp": True,
"tolls": True
},
"format":"json",
"exception_key": ""
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Access-Token': 'SEU ACCESS TOKEN'
}
response = requests.get(url, params={'json': json.dumps(data)}, headers = headers).json()