Need help? Call Live Support at +31 (0) 38 453 07 59

Used to update a template for in the brand

  • POSTMethod
  • /v2/customers/customer/brands/brand/templates/name/updateURL
  • application/jsonContent-Type
Name Type Description Restrictions
customer String The handle of the customer
  • Regular expression: [a-zA-Z0-9\-_@\.]+
  • Minimum length: 3
  • Maximum length: 40
brand String The handle of the brand
  • Regular expression: [a-zA-Z0-9\-_@\.]+
  • Minimum length: 3
  • Maximum length: 40
name Enum The name of the template

Possible values:

  • UPDATE_DOMAIN_OLD_REGISTRANT
  • TMCH_CLAIM_ACK_FORM
  • INCOMING_TRANSFER_NEW_REGISTRANT_FORM
  • ERROR_PAGE
  • UPDATE_CONTACT_OLD_REGISTRANT_FORM
  • EMAIL_HEADER
  • TMCH_CLAIM_ACK_AND_VALIDATION_FORM
  • INCOMING_FOA_FORM
  • UPDATE_DOMAIN_NEW_REGISTRANT
  • UPDATE_DOMAIN_TOKEN_FORM
  • ERRP_EXPIRED
  • ERRP_WEEK
  • EMAIL_FOOTER
  • UPDATE_CONTACT_OLD_REGISTRANT
  • INTERNAL_FOA_FORM
  • INTERNAL_TRANSFER_NEW_REGISTRANT_FORM
  • INCOMING_FOA
  • VALIDATE_CONTACT_FORM
  • THANK_YOU_PAGE
  • OUTGOING_TRANSFER_PRIVACY_PROTECT
  • VALIDATE_CONTACT
  • UPDATE_CONTACT_NEW_REGISTRANT
  • PENDING_VALIDATION
  • CONFIRM_BRAND_FORM
  • UPDATE_DOMAIN_NEW_REGISTRANT_FORM
  • INCOMING_TOKEN_FORM
  • UPDATE_CONTACT_NEW_REGISTRANT_FORM
  • WHOIS
  • ERRP_MONTH
  • WEB_HEADER
  • CONFIRM_BRAND
  • INTERNAL_TOKEN_FORM
  • NEW_REGISTRANT_CHANGE_NOTIFICATION
  • OUTGOING_FOA_FORM
  • UPDATE_DOMAIN
  • INTERNAL_FOA
  • OUTGOING_FOA
  • TMCH_CLAIM_ACK
  • INTERNAL_TRANSFER_NEW_REGISTRANT
  • WEB_FOOTER
  • TMCH_CLAIM_ACK_AND_VALIDATION
  • WDRP
  • UPDATE_DOMAIN_OLD_REGISTRANT_FORM
  • OLD_REGISTRANT_CHANGE_NOTIFICATION
  • EXPIRED_PAGE
  • INCOMING_TRANSFER_NEW_REGISTRANT
Name Type Required / Optional Description Restrictions
subject String Optional The subject, in case of a mail template
  • Minimum length: 1
  • Maximum length: 255
text String Optional The plain text template, in case of mail template
html String Optional The HTML template

Successful request

  • 200 OKHTTP Status

Failed requests

Generic errors can be expected.

The handle of the customer
The handle of the brand
The name of the template
The subject, in case of a mail template
The plain text template, in case of mail template
The HTML template

POST /v2/customers/customer/brands/brand/templates/name/update
Content-Type: application/json

{}

The template engine used to render the templates is Velocity, a summery of the most common syntax is listed below, the full documentation can be found in the Velocity user guide.

Please note all variable access and syntax is case sensitive.

Variables

Variables are referenced with a dollar sign ($) followed by the variable name between curly brackets ({}). The use of the curly brackets is optional in most cases, one exception is when the boundary between the variable and the next word is not clear.

When a variable does not exist or does not have a value the tag is not replaced, by adding a exclamation mark (!) after the dollar sign the variable will be silently ignored.

Full notation: ${brand.organization}
Short notation: $brand.organization
Undefined field: $brand.fax
Undefined field, silent: $!brand.fax
Full notation: Organization
Short notation: Organization
Undefined field: $brand.fax
Undefined field, silent:

If / Else statement

The #if directive allows for text to be included, on the conditional that the if statement is true. For example:

#if( $brand.fax )
Fax number: $brand.fax
#else
No fax number available
#end
No fax number available

Foreach Loop

The #foreach element allows for looping over lists. A loop counter is provided in the variable $foreach.count, the counter starts at 1.

#foreach( $addressLine in $brand.addressLines )
Address line $foreach.count: $addressLine
#end
Address line 1: Address

A number of utility tools are available in the template to perform output formatting.

Date Tool

Tool for working with dates in templates. It is useful for accessing and formatting the "current" date as well as for formatting Date and variables.

