Home

System

Communications

Main API Calls

Optional API Calls

Optional API Calls

Thankster API Documentation

Thankster’s technology uniquely generates authentic looking handwritten messages. On Thankster.com users can create physical cards which employ this technology that are then sent in the mail, generally for marketing use by businesses or personal use by individuals. This API is available for partners who want to access our functionality to offer to their own users or to automate card generation for other purposes. The basic steps are as follows:

Request a Partner API Key from Thankster (api_key)

Create a template project at Thankster.com

Utilize the API calls described in this document, which will operate on that template project

For most calls you will also need to utilize a user API key (userApiKey), which we use to authenticate users. You get a user API key by signing up for a plan at Thankster.com. Reach out to us if you would like to get a plan to use for development.

Absent changes to the template project via the calls herein, the template project will determine the default visual elements of the card, such as:

Cover design
Handwriting font
Font size and color
Character spacing
Line spacing
Line angle

General Requirements

Obtain an API Key

All API calls require an API key. Because API calls can result in billable services/products being rendered, interested Partners must contact Thankster directly to negotiate pricing and payment terms prior to receiving an API key.

 

User Management 

Thankster’s API system requires Partners to manage their users. This means that when a user returns to your site, it’s up to you to ensure the correct Thankster User ID is used for API calls.

 

Order Management

Once an order is complete, Partners are required to send their unique order number to Thankster for cross- referencing and accounting purposes.

 

Payment Processing

Partner sites are required to track their user’s spending and make direct payment to Thankster outside of the API/Website. Any cards created and ordered using your API key become billable once the order is approved for printing. Approval for printing required Partners first send their unique order ID to Thankster.

Partner sites providing card creation services to end users must have a checkout system to accept payments from the users. It is strongly recommended that the Partner site use SSL Encryption for all pages where Thankster is displayed or where payments are accepted.

Overview

Getting Started

Because of the wide range of font options and how these affect the size of text, Thankster utilizes template projects to help ensure your cards look the way you want, and to avoid text runoff or other issues.

With this system you utilize template projects that are created ahead of time. Templates are created via the saved projects at Thankster.com. Attributes of the card are selected and applied, such as handwriting font, character size, cover design, etc. You can create as many such templates as you want. This way you just have to call that template as specified in the API documentation, without specifying every characteristic of the card.

To use Thankster as an integrated card creation solution for your site, you will need a few things. Let’s cover those now.

Obtain your API Key(s)
This is your unique key which is provided by Thankster. This key allows you to place API calls to Thankster’s systems. There are 2 types of keys.

   Test Key – The development, or “test” key prevents orders from actually being printed while still returning data for you to use while developing your communications and data handling scripts.
   Live Key – The production, or “live” key provides full capabilities and will send orders to the printer. Each of these keys provides a full configuration, meaning you can have different styles, callback urls, card categories, etc.

In addition to providing access to API calls, the API Key also holds some settings for your account. These are outlined below and are required when you apply for your keys.

See the Home section about user API keys, which some calls require.

Note that createQuickProject will be sufficient for some applications.

System

API Calls

Template Creation

A template project (required) is simply a saved (not ordered) project created at Thankster.com. This project allows you to specify formatting for use by the API, defining the starting point for a card. Changes can be applied using the API calls.

 

We impose a character limit of 400 for each of the two inside pages of the card. It is possible, due to font, font size, letter spacing, and line spacing selections that 400 character messages will run over. You should let your users preview their messages before sending a card. If you’d like to change the max character counts let us know.

 

Absent changes to the template project via the calls herein, the template project will determine the default visual elements of the card, such as:

 

  • Cover design
  • Handwriting font
  • Font size and color
  • Character spacing
  • Line spacing
  • Line angle

API

This is the process required to use Thankster’s API.

Step by step

1) First make sure we have a user account to create this card project in by placing a call to the findOrCreateUserByEmail API call. Record the returned user_id for use later.

2) Now that a user account is ready, we’re ready to create a card in their account using the createCardProject API call. (Note that createQuickProject is often all you need to use.)

3) Once the project and recipient are ready, we can begin customizing the card using any of the card modification calls. Here are the ones currently available for making modifications to your card project:

applyMessages
renameProject
selectCard
selectFont
selectFontSize
selectFontColor
selectLineAngle

4) During testing and setup you may wish to see a preview of the card. Using the renderProjectPages API call will render a preview. This can be displayed on a new browser page, inside an Iframe container or anywhere else an HTML5 web page can be rendered.

5) When you’re done making changes to the card and are ready to order, use the orderProject API call.

6) Once you have the order ID, you must submit your system’s corresponding order ID using the method.

7) To have your order finalized, printed and shipped to the recipients, place a call to the approveForPrinting method.

NOTE: By calling this method, you agree to be billed by Thankster.

Mailing Notification
When Thankster completes all cards for an order and ships them, a notification is sent to the Partner’s Responder. The contents of this transmission are fully described in the Order Mailing Notification section.

Order Mailing Notification

When Thankster has completed processing and mailed the order, the Order Mailing Notification is sent to your callback_url (set up upon request through our support team for security reasons).

 

Data Sent:

  • id = 20 (Call Identifier)
  • call = “mailingNotification” (Call Identifier)
  • thanksterOrderID = Thankster’s internal order ID
  • partnerOrderID = Partner’s internal order ID

 

The data will be sent via POST to your callback_url. Here is an example dataset:

				
					$_POST['data'] => {
    "id":"20",
    "call":"mailingNotification",
    "thanksterOrderID":"12345",
    "partnerOrderID":"443243"
 }
				
			

No response is required for this call.

findOrCreateUserByEmail

Load, create, or update a user account.

Accounts are created using the email address as the primary key. You must also provide the user’s mailing address when making this call. This ensures the address is pre-filled on all envelopes for the user’s order.

When you make this call, the email address is used to search Thankster’s database for an existing user account. If one is found, the user’s existing account is loaded and configured for use with your iframe instance of Thankster. Their address is also updated with the information provided in this call.

