Create Discount
Changed onCreate a discount in a workspace. A code-type discount (the default) needs a unique code; a percentage discount needs percent; a fixed discount needs a positive amount.
Creating a discount publishes the code; it does not attach it to anything. The link between an order and a discount is a separate applied-discount record, written when a buyer redeems the code at checkout or when a ClickFunnels user applies it in the admin UI - which is why POST /api/v2/workspaces/{workspace_id}/orders takes no discount field and the discount_ids on an order are read-only. Writing applied discounts is not part of this API yet, and when it lands it will be that record you create rather than a discount field on the order. Until then an integration creates, reads, updates, expires and deletes discounts, and reads back which orders ended up carrying them.
Request
- Base URLhttps://myworkspace.myclickfunnels.com/api/v2
- Auth
- HTTP bearer
- or OAuth 2Authorization codehttps://accounts.myclickfunnels.com/oauth/authorizeToken URLhttps://accounts.myclickfunnels.com/oauth/token
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
Request body
Example request
{
"discount": {
"name": "Launch 20",
"code": "LAUNCH20",
"discount_type": "code",
"discount_method": "percentage",
"percent": "20.0",
"applies_to": "all_products"
}
}Response
Created
Example response
{
"id": 771,
"public_id": "gBEDMo",
"workspace_id": 42000,
"name": "Launch 20",
"code": "LAUNCH20",
"discount_type": "code",
"discount_method": "percentage",
"amount": null,
"percent": "20.0",
"currency": "usd",
"applies_to": "all_products",
"apply_from": "2025-01-01T00:00:00.000Z",
"apply_until": null,
"limit_1_per_customer": false,
"require_minimum_spend": false,
"require_minimum_spend_amount": null,
"discounts_per_redemption": null,
"redemptions_count": 0,
"product_ids": [],
"variant_ids": [],
"products_collection_ids": [],
"active": true,
"expired": false,
"scheduled": false,
"created_at": "2025-01-01T00:00:00.000Z",
"updated_at": "2025-01-01T00:00:00.000Z"
}Changes
- info
endpoint added
- info