Forum Documentation Showcase Pricing Learn more

JSON complex body in API connector

Hi,

I’m having trouble getting the formatting right for the JSON body to do this API call correctly… was hoping someone could help…

Here is the variable from the API documentation that I need to access (business_hours_schedule).

Basically, I need to be able to add multiple days and their corresponding times…

Can anyone help with how to form the JSON body in the API Connector to get this working? (and how to format it as a Key and Value in the body parameters section in Bubble, including the < > so that I can populate them as needed?)

Thanks in advance!

Sorry bother, but maybe one of you might be able to help?
@mishav, @mebeingken, @NigelG, @romanmg

Here is my setup and the error I’m getting:

Have you tried making it <day 0> and <day 1>, then at the data type pass a list of texts (in Bubble, but in coder’s language it may be called array of strings).

But how would I do that if each day/times combination is an object?

You are missing a comma after [<Token Values>]

Crap…

I tried rebuilding it line by line to see where it was going wrong - got it to work.

I think it was that…

Thanks :slight_smile:

Sorry, I missed the point. Great that it now works!