Full documentation can be found on: http://velocity.apache.org/tools/1.4/javadoc/org/apache/velocity/tools/generic/DateTool.html

Created on: $date.format("long_date", $domain.createdDate)
Created on: January 1, 2000

Escape Tool

Tool for escaping in templates. It provides methods to escape for various outputs.

Full documentation can be found on: http://velocity.apache.org/tools/1.4/javadoc/org/apache/velocity/tools/generic/EscapeTool.html

Escaped organization: $escape.html($brand.organization)
Escaped organization: Org & co

Media Tool

Tool for accessing media files attached to the template, only available in HTML templates. This tool provides access to the path of the media file dependent on the template output method, Web or E-mail.

Two methods are provider:

contains(String)
Checks if a media file is present with the template.
get(String)
Returns the path for the media file.
#if( $media.contains("logo") )
    <img alt="$brand.organization" src="$media.get("logo")">
#end
<img alt="Organization" src="/logo.jpg">

The variables available per differ per template, variables available in all templates are.

Templates

Additional variables per template are listed below, templates not listed here do not have additional variables.

ERRP_WEEK, ERRP_MONTH
  • $domain: Domain object with current domain details
  • $days: Number of days until the expiry date of the domain name
ERRP_EXPIRED
  • $domain: Domain object with current domain details
  • $autoRenewGraceEndPeriod: End date of the auto renew grace period
EXPIRED_PAGE
  • $domain: Domain object with current domain details
PENDING_VALIDATION
  • $domain: Domain object with current domain details
VALIDATE_CONTACT
  • $contact: Contact object with contact details
  • $validity: The date until this validation request is valid
  • $domainNames: List of domain names pending on this contact validation
VALIDATE_CONTACT_FORM
  • $contact: Contact object with contact details
  • $domainNames: List of domain names pending on this contact validation
INCOMING_FOA_FORM, INCOMING_TRANSFER_NEW_REGISTRANT_FORM
  • $transfer: Domain object with transfer request details
  • $requestDate: The date the transfer request was made
  • $type: Only set in case of registrant change, indicates the the role; current registrant ("OLD"), new registrant ("NEW") or both ("BOTH") if the email address does not change
  • $currentRegistrant: Only set in case of registrant change, the current registrant details
  • $additionalTransfers: List of domain names for transfers that can additional be approved via this form
INCOMING_TOKEN_FORM
  • $transfer: Domain object with transfer request details
  • $requestDate: The date the transfer request was made
INTERNAL_FOA_FORM, INTERNAL_TRANSFER_NEW_REGISTRANT_FORM
  • $transfer: Domain object with transfer request details
  • $requestDate: The date the transfer request was made
  • $type: Only set in case of registrant change, indicates the the role; current registrant ("OLD"), new registrant ("NEW") or both ("BOTH") if the email address does not change
  • $additionalTransfers: List of domain names for transfers that can additional be approved via this form
INTERNAL_TOKEN_FORM
  • $transfer: Domain object with transfer request details
  • $requestDate: The date the transfer request was made
OUTGOING_FOA_FORM
  • $domain: Domain object with current domain details
  • $requestDate: The date the transfer request was made
  • $registrar: Optional, the name of the requesting registrar
WDRP
  • $domain: Domain object with current domain details
  • $contact: Contact object with the addressed contact's details
WHOIS
  • $domain: Domain object with current domain details
CONFIRM_BRAND
  • $newBrand: Brand object with the brand to validate
  • $validity: The date until this validation request is valid
  • $brand: Brand object with the "default" brand
CONFIRM_BRAND_FORM
  • $newBrand: Brand object with the brand to validate
INCOMING_FOA, INCOMING_TRANSFER_NEW_REGISTRANT
  • $transfer: Domain object with current domain details
  • $requestDate: The date the transfer request was made
  • $contact: Contact object with the addressed contact's details
  • $validity: The date until this approval request is valid
  • $type: Only set in case of registrant change, indicates the the role; current registrant ("OLD"), new registrant ("NEW") or both ("BOTH") if the email address does not change
  • $currentRegistrant: Only set in case of registrant change, the current registrant details
INTERNAL_FOA
  • $transfer: Domain object with current domain details
  • $requestDate: The date the transfer request was made
  • $contact: Contact object with the addressed contact's details
  • $validity: The date until this approval request is valid
INTERNAL_TRANSFER_NEW_REGISTRANT
  • $transfer: Domain object with current domain details
  • $requestDate: The date the transfer request was made
  • $validity: The date until this approval request is valid
OUTGOING_FOA
  • $domain: Domain object with current domain details
  • $requestDate: The date the transfer request was made
  • $registrar: Optional, the name of the requesting registrar
  • $contact: Contact object with the addressed contact's details
  • $validity: The date until this approval request is valid
