[#911] API bad return

Migrated from Redmine #911 | Author: Rodrigo Melo
Status: Feedback | Priority: Immediate, there is BUG! | Created: 2022-07-19


I’m using the REST API to create some clients with custom fields, but when I don’t provide some data it returns an error like below:
{“code”:400,“message”:“”,“data”:{“fields”:[null,null,{“value”:[“Value is required and can’t be empty”]},null,null,null,null]},“message_data”:}

The problem is:
How can I know which data I’m not providing? APIs should show it for clients.

The endpoint is:
https://user-api-v2.simplybook.me/admin/clients/field-values

Dmytro Bondarev wrote:

Hi,
The errors are in the same order as you pass to request /admin/clients/field-values