Discussions

Ask a Question
Back to All

One POST route but multiple object parameter options

We have an API that can take different JSON params depending on the stage/step of the current process:

input 1
{
"id": "aa66454",
"stepNumber": 1,
"customParams": {
"UUID": "string==",
"SN": "string1234",
"policy": "P1234"
}
}

input 2
{
"id": "aa66454",
"stepNumber": 1,
"customParams": {
"challenge": "ABCD1234",
"sessionID": "abcd"
}
}

These are two different parameters but it's the same POST route. We have not figured out a way to make this work.