UPDATE_DOMAIN_TOKEN_FORM
  • $domain: Domain object with requested domain details
TMCH_CLAIM_ACK, TMCH_CLAIM_ACK_AND_VALIDATION
  • $domain: Domain object with requested domain details
  • $validity: The date until this request is valid
  • $requestDate: The date the registration request was made
TMCH_CLAIM_ACK_FORM, TMCH_CLAIM_ACK_AND_VALIDATION_FORM
  • $domain: Domain object with requested domain details
  • $requestDate: The date the registration request was made
UPDATE_CONTACT_OLD_REGISTRANT, UPDATE_CONTACT_OLD_REGISTRANT_FORM
  • $domainNames: List of domain names requiring registrant change approval
  • $requestDate: The date the registration request was made
  • $currentContact: Contact object with the current contact details
  • $contact: Contact object with the requested contact details
  • $validity: The date until this request is valid
UPDATE_CONTACT_NEW_REGISTRANT_FORM, UPDATE_CONTACT_NEW_REGISTRANT
  • $domainNames: List of domain names requiring registrant change approval
  • $requestDate: The date the registration request was made
  • $currentContact: Contact object with the current contact details
  • $contact: Contact object with the requested contact details
  • $type: Indicates the the role; current registrant ("OLD"), new registrant ("NEW") or both ("BOTH") if the email address does not change
UPDATE_DOMAIN_OLD_REGISTRANT, UPDATE_DOMAIN_NEW_REGISTRANT
  • $requestDate: The date the registration request was made
  • $currentDomain: Domain object with the current domain details
  • $domain: Domain object with the requested domain details
  • $validity: The date until this request is valid
UPDATE_DOMAIN_OLD_REGISTRANT_FORM, UPDATE_DOMAIN_NEW_REGISTRANT_FORM
  • $requestDate: The date the registration request was made
  • $currentDomain: Domain object with the current domain details
  • $domain: Domain object with the requested domain details
  • $additionalDomains: List of domain names for updates that can additional be approved via this form
  • $type: Indicates the the role; current registrant ("OLD"), new registrant ("NEW") or both ("BOTH") if the email address does not change
NEW_REGISTRANT_CHANGE_NOTIFICATION, OLD_REGISTRANT_CHANGE_NOTIFICATION
  • $domainNames: List of domain names affected by the change of registrant
  • $currentRegistrant: Contact object with the current registrant details
  • $newRegistrant: Contact object with the new registrant details
  • $optOut: Boolean object indicating whether or not the old registrant opted out of the 60 day transfer lock
UPDATE_DOMAIN
  • $currentDomain: Domain object with the current domain details
  • $domain: Domain object with the requested domain details

Common objects

Some object structures are used multiple times, their structure is listed below.

Country

The Country object itself will output the countries name, other attributes available are:

  • $country.code: ISO 3166-1 Alpha2 country code
  • $country.name
Brand

The Brand object itself will output the brand's organization, other attributes available are:

  • $brand.handle
  • $brand.organization
  • $brand.addressLines: List of address lines
  • $brand.addressLine: The first address line for easy access
  • $brand.postalCode
  • $brand.city
  • $brand.state: Optional
  • $brand.country: Country object
  • $brand.email
  • $brand.voice
  • $brand.fax: Optional
  • $brand.url: Optional
Contact

The Contact object itself will output the contact's organization if present, otherwise the contact's name, other attributes available are:

  • $contact.handle
  • $contact.name
  • $contact.organization: Optional
  • $contact.addressLines: List of address lines
  • $contact.addressLine: The first address line for easy access
  • $contact.postalCode
  • $contact.city
  • $contact.state: Optional
  • $contact.country: Country object
  • $contact.email
  • $contact.voice
  • $contact.fax: Optional
DomainContact

The domainContact object itself will the contact's role and organization if present otherwise the contact's name, other attributes available are:

  • $domainContact.role: The contact's role (ADMIN, BILLING or TECH)
  • $domainContact.contact: Contact object
Domain

The Domain object itself will output the domains idn domain name, other attributes available are:

  • $domain.domainName: Punicode notation in case of IDN domain name
  • $domain.idnDomainName: Unicode notation in case of IDN domain name
  • $domain.registrant: Contact object
  • $domain.contacts: Optional, list DomainContact objects
  • $domain.admin: Optional, list of Contact objects with ADMIN role
  • $domain.billing: Optional, list of Contact objects with BILLING role
  • $domain.tech: Optional, list of Contact objects with TECH role
  • $domain.ns: Optional, list of name servers
  • $domain.childHosts: Optional, list of child hosts
  • $domain.createdDate
  • $domain.expiryDate
  • $domain.updatedDate: Optional
  • $domain.languageCode: Optional
  • $domain.autoRenew