Error submitting to Hubspot API form

I’m submitting to a Hubspot API form and it is successfull about half of the time. The json sent is formatted exactly the same way each time.

The error received is:

Exception('{"status":"error","message":"Invalid input JSON on line 1, column 451: Cannot build FormSubmissionValue, some of required attributes are not set [value]","correlationId":"9eb57057-e900-461a-80c1-c0edfb36f361"}')

When I have resubmitted a form with exactly the same data as when the exception occurred the error does not repeat.

My json is formatted as below:

“fields”: [

{“name”: “country”, “value”: “Australia”},

{“name”: “state”, “value”: “Victoria”},

{“name”: “email”, “value”: “test@test.com”},

{“name”: “name”, “value”: “Joe Bloggs”}

]

Any ideas appreciated.

thanks

Hi, @GRose4 :waving_hand: Thanks for reaching out. Can you provide any additional details? Without being able to reproduce or “see” the issue in action, it’s shard for the community to offer an option.

Best,

Jaycee

The endpoint I’m using looks like this:

hubspot_endpoint = ‘https://api.hsforms.com/submissions/v3/integration/secure/submit/22676137/6bf52a8e-a2bf-431b-bb02-34d9d80c67e3’

It fails consistently when the email address sent has not already been a contact on Hubspot.

If there is a contact with that email. exactly the same code and data does not fail.

So I’m thinking this error message is happening further downstream in the process.

If there is any other specific information I can give you please let me know what it is.

thanks.

this turned out to be a data error with null fields from data imported from a previous application.