Documents

You can create, update Documents through the API.

There are 2 things that you have to keep in mind.

  1. When you update a document, the whole content will be replaced from your request. You can't just update some fields. All the fields must be supplied.
  2. If you work with multiple locales, you have to be careful to include in your request all the locales.

For example, let's say that you want to update the data of the French locale in a document that has English and French. If you specify the locale in the header, then you can directly post only the French locale

// Accept-Locale: fr-FR 
// Json Body:
  
{
	"data": {
    	"schema": "pages",
  		"content": {
        	"title": "French Title" 
        }
    }  	
}

Otherwise:

// Accept-Locale not supplied
// Json Body:

{
	"data": {
    	"schema": "pages",
  		"content": {
        	"title": {
            	"fr-Fr": "French Title",
                "en-UK": "English Title"
            }
        }
    }
}