# Thankster

> Send real cards with handwritten-style messages by mail: mail a card from one of your Thankster templates, or build, preview and order one step by step, and keep your address book up to date.

App · 17 actions. Web page: https://docs.lodol.com/docs/integrations/thankster

## Actions

### Add a contact to the address book

Add a contact to a Thankster user's address book. Adding the same contact twice makes two entries.

**Inputs**

- Account email (`account_email`, text, required): The email of the Thankster account whose address book gets the contact, usually your own sign in email.
- First name (`first_name`, text, required): The first name, as it goes on the envelope.
- Last name (`last_name`, text): The last name.
- Company (`company`, text): A company name for the envelope, if any.
- Street address (`address`, text, required): The street address, such as 123 Main St.
- Address line 2 (`address2`, text): Apartment, suite or unit, if any.
- City (`city`, text, required): The city or town.
- State (`state`, text): For a US address, the state's two-letter code (CA) or its name (California). Elsewhere, the region or province.
- ZIP code (`zip_code`, text, required): The ZIP or postal code. A US ZIP code that lost its leading zero (6815) gets it back.
- Country (`country`, text): The two-letter country code, such as US, CA or GB. Defaults to US. Thankster charges more to mail outside the US. Default: `US`.
- Email (`email`, text): The email address, kept with the address in Thankster.

**Outputs**

- `account_email` (text): Whose address book it went into
- `added` (number): How many contacts were added (1)
- `message` (text): Thankster's own words about it
- `name` (text): The contact's name as sent

**Example output**

```json
{
  "account_email": "johnboy@thankster.com",
  "added": 1,
  "message": "Addressbook entries successfully imported",
  "name": "Bob Martin"
}
```

### Approve an order for printing

Approve an order so Thankster prints and mails it. Thankster then bills it to your plan. It can't be undone here and is never retried.

**Inputs**

- Order ID (`order_id`, text, required): The order, from 'Order a card draft' (its order_id).
- Your order reference (`your_order_id`, text): Your own reference for the order, such as an order number from your shop, kept by Thankster. Defaults to lodol- and the order ID.

**Outputs**

- `approved` (true/false): Always true: Thankster approved it
- `message` (text): Thankster's own words about it
- `order_id` (text): The order approved
- `your_order_id` (text): The reference sent with it

**Example output**

```json
{
  "approved": true,
  "message": "Successfully approved order for Printing",
  "order_id": "123",
  "your_order_id": "testorder123"
}
```

### Change card design

Swap the printed card design of a card draft.

**Inputs**

- Thankster user ID (`thankster_user_id`, text, required): The Thankster user the card belongs to, from 'Find or create a user' or 'Create a card draft'.
- Card draft ID (`project_id`, text, required): The card draft, from 'Create a card draft' (its project_id).
- Card design (`design_id`, text, required): The new design. Pick one, or give its id from 'List card designs'.

**Outputs**

- `design_id` (text): The design it now uses
- `message` (text): Thankster's own words about it
- `project_id` (text): The card draft that was changed

**Example output**

```json
{
  "design_id": "12875",
  "message": "Card selection saved",
  "project_id": "7875"
}
```

### Change the handwriting

Change the handwriting font, size, ink color or line angle on a card draft. Only the settings filled in change.

**Inputs**

- Thankster user ID (`thankster_user_id`, text, required): The Thankster user the card belongs to, from 'Find or create a user' or 'Create a card draft'.
- Recipient ID (`recipient_id`, text, required): The card's recipient, from 'Create a card draft' (its recipient_id).
- Font (`font_id`, text): The handwriting font. Pick one, or give its id from 'List handwriting fonts'.
- Font size (`font_size`, number): How large the writing is, from 1 to 100. From 1 to 100.
- Ink color (`font_color`, text): The ink color as a hex code, such as #1F3A93 for blue or #000000 for black.
- Line angle (`line_angle`, number): How the lines slope, from 1 to 100. 50 keeps them level. From 1 to 100.

**Outputs**

- `changed` (list): What changed: font, font size, ink color, line angle
- `font_color` (text): The ink color set, empty if unchanged
- `font_id` (text): The font set, empty if unchanged
- `font_size` (number): The font size set, 0 if unchanged
- `line_angle` (number): The line angle set, 0 if unchanged
- `recipient_id` (text): The recipient whose card was changed

