Update several strings
POSThttps://app.shuttleglobal.com/c/api/instances/{instance_key}/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(andbranding, 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.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
object
String id, <set>.<key>
The new wording
Lowercase two-letter ISO 639-1 language code, or default. Defaults to default, so send
it when writing a translation
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" } ]}Responses
Section titled “Responses”The updated strings as they now read
object
A customer-facing string and the wording that applies for one language
object
"web.payment_form.card_number"String id, <set>.<key>
"رقم البطاقة"The wording that currently applies
"ar"Language the wording applies to
Enterprise field. The branding the wording applies to
"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
Every error has a code and a message. Some add more fields alongside them, with detail about the error.
object
The error code, for example VALIDATION_ERROR, INVALID, INVALID_REQUEST, UNAUTHORIZED, FORBIDDEN or NOT_FOUND. Program against this, not the message.
What went wrong, in words, for logs and support.
Authentication required
Every error has a code and a message. Some add more fields alongside them, with detail about the error.
object
The error code, for example VALIDATION_ERROR, INVALID, INVALID_REQUEST, UNAUTHORIZED, FORBIDDEN or NOT_FOUND. Program against this, not the message.
What went wrong, in words, for logs and support.
Example
{ "code": "UNAUTHORIZED", "message": "Unauthorised"}Was this page helpful?
What went wrong?
Thanks for telling us.