Propagate changes to one segment
This method propagates translations of a segment to other branches. The way propagation works depends on the custom script configured for your platform by the Wordbee Solutions team. Propagation is usually initiated on demand from the Editor, allowing you to push selected translations to other branches when required.
URL
(POST) /api/apps/wbflex/documents/{id}/branches/propagate/key
PARAMETERS
The URL parameters are:
id | Specify the Flex container ID | string, Mandatory |
The BODY must be a JSON object with these properties:
key | The key of the segment. | string, Mandatory |
branch | The branch of the segment. | string, Mandatory |
locales | Optional list of target locales. If not specified, the system will propagate all translations, otherwise just the locales specified. | string[], Optional |
event | Optional. Specifies the type of propagation:
| string?, Optional |
RESULTS
A typical result is:
{
"filteredSegments": 1,
"changedSegments": 3,
"changedTexts": 6,
"changedTextsByLocale": { "fr": 3, "es": 3 },
"savedSegments": 3
}
The result provides an indication of how many segments were updated by the script.
filteredSegments
: Always 1, since only one segment is processed. If you specify a non-existent key or branch, the value will be 0.changedSegments
: The number of segments that were modified, typically in other branches if a change occurred.changedTexts
: The number of texts (values or metadata) that were affected by changes to the segments.savedSegments
: The number of segments actually saved. This should be identical to changedSegments.