Garbage collection app - Traveling salesman problem

Hello community,

We’re working on a garbage collection service, after some iteration with manual routing, we’re looking to integrate a service named Mapbox, which allow us to generate optimised routes based on different locations.

They are selling API requests to use their tool, do your think Bubble can handle it ?

I never use the API Connector, I’m currently looking for courses about it.

See yaalll !

This should be possible.

I actually had implemented the same service, but the difference is, it was a plugin. I was using a plugin as I was trying to do something more complex than just optimizing routes.

However, the API connector should suffice for just route optimization.

1 Like

Thank you Tim,

Was it a Bubble plugin ?

I just found an Air Dev tutorial about setting up the API Connector, I’ll work on this today.

Did you considered other APIs excluding Mapbox ?

It was a plugin I built myself. I’ve abandoned it for now. It worked a bit different than the API connector, but it was still using the same Mapbox API.

And I don’t believe so. Mapbox seemed like the best option.

Hey Tim,

Little update, we found On Fleet tool, which is pretty incredible.
Their pricing system and features fit our needs, and I started to implement APIs into Bubble Connector.

I could GET datas from On Fleet to Bubble but POST method isn’t working at all, I’ll make some updates here, maybe some other Bubblers are looking for using this kind of tools.

I could barely add POST urls and parameters into the Connector, but for “Create Task” POST method, no matter what address format I use (Geocoded or text), the response is 409 & description “Address is missing”.

Here is the API documentation; maybe somebody know how to configure calls.

Hey Robin,

Did you format your address like this?

"address": {
      "apartment": "",
      "state": "California",
      "postalCode": "94123",
      "country": "United States",
      "city": "San Francisco",
      "street": "Vallejo Street",
      "number": "2829"

Actually, I put the Address into the Param. field into workflow but there is also the Body available for editing just under Param. fields (see screen shots).

Do I have to put dynamic values (from fields on the page) into this Body ? And ignore param. fields ?

The “Create-Destination” workflow doesn’t allow to edit the Body.

Thank for your time.

I’m not sure if you can use params + body JSON. I normally don’t use parameters, and instead just enter all of my data into the body in JSON format.

Parameters end up evaluating into JSON anyways, where Parameter Key and Parameter Value becomes {“Parameter Key” : “Parameter Value”}

So using parameters + body JSON would make your final API call look like

“Parameter Key1” : “Parameter Value1”,
“Parameter Key2” : “Parameter Value2”,
“Parameter Key3” : “Parameter Value3”,
“body”: {
“Key1” : “value1”,
“Key2” : “value2”

At least I think. Not sure exactly how the data is joined together.