How to make Object type input not required

Options
waggy_d
waggy_d Member
edited September 2023 in ? Working with APIs

I have an api endpoint with inputs tide to the columns of a database

id, name (text), external_ids (object with keys "type" (text) and "value" (text)

I want all three to be visible to the API but only id to be required.

I've set id to required, name to not required, and external_ids to not required (also set each underlying key to not required.)

For some reason, when testing if I include id only, name passes through fine but external_ids throws an error "missing_peram".

Any thoughts on what I'm doing wrong here?

Answers

  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options

    Hi @waggy_d sounds like your error is coming from your function stack not your inputs. This is because something in your function stack is mapped to one of your inputs. Even though you have your input not required, you have to account for when the input value is not provided within your function stack. It depends on what your function stack is doing, but often times this can be accomplished with a conditional function or conditional set filters.