REST API reference

ThriveCart API

15 endpoints for ThriveCart. Each one is a POST with a JSON body, called with your API key.

Base URL
https://cotlet.dev/api/v1/thrivecart
Connects with
Your own ThriveCart account (account owner; sub-users cannot clone products)
Integration page
ThriveCart
ThriveCart Endpoints
Endpoint Access Description
list_products read Products in your account with type, status and ID.
get_product read One product with its pricing options, bumps, upsells and downsells.
list_transactions read Payments, rebills, refunds and cancellations with customer, product, amount and invoice ID.
list_subscriptions read Subscriptions with status and next payment, plus the count, monthly recurring revenue and yearly revenue of the filter.
list_coupons read Coupons with code, discount, status, dates, products and number of uses.
list_affiliates read Affiliates with their approval status per product.
create_coupon write New coupon with a fixed or percentage discount, dates, use limit and products.
update_coupon write Enable or disable a coupon, or change its discount, dates, use limit or products.
clone_product write Copy a product with its checkout and settings, e.g. for a new cohort.
set_product_status write Switch a product between live, test and disabled, or archive or restore it.
refund_transaction write Full or partial refund of one payment, with an internal note. Does not cancel the subscription.
pause_subscription write Pause billing indefinitely, for a number of billing periods or until a date.
cancel_subscription write Stop all future payments of a subscription. Cannot be undone.
approve_affiliate write Approve or reject a pending affiliate application for one or more products.
set_affiliate_commission write Custom commission for one affiliate on one product.

POST https://cotlet.dev/api/v1/thrivecart/list_products

Lists the products of your account with name, type, status and ID. Filter by status the way the Products page does; the default is Active, which holds live, test and disabled products and leaves out archived ones. Use the product_id of each item in the other tools.

Parameters

Parameters: list_products
NameTypeDescription
status enum live, test, disabled, archived, active (all but archived) or all. Default: active.
search string Part of the product name.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/thrivecart/list_products \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("thrivecart", "list_products")
Node.js
const result = await cotlet.call('thrivecart', 'list_products');
CLI
cotlet call thrivecart list_products

Example response

{
  "products": [
    {
      "product_id": "12",
      "name": "Landing Page Course",
      "type": "digital",
      "status": "live"
    },
    {
      "product_id": "15",
      "name": "Spring Workshop",
      "type": "digital",
      "status": "disabled"
    }
  ]
}

POST https://cotlet.dev/api/v1/thrivecart/get_product

Returns one product with its pricing options and the bumps, upsells and downsells in its funnel, each with its own ID and price. Use it to pick the product_ids for a coupon or an affiliate.

Parameters

Parameters: get_product
NameTypeDescription
product_id required string Product ID from list_products.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/thrivecart/get_product \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product_id":"product_8c41d2"}'
Python
result = client.call("thrivecart", "get_product", {"product_id":"product_8c41d2"})
Node.js
const result = await cotlet.call('thrivecart', 'get_product', {"product_id":"product_8c41d2"});
CLI
cotlet call thrivecart get_product --data '{"product_id":"product_8c41d2"}'

Example response

{
  "product_id": "12",
  "name": "Landing Page Course",
  "status": "live",
  "pricing_options": [
    {
      "id": "po_1",
      "name": "One-time",
      "amount": "197.00",
      "currency": "USD"
    },
    {
      "id": "po_2",
      "name": "Monthly",
      "amount": "49.00",
      "currency": "USD"
    }
  ],
  "bumps": [
    {
      "bump_id": "31",
      "name": "Template pack",
      "amount": "27.00"
    }
  ],
  "upsells": [],
  "downsells": []
}

POST https://cotlet.dev/api/v1/thrivecart/list_transactions

Searches your transactions by customer name, email, order ID or invoice ID, and by type. Pages hold up to 100 transactions; pass page to read on. Use the transaction_id of an item in refund_transaction and the subscription_id of a rebill in pause_subscription or cancel_subscription.

Parameters

Parameters: list_transactions
NameTypeDescription
query string Customer name or email, order ID or invoice ID.
type enum any, charge, rebill, refund or cancel. Default: any.
per_page integer 1 to 100. Default: 50.
page integer Page number, starting at 1. Default: 1.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/thrivecart/list_transactions \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("thrivecart", "list_transactions")
Node.js
const result = await cotlet.call('thrivecart', 'list_transactions');
CLI
cotlet call thrivecart list_transactions

