Hello,
I am trying to make a simple Lead update post via Postman to the Marketo API that updates firstName based a lookupField of serialPerson (custom field). I keep getting a 609 - "Unexpected character ('-' (code 45)) in numeric value: expected digit (0-9) to follow minus sign, for valid numeric value" Error Code.
My Content-Type is set to application/json and my request is:
{
"action": "createOrUpdate",
"lookupField": "serialPerson",
"input": [{
"serialPerson": 6523,
"firstName": "test"
}]
}
Does anyone know what this message is referring to?
Solved! Go to Solution.
I have solved the issue and is within Postman. I was adding my JSON payload in the body as "form-data". It needed to be in "raw".
https://stackoverflow.com/questions/44582670/json-parsing-error-in-springboot
I assume you're POSTing to /rest/v1/leads.json (best to include that information to avoid confusion).
Is serialPerson an Integer field in Marketo? The underlying problem is a Jackson (JSON deserialization) error like you might see if had a hyphen on its own, outside of a string and not right before a number, but I don't see a hyphen anywhere in your code, which is weird.
Hi Sanford,
Yes, I am posting to /rest/v1/leads.json and serialPerson is an integer data type. I do not a have a hyphen for the value in serialPerson and the payload is very simple.
Can you quote it, as a test?
I added quotes, but got the same error.
I have solved the issue and is within Postman. I was adding my JSON payload in the body as "form-data". It needed to be in "raw".
https://stackoverflow.com/questions/44582670/json-parsing-error-in-springboot
Ah, because the MIME separator -- is composed of hyphens, yes, it needs to be only JSON on the wire!