"error": "RecordInvalid", "description": "Record validation errors", | Community
Skip to main content

"error": "RecordInvalid", "description": "Record validation errors",

  • May 23, 2019
  • 2 replies
  • 0 views

Hi,

 

I'm trying to create an anonymous request using this article https://developer.zendesk.com/rest_api/docs/support/requests#create-request 

I reach the /api/v2/requests.json fine, I use No auth.but I keep getting this error:

{
"error": "RecordInvalid",
"description": "Record validation errors",
"details": {
"base": [
{
"description": "Name: cannot be blank",
"error": "BlankValue",
"field_key": 28679625
},
{
"description": "Organisationens navn: cannot be blank",
"error": "BlankValue",
"field_key": 22892244
},
{
"description": "Organisationens CVR-nummer: cannot be blank",
"error": "BlankValue",
"field_key": 23057730
},
{
"description": "Reference person (til fakturering): cannot be blank",
"error": "BlankValue",
"field_key": 22993550
},
{
"description": "Hvilket miljø drejer henvendelsen sig om: cannot be blank",
"error": "BlankValue",
"field_key": 22993570
}
]
}
}

Here is my JSON payload:

{
"request": {
"requester": {"name": "Anonymous customer"
},
"subject": "Help!",
"comment": {
"body": "My printer is on fire!",
"upload": [
"5v3Bu2ZhHqTdcRK80PnsJ2XuT"
],
"Custom_fields": [
{
"id": 28679625,
"value": "Oprettelse"
},
{
"id": 22892244,
"value": "e-Boks"
},
{
"id": 23057730,
"value": "12345678"
},
{
"id": 22993550,
"value": "NA"
},
{
"id": 22993570,
"value": "environment_produktion"
}
]
}
}
}

As soon as I use basic auth, with the same payload, I don't get the error, and a request is created, all thou none of the fields from the payload is filled out.

I have already checked zendesk is setup like below

  • Enable "Anyone can submit tickets"
  • Disable "Ask users to register"

What am I missing?

2 replies

Integriq
  • June 10, 2019

Hello Jes,

You are experiencing this problem because you have configured  field required on submit request for these fields :Name,Organisationens navn,Organisationens CVR-nummer,Reference person (til fakturering),Hvilket miljø drejer henvendelsen sig om

So if you leave these fields blanks then it will give you Record Validation error with error code 422 Unprocessable Entity


  • September 15, 2021

Hello, I am using Zat to create application in ZD and I am getting this error message RecordInvalid
I am trying with https://developer.zendesk.com/documentation/apps/app-developer-guide/zat/#new  this steps :(