v2
latestOpenAPI 3.0.02026-08-07103189636.5 KBCreate string to context bindings
Link context files with the strings they contain.
The binding tells Smartling to show Translators which context images for which strings.
A basic bindings request should contain an object with a bindings JSON array, with at least one element (binding) featuring contextUid and stringHashcode properties:
{
"bindings": [
{
"contextUid": "25137b65-e075-4341-8362-14b1a3e558f5",
"stringHashcode": "bd603147d945h3ec74d6874422ebe4e0"
}
]
}
For IMAGE context, each binding may have additional coordinates data that specifies a rectangular area where the string is located in the image. If not specified, binding will still be created with coordinates [0,0,0,0]:
{
"bindings": [
{
"contextUid": "25137b65-e075-4341-8362-14b1a3e558f5",
"stringHashcode": "bd603147d945h3ec74d6874422ebe4e0",
"coordinates": {
"top": 50,
"left": 50,
"width": 400,
"height": 400
}
}
]
}
For HTML context, each binding may have the selector element with anchors array, specifying the enclosing the string HTML elements with the corresponding value of the data-sl-anchor attribute. Each anchor value can have up to 20 characters and consist of the following characters: 0-9 (more preferably), A-Z, a-z, .-_. If not specified, binding will still be created with the empty anchors array, effectively making it not anchored to a particular element and thus invisible in CAT Tool:
{
"bindings": [
{
"contextUid": "25137b65-e075-4341-8362-14b1a3e558f5",
"stringHashcode": "bd603147d945h3ec74d6874422ebe4e0",
"selector": {
"anchors": ["11", "22", "aa-33"]
}
}
]
}
For VIDEO context, each binding has the timecode data, specifying the start and end time of the string appearance in the video:
{
"bindings": [
{
"contextUid": "25137b65-e075-4341-8362-14b1a3e558f5",
"stringHashcode": "bd603147d945h3ec74d6874422ebe4e0",
"timecode": {
"startTime": 1203,
"endTime": 1450
}
}
]
}
Path parameters
A unique project identifier. This can be found in the Smartling Dashboard under Account Settings > API.
Request body
Response
OK