List a version's languages
/v1/whatsapp/templates/{template_ref}/versions/{version_id}/languagesconst { data } = await bird.whatsapp.templates.versions.languages.list(
"bird_otp",
"wav_01ky4x8e4genzb7way45txfkm1",
);
for (const language of data) console.log(language.language, language.status);languages = client.whatsapp.templates.versions.languages.list(
"bird_otp", "wav_01ky4x8e4genzb7way45txfkm1"
)
for language in languages.data:
print(language.language, language.status)languages, err := client.Whatsapp.Templates.Versions.Languages.List(context.Background(), "bird_otp", "wav_01ky4x8e4genzb7way45txfkm1")
if err != nil {
log.Fatal(err)
}
for _, l := range languages.Data {
fmt.Println(l.Language, l.Revision)
}$languages = $bird->whatsapp->templates->versions->languages->list('bird_otp', 'wav_01ky4x8e4genzb7way45txfkm1');
foreach ($languages->getData() ?? [] as $language) {
echo $language->getLanguage(), ' ', $language->getStatus(), "\n";
}bird whatsapp templates versions languages list <template-ref> <version-id>curl -X GET "https://us1.platform.bird.com/v1/whatsapp/templates/{template_ref}/versions/{version_id}/languages" \
-H "Authorization: Bearer $TOKEN"{
"data": [
{
"language": "pt-BR",
"status": "approved",
"revision": 4,
"content_hash": "sha256:9f2c4e1a7b03d85fbc6e29d417a05e8c3b1d9f76a2e4c018d53b7f9a6c2e18d4",
"next": [
{
"kind": "operation"
}
]
}
]
}
Returns every language a version holds, without content: each language's tag, what this version's submission did with it, its write counter, and a hash over its content. Compare the hashes to tell which languages actually differ before fetching any content. Fetch a single language for its content blocks.
Paramètres
template_refstringTemplate ID (wat_ prefix) or slug. A value that parses as a valid ID resolves by ID; any other value resolves as a slug.
version_idstringID of the template version (wav_ prefix), as returned by the version list.
Contenu de la réponse
dataEvery language this version holds, without content.
Afficher les attributs enfants
data.languageThe canonical tag this language is addressed by.
data.statusWhat this version's submission did with this language. Absent on a draft.
Possible values (may grow over time): approved, pending, rejected, paused, disabled, in_appeal, pending_deletion, limit_exceeded, archived, deleted, submit_failed, outcome_unknown
data.revisionThis language's write counter, incremented every time its content changes.
data.content_hashA hash over the serialized components this API surfaces, for telling whether a language differs without fetching it. It is comparable only within one version of this API: adding a field to the component shape changes every hash without the underlying content changing.
data.nextWhat to do next about this language, given the verdict it carries. Present on reads that compute it: an empty list means there is nothing to do, and the field is absent entirely on responses that do not report next actions.
Approval is per language, so this is where a rejection, a pause, or a reclaimed language is answered. The template's own next actions cannot say, because they read the aggregate.
Ressources associées
Poursuivez avec la documentation, les guides et les exemples sur ce sujet.