**Example output**

```json
{
  "changed": [
    "font",
    "font size",
    "ink color",
    "line angle"
  ],
  "font_color": "#1F3A93",
  "font_id": "523",
  "font_size": 50,
  "line_angle": 50,
  "recipient_id": "7875"
}
```

### Create a card draft

Start a card for one recipient from a template, without ordering it. Set its messages, images, design and handwriting next, then order it. Nothing is billed for a draft.

**Inputs**

- Template (`template_id`, text, required): The card template, saved under My Templates in Thankster. It sets the card design, handwriting and default messages. Pick one, or give its id from 'List templates'.
- Thankster user ID (`thankster_user_id`, text, required): The Thankster user the card belongs to, from 'Find or create a user' or 'Create a card draft'.
- Recipient first name (`recipient_first_name`, text, required): The recipient's first name, as it goes on the envelope.
- Recipient last name (`recipient_last_name`, text): The recipient's last name.
- Recipient company (`recipient_company`, text): A company name for the envelope, if any.
- Recipient street address (`recipient_address`, text, required): The street address, such as 123 Main St.
- Recipient address line 2 (`recipient_address2`, text): Apartment, suite or unit, if any.
- Recipient city (`recipient_city`, text, required): The city or town.
- Recipient state (`recipient_state`, text): For a US address, the state's two-letter code (CA) or its name (California). Elsewhere, the region or province.
- Recipient ZIP code (`recipient_zip_code`, text, required): The ZIP or postal code. A US ZIP code that lost its leading zero (6815) gets it back.
- Recipient country (`recipient_country`, text): The two-letter country code, such as US, CA or GB. Defaults to US. Thankster charges more to mail outside the US. Default: `US`.
- Recipient email (`recipient_email`, text): The recipient's email address, kept with the address in Thankster.

**Outputs**

- `project_id` (text): The card draft's ID (Thankster's project ID)
- `recipient_id` (text): The recipient's ID on the draft
- `recipient_name` (text): Who the card is addressed to
- `template_id` (text): The template it was made from
- `thankster_user_id` (text): The user the draft belongs to

**Example output**

```json
{
  "project_id": "7875",
  "recipient_id": "12875",
  "recipient_name": "Bob Martin",
  "template_id": "5877231",
  "thankster_user_id": "7543"
}
```

### Find or create a user

Find the Thankster user with this email, or create one, and set their mailing address, which goes on their envelopes as the return address. Returns the user ID that building a card step by step needs.

**Inputs**

- Email (`email`, text, required): The user's email address. Thankster finds the user by it, or creates them.
- First name (`first_name`, text, required): The first name, as it goes on the envelope.
- Last name (`last_name`, text): The last name.
- Company (`company`, text): A company name for the envelope, if any.
- Street address (`address`, text, required): The street address, such as 123 Main St.
- Address line 2 (`address2`, text): Apartment, suite or unit, if any.
- City (`city`, text, required): The city or town.
- State (`state`, text): For a US address, the state's two-letter code (CA) or its name (California). Elsewhere, the region or province.
- ZIP code (`zip_code`, text, required): The ZIP or postal code. A US ZIP code that lost its leading zero (6815) gets it back.
- Country (`country`, text): The two-letter country code, such as US, CA or GB. Defaults to US. Thankster charges more to mail outside the US. Default: `US`.

**Outputs**

- `address` (text): The user's address on one line, as sent
- `email` (text): The user's email address
- `name` (text): The user's name as sent
- `thankster_user_id` (text): The user's Thankster ID, for the card steps

**Example output**

```json
{
  "address": "123 Road, Apartment 5F, Morgantown, WV 26508, US",
  "email": "contact@example.com",
  "name": "Bob Martin",
  "thankster_user_id": "7875"
}
```

### List address book contacts

List the contacts in your Thankster address book.

**Inputs**: None.

**Outputs**

- `contacts` (list): The contacts
- `count` (number): How many contacts there are

**Example output**

