I am trying to create discount codes in a Shopify Store (POST to admin/api/2025-10/price_rules.json). With Postman everything works without problem. When doing exactly the same here in Bubble Connector I get the following error:
There was an issue setting up your call. Raw response for the API Status code 400 {"errors": ("price _rule":"Required parameter missing or invalid"}
This guy seemed to had the same problem: API Connector error with Shopify API but unfortunately this does not the trick here for me.
Unfortunately, I’m at my wit’s end. What else could be the cause?
There is no parameter missing. As mentioned with Postman this exact call works (I copy and pasted everything, checked it a lot of times), with Bubble API Connector it does not. It gives this error
Your JSON might be breaking in the API Connector. Try formatting it better in the API Connector body. Because of that, it probably works in Postman but not in Bubble.
call it with bubble and postmaster and compare. The beauty is that it will show exactly what you send and therefore easy to compare if it truly is the same as you claim.
mojo, here’s 2 things to try that almost always solve it for me…
#1 explicitly set the header to Content-Type: application/json. - Exact casing - yeah technically http isnt case sensitive but some frameworks won’t recognize it unless its capital C and capital T.
If that doesn’t fix it –> #2 switch the body to Raw and paste the full JSON payload directly. Bubble’s structured body sometimes serializes nested objects differently than the API expects.
I’m pretty sure this is on Bubble. Header names are case-insensitive, so Shopify shouldn’t care about capitalization. What probably happened is that Bubble didn’t actually treat content-type as the real Content-Type header and either ignored it or overrode it.
Bubble has a track record of silently overriding user-set headers in some modes, so this wouldn’t be surprising.
And even if you argue it’s not strictly a “bug,” it doesn’t really change the takeaway. Bubble is a low-code tool, and this is exactly the kind of sharp edge it should smooth over automatically. Especially if it’s trying to compete in an AI-heavy world, it should be able to figure out that content-type == Content-Type.
Absolutely… the issue is the server that receive the call that reject the call because of that, not Bubble that convert the header to something else. The server should accept header.
Yes Bubble will in some case, overwrite (keep the default in fact) the Content-type (if entered correctly Bubble will use the one you entered). For that, I could consider this a bug. But at the end, the server should accept the header even if this is capitalized or not.
At the moment you play in API connector, you are a little more than just in a no-code. Don’t forget this is why API Connector is consider a plugin actually. This is not a basic feature, not a no-code feature.