How to initiate case

I’m trying to start a case with the following contract (JSON):

{ "inputs": [ { "inputs": [ { "inputs": [], "type": "DATE", "description": null, "name": "leaveStart", "multiple": false }, { "inputs": [], "type": "INTEGER", "description": null, "name": "dayCount", "multiple": false } ], "type": null, "description": null, "name": "requestInput", "multiple": false } ], "constraints": [ { "name": "leaveStartIsFuture", "expression": "requestInput.leaveStart.compareTo(new Date()) > 0", "explanation": "Leave start must be in the future", "inputNames": [ "requestInput" ] }, { "name": "atLeastOneDay", "expression": "requestInput.dayCount > 0", "explanation": "Day count must be greater than zero", "inputNames": [ "requestInput" ] } ] }

I’m having difficulty starting it as I’m always getting a 400 Bad Request.
I’m sending this payload:

{ "requestInput ": { "leaveStart ": "1477094400000 ", "dayCount": "12" } }
I also tried with no luck:

{ "leaveStart ": "1477094400000 ", "dayCount": "12" }

Can you mention which API are you calling?

Why you have spaces in json attributes names? Did you try to remove them?

Best regards,
bpms.help

I’m calling the REST API. But I’ve solved it!
Simply sent the following payload:

{
"requestInput ": {
"leaveStart ": "2016-12-12 ",
“dayCount”: “12”
}
}

I thought the date had to be on another format…guess not xD