```json
{
  "contacts": [
    {
      "address": "123 Road",
      "address2": "Apartment 5F",
      "city": "Morgantown",
      "company": "Igicom LLC",
      "country": "US",
      "email": "contact@example.com",
      "first_name": "Bob",
      "id": "4411",
      "last_name": "Martin",
      "state": "WV",
      "zip_code": "26508"
    }
  ],
  "count": 1
}
```

### List card categories

List the categories Thankster files its card designs under.

**Inputs**: None.

**Outputs**

- `categories` (list): The categories
- `count` (number): How many categories there are

**Example output**

```json
{
  "categories": [
    {
      "id": "143",
      "name": "Thank You Cards"
    },
    {
      "id": "101",
      "name": "Business Thank Yous"
    }
  ],
  "count": 2
}
```

### List card designs

List Thankster's card designs, from every category or one, with their sizes.

**Inputs**

- Category (`category_id`, text): Only designs in this category. Leave empty for every design.

**Outputs**

- `category_id` (text): The category asked for, empty for all
- `count` (number): How many designs were returned
- `designs` (list): The card designs
- `total` (number): How many designs Thankster says the category has

**Example output**

```json
{
  "category_id": "186",
  "count": 1,
  "designs": [
    {
      "category_id": "186",
      "height_inches": 4.25,
      "id": "1320",
      "name": "Business Red",
      "orientation": "landscape",
      "thumbnail_url": "https://app.thankster.com/thankster5/thumb/phpThumb.php?src=/template/1320/cover.jpg&w=220&h=200&q=60&zc=0&bc=ffffff",
      "width_inches": 5.5
    }
  ],
  "total": 70
}
```

### List handwriting fonts

List the handwriting fonts a card can be written in.

**Inputs**: None.

**Outputs**

- `count` (number): How many fonts there are
- `fonts` (list): The fonts

**Example output**

```json
{
  "count": 2,
  "fonts": [
    {
      "id": "523",
      "name": "Americana",
      "type": "handwriting"
    },
    {
      "id": "453",
      "name": "Annette",
      "type": "handwriting"
    }
  ]
}
```

### List templates

List the card templates saved in your Thankster account (My Templates), with their ids.

**Inputs**

- Search (`search`, text): Only templates whose name contains this.
- How many (`limit`, number): The most templates to return, 1 to 2000. Defaults to 100. From 1 to 2000.

**Outputs**

- `count` (number): How many templates were returned
- `templates` (list): The templates
- `total` (number): How many templates the account has that match

**Example output**

```json
{
  "count": 1,
  "templates": [
    {
      "card_type": "folder_card",
      "id": "1234",
      "name": "Thank you template",
      "orientation": "landscape",
      "size": "large",
      "thumbnail_url": "https://thankster-prod.s3.amazonaws.com/thumbs/template_3.png"
    }
  ],
  "total": 1
}
```

### Order a card draft

Place the order for a finished card draft. Nothing is printed or billed until the order is approved for printing. It is never retried.

**Inputs**

- Thankster user ID (`thankster_user_id`, text, required): The Thankster user the card belongs to, from 'Find or create a user' or 'Create a card draft'.
- Card draft ID (`project_id`, text, required): The card draft, from 'Create a card draft' (its project_id).

**Outputs**

- `message` (text): Thankster's own words about it
- `order_id` (text): The order's ID, for 'Approve an order for printing'
- `project_id` (text): The card draft ordered

**Example output**

```json
{
  "message": "Order placed",
  "order_id": "7875",
  "project_id": "67890"
}
```

### Preview a card

Get pictures of a card draft's pages as Thankster will print them, to check before ordering.

**Inputs**

- Card draft ID (`project_id`, text, required): The card draft, from 'Create a card draft' (its project_id).
- Pages (`pages`, list): Which pages to picture. Defaults to the front cover; each extra page takes longer. One or more of: `front` (Front cover), `back` (Back cover), `inside_one` (Inside, first page (top or left)), `inside_two` (Inside, second page (bottom or right)), `envelope`. Default: `["front"]`.

**Outputs**

- `count` (number): How many pages were pictured
- `pages` (list): One picture per page
- `project_id` (text): The card draft pictured

