I have a trigger set up that his this endpoint:
POST /api/v2/tickets
Part of the JSON that I pass through the webhook is custom field data and I run into an error "Failed: 422 Unprocessable Entity (WebDV)" when I try to pass through custom field data that has a null value.
How do I get around this? Let for example that this is my JSON which contains null values below. Please Note: The webhook works as expected when the custom fields are filled out prior to hitting the webhook.
{
"ticket": {
"comment": {
"body": "This ticket was created to help!",
"public": false
},
"custom_fields": [
{
"id": 4415661978388,
"value": 401187672072
},
{
"id": 4415682949268,
"value": 246214
},
{
"id": 360041327151,
"value":
},
{
"id": 360041372052,
"value": ""
},
{
"id": 360041372372,
"value":
},
{
"id": 4417038927636,
"value": ""
}
],
"assignee_id": 401187672072,
"group_id": 360011083932,
"subject": "Test Subject",
"requester_id": 401187672072,
"status": "pending",
"tags": [
"reporter"
]
}
}