lib/API.php
public function render($email_id, $args = null) {
        $endpoint = "render";

        $payload = array(
            "template_id" => $email_id
        );

        if (is_array($args)) {
            $payload = array_merge($args, $payload);
        }

        if ($this->DEBUG) {
            $this->log_message(sprintf(
                "rendering template `%s` with \n%s",
                $email_id,
                print_r($payload, true)
            ));
        }

        return $this->api_request($endpoint, self::HTTP_POST, $payload);
    }
public function render($email_id, $args = null) {
        $endpoint = "render";

        $payload = array(
            "template_id" => $email_id
        );

        if (is_array($args)) {
            $payload = array_merge($args, $payload);
        }

        if ($this->DEBUG) {
            $this->log_message(sprintf(
                "rendering template `%s` with \n%s",
                $email_id,
                print_r($payload, true)
            ));
        }

        return $this->api_request($endpoint, self::HTTP_POST, $payload);
    }
public function render ( $ email_id , $ args = null ) { $ endpoint = "render" ; $ payload = array ( "template_id" => $ email_id ) ; if ( is_array ( $ args ) ) { $ payload = array_merge ( $ args , $ payload ) ; } if ( $ this -> DEBUG ) { $ this -> log_message ( sprintf ( "rendering template `%s` with \n%s" , $ email_id , print_r ( $ payload , true ) ) ) ; } return $ this -> api_request ( $ endpoint , self :: HTTP_POST , $ payload ) ; }
Render an email template with the provided data

The additional optional parameters are as follows:
'template_data' - Default is null. Array of variables to merge into the template.

@param string $email_id ID of email to send
@param array $args (optional) additional optional parameters
@return array API response object
Render an email template with the provided data