Update a string
PUThttps://app.shuttleglobal.com/c/api/instances/{instance_key}/strings/{string_id}
Replaces the wording of one string for one language.
- The fields go inside a
stringobject. The string is identified by the id in the URL. languageandbrandingare read from the body, not the query string. Leaving outlanguagewrites thedefault(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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The string’s id, e.g. web.payment_form.card_number.
Request Bodyrequired
Section titled “Request Bodyrequired”object
object
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
{ "string": { "text": "رقم البطاقة", "language": "ar" }}Responses
Section titled “Responses”The string as it now reads
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.