Example response

{
  "transactions": [
    {
      "transaction_id": "tx_20418",
      "type": "charge",
      "customer": {
        "name": "Dana Client",
        "email": "client@example.com"
      },
      "product": "Landing Page Course",
      "amount": "97.00",
      "currency": "USD",
      "invoice_id": "INV-20418",
      "subscription_id": "sub_7731",
      "date": "2026-10-02"
    }
  ],
  "page": 1,
  "has_more": false
}

POST https://cotlet.dev/api/v1/thrivecart/list_subscriptions

Returns the subscriptions that match your filter, as the Subscriptions dashboard does, plus the number of matches and their monthly recurring revenue and yearly revenue. Use it to see how much paused or overdue subscriptions cost you. Cancelled (still active) means the customer cancelled renewals but has access until the last paid date.

Parameters

Parameters: list_subscriptions
NameTypeDescription
status enum new_signups, trial, active, cancelled, cancelled_still_active, paused, completed, overdue or all. Default: active.
product_id string Only this product.
query string Customer name or email.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/thrivecart/list_subscriptions \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"status":"overdue"}'
Python
result = client.call("thrivecart", "list_subscriptions", {"status":"overdue"})
Node.js
const result = await cotlet.call('thrivecart', 'list_subscriptions', {"status":"overdue"});
CLI
cotlet call thrivecart list_subscriptions --data '{"status":"overdue"}'

Example response

{
  "subscriptions": [
    {
      "subscription_id": "sub_7731",
      "customer": "Dana Client",
      "product": "Landing Page Course",
      "status": "overdue",
      "amount": "49.00",
      "currency": "USD",
      "billing": "monthly",
      "next_payment": "2026-10-05"
    },
    {
      "subscription_id": "sub_7802",
      "customer": "Sam Rivers",
      "product": "Membership",
      "status": "overdue",
      "amount": "97.00",
      "currency": "USD",
      "billing": "monthly",
      "next_payment": "2026-10-08"
    }
  ],
  "total": 2,
  "mrr": "146.00",
  "yearly_revenue": "1752.00",
  "currency": "USD"
}

POST https://cotlet.dev/api/v1/thrivecart/list_coupons

Lists the coupons of the Coupons area with code, discount, status, redeemable dates, the products they work on and how many times each was used. Use the coupon_id of each item in update_coupon.

Parameters

Parameters: list_coupons
NameTypeDescription
search string Part of the coupon name or code.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/thrivecart/list_coupons \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("thrivecart", "list_coupons")
Node.js
const result = await cotlet.call('thrivecart', 'list_coupons');
CLI
cotlet call thrivecart list_coupons

Example response

{
  "coupons": [
    {
      "coupon_id": "87",
      "name": "Black Friday 30% main course",
      "code": "BLACKFRIDAY",
      "status": "enabled",
      "discount": "30%",
      "starts_on": "2026-11-27",
      "ends_on": "2026-12-01",
      "max_uses": 100,
      "uses": 0,
      "product_ids": [
        "12"
      ]
    },
    {
      "coupon_id": "71",
      "name": "Spring 20% off",
      "code": "SPRING20",
      "status": "enabled",
      "discount": "20%",
      "starts_on": null,
      "ends_on": null,
      "max_uses": null,
      "uses": 14,
      "product_ids": [
        "15"
      ]
    }
  ]
}

POST https://cotlet.dev/api/v1/thrivecart/list_affiliates

Lists your affiliates with contact details and, for each product, whether the affiliate is approved or pending. Pages hold up to 25 affiliates; pass page to read on. Use the affiliate_id of an item in approve_affiliate and set_affiliate_commission.

Parameters

Parameters: list_affiliates
NameTypeDescription
product_id string Only affiliates of this product.
query string Affiliate name, email or affiliate ID.
page integer Page number, starting at 1. Default: 1.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/thrivecart/list_affiliates \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("thrivecart", "list_affiliates")
Node.js
const result = await cotlet.call('thrivecart', 'list_affiliates');
CLI
cotlet call thrivecart list_affiliates