If the user is new, an account is automatically created using the email and address information provided.

To update a user’s address information simply make this call again with the revised address information. Be sure the email address matches the one used to initially create the account.

The user’s address is updated every time this call is placed, so please make sure it’s included every time.

Requirements:

Send data as POST
All data should be url-encoded
USPS Standard 2 letter state abbreviations are required
ISO Standard 2 letter country codes are required
The api_key and userApiKey are required in the URL or post data

URL Example:

POST Data Required:

				
					https://app.thankster.com/api/v1/api_users/findOrCreateUserByEmail?api_key=12345&userApiKey=56789
				
			

userInfo – Address information for the user.

This data should be sent as $_POST Here’s an example dataset:

				
					        $_POST["fname"]="Bob",
        $_POST["lname"]="Martin",
        $_POST["company"]="Ventures LLC",
        $_POST["address"]="123 Road",
        $_POST["address2"]="Apartment 5F",
        $_POST["city"]="Morgantown",
        $_POST["state"]="WV",
        $_POST["zip"]="26508",
        $_POST["country"]="US",
        $_POST["email"]="contact@example.com"
				
			

PHP Code Example:

				
					$url = 'https://app.thankster.com/api/v1/api_users/findOrCreateUserByEmail?api_key=12345&userApiKey=56789';

$data = array(
      'email'     => 'iframetester@igicom.com',
      'fname'     => 'Michael',
      'lname'     => 'Scharf',
      'address'   => '123 Road',
      'address2'  => 'Apartment 5F',
      'city'      => 'New Martinsville',
      'state'     => 'WV',
      'zip'       => '26155',
      'company'   => 'Igicom LLC'
  );

$send = '';
foreach($data as $key=>$value){
    $send .= $key . '=' . urlencode($value) . '&';
}
rtrim( $send, '&' );

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $send);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);

var_dump(json_decode($response)); 
				
			

Response

When successful, Thankster’s API will respond with the user_id and status. Here’s an example response:

				
					{"status":"200","user_id":"7875"}
				
			


If the call fails and the cause has been detected, the response may include a message as well. Here’s an example:

				
					{"status":"400","message":"ERROR: user email is required"}
				
			

NOTE: You should record the returned “user_id” value for use when launching the iframe or making other API calls that require this information.

createCardProject

This creates a new Project with a single card in it.

More cards may be added to this project later using the addCardRecipient method (future development).

The template ID provides the design of the card. From here, other API calls can be made to change this individual card.

You can specify images that will be applied to the covers or the inside card pages via their URLs. These are optional. See the bottom of the example data set, below. For covers, be sure your image is at least 1500×1950 pixels and has that aspect ratio to avoid stretching or pixelation. It will span the page. For more details see createQuickProject (note that this call is often all you need to use.)

Requirements:

Send data as POST
All data should be urlencoded
USPS Standard 2 letter state abbreviations are required
The api_key and userApiKey are required in the URL or post data

URL Example:

				
					https://app.thankster.com/api/v1/api_projects/createCardProject?api_key=12345&userApiKey=56789
				
			

POST Data Required:

templateID – Design Template ID. Select the project on the API templates page.
thanksterUserID – Thankster’s User ID (received from findOrCreateUserByEmail call).
recipientInfo – The recipient’s name and address information.

You can specify images that will be applied to the covers or the inside card pages via their URLs. These are optional. See the bottom of the example data set, below. For covers, be sure your image is at least 1500×1950 pixels and has that aspect ratio to avoid stretching or pixelation. It will span the page.

This data should be sent $_POST. Here’s an example dataset:

				
					    $_POST["thanksterUserID"]="7543"
    $_POST["templateID"]="5877231"
        $_POST["r_fname"]="Bob"
        $_POST["r_lname"]="Martin"
        $_POST["r_company"]="Igicom LLC"
        $_POST["r_address"]="123 Road"
        $_POST["r_address2"]="Apartment 5F"
        $_POST["r_city"]="Morgantown"
        $_POST["r_state"]="WV"
        $_POST["r_zip"]="26508"
        $_POST["r_country"]="US",
        $_POST["r_email"]="contact@example.com"
				
			

PHP Code Example:

				
					$url = 'https://app.thankster.com/api/v1/api_projects/createCardProject?api_key=12345&userApiKey=56789';

$data = array(
      'templateID'=> 1433354,
      'thanksterUserID'=>7655,
      'r_fname'     => 'Michael',
      'r_lname'     => 'Scharf',
      'r_company'   => 'Igicom LLC',
      'r_address'   => '123 Road',
      'r_address2'  => 'Apartment 5F',
      'r_city'      => 'New Martinsville',
      'r_state'     => 'WV',
      'r_zip'       => '26155',
      'r_country'   => 'US',
      'r_email'     => 'iframetester@igicom.com'
  );

$send = '';
foreach($data as $key=>$value){
    $send .= $key . '=' . urlencode($value) . '&';
}
rtrim( $send, '&' );

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $send);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);

var_dump(json_decode($response));
				
			

Response

When successful, Thankster’s API will respond with the user_id and status. Here’s an example response:

				
					{"status":"200","project_id":"7875","recipient_id":"12875"}
				
			


If the call fails and the cause has been detected, the response may include a message as well. Here’s an example:

				
					{"status":"400","message":"ERROR: recipientInfo is required"}
				
			

NOTE: You must record the returned values since these are required when making other API calls.

applyMessages

Messages are stored separately for each recipient in a project. To change messages you must provide the recipient ID and the user ID. This is a one-way call, meaning once you submit your messages they cannot be retrieved back from our servers. If you need to make adjustments to your messages after submitting them, you must re-send the entire message again.

The inside message values to submit are both required. This ensures that the default card messages are removed. Not providing the data for a message panel could result in a default message being used in place of the missing value.

NOTE: Only projects created using the createCardProject call can be edited with this call.

Requirements:

Send data as POST
All data should be url-encoded
The api_key and userApiKey are required in the URL or post data

