Tool reference
Customers and email
These tools work with your customer address book and let you reach customers by email. A typical flow: find someone with list_customers, read their details and order history with get_customer, fix their contact or address details with create_or_update_customer, then write to them with send_customer_email. For win-back campaigns, list_lapsed_customers finds customers who haven't ordered recently and send_mass_marketing_email emails a whole segment at once.
Sending email is a two-step flow. Call a send tool without confirm to preview it (nothing is sent), then call again with "confirm": true to send. Emails count against your plan's marketing-email allowance, and every tool here only sees your own customers. See Marketing-email allowance and Merge placeholders.
list_customers
Lists the customers in your Ship.com address book, excluding deleted ones. Filter by name or email and sort alphabetically or by most recent order. Rows are compact; call get_customer for full details and order history. Unlike the email segment tools, this list includes customers who have no email address.
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | No | Case-insensitive filter. Matches customers whose first or last name starts with the text, or whose email contains it. One term only: "jane doe" isn't split into first and last name. Phone, city and company aren't searched. |
sort | string | No | name (default): by last name, then first name; customers with no last name come last. recent: customers with the newest orders first, ignoring canceled and merged orders; customers with no orders come last. Any other value sorts by name. |
page | integer | No | Page number, starting at 1. Default 1. |
page_size | integer | No | Rows per page, 1 to 50. Default 25. Values outside that range are clamped to it. |
Returns: customers, each with customer_id, name, email, phone, city and state (null when not on file); plus page and page_size as applied, total (matches across all pages) and sort (the sort actually used).
Good to know: A page past the end returns an empty customers list with the real total. Customers that tie in the sort order have no guaranteed order among themselves.
{ "query": "jen", "sort": "recent", "page": 1, "page_size": 10 }get_customer
Returns the full record for one customer: name, company, contact details, birthday, mailing address, lifetime order count and spend, and their most recent orders.
| Parameter | Type | Required | Description |
|---|---|---|---|
customer_id | integer | Yes | The customer's ID, from list_customers. |
Returns: customer_id, name, first_name, last_name, company, email, phone, birthday, address (street1, street2, street3, city, state, zip, country), order_count, total_spent and recent_orders. Each recent order has order_id, order_number, date, status (for example "Ready to ship", "Label printed", "In transit", "Delivered"), total and tracking_number.
Good to know: Ship.com stores birthdays as month and day only, so birthday comes back with the year 1900 (for example "1900-04-12T00:00:00"); ignore the year. recent_orders lists up to 20 orders, newest first. order_count, total_spent and recent_orders leave out canceled and merged orders but include orders that haven't shipped yet; the count and total cover every such order, not just the 20 listed. order_number is null when an order has no number, and country is "US" when none is stored. A customer ID that isn't in your account returns an error such as Customer 482913 was not found in this account.
{ "customer_id": 482913 }create_or_update_customer
Adds a customer to your address book or updates one you already have. Omit customer_id (or pass 0) to create a customer; pass the ID of an existing customer to update them. Changes apply right away, with no confirm step.
| Parameter | Type | Required | Description |
|---|---|---|---|
customer_id | integer | No | The customer to update. Omit or pass 0 to create a new customer. Deleted customers can't be edited. |
first_name | string | Yes | First name. Can't be blank. |
last_name | string | Yes | Last name. Can't be blank. |
email | string | No | Email address. The format isn't checked. |
phone | string | No | Phone number, stored as given. |
birthday | string | No | Month and day, month first, such as "04/12" or "4/12". No year is stored. Because the month comes first, "12/04" is December 4. A value with a year, a day-first date such as "25/12", February 29 or an empty string causes an error and nothing is saved. |
street1 | string | No | Address line 1. If it's blank and street2 is set, street2 moves up to line 1. |
street2 | string | No | Address line 2, such as an apartment or suite. |
street3 | string | No | Address line 3. |
city | string | No | City. |
state | string | No | State or province code, such as "TX". Checked against the country's list of codes. A value that isn't a valid code (for example "Texas") is dropped without an error, so check address.state in the result. |
zip | string | No | ZIP or postal code. Send it as a string so leading zeros are kept. |
country | string | No | Two-letter country code, such as US or CA. Default US. |
company | string | No | Company name. |
Returns: customer_id (new or existing), created (true when a customer was added), name, email, phone, company, birthday, address, orders_updated and note. Values are returned as stored, after the state check, line 2 promotion and country default. orders_updated counts orders changed to match (always 0 on create), and note summarizes them or is null.
Good to know: An update replaces the whole record. Any optional field you leave out is cleared, and country goes back to US. To change one field, read the customer with get_customer first, then send every field back with your change applied.
Every update, even one that doesn't change the name, also updates the customer's orders that don't have a label yet and still carry the name the customer had before the update. Those orders get the customer's new name, company, email, phone and address, so the next label prints the corrected details. Fields you left out are cleared on those orders too, so a partial update can wipe their shipping address. Orders with a purchased, printed or shipped label are never changed, and orders with a different ship-to name are left alone.
Creating a customer doesn't check for duplicates; creating someone who's already in your address book adds a second record. Missing names return first_name and last_name are required., and a customer_id that isn't in your account returns the not-found error described under get_customer.
{
"customer_id": 482913,
"first_name": "Jennifer",
"last_name": "Alvarez-Reyes",
"email": "jen.alvarez@example.com",
"phone": "(512) 555-0142",
"birthday": "04/12",
"street1": "1208 Maple Ridge Dr",
"street2": "Apt 4B",
"city": "Austin",
"state": "TX",
"zip": "78704",
"country": "US"
}send_customer_email
Sends one marketing email to one of your customers, under your name. Identify the recipient with either customer_id or order_id; the email address comes from that customer or order. The subject and message can use merge placeholders such as {First Name}, filled in for the recipient.
| Parameter | Type | Required | Description |
|---|---|---|---|
customer_id | integer | One of these two | The recipient customer's ID. Send this or order_id, not both. |
order_id | integer | One of these two | An order in your account, in any status. The email goes to the order's email address; orders saved without one fall back to the linked customer's address. Using an order also fills in order placeholders such as {Invoice Number}, {Tracking Link} and {Order Total}, and takes {First Name} and {Last Name} from the order's ship-to name. |
subject | string | Yes | Subject line. Supports merge placeholders. |
message | string | Yes | Email body. HTML is allowed. Supports merge placeholders. |
confirm | boolean | No | Omit or false to preview; nothing is queued. true sends the email. |
Returns: A preview returns preview (true), recipient_name, recipient_email, subject, limit_check and a note. A confirmed send returns queued (true), recipient (name, email), subject and a note. The subject is echoed as you wrote it, with placeholders not yet filled in. limit_check has allowed, reason, limit, used and message; the last four are null when sending is allowed (see Marketing-email allowance).
Good to know: The preview checks the recipient and your allowance; it doesn't render the email. With "confirm": true, the same checks run again, then the email is queued and goes out about a minute later. Placeholders are filled in when the email is queued. There's no scheduling option on this tool; use send_mass_marketing_email with scheduled_at for timed sends.
A preview isn't required before "confirm": true, and there's no duplicate protection: confirming twice sends two emails. No tool cancels a queued email. Every email includes an unsubscribe link, and addresses that have unsubscribed from Ship.com marketing emails are skipped. If your email settings copy you on emails you send, that applies here too.
Errors include Provide exactly one of customer_id or order_id to identify the recipient., subject and message are required., a not-found error for a customer or order that isn't in your account, and That recipient has no email address on file. If that last one appears for an order whose customer does have an email, send by customer_id instead. When your allowance is used up, the confirm call is refused with the allowance message.
{
"customer_id": 482913,
"subject": "A little thank-you, {First Name}",
"message": "<p>Hi {First Name},</p><p>Thanks for being such a loyal customer! Use code THANKS10 for 10% off your next order.</p><p>{Your Name}</p>",
"confirm": true
}send_mass_marketing_email
Sends one marketing email campaign to a segment of your customers, or to your whole emailable list. Filters narrow the audience by purchase history. This sends real email and can't be undone once sending starts, so always preview first and check the recipient count.
| Parameter | Type | Required | Description |
|---|---|---|---|
filters | array of strings | No | Segment filters, applied in order; each one narrows the list. Allowed values: "has purchased anything", "has not purchased anything", "has purchased product", "has not purchased product". Omit to email every customer with an email address. |
days | array of integers | No | The lookback window in days for each filter, matched by position: days[0] goes with filters[0]. Give a positive number for every filter. A missing entry counts as 0, which makes "has purchased anything" match no one and "has not purchased anything" match everyone. |
products | array of strings | No | The product for each "...product" filter, matched by position. Case-insensitive partial match on the names of items ordered, such as "lavender". Ignored for the "...anything" filters. A missing or empty entry matches any item. |
subject | string | Yes | Subject line. Supports merge placeholders. |
message | string | Yes | Email body. HTML is allowed. Supports customer placeholders; order placeholders don't apply to campaigns. |
scheduled_at | string | No | When to send, in ISO 8601, such as "2026-10-06T15:00:00Z". A time without an offset is read as UTC. Default: now. A value that can't be read also means now, so check scheduled_for in the result. |
confirm | boolean | No | Omit or false to preview; nothing is saved. true creates the campaign. |
Returns: A preview returns preview (true), recipient_count, sample (up to 10 recipients, each with name, email and last_purchase), subject, limit_check and a note. A confirmed send returns queued (true), recipient_count, marketing_email_id (the campaign ID), scheduled_for (UTC) and a note.
Good to know: The audience is the customers in your address book that have an email address, one per address. When several customers share an identical address, the most recently added one is kept; differently capitalized addresses count as different. Customers without an email are never included. Any order counts as a purchase for the filters, including canceled ones.
Always pass filters, days and products as JSON arrays, even for a single filter. A value that isn't an array is ignored, and so is an unrecognized filter string. Ignored filters don't narrow anything, so the campaign could go to your whole list. Check recipient_count in the preview before you confirm.
On confirm, the segment is worked out again, so the count can differ from the preview. The campaign is refused if no one matches or if it would go over your remaining marketing-email allowance; there are no partial sends. The recipient list is fixed when you confirm. Each email goes to the customer's address as it stands at send time, deleted customers are skipped, and each customer gets at most one email per campaign. recipient_count can include addresses that have unsubscribed; they are skipped when sending.
A preview isn't required before "confirm": true, and there's no duplicate protection: confirming twice creates two campaigns. No tool cancels a campaign. Campaigns appear with your other email campaigns in the Ship.com web app. If your email settings copy you on emails you send, you get a copy of every email in the campaign.
{
"filters": ["has not purchased anything", "has purchased product"],
"days": [90, 365],
"products": ["", "lavender"],
"subject": "We miss you, {First Name}!",
"message": "<p>Hi {First Name},</p><p>It's been a little while! Our new lavender collection just landed. Take 15% off with code COMEBACK15.</p><p>{Your Name}</p>",
"scheduled_at": "2026-10-06T15:00:00Z",
"confirm": true
}list_lapsed_customers
Finds win-back candidates: customers who haven't ordered in the last N days (60 by default). It sends nothing and doesn't use your marketing-email allowance. Pair it with send_mass_marketing_email or send_customer_email to reach them.
| Parameter | Type | Required | Description |
|---|---|---|---|
days | integer | No | Lookback window in days. Customers with no order in this window are listed. Default 60. Use a positive number. |
product | string | No | Lists customers who haven't bought this product in the window instead (case-insensitive partial match on the names of items ordered). Customers who bought other things recently are included, so this is no longer a pure lapsed list. |
page | integer | No | Page number, starting at 1. Default 1. |
page_size | integer | No | Rows per page, 1 to 50. Default 20. |
Returns: customers, each with customer_id, name, email and last_purchase (the date of their most recent order of any kind, or null); plus count (rows on this page), total (all matches), page, page_size and days.
Good to know: It uses the same audience rules as send_mass_marketing_email: only customers with an email address, one per address, most recently added customers first. Any order counts as a purchase, including canceled ones. total matches the recipient_count a campaign preview would show for the same segment: ["has not purchased anything"] with days [N], or ["has not purchased product"] with the same days and product. For mail or phone outreach, use list_customers, which includes customers without an email address.
{ "days": 90, "page": 1, "page_size": 25 }Marketing-email allowance
Both send tools count against your plan's marketing-email allowance. Monthly usage is the number of marketing emails your account has sent in the current calendar month (UTC). A send that would go over the limit is refused as a whole; there are no partial sends.
| Plan | Marketing emails |
|---|---|
| Starter, and older plans no longer sold | Not included |
| Growth | 1,000 per month |
| Executive | 25,000 per month |
| Ultra | Unlimited |
| Free trial | 10 in total for the whole trial (the plan's monthly limit also applies) |
The allowance never blocks a preview; the preview reports the outcome in limit_check. When sending is blocked, allowed is false and reason and message say why; the confirm call is then refused with the same message. For trial_limit and tier_limit, limit and used show the cap and how much of it is used; for no_entitlement they are null.
reason | Message |
|---|---|
trial_limit | You have reached the maximum number of marketing emails allowed during your trial period. |
tier_limit | You have reached the maximum number of marketing emails allowed with your subscription. |
no_entitlement | Marketing email campaigns are not included with your current subscription. |
Merge placeholders
Placeholders work in both the subject and the message. Type them exactly as shown, including capitals, spaces and braces; anything not recognized is left as typed.
| Placeholder | Fills in with |
|---|---|
{First Name} | The customer's first name, or "there" when none is on file. When sending by order_id: the order's ship-to first name, or "Friend". |
{Last Name} | The customer's last name (the ship-to last name when sending by order_id). |
{Your Name}, {Business Name}, {Sign-Off} | Your name, your business name (or your name if none is set), and your saved email sign-off. |
{Birthday}, {Birthday Short}, {Birthday Long}, {Birthday Month} | The customer's birthday as 04/12, 4/12, April 12th or April. Empty when no birthday is on file. |
{Reward Points Balance}, {Reward Points Remaining}, {Reward Points Required}, {Reward Text}, {Reward Icon} | Details from your rewards program: the customer's points balance, points still needed, points required for a reward, the reward itself, and your rewards icon. |
{Reward Message} | A short rewards summary. Shown only on Executive and Ultra plans with an active rewards program, for customers with points history. |
{Invoice Number}, {Tracking Link}, {Order Quantity}, {Order Total}, {Order Date Short}, {Order Date Long}, {Reward Points Earned} | Order details. These fill in only with send_customer_email and order_id. Otherwise {Tracking Link} shows "Unknown", {Order Total} "$0.00", {Order Quantity} "0 items", and the rest are empty. |