POST

Bulk Create Content


Developer Preview

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

Creates multiple translation content items.

The content items are validated based on the constraints defined in the corresponding schema.

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/create

Body Params
contentsArray <Content>RequiredminItems 1maxItems 100

List of translation content.


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 Create Content
Request
cURL
curl -X POST \ 'https://www.wixapis.com/translation-content/v1/bulk/contents/create' \ -H 'Authorization: <AUTH>' \ -H 'Content-Type: application/json' \ --data-binary '{ "contents": [ { "schemaId": "a4caeb4e-81ce-4921-a8d3-1f58329acfc5", "entityId": "Product-001", "locale": "en-us", "fields": { "title": { "id": "title", "textValue": "This is the title in English.", "updatedBy": "USER", "published": false } } }, { "schemaId": "a4caeb4e-81ce-4921-a8d3-1f58329acfc5", "entityId": "Product-001", "locale": "fr-fr", "fields": { "title": { "id": "title", "textValue": "This is the title in French.", "updatedBy": "USER", "published": false } } } ], "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": "This is the title in English.", "fields": { "title": { "id": "title", "textValue": "This is the 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", "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?