I am getting the same error when using Snap to roads post API like so:
Loop through each row in the dataframe
for index, row in df.iterrows():
# Define the point data for the current row
point_data = {
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [row["longitude"], row["latitude"]]
},
"properties": {
"timestamp": row["Timestamp"].isoformat() + "Z"
}
}
Add the point data to the points list
points_list.append(point_data)
# Define the request data
request_data = {
"points": points_list,
"vehicleType": "car",
"versionNumber": 2
}
# Send the POST request to the API
response = requests.post(url, json=request_data)