Example response

{
  "affiliates": [
    {
      "affiliate_id": "3481",
      "name": "Jo Partner",
      "email": "jo@example.com",
      "products": [
        {
          "product_id": "12",
          "status": "pending"
        }
      ]
    }
  ],
  "page": 1,
  "has_more": false
}

Create coupon

write Confirm

POST https://cotlet.dev/api/v1/thrivecart/create_coupon

Creates a coupon the way the Coupons area does. The code needs at least 3 characters, letters and digits only. A percentage coupon can apply to the funnel, the main product, bumps only or the main product plus bumps; a fixed coupon applies to the main product only, once. max_uses counts all uses together, not per customer. The coupon is enabled when created, so buyers can use it from the start date. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: create_coupon
NameTypeDescription
name required string Internal name.
code required string At least 3 characters, letters and digits only.
discount_type required enum fixed or percentage.
discount required string Amount or percent, decimals allowed for percent, e.g. 20 or 12.5.
applies_to enum Percentage only: funnel, main_product, bumps_only or main_and_bumps. Default: main_product.
apply_to_recurring boolean Percentage only: also discount recurring payments.
product_ids string[] Products it works on. Default: all products.
starts_on date First day it works. Default: now.
ends_on date Last day it works, until 23:59:59 in your account time zone.
max_uses integer Disable after this many uses in total.
affiliate_id string Credit this affiliate on every use.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/thrivecart/create_coupon \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Black Friday 30% main course","code":"BLACKFRIDAY","discount_type":"percentage","discount":"30","applies_to":"main_product","product_ids":["12"],"starts_on":"2026-11-27","ends_on":"2026-12-01","max_uses":100}'
Python
result = client.call("thrivecart", "create_coupon", {"name":"Black Friday 30% main course","code":"BLACKFRIDAY","discount_type":"percentage","discount":"30","applies_to":"main_product","product_ids":["12"],"starts_on":"2026-11-27","ends_on":"2026-12-01","max_uses":100})
Node.js
const result = await cotlet.call('thrivecart', 'create_coupon', {"name":"Black Friday 30% main course","code":"BLACKFRIDAY","discount_type":"percentage","discount":"30","applies_to":"main_product","product_ids":["12"],"starts_on":"2026-11-27","ends_on":"2026-12-01","max_uses":100});
CLI
cotlet call thrivecart create_coupon --data '{"name":"Black Friday 30% main course","code":"BLACKFRIDAY","discount_type":"percentage","discount":"30","applies_to":"main_product","product_ids":["12"],"starts_on":"2026-11-27","ends_on":"2026-12-01","max_uses":100}'

Example response

{
  "coupon_id": "87",
  "name": "Black Friday 30% main course",
  "code": "BLACKFRIDAY",
  "status": "enabled",
  "discount": "30%",
  "applies_to": "main_product",
  "product_ids": [
    "12"
  ],
  "starts_on": "2026-11-27",
  "ends_on": "2026-12-01",
  "max_uses": 100,
  "uses": 0
}

Update coupon

write Confirm

POST https://cotlet.dev/api/v1/thrivecart/update_coupon

Changes one coupon. Disabling keeps the coupon and enabling turns it back on. Discount, dates and the use limit apply to the next buyer. If you add bumps to a product after creating a coupon, send product_ids again, because new bumps are not added automatically. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: update_coupon
NameTypeDescription
coupon_id required string Coupon ID from list_coupons.
fields required object Any of status (enabled or disabled), discount, starts_on, ends_on, max_uses, product_ids.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/thrivecart/update_coupon \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"coupon_id":"coupon_8c41d2","fields":"fields"}'
Python
result = client.call("thrivecart", "update_coupon", {"coupon_id":"coupon_8c41d2","fields":"fields"})
Node.js
const result = await cotlet.call('thrivecart', 'update_coupon', {"coupon_id":"coupon_8c41d2","fields":"fields"});
CLI
cotlet call thrivecart update_coupon --data '{"coupon_id":"coupon_8c41d2","fields":"fields"}'

Example response

{
  "coupon_id": "71",
  "code": "SPRING20",
  "status": "disabled",
  "discount": "20%",
  "uses": 14
}

