Create a new company discount
Creates a discount code for the company. code and price_discount_type are required; supply percentage_value for percentage discounts, flat_value for flat discounts, and free_variant_ids or free_enrollment_pack_ids for free-product or free-enrollment-pack discounts. Eligibility rules (products, collections, enrollment packs, countries, customers, shipping methods, minimum purchase, usage limits, and combinability) are set with the corresponding fields, and start/end dates are interpreted in time_zone. Discounts created through a droplet installation default to source droplet unless source promo is requested. Requires a company admin Bearer token with coupons update permission. Returns the created discount.
curl --request POST \
--url https://api.fluid.app/api/v2025-06/discounts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"discount": {
"code": "PAPERDAY10",
"description": "10% off orders over $50 for National Paper Day week",
"price_discount_type": "percentage",
"percentage_value": 10,
"applicable_for": "everything",
"purchase_requirement": "minimum_purchase_amount",
"minimum_purchase_requirement_amount": 50,
"customer_filter": "all_customers",
"limit_usage_per_customer": true,
"use_limit": 1,
"other_product_discounts": false,
"start_date": "2026-09-20",
"start_time": "00:00",
"has_end_date": true,
"end_date": "2026-09-30",
"end_time": "23:59",
"time_zone": "America/New_York",
"active": true
}
}
'import requests
url = "https://api.fluid.app/api/v2025-06/discounts"
payload = { "discount": {
"code": "PAPERDAY10",
"description": "10% off orders over $50 for National Paper Day week",
"price_discount_type": "percentage",
"percentage_value": 10,
"applicable_for": "everything",
"purchase_requirement": "minimum_purchase_amount",
"minimum_purchase_requirement_amount": 50,
"customer_filter": "all_customers",
"limit_usage_per_customer": True,
"use_limit": 1,
"other_product_discounts": False,
"start_date": "2026-09-20",
"start_time": "00:00",
"has_end_date": True,
"end_date": "2026-09-30",
"end_time": "23:59",
"time_zone": "America/New_York",
"active": True
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
discount: {
code: 'PAPERDAY10',
description: '10% off orders over $50 for National Paper Day week',
price_discount_type: 'percentage',
percentage_value: 10,
applicable_for: 'everything',
purchase_requirement: 'minimum_purchase_amount',
minimum_purchase_requirement_amount: 50,
customer_filter: 'all_customers',
limit_usage_per_customer: true,
use_limit: 1,
other_product_discounts: false,
start_date: '2026-09-20',
start_time: '00:00',
has_end_date: true,
end_date: '2026-09-30',
end_time: '23:59',
time_zone: 'America/New_York',
active: true
}
})
};
fetch('https://api.fluid.app/api/v2025-06/discounts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fluid.app/api/v2025-06/discounts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'discount' => [
'code' => 'PAPERDAY10',
'description' => '10% off orders over $50 for National Paper Day week',
'price_discount_type' => 'percentage',
'percentage_value' => 10,
'applicable_for' => 'everything',
'purchase_requirement' => 'minimum_purchase_amount',
'minimum_purchase_requirement_amount' => 50,
'customer_filter' => 'all_customers',
'limit_usage_per_customer' => true,
'use_limit' => 1,
'other_product_discounts' => false,
'start_date' => '2026-09-20',
'start_time' => '00:00',
'has_end_date' => true,
'end_date' => '2026-09-30',
'end_time' => '23:59',
'time_zone' => 'America/New_York',
'active' => true
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fluid.app/api/v2025-06/discounts"
payload := strings.NewReader("{\n \"discount\": {\n \"code\": \"PAPERDAY10\",\n \"description\": \"10% off orders over $50 for National Paper Day week\",\n \"price_discount_type\": \"percentage\",\n \"percentage_value\": 10,\n \"applicable_for\": \"everything\",\n \"purchase_requirement\": \"minimum_purchase_amount\",\n \"minimum_purchase_requirement_amount\": 50,\n \"customer_filter\": \"all_customers\",\n \"limit_usage_per_customer\": true,\n \"use_limit\": 1,\n \"other_product_discounts\": false,\n \"start_date\": \"2026-09-20\",\n \"start_time\": \"00:00\",\n \"has_end_date\": true,\n \"end_date\": \"2026-09-30\",\n \"end_time\": \"23:59\",\n \"time_zone\": \"America/New_York\",\n \"active\": true\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.fluid.app/api/v2025-06/discounts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"discount\": {\n \"code\": \"PAPERDAY10\",\n \"description\": \"10% off orders over $50 for National Paper Day week\",\n \"price_discount_type\": \"percentage\",\n \"percentage_value\": 10,\n \"applicable_for\": \"everything\",\n \"purchase_requirement\": \"minimum_purchase_amount\",\n \"minimum_purchase_requirement_amount\": 50,\n \"customer_filter\": \"all_customers\",\n \"limit_usage_per_customer\": true,\n \"use_limit\": 1,\n \"other_product_discounts\": false,\n \"start_date\": \"2026-09-20\",\n \"start_time\": \"00:00\",\n \"has_end_date\": true,\n \"end_date\": \"2026-09-30\",\n \"end_time\": \"23:59\",\n \"time_zone\": \"America/New_York\",\n \"active\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/v2025-06/discounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"discount\": {\n \"code\": \"PAPERDAY10\",\n \"description\": \"10% off orders over $50 for National Paper Day week\",\n \"price_discount_type\": \"percentage\",\n \"percentage_value\": 10,\n \"applicable_for\": \"everything\",\n \"purchase_requirement\": \"minimum_purchase_amount\",\n \"minimum_purchase_requirement_amount\": 50,\n \"customer_filter\": \"all_customers\",\n \"limit_usage_per_customer\": true,\n \"use_limit\": 1,\n \"other_product_discounts\": false,\n \"start_date\": \"2026-09-20\",\n \"start_time\": \"00:00\",\n \"has_end_date\": true,\n \"end_date\": \"2026-09-30\",\n \"end_time\": \"23:59\",\n \"time_zone\": \"America/New_York\",\n \"active\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 5821,
"code": "PAPERDAY10",
"name": "PAPERDAY10",
"description": "10% off orders over $50 for National Paper Day week",
"price_discount_type": "percentage",
"price_discount_amount": 0,
"price_discount_percent": 10,
"percentage_value": "10.0",
"source": "promo",
"value_managed_by_droplet": false,
"reason": null,
"created_by": {
"id": 20410,
"full_name": "Michael Scott"
},
"active": true,
"automatic": false,
"applicable_for": "everything",
"apply_only_once": false,
"apply_to_subscriptions": false,
"apply_to_recurring_subscription_orders": false,
"apply_to_volume": false,
"country_filter": "apply_all",
"customer_filter": "all_customers",
"shipping_method_filter": "apply_all_methods",
"purchase_requirement": "minimum_purchase_amount",
"purchase_requirement_applies_to_whole_cart": true,
"has_end_date": true,
"start_date_time": "2026-09-20T04:00:00.000Z",
"end_date_time": "2026-10-01T03:59:00.000Z",
"start_date": "2026-09-20",
"start_time": "00:00",
"end_date": "2026-09-30",
"end_time": "23:59",
"time_zone": "America/New_York",
"discount_type": "product_discount",
"total_usage": 0,
"free_variant_ids": [],
"free_enrollment_pack_ids": [],
"waive_enrollment_fee": false,
"applicable_product_ids": [],
"inapplicable_product_ids": [],
"applicable_collection_ids": [],
"applicable_enrollment_pack_ids": [],
"inapplicable_enrollment_pack_ids": [],
"collection_ids": [],
"product_ids": [],
"customer_ids": [],
"country_codes": [],
"eligible_customer_ids": [],
"csv_uploaded_customer_emails": [],
"eligible_country_ids": [],
"ineligible_country_ids": [],
"eligible_shipping_method_ids": [],
"eligible_customer_segments": [],
"minimum_purchase_requirement_amount": 50,
"minimum_purchase_requirement_amount_max": null,
"minimum_purchase_requirement_quantity": 0,
"minimum_cv": null,
"maximum_cv": null,
"customer_usage_limit": 1,
"minimum_amount_cents": 50,
"limit_usage_of_code": false,
"limit_usage_per_customer": true,
"other_shipping_discounts": true,
"other_product_discounts": false,
"created_at": "2026-09-10T19:04:22Z",
"updated_at": "2026-09-10T19:04:22Z",
"meta": {
"request_id": "4f1c2a9e-7b3d-4e8a-9c61-2d5f8a0b3e17",
"timestamp": "2026-09-15T14:32:08Z"
}
}{
"message": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"pagination": {
"cursor": "<string>",
"limit": 123,
"prev_cursor": "<string>",
"next_cursor": "<string>",
"total_count": 123
}
}
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"pagination": {
"cursor": "<string>",
"limit": 123,
"prev_cursor": "<string>",
"next_cursor": "<string>",
"total_count": 123
}
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Show child attributes
Show child attributes
Response
Success
flat, percentage, free_product, free_shipping, free_enrollment_pack promo, manual, droplet Show child attributes
Show child attributes
everything, specific_products, specific_collections, except_specific_products, specific_enrollment_packs, except_specific_enrollment_packs, null product_discount, shipping_discount Merchant-only note about the promo code. Never shown to shoppers.
1000Show child attributes
Show child attributes
curl --request POST \
--url https://api.fluid.app/api/v2025-06/discounts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"discount": {
"code": "PAPERDAY10",
"description": "10% off orders over $50 for National Paper Day week",
"price_discount_type": "percentage",
"percentage_value": 10,
"applicable_for": "everything",
"purchase_requirement": "minimum_purchase_amount",
"minimum_purchase_requirement_amount": 50,
"customer_filter": "all_customers",
"limit_usage_per_customer": true,
"use_limit": 1,
"other_product_discounts": false,
"start_date": "2026-09-20",
"start_time": "00:00",
"has_end_date": true,
"end_date": "2026-09-30",
"end_time": "23:59",
"time_zone": "America/New_York",
"active": true
}
}
'import requests
url = "https://api.fluid.app/api/v2025-06/discounts"
payload = { "discount": {
"code": "PAPERDAY10",
"description": "10% off orders over $50 for National Paper Day week",
"price_discount_type": "percentage",
"percentage_value": 10,
"applicable_for": "everything",
"purchase_requirement": "minimum_purchase_amount",
"minimum_purchase_requirement_amount": 50,
"customer_filter": "all_customers",
"limit_usage_per_customer": True,
"use_limit": 1,
"other_product_discounts": False,
"start_date": "2026-09-20",
"start_time": "00:00",
"has_end_date": True,
"end_date": "2026-09-30",
"end_time": "23:59",
"time_zone": "America/New_York",
"active": True
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
discount: {
code: 'PAPERDAY10',
description: '10% off orders over $50 for National Paper Day week',
price_discount_type: 'percentage',
percentage_value: 10,
applicable_for: 'everything',
purchase_requirement: 'minimum_purchase_amount',
minimum_purchase_requirement_amount: 50,
customer_filter: 'all_customers',
limit_usage_per_customer: true,
use_limit: 1,
other_product_discounts: false,
start_date: '2026-09-20',
start_time: '00:00',
has_end_date: true,
end_date: '2026-09-30',
end_time: '23:59',
time_zone: 'America/New_York',
active: true
}
})
};
fetch('https://api.fluid.app/api/v2025-06/discounts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fluid.app/api/v2025-06/discounts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'discount' => [
'code' => 'PAPERDAY10',
'description' => '10% off orders over $50 for National Paper Day week',
'price_discount_type' => 'percentage',
'percentage_value' => 10,
'applicable_for' => 'everything',
'purchase_requirement' => 'minimum_purchase_amount',
'minimum_purchase_requirement_amount' => 50,
'customer_filter' => 'all_customers',
'limit_usage_per_customer' => true,
'use_limit' => 1,
'other_product_discounts' => false,
'start_date' => '2026-09-20',
'start_time' => '00:00',
'has_end_date' => true,
'end_date' => '2026-09-30',
'end_time' => '23:59',
'time_zone' => 'America/New_York',
'active' => true
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fluid.app/api/v2025-06/discounts"
payload := strings.NewReader("{\n \"discount\": {\n \"code\": \"PAPERDAY10\",\n \"description\": \"10% off orders over $50 for National Paper Day week\",\n \"price_discount_type\": \"percentage\",\n \"percentage_value\": 10,\n \"applicable_for\": \"everything\",\n \"purchase_requirement\": \"minimum_purchase_amount\",\n \"minimum_purchase_requirement_amount\": 50,\n \"customer_filter\": \"all_customers\",\n \"limit_usage_per_customer\": true,\n \"use_limit\": 1,\n \"other_product_discounts\": false,\n \"start_date\": \"2026-09-20\",\n \"start_time\": \"00:00\",\n \"has_end_date\": true,\n \"end_date\": \"2026-09-30\",\n \"end_time\": \"23:59\",\n \"time_zone\": \"America/New_York\",\n \"active\": true\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.fluid.app/api/v2025-06/discounts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"discount\": {\n \"code\": \"PAPERDAY10\",\n \"description\": \"10% off orders over $50 for National Paper Day week\",\n \"price_discount_type\": \"percentage\",\n \"percentage_value\": 10,\n \"applicable_for\": \"everything\",\n \"purchase_requirement\": \"minimum_purchase_amount\",\n \"minimum_purchase_requirement_amount\": 50,\n \"customer_filter\": \"all_customers\",\n \"limit_usage_per_customer\": true,\n \"use_limit\": 1,\n \"other_product_discounts\": false,\n \"start_date\": \"2026-09-20\",\n \"start_time\": \"00:00\",\n \"has_end_date\": true,\n \"end_date\": \"2026-09-30\",\n \"end_time\": \"23:59\",\n \"time_zone\": \"America/New_York\",\n \"active\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/v2025-06/discounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"discount\": {\n \"code\": \"PAPERDAY10\",\n \"description\": \"10% off orders over $50 for National Paper Day week\",\n \"price_discount_type\": \"percentage\",\n \"percentage_value\": 10,\n \"applicable_for\": \"everything\",\n \"purchase_requirement\": \"minimum_purchase_amount\",\n \"minimum_purchase_requirement_amount\": 50,\n \"customer_filter\": \"all_customers\",\n \"limit_usage_per_customer\": true,\n \"use_limit\": 1,\n \"other_product_discounts\": false,\n \"start_date\": \"2026-09-20\",\n \"start_time\": \"00:00\",\n \"has_end_date\": true,\n \"end_date\": \"2026-09-30\",\n \"end_time\": \"23:59\",\n \"time_zone\": \"America/New_York\",\n \"active\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 5821,
"code": "PAPERDAY10",
"name": "PAPERDAY10",
"description": "10% off orders over $50 for National Paper Day week",
"price_discount_type": "percentage",
"price_discount_amount": 0,
"price_discount_percent": 10,
"percentage_value": "10.0",
"source": "promo",
"value_managed_by_droplet": false,
"reason": null,
"created_by": {
"id": 20410,
"full_name": "Michael Scott"
},
"active": true,
"automatic": false,
"applicable_for": "everything",
"apply_only_once": false,
"apply_to_subscriptions": false,
"apply_to_recurring_subscription_orders": false,
"apply_to_volume": false,
"country_filter": "apply_all",
"customer_filter": "all_customers",
"shipping_method_filter": "apply_all_methods",
"purchase_requirement": "minimum_purchase_amount",
"purchase_requirement_applies_to_whole_cart": true,
"has_end_date": true,
"start_date_time": "2026-09-20T04:00:00.000Z",
"end_date_time": "2026-10-01T03:59:00.000Z",
"start_date": "2026-09-20",
"start_time": "00:00",
"end_date": "2026-09-30",
"end_time": "23:59",
"time_zone": "America/New_York",
"discount_type": "product_discount",
"total_usage": 0,
"free_variant_ids": [],
"free_enrollment_pack_ids": [],
"waive_enrollment_fee": false,
"applicable_product_ids": [],
"inapplicable_product_ids": [],
"applicable_collection_ids": [],
"applicable_enrollment_pack_ids": [],
"inapplicable_enrollment_pack_ids": [],
"collection_ids": [],
"product_ids": [],
"customer_ids": [],
"country_codes": [],
"eligible_customer_ids": [],
"csv_uploaded_customer_emails": [],
"eligible_country_ids": [],
"ineligible_country_ids": [],
"eligible_shipping_method_ids": [],
"eligible_customer_segments": [],
"minimum_purchase_requirement_amount": 50,
"minimum_purchase_requirement_amount_max": null,
"minimum_purchase_requirement_quantity": 0,
"minimum_cv": null,
"maximum_cv": null,
"customer_usage_limit": 1,
"minimum_amount_cents": 50,
"limit_usage_of_code": false,
"limit_usage_per_customer": true,
"other_shipping_discounts": true,
"other_product_discounts": false,
"created_at": "2026-09-10T19:04:22Z",
"updated_at": "2026-09-10T19:04:22Z",
"meta": {
"request_id": "4f1c2a9e-7b3d-4e8a-9c61-2d5f8a0b3e17",
"timestamp": "2026-09-15T14:32:08Z"
}
}{
"message": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"pagination": {
"cursor": "<string>",
"limit": 123,
"prev_cursor": "<string>",
"next_cursor": "<string>",
"total_count": 123
}
}
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"pagination": {
"cursor": "<string>",
"limit": 123,
"prev_cursor": "<string>",
"next_cursor": "<string>",
"total_count": 123
}
}
}