Skip to content
Status

Update a string

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

PUT
/strings/{string_id}

Replaces the wording of one string for one language.

  • The fields go inside a string object. The string is identified by the id in the URL.
  • language and branding are read from the body, not the query string. Leaving out language writes the default (base) wording, not a translation.
  • Sending the wording the string already inherits removes your override instead of storing it, so the string goes back to the inherited wording.
  • Saving the first string in a language adds that language. There is no separate step to add a language.

The change applies to checkouts opened after it is saved. A checkout session that was already created keeps the wording it was created with until it expires.

string_id
required
string

The string’s id, e.g. web.payment_form.card_number.

Media typeapplication/json
object
string
required
object
object
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
{
"string": {
"text": "رقم البطاقة",
"language": "ar"
}
}

The string as it now reads

Media typeapplication/json
object
string
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?