Get published email template parameters
/v1/email/templates/{template_ref}/parametersconst discovery = await bird.email.templates.parameters(
"emt_01krdgeqcxet5s7t44vh8rt9mg",
);
console.log(discovery.parameters, discovery.variables);discovery = client.email.templates.parameters("emt_01krdgeqcxet5s7t44vh8rt9mg")
print(discovery.parameters, discovery.variables)discovery, err := client.Email.Templates.Parameters(context.Background(), "emt_01krdgeqcxet5s7t44vh8rt9mg", bird.EmailTemplatesParametersParams{})
if err != nil {
log.Fatal(err)
}
fmt.Println(discovery.Parameters, discovery.Variables)$discovery = $bird->email->templates->parameters('emt_01krdgeqcxet5s7t44vh8rt9mg');
echo json_encode($discovery->getParameters()), json_encode($discovery->getVariables());bird email templates parameters <template-ref>curl -X GET "https://us1.platform.bird.com/v1/email/templates/{template_ref}/parameters" \
-H "Authorization: Bearer $TOKEN"{
"template_id": "emt_01krdgeqcxet5s7t44vh8rt9mg",
"observed_version_id": "emv_01krdgeqcxet5s7t44vh8rt9mg",
"requested_language": "pt-BR",
"effective_language": "pt-BR",
"parameters": [
{
"name": "offer",
"type": "text",
"value_domain": "scalar",
"use_constraints": [
{
"kind": "value",
"site": "html"
}
]
}
],
"variables": [
{
"path": "bird.contact.first_name",
"source": "contact",
"use_constraints": [
{
"kind": "value",
"site": "html"
}
]
}
]
}
Get the parameters and variables used by the template's published content in one language. The result describes the template and holds no saved values. Parameters are the names a broadcast supplies in template.parameters, and variables are the bird. references Bird fills in. The result identifies list values, which broadcast parameters cannot supply. It also includes a fingerprint that identifies the published content without exposing contact values. You cannot select an older template version. Requires email_marketing read permission in addition to email_management read. Parameter sites cover template subject, HTML and text; envelope overrides are checked by broadcast validation.
Parameter
template_refstringWorkspace template ID, workspace template slug, or built-in template slug.
Parameter Kueri
languagestringLanguage of the template's published content. Omission uses the template's default language.
Payload Respons
template_idThe template that was read.
observed_version_idThe published template version that was read.
requested_languageThe language requested with language. Absent when none was requested and the published version's default language is used.
effective_languageThe language whose content was read.
requirements_fingerprintAn opaque value that changes when this content or the parameters and variables it uses change, including for built-in templates whose version ID stays the same. Compare it with an earlier value to tell whether they are still the same. Do not parse it.
parametersThe parameters the broadcast supplies, sorted by name.
Tampilkan atribut turunan
parameters.nameThe parameter name to use as a key in template.parameters.
parameters.typeThe value type the template declares for a parameter. A broadcast can still supply any scalar value; see value_domain.
text: any value. A parameter the template uses without declaring it is reported as a requiredtextparameter.code: 4 to 8 digits.ttl: a whole number from 1 to 999.count: a whole number from 1 to 999.ref: up to 16 uppercase letters, digits or hyphens.date: an ISO 8601 date (YYYY-MM-DD).date_time: an ISO 8601 date and time, with an optional offset.amount: a decimal amount in major units, with up to 4 decimal places.currency: an ISO 4217 currency code of 3 uppercase letters.
Possible values (may grow over time): text, code, ttl, count, ref, date, date_time, amount, currency
parameters.value_domainThe shape of value a broadcast may supply for a parameter, independent of the declared type.
scalar: a string, number, boolean or null, used as given.
Possible values (may grow over time): scalar
parameters.requiredWhether the template declares the parameter required.
parameters.sensitiveWhether the template marks the parameter sensitive. A broadcast cannot supply a sensitive parameter that its content uses.
parameters.use_constraintsEach place the content uses the parameter.
variablesThe bird. variables Bird fills in, sorted by path.
Sumber daya terkait
Lanjutkan dengan dokumentasi, panduan, dan contoh untuk topik ini.