URL Example:

				
					https://app.thankster.com/api/v1/api_projects/applyMessages?api_key=12345&userApiKey=56789
				
			

POST Data Required:

thanksterRecipientID – Received when making the createCardProject call.
thanksterUserID – Thankster’s User ID (received from findOrCreateUserByEmail call).
api_text_one (optional) – text box 1 (has a pink border in the corresponding Thankster template)
api_test_two (optional) – text box 2 (has an orange border in the corresponding Thankster template)
api_test_three (optional) – text box 3 (has a blue border in the corresponding Thankster template)
api_test_four (optional) – text box 4 (has a purple border in the corresponding Thankster template)

This data should be sent as $_POST. Here’s an example dataset:

				
					        $_POST["thanksterUserID"]="7543"
        $_POST["thanksterRecipientID"]="5877231"
        $_POST["api_text_one"]="Thanks for the Cake"
        $_POST["api_text_two"]="It was a Great Party"
				
			

Response

When successful, Thankster’s API will respond with status 200. Here’s an example response:

				
					{"status":"200","Message saved"}
				
			

If the call fails and the cause has been detected, the response may include a message as well. Here’s an example:

				
					{"status":"400","message":"Error: Inside message 1 is too long"}
				
			

orderProject

Once a project is complete and you are ready to order it, this call will place the order in Thankster’s systems and return an Order ID back for your records. This Order ID must be used in the setPartnerOrderID before calling the approveForPrinting method.

Requirements:

Send data as POST
All data should be url-encoded
The api_key, userApiKey, and thanksterProjectID are required in the URL or post data

URL Example:

				
					https://app.thankster.com/api/v1/api_projects/orderProject?api_key=12345&userApiKey=56789
				
			

POST Data Required:

thanksterUserID – Thankster’s User ID (received from findOrCreateUserByEmail call).
thanksterProjectID – Thankster’s project ID to order

This data should be sent as $_POST. Here’s an example dataset:

				
					   $_POST["thanksterUserID"]=12345
    $_POST["thanksterProjectID"]=67890
				
			

PHP Code Example:

				
					    $url = 'https://app.thankster.com/api/v1/api_projects/orderProject?api_key=12345&userApiKey=56789';

    $data['thanksterUserID'] = '7655';
    $data['thanksterProjectID']      = '1433354';

    $send = '';
    foreach($data as $key=>$value){
        $send .= $key . '=' . urlencode($value) . '&';
    }
    rtrim( $send, '&' );

    $ch = curl_init($url);
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $send);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    $response = curl_exec($ch);

    var_dump(json_decode($response)); 
				
			

Response

When successful, Thankster’s API will respond with the order_id and status. Here’s an example response:

				
					{"status":"200","order_id":"7875"}
				
			

If the call fails and the cause has been detected, the response may include a message as well. Here’s an example:

				
					{"status":"400","message":"Error: something went wrong while saving project order status"}
				
			

NOTE: You must record the returned values since these are required when making other API calls.

setPartnerOrderID

Submit your Order ID to Thankster so orders may be cross referenced.

This call MUST be placed before the approveForPrinting call can be made.

Requirements:

Send data as POST
All data should be url-encoded

URL Example:

				
					https://app.thankster.com/api/v1/api_projects/setPartnerOrderID?api_key=12345
				
			

POST Data Required:

thanksterOrderID – Thankster’s order ID
orderID – Your system’s order ID

This data should be sent as $_POST. Here’s an example dataset:

				
					        $_POST["thanksterOrderID"] = "123"
        $_POST["orderID"] = "testorder123"
				
			

Response

Upon receiving and storing the order ID, Thankster’s API will respond with:

				
					{"status":"200","message":"Successfully inserted your order ID"}
				
			

NOTE:HTTP status codes are used for responses

approveForPrinting

Used to notify Thankster that an order may be printed and mailed.

Requirements:

Send data as POST

URL Example:

				
					https://app.thankster.com/api/v1/api_projects/approveForPrinting?api_key=12345
				
			

POST Data Required:

thanksterOrderID – Thankster’s order ID
orderID – Your system’s order ID

This data should be sent as $_POST. Here’s an example dataset:

				
					        $_POST["thanksterOrderID"]=123
        $_POST["orderID"]=testorder123
				
			

Response

Upon receiving and storing the order ID, Thankster’s API will respond with:

				
					{"status":"200","message":"Successfully approved order for Printing"}
				
			

NOTE:HTTP status codes are used for responses

renderProjectPreview

This endpoint has been deprecated.  Use renderProjectPages instead.

Renders a preview of a user’s project in an iframe.

When this URL is used in an iframe, a preview of the user’s card is returned. This may be useful for display in a user’s dashboard, during their checkout on your site, etc.

Requirements:

The api_key, userApiKey, and thanksterProjectID are required in the URL or post data

URL Example:

				
					https://app.thankster.com/api/v1/api_projects/renderProjectPreview?api_key=12345&thanksterProjectID=7502&userApiKey=56789
				
			

renderProjectPages

Renders each project’s page as an image. 

This endpoint has replaced renderProjectPreview, which has been deprecated.

This URL is used to get each projects page as base64 encoded image. This may be useful to display all changes made to a page during user interaction.

Requirements:

The api_key, userApiKey, thanksterProjectID and pages are required in the URL.
Allowed pages:
front
back
inside_one – represents top for landscape, left for portrait (folders only)
inside_two – represents bottom for landscape, right for portrait (folders only)
envelope
Query parameter should always be an array.
We recommend to query only pages that you need for performance reasons.

URL Example:

				
					https://app.thankster.com/api/v1/api_projects/renderProjectPages?api_key=12345&thanksterProjectID=7502&userApiKey=56789&pages[]=front
				
			

Response Example:

When successful, Thankster’s API will respond with each requested page in base64 encoded images. Here’s an example response:

				
					{"front":"data:image\/jpeg;base64,iVBORw0K....", "back": "data:image\/jpeg;base64,iVBORw0K...."}
				
			

