Workday errors in plain English.

Submit an Error
errors / rest-api / rest-custom-object-body-array-not-object

REST Custom Object: Request Body Is Array, Not Object

✓ Verified REST API 10 lookups
The error HTTP 400 Bad Request VALIDATION_ERROR: Expected a JSON object but received a JSON array

What it means

The custom object endpoint expects a JSON object (starting with {}) but got an array (starting with []). Workday rejects the body immediately without processing any data. This is common when coming from a SOAP background where XML children feel naturally list-like.

Troubleshooting

  1. Check the first character of your request body - { is an object, [ is an array. The outer wrapper must be {}.
  2. Each field should be a key-value pair inside {}, not an element inside [].
  3. Reference fields like worker must also be objects: {"id": "..."} not ["..."].
  4. Do a GET on the same endpoint for an existing record and use that response structure as your PUT or POST template.
⚡ Quick fix

Change the outer wrapper from [...] to {...} and confirm all reference fields follow the {"id": "value"} pattern, then re-run.

✓ Permanent fix

Before writing the PUT or POST, do a GET on the custom object endpoint for a known record and mirror that exact JSON structure in your outbound payload. Validate request bodies against the schema before the call.

Was this helpful?

Related errors