How to avoid multiple BlockSpring API Calls

Alright, So i spent the better half of the day creating a blockspring block that retrieves data from Edmunds mashey to decode VIN numbers. Now i am trying to avoid multiple API calls on the same VIN

For example. If i supply XXXX VIN number i will get back these fields
Make
Model
(and many many others)

If i wanted to save them in a thing i must make this API call 2 times. like in the image below. How i can i make the Blockspring call once. then save the data in different fields.

1 Like

hey @AliFarahat - here’s how I would do it:

  1. Have an input that takes a VIN number
  2. Have a group of the type “Edmunds Mashery Vehicle VIN Decoder API V2” that has as its source the API call
  3. When you create a thing, refer to the group instead of the API

Hope that works!

2 Likes

When I tried something similar on the IP address, it still seemed to do it twice. Maybe a group is the answer. Or to do backend only somehow ?

That worked like a charm. I changed the logic a bit to use a custom state but using the same method.

Thanks for help @vlad & @NigelG

1 Like

Hi Ali,
Silly question, but to clarify, do the two fields that call the API (in your image above) only use 1 call?
I’m trying to design in a way to minimise API calls but I’m not sure if this example means 2 calls (one call per field) or a single call that populates them both.

Thanks

You don’t need Blockspring anymore you can setup the API call using the API plugin to talk directly to Edmunds API for VIN decoding.

Thanks Ali.
Sorry, I wasn’t very clear. I was just speaking more generally about API’s being called multiple times to populate separate fields.
The way I’m interpreting this thread is that if I set a group to the API data type, then I can refer to the group in multiple fields without calling for each each field?
Is this correct?

Cheers

Create a custom state with the same type of the API call and store the results of the call in it. Then use that custom state how you like…

Excellent. That clears it up. Thanks mate.

Dear @AliFarahat, I am happy you found solution and i would like also to ask you one simple related question as I am a newbie in this platform, could you be kind to share how can i connect Edmunds Api and if it is still free? Or if there is any guide to explain it well.

Thanks in advance!

Unfortunately Edmunds is no longer free and it’s been since restricted. What information do you need to get, maybe I can suggest another service

Dear @AliFarahat, thanks for your kind response.

I was looking for a way to get data on basic car details by VIN. I saw it in a few websites where they are writing the VIN and it populates the data automatically.

Thanks for your kind consideration.