Theme API
Read CallListShopStrings1
List a shop's customer-facing strings with their translations: texts of theme blocks, overridden built-in texts, and texts of tiers, rewards, ways to earn and similar. By default only the strings the shop has configured.
| Kind | Read API call |
|---|---|
| Method | GET or POST |
| URL | https://app.bubblehouse.com/api/v2023061/<shop>/ListShopStrings1 |
| Authentication | Shop TokenStaff Token |
Needs the strings view permission, the translate permission or theme view. Each string has a source: theme for texts of theme blocks, legacy for built-in texts, entity for texts of tiers, rewards, ways to earn and similar.
Configured strings are theme texts with a saved value, built-in texts that are overridden or translated, and every entity text. filter untranslated lists configured strings missing a translation in some language, or in language when given; translated those translated in all of them. all and unconfigured also list theme texts and built-in texts nobody changed.
Change texts and translations with UpdateShopStrings1.
Input
-
matchstring optionalReturn the keys matching this pattern, where
*matches any text:banner.*,*.string,tier.*.hero.image. -
filterstring optionalconfigured(the default) returns what is saved or in use;unconfiguredwhat is not;allboth. String lists also taketranslatedanduntranslated.unconfiguredandallneed the theme view permission. -
languagestring optionalShow translations, and apply the translation filters, for this language only. A translation language from
languages: a locale such asfr-FR, or a venue or market context such asstore:fr-FR. -
cursorstring optionalContinue a list: pass
next_cursorfrom the previous page. -
limitinteger optionalMost items to return. Defaults to 200; at most 2000.
Output
-
revisionstring requiredThe revision of the shop's configuration. Pass it to the matching write call as
expected_revision. -
The matching items in key order.
-
base_languagestring requiredThe locale the strings themselves are in.
-
languagesarray of string requiredThe shop's translation languages and contexts.
-
totalinteger requiredHow many items matched, on all pages.
-
next_cursorstring optionalSet when more items follow; pass it as
cursorto get them.
Usage Examples
Strings still missing French
Request
{
"filter": "untranslated",
"language": "fr-FR",
"limit": 2
}
Response
{
"base_language": "en-US",
"languages": [
"fr-FR"
],
"revision": "1086983a00000003:2:7:3",
"settings": [
{
"block": "hero-banner",
"in_effect": "Welcome",
"is_set": true,
"key": "hero-banner.title.string",
"source": "theme",
"type": "string",
"untranslated": [
"fr-FR"
],
"value": "Welcome"
},
{
"in_effect": "Spring Claims",
"is_set": true,
"key": "promo.1086983a00003001.title",
"read_only_base": true,
"source": "entity",
"type": "string",
"untranslated": [
"fr-FR"
],
"value": "Spring Claims"
}
],
"total": 2
}
Specific Errors
| Status | Error | Reason & Examples |
|---|---|---|
| 400 | bad_data |
An input is invalid. For example: |
| 403 | access_denied |
Your permissions do not allow this call or filter. |
Global Errors
| Status | Error | Reason & Examples |
|---|---|---|
| 401 | invalid_token |
The provided authentication token is invalid or has expired. For example: |