Passing a list of database ID's through API connector

Hi Guys, Im trying to send a list of unique records of my database through the API connector but any example i provide fails to initialize

example - “work_orders”: [“1771223277996x175887814820627760”, “1771223277996x313609477164249000”]

appreciate any help.

I think the body of your connector should be like this

{
“contributor”: “<contributor>”,
“check_in”: “<check_in>”,
“work_orders”: <list_of_work_orders>
}

Work orders value shouldn’t be in quotes, remember they are perceived as strings not as numbers

When u’re parsing it, ie testing it out, it should be like this for example

{
“contributor”: “1234567890”,
“check_in”: “1670000000000”,
“work_orders”: [
“1771223277996x175887814820627760”,
“1771223277996x313609477164249000”
]
}

Try it, this might solve the problem

1 Like

There’s a syntax error. Look at “work_orders”. In your Body you have “work_orders”: ““. But inside your you’re passing an array of strings. Remove the quotes around so that you can pass the array of strings.

There might be more errors, but the screenshot is blocked by the popup. Regardless, when you get a JSON error like this the cause is most likely a syntax issue.

1 Like