selectCard

Change the card design selected for this use on this project

This is an optional call, if this call is not used the project will be created with the default of our system or the one selected for your template (if you have one).

Requirements:

Send data as POST
All data should be url-encoded
The api_key, userApiKey, and thanksterProjectID are required in the URL or post data

URL Example:

				
					https://app.thankster.com/api/v1/api_projects/selectFont?api_key=12345
				
			

POST Data Required:

thanksterUserID – Thankster’s User ID (received from findOrCreateUserByEmail call).
thanksterProjectID – Thankster’s Project ID (received from createCardProject call).
thanksterCardID – Card Design ID. (from our designs)

This data should be sent as $_POST. Here’s an example dataset:

				
					    $_POST["thanksterUserID"]="12345"
    $_POST["thanksterProjectID"]="67890"
    $_POST["thanksterCardID"]="54321"
				
			

PHP Code Example:

				
					$url = 'https://app.thankster.com/api/v1/api_projects/selectCard?api_key=12345&userApiKey=56789';

$data['thanksterUserID']      = '1433354';
$data['thanksterProjectID'] = '7655';
$data['thanksterCardID'] = '26155';

$send = '';
foreach($data as $key=>$value){
    $send .= $key . '=' . urlencode($value) . '&';
}
rtrim( $send, '&' );

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $send);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);

var_dump(json_decode($response));    
				
			

Response Example:

When successful, Thankster’s API will respond with a success status. Here’s an example response:

				
					{"status":"200","project_id":"7875","card_id":"12875", "message":"Card selection saved"}
				
			

If the call fails and the cause has been detected, the response may include a message as well. Here’s an example:

				
					{"status":"400","message":"Error - thanksterCardID is required"}
				
			

renameProject

Change internal project name that will be used within Thankster

This is an advanced optional call, if this call is not used the project will be created with a generic name like “Project 1”.

Requirements:

Send data as POST
All data should be url-encoded
The api_key, userApiKey, and thanksterProjectID are required in the URL or post data

URL Example:

				
					https://app.thankster.com/api/v1/api_projects/renameProject?api_key=12345&userApiKey=56789
				
			

POST Data Required:

thanksterUserID – Thankster’s User ID (received from findOrCreateUserByEmail call).
thanksterProjectID – Thankster’s Project ID (received from createCardProject call).
thanksterProjectName – Project name to be used within thanskter

This data should be sent as JSON in $_POST[‘data’]. Here’s an example dataset:

				
					    $_POST["thanksterUserID"]=12345
    $_POST["thanksterProjectID"]=67890
    $_POST["thanksterProjectName"]="Project for user John Doe"
				
			

PHP Code Example:

				
					    $url = 'https://app.thankster.com/api/v1/api_projects/renameProject?api_key=12345&userApiKey=56789';

    $data['thanksterUserID']      = '1433354';
    $data['thanksterProjectID'] = '7655';
    $data['thanksterProjectName'] = 'Project for user John Doe';

    $send = '';
    foreach($data as $key=>$value){
        $send .= $key . '=' . urlencode($value) . '&';
    }
    rtrim( $send, '&' );

    $ch = curl_init($url);
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $send);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    $response = curl_exec($ch);

    var_dump(json_decode($response));    
				
			

Response Example:

When successful, Thankster’s API will respond with a success status. Here’s an example response:

				
					{"status":"200","project_id":"7875","project_name":"Project for user John Doe", "message":"Project name saved"}
				
			

If the call fails and the cause has been detected, the response may include a message as well. Here’s an example:

				
					{"status":"400","message":"Error - thanksterProjectName is required"}
				
			

selectFont

Change the font selected for a the recipient of this project

This is an optional call, if this call is not used the recipients will be created with the default of our system or the one selected for your template. (if you have one).

Requirements:

Send data as POST
All data should be url-encoded
The api_key and userApiKey are required in the URL or post data

URL Example:

				
					https://app.thankster.com/api/v1/api_projects/selectCard?api_key=12345&userApiKey=56789
				
			

POST Data Required:

thanksterUserID – Thankster’s User ID (received from findOrCreateUserByEmail call).
thanksterRecipientID – Thankster’s Recipient ID (received from createCardProject call).
thanksterFontID – Thankster’s Font ID. (from our fonts)

This data should be sent as $_POST. Here’s an example dataset:

				
					        $_POST["thanksterUserID"]="12345"
        $_POST["thanksterRecipientID"]="67890"
        $_POST["thanksterFontID"]="54321"
				
			

PHP Code Example:

				
					    $url = 'https://app.thankster.com/api/v1/api_projects/selectFont?api_key=12345&userApiKey=56789';

    $data['thanksterUserID']      = '1433354';
    $data['thanksterRecipientID'] = '7655';
    $data['thanksterFontID'] = '26155';

    $send = '';
    foreach($data as $key=>$value){
        $send .= $key . '=' . urlencode($value) . '&';
    }
    rtrim( $send, '&' );

    $ch = curl_init($url);
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $send);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    $response = curl_exec($ch);

    var_dump(json_decode($response)); 
				
			

Response Example:

When successful, Thankster’s API will respond with a success status. Here’s an example response:

				
					{"status":"200","recipient_id":"7875","font_id":"12875", "message":"Font selection saved"}
				
			

If the call fails and the cause has been detected, the response may include a message as well. Here’s an example:

				
					{"status":"400","message":"Error - Font ID given does not exists within thankster"}
				
			

selectFontSize

Change the font size for a the recipient of this project

 

This is an optional call, if this call is not used the recipients will be created with the default font selected for your template.

Requirements:

Font size must be an integer inside the range from 1 to 100, being 100 the max size
Send data as POST
All data should be url-encoded
The api_key and userApiKey are required in the URL or post data

URL Example:

				
					https://app.thankster.com/api/v1/api_projects/selectFontSize?api_key=12345&userApiKey=56789
				
			

POST Data Required:

