Promo codes
Update a promo code (discount)
Updates a promo code (discount). It also accepts a manual discount by id, although the list endpoint excludes manual discounts. Send only the fields you want to change inside discount; omitted fields keep their current values. Requires a company admin Bearer token with coupons update permission. Returns the updated discount, 404 when it does not exist in the company, or 422 when validation fails.
PUT
/
api
/
v2025-06
/
discounts
/
{id}
Update a promo code (discount)
curl --request PUT \
--url https://api.fluid.app/api/v2025-06/discounts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"discount": {
"percentage_value": 15,
"end_date": "2026-10-07",
"end_time": "23:59"
}
}
'import requests
url = "https://api.fluid.app/api/v2025-06/discounts/{id}"
payload = { "discount": {
"percentage_value": 15,
"end_date": "2026-10-07",
"end_time": "23:59"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({discount: {percentage_value: 15, end_date: '2026-10-07', end_time: '23:59'}})
};
fetch('https://api.fluid.app/api/v2025-06/discounts/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'discount' => [
'percentage_value' => 15,
'end_date' => '2026-10-07',
'end_time' => '23:59'
]
]),
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/{id}"
payload := strings.NewReader("{\n \"discount\": {\n \"percentage_value\": 15,\n \"end_date\": \"2026-10-07\",\n \"end_time\": \"23:59\"\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.fluid.app/api/v2025-06/discounts/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"discount\": {\n \"percentage_value\": 15,\n \"end_date\": \"2026-10-07\",\n \"end_time\": \"23:59\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/v2025-06/discounts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"discount\": {\n \"percentage_value\": 15,\n \"end_date\": \"2026-10-07\",\n \"end_time\": \"23:59\"\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": 15,
"percentage_value": "15.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-08T03:59:00.000Z",
"start_date": "2026-09-20",
"start_time": "00:00",
"end_date": "2026-10-07",
"end_time": "23:59",
"time_zone": "America/New_York",
"discount_type": "product_discount",
"total_usage": 37,
"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-15T14:32:08Z",
"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
}
}
}{
"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.
Path Parameters
Body
application/json
Show child attributes
Show child attributes
Response
Success
Available options:
flat, percentage, free_product, free_shipping, free_enrollment_pack Available options:
promo, manual, droplet Show child attributes
Show child attributes
Available options:
everything, specific_products, specific_collections, except_specific_products, specific_enrollment_packs, except_specific_enrollment_packs, null Available options:
product_discount, shipping_discount Merchant-only note about the promo code. Never shown to shoppers.
Maximum string length:
1000Show child attributes
Show child attributes
⌘I
Update a promo code (discount)
curl --request PUT \
--url https://api.fluid.app/api/v2025-06/discounts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"discount": {
"percentage_value": 15,
"end_date": "2026-10-07",
"end_time": "23:59"
}
}
'import requests
url = "https://api.fluid.app/api/v2025-06/discounts/{id}"
payload = { "discount": {
"percentage_value": 15,
"end_date": "2026-10-07",
"end_time": "23:59"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({discount: {percentage_value: 15, end_date: '2026-10-07', end_time: '23:59'}})
};
fetch('https://api.fluid.app/api/v2025-06/discounts/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'discount' => [
'percentage_value' => 15,
'end_date' => '2026-10-07',
'end_time' => '23:59'
]
]),
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/{id}"
payload := strings.NewReader("{\n \"discount\": {\n \"percentage_value\": 15,\n \"end_date\": \"2026-10-07\",\n \"end_time\": \"23:59\"\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.fluid.app/api/v2025-06/discounts/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"discount\": {\n \"percentage_value\": 15,\n \"end_date\": \"2026-10-07\",\n \"end_time\": \"23:59\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/v2025-06/discounts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"discount\": {\n \"percentage_value\": 15,\n \"end_date\": \"2026-10-07\",\n \"end_time\": \"23:59\"\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": 15,
"percentage_value": "15.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-08T03:59:00.000Z",
"start_date": "2026-09-20",
"start_time": "00:00",
"end_date": "2026-10-07",
"end_time": "23:59",
"time_zone": "America/New_York",
"discount_type": "product_discount",
"total_usage": 37,
"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-15T14:32:08Z",
"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
}
}
}{
"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
}
}
}