**Example output**

```json
{
  "count": 1,
  "pages": [
    {
      "image": "data:image/jpeg;base64,/9j/4AAQSkZJRg==",
      "page": "front"
    }
  ],
  "project_id": "7502"
}
```

### Rename a card draft

Rename a card draft, as it shows in Thankster.

**Inputs**

- Thankster user ID (`thankster_user_id`, text, required): The Thankster user the card belongs to, from 'Find or create a user' or 'Create a card draft'.
- Card draft ID (`project_id`, text, required): The card draft, from 'Create a card draft' (its project_id).
- New name (`name`, text, required): The name to show in Thankster, such as the recipient's.

**Outputs**

- `message` (text): Thankster's own words about it
- `name` (text): Its new name
- `project_id` (text): The card draft that was renamed

**Example output**

```json
{
  "message": "Project name saved",
  "name": "Project for user John Doe",
  "project_id": "7875"
}
```

### Send a card

Mail a real card with handwritten-style messages, made from one of your Thankster templates. Thankster prints and mails it within minutes and bills it to your plan, so every run sends and pays for one card. It is never retried.

**Inputs**

- Template (`template_id`, text, required): The card template, saved under My Templates in Thankster. It sets the card design, handwriting and default messages. Pick one, or give its id from 'List templates'.
- Recipient first name (`recipient_first_name`, text, required): The recipient's first name, as it goes on the envelope.
- Recipient last name (`recipient_last_name`, text): The recipient's last name.
- Recipient company (`recipient_company`, text): A company name for the envelope, if any.
- Recipient street address (`recipient_address`, text, required): The street address, such as 123 Main St.
- Recipient address line 2 (`recipient_address2`, text): Apartment, suite or unit, if any.
- Recipient city (`recipient_city`, text, required): The city or town.
- Recipient state (`recipient_state`, text): For a US address, the state's two-letter code (CA) or its name (California). Elsewhere, the region or province.
- Recipient ZIP code (`recipient_zip_code`, text, required): The ZIP or postal code. A US ZIP code that lost its leading zero (6815) gets it back.
- Recipient country (`recipient_country`, text): The two-letter country code, such as US, CA or GB. Defaults to US. Thankster charges more to mail outside the US. Default: `US`.
- Recipient email (`recipient_email`, text): The recipient's email address, kept with the address in Thankster.
- Sender first name (`sender_first_name`, text, required): The sender's first name, as it goes on the envelope.
- Sender last name (`sender_last_name`, text): The sender's last name.
- Sender company (`sender_company`, text): A company name for the envelope, if any.
- Sender street address (`sender_address`, text, required): The street address, such as 123 Main St.
- Sender address line 2 (`sender_address2`, text): Apartment, suite or unit, if any.
- Sender city (`sender_city`, text, required): The city or town.
- Sender state (`sender_state`, text): For a US address, the state's two-letter code (CA) or its name (California). Elsewhere, the region or province.
- Sender ZIP code (`sender_zip_code`, text, required): The ZIP or postal code. A US ZIP code that lost its leading zero (6815) gets it back.
- Sender country (`sender_country`, text): The two-letter country code, such as US, CA or GB. Defaults to US. Thankster charges more to mail outside the US. Default: `US`.
- Sender email (`sender_email`, text): The sender's email address, kept with the address in Thankster.
- Message box 1 (`text_one`, text): Text for the template's message box 1 (the one with a pink border in Thankster's editor), up to 400 characters. Left empty, the template's own text stays.
- Message box 2 (`text_two`, text): Text for the template's message box 2 (the one with a orange border in Thankster's editor), up to 400 characters. Left empty, the template's own text stays.
- Message box 3 (`text_three`, text): Text for the template's message box 3 (the one with a blue border in Thankster's editor), up to 400 characters. Left empty, the template's own text stays.
- Message box 4 (`text_four`, text): Text for the template's message box 4 (the one with a purple border in Thankster's editor), up to 400 characters. Left empty, the template's own text stays.
- Image box 1 (`image_one`, text): Web address of a PNG or JPG for the template's image box 1 (the one with a pink border in Thankster's editor), such as a logo or signature. A cover image should be at least 1500 x 1950 pixels.
- Image box 2 (`image_two`, text): Web address of a PNG or JPG for the template's image box 2 (the one with a orange border in Thankster's editor), such as a logo or signature. A cover image should be at least 1500 x 1950 pixels.
- Image box 3 (`image_three`, text): Web address of a PNG or JPG for the template's image box 3 (the one with a blue border in Thankster's editor), such as a logo or signature. A cover image should be at least 1500 x 1950 pixels.
- Image box 4 (`image_four`, text): Web address of a PNG or JPG for the template's image box 4 (the one with a purple border in Thankster's editor), such as a logo or signature. A cover image should be at least 1500 x 1950 pixels.