thanksterUserID – Thankster’s User ID (received from findOrCreateUserByEmail call).
thanksterRecipientID – Thankster’s Recipient ID (received from createCardProject call).
thanksterFontSize – Font Size.

This data should be sent as JSON in $_POST[‘data’]. Here’s an example dataset:

				
					    $_POST["thanksterUserID"]="12345"
    $_POST["thanksterRecipientID"]="67890"
    $_POST["thanksterFontSize"]="50"
				
			

PHP Code Example:

				
					    $url = 'https://app.thankster.com/api/v1/api_projects/selectFontSize?api_key=12345&userApiKey=56789';

    $data['thanksterUserID']      = '1433354';
    $data['thanksterRecipientID'] = '7655';
    $data['thanksterFontSize'] = '50';

    $send = '';
    foreach($data as $key=>$value){
        $send .= $key . '=' . urlencode($value) . '&';
    }
    rtrim( $send, '&' );

    $ch = curl_init($url);
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $send);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    $response = curl_exec($ch);

    var_dump(json_decode($response));   
				
			

Response Example:

When successful, Thankster’s API will respond with a success status. Here’s an example response:

				
					{"status":"200","recipient_id":"7875","font_size":"50", "message":"Font size saved"}
				
			

If the call fails and the cause has been detected, the response may include a message as well. Here’s an example:

				
					{"status":"400","message":"Error - Font size given must be an integer"}
				
			

selectFontColor

Change the font color for a the recipient of this project

This is an optional call, if this call is not used the recipients will be created with the default font selected for your template.

Requirements:

Font color must be submited in HEX format (#RRGGBB) for example “#FF00CC”
Send data as POST
All data should be url-encoded
The api_key and userApiKey are required in the URL or post data

URL Example:

				
					https://app.thankster.com/api/v1/api_projects/selectFontColor?api_key=12345&userApiKey=56789
				
			

POST Data Required:

thanksterUserID – Thankster’s User ID (received from findOrCreateUserByEmail call).
thanksterRecipientID – Thankster’s Recipient ID (received from createCardProject call).
thanksterFontColor – Font Color.

This data should be sent as $_POST. Here’s an example dataset:

				
					    $_POST["thanksterUserID"]="12345"
    $_POST["thanksterRecipientID"]="67890"
    $_POST["thanksterFontColor"]="50"
				
			

PHP Code Example:

				
					    $url = 'https://app.thankster.com/api/v1/api_projects/selectFontColor?api_key=12345&userApiKey=56789';

    $data['thanksterUserID']      = '1433354';
    $data['thanksterRecipientID'] = '7655';
    $data['thanksterFontColor'] = '50';

    $send = '';
    foreach($data as $key=>$value){
        $send .= $key . '=' . urlencode($value) . '&';
    }
    rtrim( $send, '&' );

    $ch = curl_init($url);
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $send);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    $response = curl_exec($ch);

    var_dump(json_decode($response));
				
			

Response Example:

When successful, Thankster’s API will respond with a success status. Here’s an example response:

				
					{"status":"200","recipient_id":"7875","font_color":"50", "message":"Font color saved"}
				
			

If the call fails and the cause has been detected, the response may include a message as well. Here’s an example:

				
					{"status":"400","message":"Error - thanksterFontColor is required"}
				
			

selectLineAngle

Change the line angle for a the recipient of this project

This is an optional call, if this call is not used the recipients will be created with the default font selected for your template.

Requirements:

Line angle must be submitted as an integer between 1 and 100 being 50 the default value i.e. where the line is not tilted
Send data as POST
All data should be url-encoded
The api_key and userApiKey are required in the URL or post data

URL Example:

				
					https://app.thankster.com/api/v1/api_projects/selectLineAngle?api_key=12345&userApiKey=56789
				
			

POST Data Required:

thanksterUserID – Thankster’s User ID (received from findOrCreateUserByEmail call).
thanksterRecipientID – Thankster’s Recipient ID (received from createCardProject call).
thanksterLineAngle – Line Angle.

This data should be sent as$_POST. Here’s an example dataset:

				
					    $_POST["thanksterUserID"]=12345
    $_POST["thanksterRecipientID"]=67890
    $_POST["thanksterLineAngle"]=50
				
			

PHP Code Example:

				
					    $url = 'https://app.thankster.com/api/v1/api_projects/selectLineAngle?api_key=12345&userApiKey=56789';

    $data['thanksterUserID']      = '1433354';
    $data['thanksterRecipientID'] = '7655';
    $data['thanksterLineAngle'] = '50';

    $send = '';
    foreach($data as $key=>$value){
        $send .= $key . '=' . urlencode($value) . '&';
    }
    rtrim( $send, '&' );

    $ch = curl_init($url);
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $send);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    $response = curl_exec($ch);

    var_dump(json_decode($response));
				
			

Response Example:

When successful, Thankster’s API will respond with a success status. Here’s an example response:

				
					{"status":"200","recipient_id":"7875","line_angle":"50", "message":"Line angle saved"}
				
			

If the call fails and the cause has been detected, the response may include a message as well. Here’s an example:

				
					{"status":"400","message":"Error - thanksterLineAngle is required"}
				
			

importAddressbook

Imports a list of contacts into a user’s addressbook on Thankster.com.

The user must first be created or verified by using the findOrCreateUserByEmail call. This ensures there is a user to import the contacts to.

Each time this call is executed, the entries will be added to the user’s addressbook. Sending the same entries again will result in duplicates in the user’s addressbook.

Requirements:

Developer API key
Send data as POST[‘data’]Encode data as JSON
ISO Standard 2 letter country codes are required
USPS Standard 2 letter state abbreviations are required
The api_key and userApiKey are required in the URL or post data

URL Example:

				
					https://app.thankster.com/api/v1/api_users/importAddressbook?api_key=12345&userApiKey=56789
				
			

POST Data Required:

userEmail – Email address of the user to receive these contacts
entries – User’s contacts array (see example data set for all data which may be included in an entry)

