Tamio

List all discounts

GET https://api.tamio.com/v2/discounts/list

Returns a paginated list of discounts. Supports filtering by type, status, condition, applies_to, date range, text search, product, and customer.

Query Parameters

page integer*
per_page integer*
order string
ascdesc
sort_by string
nametypeapplies_toconditioncreated_at
filter string

Search by discount name, coupon code, or currency

from string

Start date filter (ISO 8601 or unix timestamp)

to string

End date filter (ISO 8601 or unix timestamp)

type string

Filter by discount type

customer_discountproduct_discount
applies_to string

Filter by what the discount applies to

selected_productsselected_categoriesall_products
condition string

Filter by activation condition

all_ordersitem_subtotalitem_quantitycouponvouchersorder_subtotal
status string

Filter by active/inactive status

activeinactive
product_id string

Filter by product UUID

customer_id string

Filter by customer UUID

Responses

200 Discounts listed successfully

Discounts listed successfully

status integer
total_results integer
discounts array of Discount
id string
object string
label string
currency string
percent_off number
amount_off integer

Fixed discount amount in smallest currency unit

shipping_percent_off number
shipping_amount_off integer

Shipping discount in smallest currency unit

active boolean
type string
product_discountcustomer_discount
condition string
all_ordersitem_subtotalitem_quantitycouponvouchers
applies_to string
selected_productsselected_categoriesall_products
rule_amount integer

Minimum amount in smallest currency unit (for subtotal conditions) or quantity

order_condition string
order_subtotalorder_shippingorder_quantity
block_affiliates boolean
destinations array of string
payments array of string
expiry_date integer

Unix timestamp of expiry date

subscription_discount_duration string
onceforeverrepeating
number_of_months integer

Number of months for repeating subscription discounts

domain integer
customer string

Customer UUID (only for customer_discount type)

products array of string

Product UUIDs (only when applies_to is "selected_products")

categories object

Category configuration (only when applies_to is "selected_categories")

coupon string

Coupon code (only when condition is "coupon")

coupon_max_redemptions integer

Maximum redemptions (only when condition is "coupon")

coupon_times_redeemed integer

Number of times redeemed (only when condition is "coupon")

vouchers array of string

Voucher code list (only when condition is "vouchers")

voucher_method string

Voucher generation method (only when condition is "vouchers")

voucher_prefix string

Voucher code prefix (only when condition is "vouchers")

number_of_vouchers integer

Total number of vouchers (only when condition is "vouchers")

created_at integer

Unix timestamp

400 Validation or business-logic error.
401 Unauthorized – invalid or missing Bearer token
/discounts/list
1const response = await fetch("https://api.tamio.com/v2/discounts/list", {
2 headers: {
3 "Authorization": "Bearer YOUR_API_KEY",
4 "Accept": "application/json"
5 }
6});
7const data = await response.json();
Responses
{
  "status": 200,
  "total_results": 42,
  "discounts": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "object": "discount",
      "label": "Summer Sale 10% Off",
      "currency": "EUR",
      "percent_off": 10,
      "amount_off": 0,
      "shipping_percent_off": 0,
      "shipping_amount_off": 0,
      "active": true,
      "type": "product_discount",
      "condition": "coupon",
      "applies_to": "all_products",
      "rule_amount": 5000,
      "order_condition": "order_subtotal",
      "block_affiliates": false,
      "destinations": [
        "worldwide"
      ],
      "payments": [
        "all"
      ],
      "expiry_date": 1735689600,
      "subscription_discount_duration": "once",
      "number_of_months": 3,
      "domain": 12,
      "customer": "660e8400-e29b-41d4-a716-446655440001",
      "products": [
        "770e8400-e29b-41d4-a716-446655440002"
      ],
      "categories": {
        "physical": [
          "clothing",
          "accessories"
        ],
        "digital": [],
        "services": [],
        "billing_plans": []
      },
      "coupon": "SUMMER10",
      "coupon_max_redemptions": 100,
      "coupon_times_redeemed": 45,
      "vouchers": [],
      "voucher_method": "autogenerated",
      "voucher_prefix": "SALE_",
      "number_of_vouchers": 100,
      "created_at": 1700000000
    }
  ]
}