Skip to content
Status

Update several strings

POSThttps://app.shuttleglobal.com/c/api/instances/{instance_key}/strings

POST
/strings

Updates the wording of several strings in one request, for one language. Strings not included are left as they are.

  • Every item in one request must use the same language (and branding, if you send it). Send one request per language.
  • Each item is applied as Update a string would apply it: sending the wording the string already inherits removes your override.
  • An id whose set (the part before the first dot) is not recognised rejects the request before anything is written. Only use ids returned by List strings.
  • The update is not atomic. Sets are written one after another, so a failure part-way leaves the earlier sets saved. Re-sending the same request is safe.
  • Send requests one at a time. Writes to a branding are queued, and a write still waiting after 10 seconds is refused (BOLT-7059).
  • The request body must be under 10 MB.
Media typeapplication/json
object
strings
required
Array
object
id
required
string

String id, <set>.<key>

text
required
string

The new wording

language
string

Lowercase two-letter ISO 639-1 language code, or default. Defaults to default, so send it when writing a translation

branding
string

Enterprise field, for accounts with more than one branding. Leave out to use your own branding

Example
{
"strings": [
{
"id": "web.payment_form.card_number",
"text": "رقم البطاقة",
"language": "ar"
},
{
"id": "web.payment_processing.error",
"text": "حدثت مشكلة أثناء معالجة الدفع.",
"language": "ar"
}
]
}

The updated strings as they now read

Media typeapplication/json
object
strings
Array<object>

A customer-facing string and the wording that applies for one language

object
id
string
e.g. "web.payment_form.card_number"

String id, <set>.<key>

text
string
e.g. "رقم البطاقة"

The wording that currently applies

language
string
e.g. "ar"

Language the wording applies to

branding
string

Enterprise field. The branding the wording applies to

overriding
string
e.g. "Card Number"

Present only when the string has its own wording for this language. Holds the wording it would otherwise inherit, which is what it goes back to if reset

Bad request

Media typeapplication/json

Every error has a code and a message. Some add more fields alongside them, with detail about the error.

object
code
string

The error code, for example VALIDATION_ERROR, INVALID, INVALID_REQUEST, UNAUTHORIZED, FORBIDDEN or NOT_FOUND. Program against this, not the message.

message
string

What went wrong, in words, for logs and support.

Authentication required

Media typeapplication/json

Every error has a code and a message. Some add more fields alongside them, with detail about the error.

object
code
string

The error code, for example VALIDATION_ERROR, INVALID, INVALID_REQUEST, UNAUTHORIZED, FORBIDDEN or NOT_FOUND. Program against this, not the message.

message
string

What went wrong, in words, for logs and support.

Example
{
"code": "UNAUTHORIZED",
"message": "Unauthorised"
}

Was this page helpful?