POST

Bulk Update Content By Key


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Updates multiple translation content items using a unique key, which is a combination of contents.content.schemaId, contents.content.entityId, and contents.content.locale.

To remove a field, pass the field key with an empty object as the value. For example:

Copy
{ "fields": { "title": {} } }
Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Wix Multilingual - Write Translation Content
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/translation-content/v1/bulk/contents/update-by-key

Body Params
contentsArray <MaskedContent>RequiredminItems 1maxItems 100

Translation content items to update.


returnEntityboolean

Whether to include the created translation content items in the response. Set to true to receive the translation content items in the response.

Response Object
resultsArray <BulkContentResult>minItems 1maxItems 100

Items created by bulk action.


bulkActionMetadataBulkActionMetadata

Bulk action metadata.

Bulk Update Content By Key
Request
cURL
curl -X POST \ 'https://www.wixapis.com/translation-content/v1/bulk/contents/update-by-key' \ -H 'Authorization: <AUTH>' \ -H 'Content-Type: application/json' \ --data-binary '{ "contents": [ { "content": { "schemaId": "a4caeb4e-81ce-4921-a8d3-1f58329acfc5", "entityId": "Product-001", "locale": "en-us", "fields": { "title": { "textValue": "New title in English." } } } }, { "content": { "schemaId": "a4caeb4e-81ce-4921-a8d3-1f58329acfc5", "entityId": "Product-001", "locale": "fr-fr", "parentEntityId": "MyParentEntity-01" } } ], "returnEntity": true }'
Response
JSON
{ "results": [ { "itemMetadata": { "id": "8046df3c-7575-4098-a5ab-c91ad8f33c47", "originalIndex": 0, "success": true }, "item": { "id": "8046df3c-7575-4098-a5ab-c91ad8f33c47", "createdDate": "2019-10-30T17:22:10.299Z", "updatedDate": "2019-10-30T17:22:10.299Z", "schemaId": "a4caeb4e-81ce-4921-a8d3-1f58329acfc5", "entityId": "Product-001", "locale": "en-us", "publishStatus": "UNPUBLISHED", "previewField": "New title in English.", "fields": { "title": { "id": "title", "textValue": "New title in English.", "updatedBy": "USER", "published": false, "schemaFieldKey": "title", "index": 1 } } } }, { "itemMetadata": { "id": "2ac220f5-ffef-413c-854f-35c9ad0b1703", "originalIndex": 1, "success": true }, "item": { "id": "2ac220f5-ffef-413c-854f-35c9ad0b1703", "createdDate": "2019-10-30T17:22:10.299Z", "updatedDate": "2019-10-30T17:22:10.299Z", "schemaId": "a4caeb4e-81ce-4921-a8d3-1f58329acfc5", "entityId": "Product-001", "locale": "fr-fr", "publishStatus": "UNPUBLISHED", "parentEntityId": "MyParentEntity-01", "previewField": "This is the title in French.", "fields": { "title": { "id": "title", "textValue": "This is the title in French.", "updatedBy": "USER", "published": false, "schemaFieldKey": "title", "index": 1 } } } } ], "bulkActionMetadata": { "totalSuccesses": 2, "totalFailures": 0, "undetailedFailures": 0 } }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Event TriggersThis method triggers the following events:
Did this help?