This data should be sent as JSON in $_POST[‘data’]. Here’s an example dataset:

				
					$_POST['data'] => {
    "userEmail":"johnboy@thankster.com",
    "entries":[
        {
        "fname":"Bob",
        "lname":"Martin",
        "company":"Igicom LLC",
        "address":"123 Road",
        "address2":"Apartment 5F",
        "city":"Morgantown",
        "state":"WV",
        "zip":"26508",
        "country":"US",
        "email":"contact@example.com"},
        {
        "fname":"Jumbo",
        "lname":"Shrimp",
        "company":"Red Lobster",
        "address":"321 Seafood Rd",
        "address2":"",
        "city":"New York",
        "state":"NY",
        "zip":"00123",
        "country":"US",
        "email":"jumbo@redlobster.com"}
    ]
				
			

Response Example:

Upon receiving and storing the entries, Thankster’s API will respond with the status and a message. Here’s an example success response:

				
					{"status":200,"message":"Addressbook entries successfully imported"}
				
			


If a failure occurs and the API can detect the cause, a message will be returned. Here’s an example of a failed call:

				
					{"status":400,"message":"ERROR: no account found for the provided user email, import failed"}
				
			

listCards

This call can be used to retrieve the list of cards available from Thankster. You will get a JSON enconded array with totalCount, categoryId, and a subarray of cards with id, name card_rotation, width (real paper width in inches), height (real paper height in inches), and card thumbnail URL.

Requirements:

Developer API key

URL Example:

				
					https://app.thankster.com/api/v1/api_projects/listCards?api_key=12345
				
			

Optional POST Data:

thanksterCategoryID – Thankster’s Card Category ID (see: listCardsCategories)

This data should be sent as $_POST. Here’s an example dataset:

				
					  $_POST["thanksterCategoryID"]=186
				
			

PHP Code Example:

				
					$url = 'https://app.thankster.com/api/v1/api_projects/listCards?api_key=12345&userApiKey=56789';

$data['thanksterCategoryID'] = 'email@example.com';

$send = '';
foreach($data as $key=>$value){
    $send .= $key . '=' . urlencode($value) . '&';
}
rtrim( $send, '&' );

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $send);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);

var_dump(json_decode($response));
				
			

Response Example:

When successful, Thankster’s API will respond with a JSON encoded card list. Here’s an example response:

				
					[{"totalCount":"70","cards":[{"id":"1320","card_rotation":"landscape","name":"Business Red","width":"5.500","height":"4.250","coverDesignImageThumb":"https:\/\/app.thankster.com\/thankster5\/thumb\/phpThumb.php?src=\/template\/1320\/cover.jpg&w=220&h=200&q=60&zc=0&fltr[]=rot|-90]&bc=ffffff"},{"id":"1319","card_rotation":"landscape","name":"Business Squares","width":"5.500","height":"4.250","coverDesignImageThumb":"https:\/\/app.thankster.com"},{"id":"1318","card_rotation":"landscape","name":"Business 1","width":"5.500","height":"4.250","coverDesignImageThumb":"https:\/\/app.thankster.com"},{"id":"1321","card_rotation":"portrait","name":"Business Beige","width":"5.000","height":"7.000","coverDesignImageThumb":"https:\/\/app.thankster.com"},{"id":"1322","card_rotation":"landscape","name":"Business Banner\r","width":"5.500","height":"4.250","coverDesignImageThumb":"https:\/\/app.thankster.com"},{"id":"1324","card_rotation":"portrait","name":"Business 7","width":"4.250","height":"5.500","coverDesignImageThumb":"https:\/\/app.thankster.com"},{"id":"1323","card_rotation":"landscape","name":"Business 6","width":"5.500","height":"4.250","coverDesignImageThumb":"https:\/\/app.thankster.com"}],"categoryId":186}]
				
			

If the call fails and the cause has been detected, the response may include a message as well. Here’s an example:

				
					{"status":"400","message":"Error: something went wrong while retrieving the cards"}
				
			

listCardsCategories

This call can be used to retrieve the list of cards available from Thankster. You will get a JSON enconded array with totalCount, categoryId, and a subarray of cards with id, name card_rotation, widthThis call can be used to retrieve the list of card categories available from Thankster. You will get a JSON encoded array with id and category_name. (real paper width in inches), height (real paper height in inches), and card thumbnail URL.

Requirements:

Developer API key

URL Example:

				
					https://app.thankster.com/api/v1/api_projects/listCardsCategories?api_key=12345

				
			

PHP Code Example:

				
					$url = 'https://app.thankster.com/api/v1/api_projects/listCardsCategories?api_key=12345&userApiKey=56789';

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);

var_dump(json_decode($response));
				
			

Response Example:

When successful, Thankster’s API will respond with a JSON encoded categories list. Here’s an example response:

				
					[{"id":"143","category_name":"Thank You Cards"},{"id":"39","category_name":"General Thank You Cards"},{"id":"66","category_name":"Birthday Thank You"},{"id":"110","category_name":"Heart & Flowers"},{"id":"10","category_name":"Bachelorette Thank You"},{"id":"43","category_name":"Bridal Shower Thank You"},{"id":"41","category_name":"Wedding Thank Yous"},{"id":"1","category_name":"Baby \/ Baby Shower Thank You"},{"id":"46","category_name":"Kids Thank Yous"},{"id":"2","category_name":"Bar \/ Bat Mitzvah Thank You"},{"id":"4","category_name":"Graduation Thank You"},{"id":"40","category_name":"Religious-themed Thank You"},{"id":"101","category_name":"Business Thank Yous"},{"id":"127","category_name":"Sympathy Thank Yous"},{"id":"95","category_name":"Other Thank You Cards"},{"id":"144","category_name":"Birthday Cards"},{"id":"76","category_name":"Birthday Greetings"},{"id":"90","category_name":"Occasion Cards"},{"id":"91","category_name":"Engagement"},{"id":"94","category_name":"Weddings"},{"id":"99","category_name":"Anniversary"},{"id":"113","category_name":"Newborn"},{"id":"122","category_name":"Bar \/ Bat Mitzvah Congrats"},{"id":"92","category_name":"Graduation"},{"id":"134","category_name":"Get Well"},{"id":"141","category_name":"Sympathy "},{"id":"36","category_name":"Holiday Cards"},{"id":"126","category_name":"Father's Day"},{"id":"137","category_name":"Rosh Hashanah"},{"id":"98","category_name":"Hanukkah"},{"id":"86","category_name":"Christmas Themes"},{"id":"89","category_name":"Season's Greetings"},{"id":"74","category_name":"Valentine's Day"},{"id":"125","category_name":"Mother's Day"},{"id":"145","category_name":"Just Because"},{"id":"97","category_name":"Friendship"},{"id":"186","category_name":"EB Classic"},{"id":"187","category_name":"EB Fun"},{"id":"75","category_name":"Invitations"},{"id":"82","category_name":"Humor"},{"id":"85","category_name":"Sentimental "},{"id":"100","category_name":"Save The Date"},{"id":"106","category_name":"Formal"},{"id":"107","category_name":"Informal"},{"id":"109","category_name":"Star of David"},{"id":"111","category_name":"Wedding Cakes"},{"id":"112","category_name":"Strollers"},{"id":"114","category_name":"Cross"},{"id":"115","category_name":"Star of David Thank You"},{"id":"116","category_name":"Birdies & Storks"},{"id":"133","category_name":"Tropical"},{"id":"108","category_name":"Classic Cards"},{"id":"88","category_name":"Classic"},{"id":"121","category_name":"Gifts"},{"id":"119","category_name":"Cakes & Candles"},{"id":"120","category_name":"Balloons"},{"id":"123","category_name":"Toys"},{"id":"124","category_name":"Animals"},{"id":"129","category_name":"Carol Blakney"},{"id":"130","category_name":"Kate Harper"},{"id":"128","category_name":"Designers"},{"id":"136","category_name":"Wildhorse Press"},{"id":"138","category_name":"Freckle Paper"},{"id":"139","category_name":"A Fresh Bunch"},{"id":"140","category_name":"Kid's Birthday"},{"id":"185","category_name":"My Cards"}]
				
			

If the call fails and the cause has been detected, the response may include a message as well. Here’s an example:

				
					{"status":"400","message":"Error: something went wrong while retrieving the categories"}
				
			

listFonts

This call can be used to retrieve the list of font categories available from Thankster. You will get a JSON encoded array with id, type, font_name, and a font preview URL where you can see a rendering of the font.

Requirements:

Developer API key

URL Example:

				
					https://app.thankster.com/api/v1/api_projects/listFonts?api_key=12345
				
			

PHP Code Example:

				
					$url = 'https://app.thankster.com/api/v1/api_projects/listFonts?api_key=12345&userApiKey=56789';

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);

var_dump(json_decode($response));
				
			

Response Example:

When successful, Thankster’s API will respond with a JSON encoded font list. Here’s an example response:

				
					[{"id":"523","type":"handwriting","font_name":"Americana","font_preview":"https:\/\/app.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=523"},{"id":"453","type":"handwriting","font_name":"Annette","font_preview":"https:\/\/app.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=453"},{"id":"758","type":"handwriting","font_name":"Applepie","font_preview":"https:\/\/app.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=758"},{"id":"256","type":"handwriting","font_name":"Arriviste","font_preview":"https:\/\/app.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=256"},{"id":"597","type":"handwriting","font_name":"Au Pair","font_preview":"https:\/\/app.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=597"},{"id":"607","type":"handwriting","font_name":"Augusta","font_preview":"https:\/\/app.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=607"},{"id":"459","type":"handwriting","font_name":"Big Billy","font_preview":"https:\/\/app.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=459"},{"id":"677","type":"handwriting","font_name":"Biggie Bold","font_preview":"https:\/\/app.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=677"},{"id":"448","type":"handwriting","font_name":"Billy the Builder","font_preview":"https:\/\/app.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=448"},{"id":"688","type":"handwriting","font_name":"Blinkers","font_preview":"https:\/\/app.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=688"},{"id":"563","type":"handwriting","font_name":"Bohemian","font_preview":"https:\/\/app.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=563"},{"id":"683","type":"handwriting","font_name":"Bold Hand","font_preview":"https:\/\/app.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=683"},{"id":"894","type":"handwriting","font_name":"Boyish","font_preview":"https:\/\/app.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=894"},{"id":"587","type":"handwriting","font_name":"Bricks","font_preview":"https:\/\/app.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=587"},{"id":"381","type":"handwriting","font_name":"Broadway","font_preview":"https:\/\/app.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=381"},{"id":"723","type":"handwriting","font_name":"Bubbles","font_preview":"https:\/\/app.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=723"},{"id":"867","type":"handwriting","font_name":"Businessman","font_preview":"https:\/\/app.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=867"},{"id":"728","type":"handwriting","font_name":"Buttercup","font_preview":"https:\/\/app.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=728"},{"id":"959","type":"handwriting","font_name":"Cherries","font_preview":"https:\/\/app.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=959"},{"id":"733","type":"handwriting","font_name":"Chicane","font_preview":"https:\/\/app.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=733"},{"id":"637","type":"handwriting","font_name":"Crony","font_preview":"https:\/\/app.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=637"},{"id":"647","type":"handwriting","font_name":"Davenport","font_preview":"https:\/\/app.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=647"},{"id":"438","type":"handwriting","font_name":"diva","font_preview":"https:\/\/app.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=438"},{"id":"3294","type":"handwriting","font_name":"diva crossouts","font_preview":"https:\/\/app.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=3294"},{"id":"703","type":"handwriting","font_name":"Dumpling","font_preview":"https:\/\/app.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=703"},{"id":"582","type":"handwriting","font_name":"El Mexicano","font_preview":"https:\/\/app.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=582"},{"id":"642","type":"handwriting","font_name":"Fat Cat","font_preview":"https:\/\/app.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=642"},{"id":"743","type":"handwriting","font_name":"Flimflam","font_preview":"https:\/\/app.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=743"},{"id":"1046","type":"handwriting","font_name":"Florida Righty","font_preview":"https:\/\/app.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=1046"},{"id":"662","type":"handwriting","font_name":"Frazzle Dazzle","font_preview":"https:\/\/app.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=662"},{"id":"718","type":"handwriting","font_name":"Fresh","font_preview":"https:\/\/app.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=718"},{"id":"476","type":"handwriting","font_name":"Freshman","font_preview":"https:\/\/app.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=476"},{"id":"163","type":"handwriting","font_name":"Gee Five","font_preview":"https:\/\/app.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=163"},{"id":"668","type":"handwriting","font_name":"Greenhorn","font_preview":"https:\/\/app.thankster.com\/viewFont?api_key=1e530276c56d2c04efb39565be02a8r0&thanksterFontID=668"}]
				
			