POST https://cotlet.dev/api/v1/thrivecart/clone_product

Copies a product the way the copy button does, including archived products. Only the account owner can clone; for a sub-user the call fails with a permission error. The copy is a separate product with its own ID, ready for you to edit. clone_product runs without asking first: it sends nothing to anyone, and set_product_status archives the copy in one call.

Parameters

Parameters: clone_product
NameTypeDescription
product_id required string Product ID from list_products.
name string Name for the copy. Default: ThriveCart's default for a copy.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/thrivecart/clone_product \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product_id":"15","name":"Autumn Workshop 2026"}'
Python
result = client.call("thrivecart", "clone_product", {"product_id":"15","name":"Autumn Workshop 2026"})
Node.js
const result = await cotlet.call('thrivecart', 'clone_product', {"product_id":"15","name":"Autumn Workshop 2026"});
CLI
cotlet call thrivecart clone_product --data '{"product_id":"15","name":"Autumn Workshop 2026"}'

Example response

{
  "product_id": "27",
  "name": "Spring Workshop, autumn cohort",
  "cloned_from": "15"
}

Set product status

write Confirm

POST https://cotlet.dev/api/v1/thrivecart/set_product_status

Sets the status of a product. Live products can be bought, test products are in test mode, disabled products are inactive. Archiving removes a product from the active list and disables its checkout, while its stats and transactions stay in your reports; restoring makes it active again. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: set_product_status
NameTypeDescription
product_id required string Product ID from list_products.
status required enum live, test, disabled, archived or restored.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/thrivecart/set_product_status \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product_id":"product_8c41d2","status":"live"}'
Python
result = client.call("thrivecart", "set_product_status", {"product_id":"product_8c41d2","status":"live"})
Node.js
const result = await cotlet.call('thrivecart', 'set_product_status', {"product_id":"product_8c41d2","status":"live"});
CLI
cotlet call thrivecart set_product_status --data '{"product_id":"product_8c41d2","status":"live"}'

Example response

{
  "product_id": "15",
  "name": "Spring Workshop",
  "status": "archived"
}

Refund transaction

write Confirm

POST https://cotlet.dev/api/v1/thrivecart/refund_transaction

Refunds one payment or rebill, in full or in part. You can refund partly several times, up to the transaction total and never more. A refund cannot be reversed, and the note stays internal. It does not cancel the subscription, so call cancel_subscription too. A PayPal refund fails if your PayPal account has too little balance. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: refund_transaction
NameTypeDescription
transaction_id required string Transaction ID from list_transactions.
amount string Partial amount. Default: the full remaining amount.
note string Internal note, never shown to the customer.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/thrivecart/refund_transaction \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"transaction_id":"tx_20418","note":"30-day guarantee, asked 10 Oct"}'
Python
result = client.call("thrivecart", "refund_transaction", {"transaction_id":"tx_20418","note":"30-day guarantee, asked 10 Oct"})
Node.js
const result = await cotlet.call('thrivecart', 'refund_transaction', {"transaction_id":"tx_20418","note":"30-day guarantee, asked 10 Oct"});
CLI
cotlet call thrivecart refund_transaction --data '{"transaction_id":"tx_20418","note":"30-day guarantee, asked 10 Oct"}'

Example response

{
  "transaction_id": "tx_20418",
  "status": "refunded",
  "amount": "97.00",
  "refunded_total": "97.00",
  "remaining": "0.00",
  "currency": "USD"
}

Pause subscription

write Confirm

POST https://cotlet.dev/api/v1/thrivecart/pause_subscription

Pauses billing of one subscription. Without resume_on or periods the pause lasts until you resume it. Pausing does not remove payments the customer owes: a subscription with 5 rebills is still charged 5 times, later. resume_on must be at least 24 hours ahead. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: pause_subscription
NameTypeDescription
subscription_id required string Subscription ID from list_subscriptions.
resume_on date Resume automatically on this date, at least 24 hours from now.
periods integer Pause for this many billing periods instead.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/thrivecart/pause_subscription \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"subscription_id":"subscription_8c41d2"}'
Python
result = client.call("thrivecart", "pause_subscription", {"subscription_id":"subscription_8c41d2"})
Node.js
const result = await cotlet.call('thrivecart', 'pause_subscription', {"subscription_id":"subscription_8c41d2"});
CLI
cotlet call thrivecart pause_subscription --data '{"subscription_id":"subscription_8c41d2"}'

