Write a letter in a handwriting-style font
hip_set_letterUse this for a letter in a handwriting-style font; for a typeset document use hip_add_text_document, and for a file the person has use hip_get_upload_target. Needs a job_handle from hip_create_job (a new job, no documents) and choices from hip_get_catalog. Write a letter on a job from hip_create_job, printed in a handwriting-style font, optionally on a stationery design: the letter type, the font, the message, the greeting and sign-off, the name it is signed with, and how it is mailed (flat and tracked, a First-Class letter of up to 5 pages, or a Certified letter). Have It Printed checks it as its website does (fit, names, the design's own words), counts the pages, and returns the price and a preview picture of page 1. This only edits the job's draft before checkout: calling it again updates this draft (the previous draft text is not kept), the person sees and approves the letter before paying, and nothing is printed, mailed or charged until the person pays on haveitprinted.com. Never include an address: the person enters the mailing address at checkout. Then call hip_create_checkout: the person pays on haveitprinted.com.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"job_handle": "<job_handle>",
"message": "<message>"
},
"name": "hip_set_letter"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| font | No | a font from hip_get_catalog | |
| color | No | print in color (default false: one ink) | |
| fields | No | optional: a stationery design's or a card-style letter type's own words, by the keys hip_get_catalog lists (never an address) | |
| mailing | No | tracked_document (default): flat in a rigid mailer with a tracking number. basic_letter: folded, First-Class, no tracking, up to 5 pages. certified_letter: the same by Certified Mail, with tracking | |
| message | Yes | the body of the letter, as it should read; separate paragraphs with a blank line. The greeting and sign-off are printed from greeting/greeting_name/signoff | |
| signoff | No | optional: e.g. With love, | |
| greeting | No | optional: the opening word, e.g. Dear | |
| job_handle | Yes | the job_handle that hip_create_job returned (job_ followed by 32 hex characters). Only the API key that created the job can use it. | |
| stationery | No | optional: a stationery design from hip_get_catalog for this letter type | |
| letter_type | No | a letter type from hip_get_catalog (default: a plain letter) | |
| sender_name | No | the name the letter is signed with | |
| greeting_name | No | optional: the name in the greeting, e.g. Mom (not an address) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||