Smartrr MCP by usefulapi

v1.21.1
io.usefulapi/smartrr Checked 2 days ago Published 1 day ago

Manage Smartrr subscriptions on Shopify: customers, orders, bills; pause, resume, cancel.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

smartrr_list_subscriptions List subscriptions

List customer subscriptions (Smartrr 'purchase states') with status, next billing date, selling plan, line items, shipping address, discounts and the customer (id, email, name). Filter by status, next billing date or creation date. The ids you need for the other tools: `id` (subscription id), `custRel.id` (customer id) and `shopifyId` (Shopify subscription id). GET /vendor/purchase-state.

ParameterTypeDescription
created_afterstringOnly subscriptions created on or after this date.
created_beforestringOnly subscriptions created on or before this date.
next_billing_afterstringOnly subscriptions whose next billing date is on or after this date.
next_billing_beforestringOnly subscriptions whose next billing date is on or before this date.
pageintegerPage number, from 1 (default 1). Pass the previous reply's next_page.
page_sizeintegerResults per page, 1-100 (default 25).
sortstringSort by creation date (default: Smartrr's own order).
statusstringOnly subscriptions in this status.

smartrr_get_subscription Get subscription

One subscription by its Shopify subscription id (the `shopifyId` field from smartrr_list_subscriptions, passed exactly as shown): status, schedule, next billing date, line items, discounts, shipping address, customer and payment method (brand, last digits and expiry only). GET /vendor/purchase-state/{shopifySubscriptionId}.

ParameterTypeDescription
shopify_subscription_id *stringThe subscription's Shopify id (`shopifyId` in smartrr_list_subscriptions).

smartrr_list_customer_subscriptions List a customer's subscriptions

List the subscriptions of one customer, by Smartrr customer id (`custRel.id` from smartrr_list_subscriptions, or `id` from smartrr_list_customers). GET /vendor/customer/{customerRelationshipId}/purchase-state/.

ParameterTypeDescription
customer_id *stringSmartrr customer id.
pageintegerPage number, from 1 (default 1). Pass the previous reply's next_page.
page_sizeintegerResults per page, 1-100 (default 25).
statusstringOnly subscriptions in this status.

smartrr_get_subscription_events Get subscription history

The 250 most recent events on a subscription (pause, skip, cancel, activate, billing attempts and failures, line-item and address changes, discounts) with who did it. GET /vendor/purchase-state/{shopifySubscriptionId}/events.

ParameterTypeDescription
shopify_subscription_id *stringThe subscription's Shopify id (`shopifyId` in smartrr_list_subscriptions).

smartrr_get_subscription_orders List a subscription's orders

Orders generated by one subscription, by its Shopify subscription id. GET /vendor/purchase-state/{shopifySubscriptionId}/orders.

ParameterTypeDescription
shopify_subscription_id *stringThe subscription's Shopify id (`shopifyId` in smartrr_list_subscriptions).
pageintegerPage number, from 1 (default 1). Pass the previous reply's next_page.
page_sizeintegerResults per page, 1-100 (default 25).
sortstringSort by creation date (default: Smartrr's own order).

smartrr_get_subscription_bills List a subscription's bills

Billing attempts of one subscription (amount, status pending/processing/succeeded/failed/canceled, billing date, retry count, error), by its Shopify subscription id. GET /vendor/purchase-state/{shopifySubscriptionId}/bills.

ParameterTypeDescription
shopify_subscription_id *stringThe subscription's Shopify id (`shopifyId` in smartrr_list_subscriptions).
pageintegerPage number, from 1 (default 1). Pass the previous reply's next_page.
page_sizeintegerResults per page, 1-100 (default 25).
sortstringSort by creation date (default: Smartrr's own order).

smartrr_list_customers List customers

List Smartrr customers (subscribers) with email, name, phone, order count, total spent and custom attributes. Search by email fragment or filter by Shopify customer id. GET /vendor/customer-relationship.

ParameterTypeDescription
emailstringCustomers whose email contains this text.
pageintegerPage number, from 1 (default 1). Pass the previous reply's next_page.
page_sizeintegerResults per page, 1-100 (default 25).
shopify_customer_idstringOnly the customer with this Shopify customer id.
sortstringSort by creation date (default: Smartrr's own order).

smartrr_list_orders List orders

List orders Smartrr has synced from Shopify (subscription and one-time) with totals, status, financial and fulfillment status, tracking, items and customer. Filter by processed date or order label (e.g. #1001). GET /vendor/order.

ParameterTypeDescription
order_labelstringOrders whose Shopify order label contains this text, e.g. #1001.
pageintegerPage number, from 1 (default 1). Pass the previous reply's next_page.
page_sizeintegerResults per page, 1-100 (default 25).
processed_afterstringOnly orders processed on or after this date.
processed_beforestringOnly orders processed on or before this date.
sortstringSort by creation date (default: Smartrr's own order).

smartrr_get_order Get order

One order by its Shopify order id (the `shopifyId` field in smartrr_list_orders, passed as shown). GET /vendor/orders/{shopifyId}.

ParameterTypeDescription
shopify_order_id *stringThe order's Shopify id (`shopifyId` in smartrr_list_orders).

smartrr_list_bills List bills

List billing attempts across all subscriptions with amount, status (pending, processing, succeeded, failed, canceled), billing date, retry count, error and the subscription and customer. Filter by billing date; `status` filters the returned page only (use page_size 100 and next_page to cover more). Bill ids are numbers. GET /vendor/bill.

ParameterTypeDescription
billing_afterstringOnly bills with a billing date on or after this date.
billing_beforestringOnly bills with a billing date on or before this date.
pageintegerPage number, from 1 (default 1). Pass the previous reply's next_page.
page_sizeintegerResults per page, 1-100 (default 25).
sortstringSort by creation date (default: Smartrr's own order).
statusstringKeep only bills in this status (applied to the fetched page, not server-side).

smartrr_get_bill_history Get bill history

The audit trail of one bill: every status change, retry and error. GET /vendor/bill/{billId}/history.

ParameterTypeDescription
bill_id *integerSmartrr bill id (numeric `id` in smartrr_list_bills).

smartrr_list_selling_plan_groups List subscription programs

The store's subscription programs (selling plan groups) and their plans: name, options, delivery and billing frequency, discounts. GET /vendor/selling-plan-group.

smartrr_list_cancellation_reasons List cancellation reasons

The cancellation reasons configured in Smartrr (id, type, text, action, retention discount). Use an `id` as reason_id when cancelling a subscription. GET /vendor/cancellation-reasons.

smartrr_get_analytics Get subscription analytics

Active subscription count and active subscriber count for each day in a date range. GET /vendor/analytics-simple.

ParameterTypeDescription
end_date *stringLast day of the range.
start_date *stringFirst day of the range.

smartrr_pause_subscription Pause a subscription

WRITE: pause a customer's subscription until a date: no orders or charges are created while it is paused, then it resumes on that date. Reverse it with smartrr_resume_subscription. Takes the customer id and subscription id from smartrr_list_subscriptions. PUT /vendor/customer/{customerId}/purchase-state/{subscriptionId}/pause.

ParameterTypeDescription
customer_id *stringSmartrr customer id (`custRel.id`).
subscription_id *stringSmartrr subscription id (`id`, a UUID).
unpause_date *stringWhen the subscription resumes.

smartrr_resume_subscription Resume a subscription

WRITE: reactivate a paused or cancelled subscription; the customer will be billed on next_billing_date and every cycle after. Customer-facing: it restarts charges to the customer's card. PUT /vendor/customer/{customerId}/purchase-state/{subscriptionId}/activate.

ParameterTypeDescription
customer_id *stringSmartrr customer id (`custRel.id`).
next_billing_date *stringThe next billing date after reactivation.
subscription_id *stringSmartrr subscription id (`id`, a UUID).

smartrr_cancel_customer_subscription Cancel a customer's subscription

WRITE, DESTRUCTIVE: cancel a customer's subscription in the merchant's store (this is the customer's Smartrr subscription, not your usefulapi plan). It stops all future orders and charges; the reason may trigger Smartrr's configured cancellation emails or actions. It can be undone only with smartrr_resume_subscription. Get reason_id from smartrr_list_cancellation_reasons. PUT /vendor/customer/{customerId}/purchase-state/{subscriptionId}/cancel.

ParameterTypeDescription
customer_id *stringSmartrr customer id (`custRel.id`).
reason_id *stringCancellation reason id from smartrr_list_cancellation_reasons.
subscription_id *stringSmartrr subscription id (`id`, a UUID).

smartrr_skip_order Skip a subscription order

WRITE: skip one scheduled order of a subscription (no order and no charge for that cycle; the schedule moves on). `date` is the scheduled order date to skip; omit it to skip the next one. Reverse with smartrr_unskip_order. PUT /vendor/customer/{customerId}/purchase-state/{subscriptionId}/skip.

ParameterTypeDescription
customer_id *stringSmartrr customer id (`custRel.id`).
subscription_id *stringSmartrr subscription id (`id`, a UUID).
datestringThe scheduled order date to skip (default: the next order).

smartrr_unskip_order Unskip a subscription order

WRITE: restore a previously skipped order of a subscription, so it is billed and shipped again. `date` is the skipped order date; omit it to restore the earliest skip. PUT /vendor/customer/{customerId}/purchase-state/{subscriptionId}/unskip.

ParameterTypeDescription
customer_id *stringSmartrr customer id (`custRel.id`).
subscription_id *stringSmartrr subscription id (`id`, a UUID).
datestringThe skipped order date to restore (default: the earliest skipped one).

smartrr_set_next_billing_date Set next billing date

WRITE: change the date on which a subscription is next billed and its order created. Customer-facing: the customer is charged on the new date. PUT /vendor/customer/{customerId}/purchase-state/{subscriptionId}/next-billing-date.

ParameterTypeDescription
customer_id *stringSmartrr customer id (`custRel.id`).
date *stringThe new next billing date.
subscription_id *stringSmartrr subscription id (`id`, a UUID).

smartrr_retry_bill Retry a failed bill

WRITE, CHARGES THE CUSTOMER: retry a billing attempt now. If it succeeds the customer's saved payment method is charged for the bill amount and the order is created. Check the bill with smartrr_list_bills first; do not retry a succeeded bill. Not idempotent: each call can charge again. Requires confirm=true. POST /vendor/bill/{billId}/retry.

ParameterTypeDescription
bill_id *integerSmartrr bill id (numeric `id` in smartrr_list_bills).
confirm *booleanMust be true: confirms the customer's saved payment method should be charged now.