Skip to content

List a subscription's discounts

GET
/api/subscriptions/{id}/discounts
curl --request GET \
--url https://api.usegro.co/api/subscriptions/example/discounts \
--header 'Authorization: Bearer <token>' \
--header 'X-API-Key: <X-API-Key>'

The discounts on the subscription now. Pass include_history=true to also get ones that ran out (EXHAUSTED) or were removed.

id
required
string
include_history
boolean

Also return exhausted and removed discounts

Media typeapplication/json
object
data
Array<object>
object
id

Gro discount ID, used to remove it

string
shopify_discount_id

The discount on the Shopify contract

string
title
string
nullable
discount_code
string
nullable
target_type
string
Allowed values: ORDER SHIPPING_LINE LINE_ITEM
value_type
string
Allowed values: PERCENTAGE FIXED_AMOUNT
value

A percentage, or a fixed amount in the currency’s main unit (not cents)

number
currency_code
string
nullable
recurring_cycle_limit

How many orders it applies to; null for every order

integer
nullable
status
string
Allowed values: ACTIVE EXHAUSTED REMOVED
is_active
boolean
is_shipping_discount
boolean
discount_label

Ready to show, e.g. “10% off”

string
estimated_amount

What an active order discount takes off the current subtotal

number
nullable
applied_at
string format: date-time
nullable
exhausted_at
string format: date-time
nullable
removed_at
string format: date-time
nullable
created_at
string format: date-time
updated_at
string format: date-time
metadata
object
total
integer

Example

{
"data": [
{
"target_type": "ORDER",
"value_type": "PERCENTAGE",
"status": "ACTIVE"
}
]
}

Subscription not found

Media typeapplication/json