Where is the field value format reference?

I’m trying to create entries via the API and keep getting validation errors, but they never explain why a value is not valid. The documentation only seems to give a very simple example with a few short text fields.

Where do I find out how to format a date field? I’ve tried “2019-04-15” and “2019-04-15T00:00:00Z” but both give validation errors, even though this appears to be their format when you get an entry.

And what about a short text field that’s a list? Is it a list of objects with an “en-US” property? Or an object with an “en-US” property that’s a list?

Do text fields even have to have a locale? What about rich-text fields?

I find the easiest way to see what to do is to open up the Contentful Web App and then open the DevTools or Web Inspector and watch the network tab as you use the Web App to do various things.

Regarding locales when creating entries the format looks like this (assuming en-US is your locale):

"fields": {
  "field1": {
    "en-US": "abc123" // short text
  "field2": {
    "en-US": ["one", "two", "three" ] // short text list
  "field3": {
    "en-US": "2019-11-20" // date
  "field4": {
    "en-US": "2019-11-20T00:00" // datetime
  "field5": {
    "en-US": "2019-11-20T00:00+01:00" // datetime with timezone

Technically everything has at least the default locale, but if localization is enabled on a field then it has the possibility of storing values for multiple locales. The locale is always a property of the field object.

It also might be helpful to look at the raw JSON response from the Content Management API by going to a url like the following in your browser:

https://api.contentful.com/spaces/{space_id}/entries/{entry_id}&access_token={your CMA access token}