The Translation Content API allows you to access and manage a site's translation content based on the defined translation schema.
With the Translation Content API, your app can:
This API is based on Wix Multilingual.
To begin, you need to add the base content for translation in the site's primary language. This content aligns with the schema you’ve already defined and serves as the foundation for future translations.
Depending on your app, this content can either be user-generated or default content provided by your app:
Once the original content is added, it can be translated and stored in the following ways:
It's important to note the following points before starting to code:
"type": "VIDEO"
, you can't set the create content value for that field to an "IMAGE"
. If you add invalid content you'll get a validation error.SchemaField
, ensuring it follows the schema’s validation rules.ContentField
(Map<string, ContentField>
). The string serves as a key, which you'll need to access each field in the content and when referencing a translation schema.UNPUBLISHED
: None of the fields have been marked as ready to publish.PUBLISHED
: All of the fields have been marked as ready to publish.PARTIALLY_PUBLISHED
: Some of the fields have been marked as ready to publish.This article presents possible use cases and corresponding sample flows that your app can support. It provides a useful starting point as you plan your app's implementation.
If you're developing a delivery service app, the Wix user may want to translate content from the primary language (English) into a secondary language (French). They have two schemas, one for restaurant delivery and one for catering delivery. The content they want to translate includes delivery instructions, special notes for couriers, and customer communications. Follow the flow below to get started:
Prepare the content for translation
Use the Create Schema method to create schemas for both restaurant and catering delivery. In each schema, define all the fields that will require translation.
Collect the original user-generated content
Prompt the Wix user to provide the original content in the site's primary language (English) for each schema. Call the Bulk Create Content method to save this collected content. This content will serve as the baseline for future translations.
Example request:
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": "Delivery-Instruction-001",
"locale": "en-us",
"fields": {
"instructions": {
"textValue": "Leave the package at the front door.",
"updatedBy": "USER",
"published": false,
},
"special_notes": {
"textValue": "Please ring the doorbell.",
"updatedBy": "USER",
"published": false,
}
}
},
{
"schemaId": "a4caeb4e-81ce-4921-a8d3-1f58329acfc5",
"entityId": "Delivery-Instruction-002",
"locale": "en-us",
"fields": {
"instructions": {
"textValue": "For a package heavier then 20kg, please call in advance.",
"updatedBy": "USER",
"published": false,
}
}
}
],
"returnEntity": true
}'
Translate the content to French
The Wix user can translate the content manually or using their preferred translation service. Once translated, they can add the French content through the Translation Manager. The Translation Manager automatically calls the API to store the translations and mark them as ready to publish.
Update as needed
If there are updates to the primary or secondary locale content, repeat the process to keep all content up-to-date. Call Query Contents to check for existing content, and either Bulk Update Content or Bulk Create Content to add or update the translation content.
Let's say you're developing an app that provides original default FAQ content in English for Wix users. The Wix user may prefer to update this default content with their own original content.
Your app provides English FAQs as boilerplate content. Call the Create Content method to store this default content.
Prompt the Wix user to replace the default content in the Translation Manager with their own custom content.
Listen for the Content Updated event to make sure the Wix user has entered their custom content.
Call the Update Content method to replace the default FAQ content in your app with the Wix user's content.
This article covers field support for filtering, sorting, and searching in the Translation Content API.
The following table shows field support for filters and sorting for the translation content object when using Query Contents:
Field | Supported Filters | Sortable |
---|---|---|
id | eq , ne , exists , in , hasSome , startsWith , ascending , descending | Sortable |
schemaId | eq , ne , exists , in , hasSome , startsWith , ascending , descending | Sortable |
entityId | eq , ne , exists , in , hasSome , startsWith , ascending , descending | Sortable |
locale | eq , ne , exists , in , hasSome , startsWith , ascending , descending | Sortable |
parentEntityId | eq , ne , exists , in , hasSome , startsWith , ascending , descending | Sortable |
publishStatus | eq , ne , exists , in , hasSome , startsWith , ascending , descending | Sortable |
The following table shows field support for filters, sorting, and free-text searching for the translation content object when using Search Contents:
Field | Supported Filters | Sortable | Searchable |
---|---|---|---|
id | eq , ne , exists , in , hasSome , startsWith , ascending , descending | Sortable | |
entityId | eq , ne , exists , in , hasSome , startsWith , ascending , descending | Sortable | |
schemaId | eq , ne , exists , in , hasSome , startsWith , ascending , descending | Sortable | |
locale | eq , ne , exists , in , hasSome , startsWith , ascending , descending | Sortable | |
parentEntityId | eq , ne , exists , in , hasSome , startsWith , ascending , descending | Sortable | |
publishStatus | eq , ne , exists , in , hasSome , startsWith , ascending , descending | Sortable | |
previewField | eq , ne , exists , in , hasSome , startsWith , ascending , descending | Sortable | Searchable |
fields.textValue | Sortable | Searchable | |
fields.richContent | Sortable | Searchable |
This table outlines errors that might be issued when calling the Translation Content API. The list includes error codes, and troubleshooting guidance to help you resolve these issues.
HTTP STATUS | ERROR NAME | RULE NAME | DESCRIPTION & TROUBLESHOOTING |
---|---|---|---|
BAD_REQUEST (400) | WixValidationRuntimeException | ContentSizeValidationRule | The content size exceeds 1MB (1,048,576 bytes). Reduce its size by removing unnecessary data. |
BAD_REQUEST (400) | WixValidationRuntimeException | SchemaFieldsExistValidationRule | Field ID not found in the schema. Ensure all content fields match the schema. Remove or rename unmatched fields, or update the schema to include them. |
BAD_REQUEST (400) | WixValidationRuntimeException | FieldTypeValidationRule | Field type doesn't match the schema. Update the content field type to align with the schema. |
BAD_REQUEST (400) | WixValidationRuntimeException | RepeaterIdSpecifiedValidationRule | Invalid repeater field ID. Ensure repeater field IDs are correctly specified and follow the required format. |
BAD_REQUEST (400) | WixValidationRuntimeException | MaxLengthValidationRule | Text exceeds the maximum length. Shorten the text to fit within the specified limit. |
BAD_REQUEST (400) | WixValidationRuntimeException | MinLengthValidationRule | Text is shorter than the minimum length. Extend or pad the text to meet the required length. |
BAD_REQUEST (400) | WixValidationRuntimeException | FieldFormatValidationRule | Invalid field value format. Update the field value to match the required format. |
BAD_REQUEST (400) | WixValidationRuntimeException | SchemaExistsValidationRule | Schema not found. Ensure the schema ID is correct and valid. |
BAD_REQUEST (400) | InvalidArgumentException | Missing revision value when calling the Update method. Specify a value for the revision property when updating the entity. | |
NOT_FOUND (404) | EntityNotFound | Content not found. Verify that the ID used in the Get Content method exists in the system. |
If you encounter any of these errors:
Translation content ID.
Translation schema ID.
A unique identifier defined by the app developer to differentiate translation content for various entities within the site. For example, if an app developer is creating translation content for blog posts, the entityId
can be 'blog-posts-1'
.
Translation content locale.
List of fields for the translation content. This property uses a string to map to a ContentField
(Map<string, ContentField>
). The string serves as a key, which you'll need to access each field in the content and when referencing a translation schema.
A reference to the parent content. For example, if the content is a menu item, this property would contain the entityId
of the menu it belongs to.
The aggregated published status across all content fields.
Contains the value of the preview field if the schema defines one.
Date and time the translation content was created.
Date and time the translation content was updated.
{
"content": {
"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
},
"description": {
"id": "description",
"richContent": {
"nodes": [
{
"type": "PARAGRAPH",
"id": "qk4dj27",
"nodes": [
{
"type": "TEXT",
"text_data": {
"text": "This is the description in English."
}
}
]
}
],
"metadata": {
"version": 1,
"created_timestamp": "2019-10-30T17:22:10.299Z",
"updated_timestamp": "2019-10-30T17:22:10.299Z",
"id": "ee5c8167-31a2-4bdd-8f29-f376d1a36d11"
}
},
"updatedBy": "USER",
"published": false,
"schemaFieldKey": "description",
"index": 2
},
"image(01)": {
"id": "image(01)",
"image": {
"id": "7575-4098-a5ab-c91ad8f33c-8888bba",
"url": "my-image-url.jpg",
"height": 1920,
"width": 1920
},
"updatedBy": "USER",
"published": false,
"schemaFieldKey": "image()",
"index": 3
},
"image(02)": {
"id": "image(02)",
"image": {
"id": "2295575-4098-a5ab-c91ad8f33c-32249",
"url": "my-other-image-url.jpg",
"height": 1920,
"width": 1920
},
"updatedBy": "USER",
"published": false,
"schemaFieldKey": "image()",
"index": 4
}
}
}
}
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Creates a translation content item.
The content is validated based on the constraints defined in the corresponding schema.
You can only call this method when authenticated as a Wix app or Wix user identity.
Translation content to create.
Newly created translation content.
curl -X POST \
'https://www.wixapis.com/translation-content/v1/contents' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
--data-binary '{
"content": {
"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
},
"description": {
"id": "description",
"richContent": {
"nodes": [
{
"type": "PARAGRAPH",
"id": "qk4dj27",
"nodes": [
{
"type": "TEXT",
"text_data": {
"text": "This is the description in English."
}
}
]
}
],
"metadata": {
"version": 1,
"created_timestamp": "2019-10-30T17:22:10.299Z",
"updated_timestamp": "2019-10-30T17:22:10.299Z",
"id": "ee5c8167-31a2-4bdd-8f29-f376d1a36d11"
}
},
"updatedBy": "USER",
"published": false
},
"image(01)": {
"id": "image(01)",
"image": {
"id": "7575-4098-a5ab-c91ad8f33c-8888bba",
"url": "some-image-url.jpg",
"height": 1920,
"width": 1920
},
"updatedBy": "USER",
"published": false
},
"image(02)": {
"id": "image(02)",
"image": {
"id": "2295575-4098-a5ab-c91ad8f33c-32249",
"url": "other-image-url.jpg",
"height": 1920,
"width": 1920
},
"updatedBy": "USER",
"published": false
}
}
}
}'
{
"content": {
"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
},
"description": {
"id": "description",
"richContent": {
"nodes": [
{
"type": "PARAGRAPH",
"id": "qk4dj27",
"nodes": [
{
"type": "TEXT",
"text_data": {
"text": "This is the description in English."
}
}
]
}
],
"metadata": {
"version": 1,
"created_timestamp": "2019-10-30T17:22:10.299Z",
"updated_timestamp": "2019-10-30T17:22:10.299Z",
"id": "ee5c8167-31a2-4bdd-8f29-f376d1a36d11"
}
},
"updatedBy": "USER",
"published": false,
"schemaFieldKey": "description",
"index": 2
},
"image(01)": {
"id": "image(01)",
"image": {
"id": "7575-4098-a5ab-c91ad8f33c-8888bba",
"url": "some-image-url.jpg",
"height": 1920,
"width": 1920
},
"updatedBy": "USER",
"published": false,
"schemaFieldKey": "image()",
"index": 3
},
"image(02)": {
"id": "image(02)",
"image": {
"id": "2295575-4098-a5ab-c91ad8f33c-32249",
"url": "other-image-url.jpg",
"height": 1920,
"width": 1920
},
"updatedBy": "USER",
"published": false,
"schemaFieldKey": "image()",
"index": 4
}
}
}
}
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Retrieves a translation content item.
You can only call this method when authenticated as a Wix app or Wix user identity.
ID of the translation content to retrieve.
The requested translation content.
curl -X GET \
'https://www.wixapis.com/translation-content/v1/contents/8046df3c-7575-4098-a5ab-c91ad8f33c47' \
-H 'Authorization: <AUTH>'
{
"content": {
"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
},
"description": {
"id": "description",
"richContent": {
"nodes": [
{
"type": "PARAGRAPH",
"id": "qk4dj27",
"nodes": [
{
"type": "TEXT",
"text_data": {
"text": "This is the description in English."
}
}
]
}
],
"metadata": {
"version": 1,
"created_timestamp": "2019-10-30T17:22:10.299Z",
"updated_timestamp": "2019-10-30T17:22:10.299Z",
"id": "ee5c8167-31a2-4bdd-8f29-f376d1a36d11"
}
},
"updatedBy": "USER",
"published": false,
"schemaFieldKey": "description",
"index": 2
},
"image(01)": {
"id": "image(01)",
"image": {
"id": "8ac220f5-ffef-413c-854f-35c9ad0b1703",
"url": "some-image-url.jpg",
"height": 1920,
"width": 1920
},
"updatedBy": "USER",
"published": false,
"schemaFieldKey": "image()",
"index": 3
},
"image(02)": {
"id": "image(02)",
"image": {
"id": "44ac920f5-ffef-413c-854f-35c9ad0c1997",
"url": "other-image-url.jpg",
"height": 1920,
"width": 1920
},
"updatedBy": "USER",
"published": false,
"schemaFieldKey": "image()",
"index": 4
}
}
}
}
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Deletes a translation content item.
You can only call this method when authenticated as a Wix app or Wix user identity.
ID of the translation content to delete.
curl -X DELETE \
'https://www.wixapis.com/translation-content/v1/contents/8046df3c-7575-4098-a5ab-c91ad8f33c47' \
-H 'Authorization: <AUTH>'
{}
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Updates a translation content item by ID.
To remove a field, pass the field key with an empty object as the value. For example:
{
"fields": {
"title": {}
}
}
You can only call this method when authenticated as a Wix app or Wix user identity.
Translation content ID.
Translation content to update.
Updated translation content.
curl -X PATCH \
'https://www.wixapis.com/translation-content/v1/contents/8046df3c-7575-4098-a5ab-c91ad8f33c47' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
--data-binary '{
"content": {
"schemaId": "a4caeb4e-81ce-4921-a8d3-1f58329acfc5",
"parentEntityId": "NewParentEntity-01"
}
}'
{
"content": {
"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",
"parentEntityId": "NewParentEntity-01",
"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
},
"description": {
"id": "description",
"richContent": {
"nodes": [
{
"type": "PARAGRAPH",
"id": "qk4dj27",
"nodes": [
{
"type": "TEXT",
"text_data": {
"text": "This is the description in English."
}
}
]
}
],
"metadata": {
"version": 1,
"created_timestamp": "2019-10-30T17:22:10.299Z",
"updated_timestamp": "2019-10-30T17:22:10.299Z",
"id": "ee5c8167-31a2-4bdd-8f29-f376d1a36d11"
}
},
"updatedBy": "USER",
"published": false,
"schemaFieldKey": "description",
"index": 2
},
"image(01)": {
"id": "image(01)",
"image": {
"id": "2ac220f5-ffef-413c-854f-35c9ad0b1703",
"url": "some-image-url.jpg",
"height": 1920,
"width": 1920
},
"updatedBy": "USER",
"published": false,
"schemaFieldKey": "image()",
"index": 3
},
"image(02)": {
"id": "image(02)",
"image": {
"id": "5bc220f5-ffef-413c-854f-35c9ad0a1492",
"url": "other-image-url.jpg",
"height": 1920,
"width": 1920
},
"updatedBy": "USER",
"published": false,
"schemaFieldKey": "image()",
"index": 4
}
}
}
}
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Updates a translation content item using a unique key, which is a combination of content.schemaId
, content.entityId
, and content.locale
.
To remove a field, pass the field key with an empty object as the value. For example:
{
"fields": {
"title": {}
}
}
You can only call this method when authenticated as a Wix app or Wix user identity.
Content to update.
Updated Content.
curl -X PATCH \
'https://www.wixapis.com/translation-content/v1/contents/by-key' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
--data-binary '{
"content": {
"schemaId": "a4caeb4e-81ce-4921-a8d3-1f58329acfc5",
"entityId": "Product-001",
"locale": "en-us",
"parentEntityId": "NewParentEntity-01"
}
}'
{
"content": {
"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",
"parentEntityId": "NewParentEntity-01",
"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
},
"description": {
"id": "description",
"richContent": {
"nodes": [
{
"type": "PARAGRAPH",
"id": "qk4dj27",
"nodes": [
{
"type": "TEXT",
"text_data": {
"text": "This is the description in English."
}
}
]
}
],
"metadata": {
"version": 1,
"created_timestamp": "2019-10-30T17:22:10.299Z",
"updated_timestamp": "2019-10-30T17:22:10.299Z",
"id": "ee5c8167-31a2-4bdd-8f29-f376d1a36d11"
}
},
"updatedBy": "USER",
"published": false,
"schemaFieldKey": "description",
"index": 2
},
"image(01)": {
"id": "image(01)",
"image": {
"id": "7575-4098-a5ab-c91ad8f33c-8888bba",
"url": "some-image-url.jpg",
"height": 1920,
"width": 1920
},
"updatedBy": "USER",
"published": false,
"schemaFieldKey": "image()",
"index": 3
},
"image(02)": {
"id": "image(02)",
"image": {
"id": "2295575-4098-a5ab-c91ad8f33c-32249",
"url": "other-image-url.jpg",
"height": 1920,
"width": 1920
},
"updatedBy": "USER",
"published": false,
"schemaFieldKey": "image()",
"index": 4
}
}
}
}
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Retrieves a list of translation content items given the provided paging, filtering, and sorting. Up to 100 translation content items can be returned per request.
The default sort
is id
in ASC
.
For field support for filters and sorting, see Translation Content: Supported Filters, Sorting, and Search.
To learn how to query translation consent items, see API Query Language.
You can only call this method when authenticated as a Wix app or Wix user identity.
Query options.
List of translation content.
Details on the paged set of results returned.
curl -X POST \
'https://www.wixapis.com/translation-content/v1/contents/query' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
--data-binary '{
"query": {
"filter": {
"schemaId": "a4caeb4e-81ce-4921-a8d3-1f58329acfc5"
}
}
}'
{
"contents": [
{
"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
},
"description": {
"id": "description",
"richContent": {
"nodes": [
{
"type": "PARAGRAPH",
"id": "qk4dj27",
"nodes": [
{
"type": "TEXT",
"text_data": {
"text": "This is the description in English."
}
}
]
}
],
"metadata": {
"version": 1,
"created_timestamp": "2019-10-30T17:22:10.299Z",
"updated_timestamp": "2019-10-30T17:22:10.299Z",
"id": "ee5c8167-31a2-4bdd-8f29-f376d1a36d11"
}
},
"updatedBy": "USER",
"published": false,
"schemaFieldKey": "description",
"index": 2
},
"image(01)": {
"id": "image(01)",
"image": {
"id": "2ac220f5-ffef-413c-854f-35c9ad0b1703",
"url": "some-image-url.jpg",
"height": 1920,
"width": 1920
},
"updatedBy": "USER",
"published": false,
"schemaFieldKey": "image()",
"index": 3
},
"image(02)": {
"id": "image(02)",
"image": {
"id": "5bc220f5-ffef-413c-854f-35c9ad0a1492",
"url": "other-image-url.jpg",
"height": 1920,
"width": 1920
},
"updatedBy": "USER",
"published": false,
"schemaFieldKey": "image()",
"index": 4
}
}
}
],
"pagingMetadata": {
"count": 1,
"has_next": false
}
}
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Retrieves a list of all translation content associated with a site that matches the search query, with optional data aggregation.
Note that this method allows you to retrieve all translation content for a site, regardless of which app created it.
Use this method to search translation content fields on a site for a given expression, and/or to perform data aggregations on a site's translation content fields.
For field support for filters, sorting, and free-text searching see Translation Content: Supported Filters, Sorting, and Search.
To learn more about working with the search query, see API Query Language and Sorting and Paging.
You can only call this method when authenticated as a Wix app or Wix user identity.
Search query and aggregation information.
List of translation content.
Details on the paged set of results returned.
Aggregation data.
curl -X POST \
'https://www.wixapis.com/translation-content/v1/contents/search' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
--data-binary '{
"search": {
"search": {
"fields": [
"fields.textValue"
],
"expression": "title"
}
}
}'
{
"contents": [
{
"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
},
"description": {
"id": "description",
"richContent": {
"nodes": [
{
"type": "PARAGRAPH",
"id": "qk4dj27",
"nodes": [
{
"type": "TEXT",
"text_data": {
"text": "This is the description in English."
}
}
]
}
],
"metadata": {
"version": 1,
"created_timestamp": "2019-10-30T17:22:10.299Z",
"updated_timestamp": "2019-10-30T17:22:10.299Z",
"id": "ee5c8167-31a2-4bdd-8f29-f376d1a36d11"
}
},
"updatedBy": "USER",
"published": false,
"schemaFieldKey": "description",
"index": 2
},
"image(01)": {
"id": "image(01)",
"image": {
"id": "2ac220f5-ffef-413c-854f-35c9ad0b1703",
"url": "some-image-url.jpg",
"height": 1920,
"width": 1920
},
"updatedBy": "USER",
"published": false,
"schemaFieldKey": "image()",
"index": 3
},
"image(02)": {
"id": "image(02)",
"image": {
"id": "5bc220f5-ffef-413c-854f-35c9ad0a1492",
"url": "other-image-url.jpg",
"height": 1920,
"width": 1920
},
"updatedBy": "USER",
"published": false,
"schemaFieldKey": "image()",
"index": 4
}
}
}
],
"pagingMetadata": {
"count": 1,
"has_next": false
}
}
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.
You can only call this method when authenticated as a Wix app or Wix user identity.
List of translation content.
Whether to include the created translation content items in the response. Set to true
to receive the translation content items in the response.
Items created by bulk action.
Bulk action metadata.
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
}'
{
"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
}
}
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 by ID.
To remove a field, pass the field key with an empty object as the value. For example:
{
"fields": {
"title": {}
}
}
You can only call this method when authenticated as a Wix app or Wix user identity.
Translation content items to update.
Whether to include the updated translation content items in the response. Set to true
to receive the translation content items in the response.
Items created by bulk action.
Bulk action metadata.
curl -X POST \
'https://www.wixapis.com/translation-content/v1/bulk/contents/update' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
--data-binary '{
"contents": [
{
"content": {
"id": "8046df3c-7575-4098-a5ab-c91ad8f33c47",
"schemaId": "a4caeb4e-81ce-4921-a8d3-1f58329acfc5",
"fields": {
"title": {
"textValue": "New title in English."
}
}
}
},
{
"content": {
"id": "2ac220f5-ffef-413c-854f-35c9ad0b1703",
"schemaId": "a4caeb4e-81ce-4921-a8d3-1f58329acfc5",
"parentEntityId": "MyParentEntity-01"
}
}
],
"returnEntity": true
}'
{
"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
}
}
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:
{
"fields": {
"title": {}
}
}
You can only call this method when authenticated as a Wix app or Wix user identity.
Translation content items to update.
Whether to include the created translation content items in the response. Set to true
to receive the translation content items in the response.
Items created by bulk action.
Bulk action metadata.
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
}'
{
"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
}
}
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Deletes multiple translation content items.
You can only call this method when authenticated as a Wix app or Wix user identity.
IDs of the translation content items to delete.
Items created by bulk action.
Bulk action metadata.
curl -X POST \
'https://www.wixapis.com/translation-content/v1/bulk/contents/delete' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
--data-binary '{
"contentIds": [
"3fe09f99-c64d-4205-a9a3-9a112550f4de",
"b0da7456-a7b0-4967-be36-d31e32ccec73",
"f93c2237-b749-43d0-a043-972e8c738d02",
"39636d44-ff62-4de4-8068-43efb2561bbf",
"b27f10ac-b451-4fde-ae88-76b91bca69a0"
]
}'
{
"results": [
{
"itemMetadata": {
"id": "3fe09f99-c64d-4205-a9a3-9a112550f4de",
"originalIndex": 0,
"success": true
},
{
"itemMetadata": {
"id": "b0da7456-a7b0-4967-be36-d31e32ccec73",
"originalIndex": 1,
"success": true
},
"itemMetadata": {
"id": "f93c2237-b749-43d0-a043-972e8c738d02",
"originalIndex": 2,
"success": true
},
{
"itemMetadata": {
"id": "39636d44-ff62-4de4-8068-43efb2561bbf",
"originalIndex": 3,
"success": true
},
"itemMetadata": {
"id": "b27f10ac-b451-4fde-ae88-76b91bca69a0",
"originalIndex": 4,
"success": true
},
],
"bulkActionMetadata": {
"totalSuccesses": 5,
"totalFailures": 0,
"undetailedFailures": 0
}
}
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Triggered when translation content is created.
Unique event ID. Allows clients to ignore duplicate webhooks.
Fully qualified domain name of the entity associated with the event. Expected wix.multilingual.translation.v1.content
.
Event name. Expected created
.
ID of the entity associated with the event.
Event timestamp.
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).
If present, indicates the action that triggered the event.
Event information.
The data payload will include the following as an encoded JWT:
{
"data": {
"eventType": "wix.multilingual.translation.v1.content_created",
"instanceId": "<app-instance-id>",
"data": "<stringified-JSON>",
// The identity field is sent as a stringified JSON
"identity": {
"identityType": "<identityType>", // ANONYMOUS_VISITOR, MEMBER, WIX_USER, APP
"anonymousVisitorId": "<anonymousVisitorId>", // in case of ANONYMOUS_VISITOR
"memberId": "<memberId>", // in case of MEMBER
"wixUserId": "<wixUserId>", // in case of WIX_USER
"appId": "<appId>" // in case of APP
}
}
}
{
"id": "52269077-05f2-4b59-ba4f-36ef8c4c1e11",
"entityFqdn": "wix.multilingual.translation.content.v1.content",
"slug": "created",
"entityId": "8046df3c-7575-4098-a5ab-c91ad8f33c47",
"createdEvent": {
"entityAsJson": "{\"content\": {\"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 }, \"description\": {\"id\": \"description\", \"rich_content\": {\"nodes\": [ {\"type\": \"PARAGRAPH\", \"id\": \"qk4dj27\", \"nodes\": [ {\"type\": \"TEXT\", \"text_data\": {\"text\": \"this is the description in english.\",}}]}], \"metadata\": {\"version\": 1, \"created_timestamp\": \"2019-10-30T17:22:10.299Z\", \"updated_timestamp\": \"2019-10-30T17:22:10.299Z\", \"id\": \"ee5c8167-31a2-4bdd-8f29-f376d1a36d11\" }}, \"updatedBy\": \"USER\", \"published\": false, \"schemaFieldKey\": \"description\", \"index\": 2 }, \"image(01)\": {\"id\": \"image(01)\", \"image\": {\"id\": \"some-image-id\", \"url\": \"some-image-url.jpg\", \"height\": 1920, \"width\": 1920 }, \"updatedBy\": \"USER\", \"published\": false, \"schemaFieldKey\": \"image()\", \"index\": 3 }, \"image(02)\": {\"id\": \"image(02)\", \"image\": {\"id\": \"other-image-id\", \"url\": \"other-image-url.jpg\", \"height\": 1920, \"width\": 1920 }, \"updatedBy\": \"USER\", \"published\": false, \"schemaFieldKey\": \"image()\", \"index\": 4 }}}}"
},
"eventTime": "2020-10-18T13:40:58.304800Z",
"triggeredByAnonymizeRequest": false
}
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Triggered when translation content is deleted.
Unique event ID. Allows clients to ignore duplicate webhooks.
Fully qualified domain name of the entity associated with the event. Expected wix.multilingual.translation.v1.content
.
Event name. Expected deleted
.
ID of the entity associated with the event.
Event timestamp.
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).
If present, indicates the action that triggered the event.
Event information.
The data payload will include the following as an encoded JWT:
{
"data": {
"eventType": "wix.multilingual.translation.v1.content_deleted",
"instanceId": "<app-instance-id>",
"data": "<stringified-JSON>",
// The identity field is sent as a stringified JSON
"identity": {
"identityType": "<identityType>", // ANONYMOUS_VISITOR, MEMBER, WIX_USER, APP
"anonymousVisitorId": "<anonymousVisitorId>", // in case of ANONYMOUS_VISITOR
"memberId": "<memberId>", // in case of MEMBER
"wixUserId": "<wixUserId>", // in case of WIX_USER
"appId": "<appId>" // in case of APP
}
}
}
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Triggered when translation content is updated.
Unique event ID. Allows clients to ignore duplicate webhooks.
Fully qualified domain name of the entity associated with the event. Expected wix.multilingual.translation.v1.content
.
Event name. Expected updated
.
ID of the entity associated with the event.
Event timestamp.
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).
If present, indicates the action that triggered the event.
Event information.
The data payload will include the following as an encoded JWT:
{
"data": {
"eventType": "wix.multilingual.translation.v1.content_updated",
"instanceId": "<app-instance-id>",
"data": "<stringified-JSON>",
// The identity field is sent as a stringified JSON
"identity": {
"identityType": "<identityType>", // ANONYMOUS_VISITOR, MEMBER, WIX_USER, APP
"anonymousVisitorId": "<anonymousVisitorId>", // in case of ANONYMOUS_VISITOR
"memberId": "<memberId>", // in case of MEMBER
"wixUserId": "<wixUserId>", // in case of WIX_USER
"appId": "<appId>" // in case of APP
}
}
}