Skip to main content
Question

GET URL not giving all information

  • July 11, 2022
  • 3 replies
  • 63 views

Hello!

So I had a question about making a GET call in Zapier. I’ve been trying to collect information sending out a GET call, but it doesn’t seem to return all of the information. I’ve been testing it out using other software like e.g. python, and then I do get all the information needed. Here some screenshots as example:

 

You see the 2 ID’s i want to collect at the end. I’ve tried playing around with the options (like unflattening, custom request, etc), but that doesn’t seem to change anything.

 

Here you see the response body I get, filtering for the ID’s:

Now if I use another program or tool, I do get the the output of both ID 6139 and 6129. Does anyone know what’s the cause of this and how I can solve it?

 

Let me know!

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

3 replies

Troy Tessalone
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img+14
  • Zapier Orchestrator & Solution Partner
  • July 11, 2022

Hi @AutoGrowth 

Good question.

That will depend on the documentation for the API endpoint you are trying to use.

Can you share a link to that?


  • Author
  • Beginner
  • July 12, 2022

Hi @Troy Tessalone ,

 

Thanks for helping out! It’s a private link, but this is what the documentation says

 

 

GET /api/external/machines

Implementation Notes

This call returns all machines for the customer including address info, machine ID's and price regions. Add ID’s to specify a certain range of machines. E.g. /api/external/machines/1234,5678

Response Class (Status 200)

Success

 

Machine {

Id (integer, optional),

Name (string, optional),

Customer (Customer, optional),

PriceRegion (CustomerPriceRegion, optional),

Location (string, optional),

Latitude (number, optional),

Longitude (number, optional),

City (string, optional),

Country (string, optional),

Email (string, optional),

Phone (string, optional)

}
Customer {

Id (integer, optional),

Name (string, optional)

}
CustomerPriceRegion {

Id (integer, optional),

Name (string, optional),

Currency (string, optional),

Vat (number, optional)

}


GetUWired
Forum|alt.badge.img+12
  • Zapier Solution Partner
  • July 12, 2022

@AutoGrowth 

Interesting.. I would bet Zapier is scrubbing the url/validating it and removing the second id. 

Have you tried to make a request in the code block? Either using python or javascript?

if javascript code, a simple fetch statement (assuming no headers need to be sent) like:


let response = await fetch(url)
let data = await response.json()

return data

Another thing that could be happening.. does the api return an array of objects?