Recent searches


No recent searches

Custom field not working



Posted Mar 25, 2021

I'm trying to create requests using your Support API, but I've a custom fields and I can't set this field.

 

Code:

await axios.post( 'https://primepass.zendesk.com/api/v2/requests.json', {
      request: {
        custom_fields: [
          { id: 360034914592, value: 'feedbaks e sugestões' },
        ],
      subject: 'Comentário feito no review do app.',
      comment: {
        body: comment,
      },
      requester: {
        name: user.name,
      },
    },
},
{
    auth: {
      username: `${user.email}/token`,
      password: '${token}',
    },
});
 
 
and response:

### Status Code

`422`

### Data Received

```json
{
    "error": "RecordInvalid",
    "description": "Record validation errors",
    "details": {
      "base": [
        {
          "description": "Motivo do contato: não pode ficar em branco",
          "error": "BlankValue",
          "field_key": 360034914592
        }
      ]
    }
}
```


1

1

1 comment

Found my mistake it's about value of custom field: `feedbaks_e_sugestões` instead `feedbaks e sugestões`

1


Please sign in to leave a comment.

Didn't find what you're looking for?

New post