最近搜索


没有最近搜索

BlankValue error when I am providing field value



已于 2024年5月21日 发布

I am trying to make a new request with the requests API, but am always getting this error:

{"error":"RecordInvalid","description":"Record validation errors","details":{"base":[{"description":"XXX: cannot be blank","error":"BlankValue","field_key":XXXXX}]}}

For some context, here is the request I am submitting to ..

{
    "request": {
        "requester": {
            "name": "Name",
            "email": "email@email.com"
        },
        "comment": {
            "body": "this is a test"
        },
        "subject": "TEST REQUEST - PLEASE IGNORE",
        "custom_fields": [
            {
                "id": "XXXXX",
                "value": "one of the tag values"
            }
        ]
    }
}

The field in question is defined as a drop-down field and is listed as required to solve a ticket. However, I am making sure that the value is one of the tag values specified in the admin but still am getting this error.


0

3

3 条评论

Hi Jacob,

Is the custom field ID the same in your request and in the error? Just wondering if you have other mandatory custom fields required to open a request. And make sure to put the value tag and not the value you see when viewing the ticket.

For testing purposes, you can try to disable the custom field and see if the request will work without it.

Ned

0


Yes, the custom field ID in the request and the error are the same. I also made sure to put the value tag in the request.

0


I tested this and it's working fine with a custom drop-down field using the “POST /api/v2/tickets” endpoint.

 

I noticed that the beginning of your body is “request” but in the docs it's “ticket”.

{
    "ticket": {
    ....

0


请先登录再写评论。

找不到所需的内容?

新建帖子