Example response

{
  "subscription_id": "sub_7731",
  "status": "paused",
  "resume_on": "2026-11-15"
}

Cancel subscription

write Confirm

POST https://cotlet.dev/api/v1/thrivecart/cancel_subscription

Cancels one active or paused subscription for good. ThriveCart tells the payment processor, tags the original transaction as cancelled and adds a $0.00 transaction on that day to mark it. It does not refund anything. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: cancel_subscription
NameTypeDescription
subscription_id required string Subscription ID from list_subscriptions.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/thrivecart/cancel_subscription \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"subscription_id":"subscription_8c41d2"}'
Python
result = client.call("thrivecart", "cancel_subscription", {"subscription_id":"subscription_8c41d2"})
Node.js
const result = await cotlet.call('thrivecart', 'cancel_subscription', {"subscription_id":"subscription_8c41d2"});
CLI
cotlet call thrivecart cancel_subscription --data '{"subscription_id":"subscription_8c41d2"}'

Example response

{
  "subscription_id": "sub_7731",
  "status": "cancelled",
  "cancelled_on": "2026-10-11"
}

Approve affiliate

write Confirm

POST https://cotlet.dev/api/v1/thrivecart/approve_affiliate

Approves or rejects an affiliate for the products you name. Approving needs a pending application for each of them. An affiliate approved for the main product is also approved for the upsells and downsells of its funnel. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: approve_affiliate
NameTypeDescription
affiliate_id required string Affiliate ID from list_affiliates.
product_ids required string[] Product IDs to decide on.
decision required enum approve or reject.
trigger_emails boolean Send ThriveCart's emails to the affiliate and you.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/thrivecart/approve_affiliate \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"affiliate_id":"affiliate_8c41d2","product_ids":["product ids"],"decision":"approve"}'
Python
result = client.call("thrivecart", "approve_affiliate", {"affiliate_id":"affiliate_8c41d2","product_ids":["product ids"],"decision":"approve"})
Node.js
const result = await cotlet.call('thrivecart', 'approve_affiliate', {"affiliate_id":"affiliate_8c41d2","product_ids":["product ids"],"decision":"approve"});
CLI
cotlet call thrivecart approve_affiliate --data '{"affiliate_id":"affiliate_8c41d2","product_ids":["product ids"],"decision":"approve"}'

Example response

{
  "affiliate_id": "3481",
  "name": "Jo Partner",
  "products": [
    {
      "product_id": "12",
      "status": "approved"
    }
  ]
}

Set affiliate commission

write Confirm

POST https://cotlet.dev/api/v1/thrivecart/set_affiliate_commission

Sets a custom commission for one approved affiliate on one product, instead of the default rate. It applies to all pricing options of the product, not to single ones. Upfront and recurring commissions are set separately. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: set_affiliate_commission
NameTypeDescription
affiliate_id required string Affiliate ID from list_affiliates.
product_id required string Product ID from list_products.
type required enum percentage or fixed.
amount required string Percent or amount, e.g. 40.
recurring_type enum percentage or fixed, for recurring payments.
recurring_amount string Percent or amount for recurring payments.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/thrivecart/set_affiliate_commission \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"affiliate_id":"affiliate_8c41d2","product_id":"product_8c41d2","type":"percentage","amount":"amount"}'
Python
result = client.call("thrivecart", "set_affiliate_commission", {"affiliate_id":"affiliate_8c41d2","product_id":"product_8c41d2","type":"percentage","amount":"amount"})
Node.js
const result = await cotlet.call('thrivecart', 'set_affiliate_commission', {"affiliate_id":"affiliate_8c41d2","product_id":"product_8c41d2","type":"percentage","amount":"amount"});
CLI
cotlet call thrivecart set_affiliate_commission --data '{"affiliate_id":"affiliate_8c41d2","product_id":"product_8c41d2","type":"percentage","amount":"amount"}'

Example response

{
  "affiliate_id": "3481",
  "product_id": "12",
  "upfront": {
    "type": "percentage",
    "amount": "40"
  }
}