**Outputs**

- `message` (text): Thankster's own words about it
- `recipient_address` (text): The recipient's address on one line
- `recipient_name` (text): Who the card is addressed to
- `sent` (true/false): Always true: Thankster took the order
- `template_id` (text): The template the card was made from

**Example output**

```json
{
  "message": "Order being processed",
  "recipient_address": "123 Thanks Rd, Apartment 11, Stamford, CT 06815, US",
  "recipient_name": "Jane Doe",
  "sent": true,
  "template_id": "237835"
}
```

### Set card images

Put pictures from web addresses into the image boxes of a card draft's template, such as a logo, photo or signature.

**Inputs**

- Thankster user ID (`thankster_user_id`, text, required): The Thankster user the card belongs to, from 'Find or create a user' or 'Create a card draft'.
- Recipient ID (`recipient_id`, text, required): The card's recipient, from 'Create a card draft' (its recipient_id).
- Image box 1 (`image_one`, text): Web address of a PNG or JPG for the template's image box 1 (the one with a pink border in Thankster's editor), such as a logo or signature. A cover image should be at least 1500 x 1950 pixels.
- Image box 2 (`image_two`, text): Web address of a PNG or JPG for the template's image box 2 (the one with a orange border in Thankster's editor), such as a logo or signature. A cover image should be at least 1500 x 1950 pixels.
- Image box 3 (`image_three`, text): Web address of a PNG or JPG for the template's image box 3 (the one with a blue border in Thankster's editor), such as a logo or signature. A cover image should be at least 1500 x 1950 pixels.
- Image box 4 (`image_four`, text): Web address of a PNG or JPG for the template's image box 4 (the one with a purple border in Thankster's editor), such as a logo or signature. A cover image should be at least 1500 x 1950 pixels.

**Outputs**

- `boxes_set` (list): The boxes that were filled in, such as text_one
- `message` (text): Thankster's own words about it
- `recipient_id` (text): The recipient whose card was changed

**Example output**

```json
{
  "boxes_set": [
    "image_one"
  ],
  "message": "Images saved",
  "recipient_id": "5877231"
}
```

### Set card messages

Write the handwritten messages into the text boxes of a card draft's template.

**Inputs**

- Thankster user ID (`thankster_user_id`, text, required): The Thankster user the card belongs to, from 'Find or create a user' or 'Create a card draft'.
- Recipient ID (`recipient_id`, text, required): The card's recipient, from 'Create a card draft' (its recipient_id).
- Message box 1 (`text_one`, text): Text for the template's message box 1 (the one with a pink border in Thankster's editor), up to 400 characters. Left empty, the template's own text stays.
- Message box 2 (`text_two`, text): Text for the template's message box 2 (the one with a orange border in Thankster's editor), up to 400 characters. Left empty, the template's own text stays.
- Message box 3 (`text_three`, text): Text for the template's message box 3 (the one with a blue border in Thankster's editor), up to 400 characters. Left empty, the template's own text stays.
- Message box 4 (`text_four`, text): Text for the template's message box 4 (the one with a purple border in Thankster's editor), up to 400 characters. Left empty, the template's own text stays.

**Outputs**

- `boxes_set` (list): The boxes that were filled in, such as text_one
- `message` (text): Thankster's own words about it
- `recipient_id` (text): The recipient whose card was changed

**Example output**

```json
{
  "boxes_set": [
    "text_one",
    "text_two"
  ],
  "message": "Message saved",
  "recipient_id": "5877231"
}
```
