#espagnol-product-search
1 messages · Page 1 of 1 (latest)
can I do an API call to https://api.stripe.com/v1/products/search and pass the parameter query=name:'name of the product'?
Exactly what I was about to suggest
Our list call can't filter by name but that search call can take queries that use the name
amazing
can you take a look at this and maybe tell me what am i doing wrong?
probably something with the air quotes or the syntax
because the message that i am getting back "The app returned "invalid_request_error"
i have added content-type: application/x-www-form-urlencoded
and i am passing the url like this: https://api.stripe.com/products/search?query=name:"{{175104280__COL$P}}"
Do you have the request ID from the call that you just made? (req_123)
i have no idea how to look for that
If you didn't log it, it will be on your dashboard: https://dashboard.stripe.com/test/logs
It also comes back as a header when you make the call https://stripe.com/docs/api/request_ids
the request did not go through
Can you paste the full response that you are getting here?
i dont get any response. Only the error that i commented
here is the problem
i need to know how to write this
according to the tooltip displayed below, I can also use JSON
I think that that is a general tip for the request tool that you are using. Stripe's API will require a query string there
If your request is not going through and showing up on the dashboard, it is failing before Stripe gets to what you passed in as that string
i try this: https://api.stripe.com/products/search?query="active:'true' but it also fails
Can you show me the full failure that you are getting here?
they dont show on the stripe logs
they only show on zapier side
and the only message that I get is: "The app returned "invalid_request_error"
it does not show me exactly what i am trying to send
Does it not say anything else about the response there?
Unfortunately I am not that familiar with Zapier. I can try making a quick cURL command to demonstrate how to use this API. That may be helpful in configuring the call in Zapier
Yes, will do. Bouncing between a couple threads but I should have this example soon
thank you very much for your time
Not sure how helpful this will be but this would be the curl command
-u sk_test_123456: \
--data-urlencode query="active:'true' AND name~'wow'" \
-G```
So maybe try wrapping the query in double quotes?
Nice! Glad you could figure that out
only with the active:'true'
I will try to add the name now
can I do only the name also?
Yeah only name should work though it would return inactive products of course
ok
thank you very much
for some reason it works, but it is not finding any product
even though i copy the name exactly like it is on Stripe
and I cannot see any new request for that specific endopoint
i found the problem
the token
was for the test version
and I have all the products in the live version
Oh gotcha, glad you could solve that!
Also on one quick note, I would recommend rolling your test mode secret key when you get a chance. I deleted your screenshots that showed the secret key but sometimes bots grab things. A test key isn't that dangerous if exposed but it is better to be safe here
espagnol-product-search