If the call fails and the cause has been detected, the response may include a message as well. Here’s an example:

				
					{"status":"400","message":"Error: something went wrong while retrieving the fonts"}
				
			

createQuickProject

This creates a new Project with a single card in it.

The template ID provides the design of the card and defaults for the project. From here, other API calls can be made to change this individual card.

You can specify images that will be applied to the covers or the inside card pages via their URLs. These are optional. See the bottom of the example data set, below. For covers, be sure your image is at least 1500×1950 pixels and has that aspect ratio to avoid stretching or pixelation. It will span the page.

Keep in mind that orders are generally executed within five minutes of getting received; if you need real-time execution to receive parameters like recipient or order ID please contact us at developers@thankster.com.

Requirements:

Send data as POST
All data should be url-encoded
USPS Standard 2 letter state abbreviations are required
Users must have a valid subscription with included postage, shipping and taxes, each time this call is used the remaining allowance will be decreased by one
Subscriptions may be acquired through my account area on thankster.com
The api_key and userApiKey are required in the URL or post data

URL Example:

				
					https://app.thankster.com/api/v1/api_projects/createQuickProject?api_key=12345&userApiKey=56789
				
			

POST Data Required:

thanksterUserID – Thankster’s User ID. (received from ‘>findOrCreateUserByEmail call).
templateID – Design Template ID.
email – Thankster’s User email.
senderInfo – The Sender’s name and information.
recipientInfo – The recipient’s name and information.
Inside Message(s) – Messages for the card for the pages you want to get text on.

This data should be sent $_POST. Here’s an example dataset:

				
					    $_POST["templateID"]="5877231"
    $_POST["thanksterUserID"]="12345"
        $_POST["email"]="apisender@example.com"

        $_POST["fname"]="John",
        $_POST["lname"]="Smith",
        $_POST["company"]="My Company LLC",
        $_POST["address"]="123 Road",
        $_POST["address2"]="Apartment 5F",
        $_POST["city"]="New Martinsville",
        $_POST["state"]="WV",
        $_POST["zip"]="26508",
        $_POST["country"]="US",

        $_POST["r_fname"]="Jane"
        $_POST["r_lname"]="Doe"
        $_POST["r_company"]="Donators LLC"
        $_POST["r_address"]="123 Thanks Rd"
        $_POST["r_address2"]="Apartment 4F"
        $_POST["r_city"]="Stamford"
        $_POST["r_state"]="CT"
        $_POST["r_zip"]="06815"
        $_POST["r_country"]="US",
        $_POST["r_email"]="apirerrecipient@example.com"

    $_POST["api_text_one"]="Thanks for the Cake"
    $_POST["api_text_two"]="It was a Great Party"

    $_POST["api_image_one"]="https://www.website.com/image1.png"
    $_POST["api_image_two"]="https://www.website.com/image2.png"
    $_POST["api_image_three"]="https://www.website.com/image3.png"
    $_POST["api_image_four"]="https://www.website.com/image4.png"
				
			

PHP Code Example:

				
					$url = 'https://app.thankster.com/api/v1/api_projects/createQuickProject?api_key=a3d35jsdhg622h2k';

$data = array(
      'templateID'=> 237835,
      'thanksterUserID'=> 12345,
      'fname'     => 'John',
      'lname'     => 'Smith',
      'company'   => 'My Company LLC',
      'address'   => '123 Road',
      'address2'  => 'Apartment 5F',
      'city'      => 'New Martinsville',
      'state'     => 'WV',
      'zip'       => '26155',
      'country'   => 'US',
      'email'     => 'apisender@example.com',
      'r_fname'     => 'Jane',
      'r_lname'     => 'Doe',
      'r_company'   => 'Donators LLC',
      'r_address'   => '123 Thanks Rd',
      'r_address2'  => 'Apartment 11',
      'r_city'      => 'Stamford',
      'r_state'     => 'CT',
      'r_zip'       => '06815',
      'r_country'   => 'US',
      'r_email'     => 'apirerrecipient@example.com',
      'api_text_one'   => 'Thanks for the Cake',
      'api_text_two'   => 'It was a Great Party'
      'api_image_one'   => 'https://www.website.com/image1.png'
      'api_image_two'   => 'https://www.website.com/image2.png'
      'api_image_three'   => 'https://www.website.com/image3.png'
      'api_image_four'   => 'https://www.website.com/image4.png'
				
			
				
					);  $send = ''; foreach($data as $key=>$value){     $send .= $key . '=' . urlencode($value) . '&'; } rtrim( $send, '&' );  $ch = curl_init($url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $send); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $response = curl_exec($ch);  echo print_r($response,true);
				
			

Response Example:

When successful, Thankster’s API will respond with the user_id and status. Here’s an example response:

				
					{"status":"200","project_id":"7875","recipient_id":"12875"}
				
			

If the call fails and the cause has been detected, the response may include a message as well. Here’s an example:

				
					{"status":"400","message":"ERROR: recipientInfo is required"}
				
			

NOTE: You must record the returned values since these are required when making other API calls.