V2 API Validation Error on Organzation Update

I’m getting an error from the V2 API when updating an organization (e.g., PATCH /api/v2/organizations/1653)

The API response is HTTP 400 with the following body:

{“success”:false,“error”:“Validation failed: custom_fields: Expected \u0027string\u0027 as short text custom field value, Expected \u0027string\u0027 as short text custom field value, Expected \u0027string\u0027 as short text custom field value”,“code”:“ERR_SCHEMA_VALIDATION_FAILED”}

I am not sending any null values or empty strings.

  • How do I know which fields are causing this issue? It appears that the API response does not include this information but that seems hard to believe.
  • How do I know which fields require a value? I’ve reviewed the API docs and it isn’t clear if that information is available.

Tyler

Hey!

Thank you for bringing this to our attention, we will look into providing more explicit error responses.

In this case in particular, it seems that you are providing a non-string value to 3 short text (‘varchar’ type) custom fields. Are you perhaps passing the string wrapped in a { value: … } object for these fields instead of a string?

Best regards,

Andreas

Thank you for the reply.

I’m unable to reproduce the issue at the moment since my customer changed their field configuration and the issue is no longer happening.

This would have been significantly easier to diagnose if the API identified the fields that were causing validation errors. Frankly, it’s quite surprising that this information is not already returned. I have already spent hours testing fields one-by-one trying to figure out which field is causing an issue. Fixing this seems like an urgent priority for your developer community.

I am considering disabling my Pipedrive integration simply because it is not worth the frustration.