curl --request POST \
--url https://www.closient.com/retailers/api/v1/in-store-promotions \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"description": "Black Friday weekend",
"end_date": "2026-12-31T23:59:59Z",
"metadata": {
"campaign_id": "bf-2026"
},
"offer_id": "c4d5e6f7-8901-2345-abcd-ef6789012345",
"promotion_type": "SEASONAL",
"promotional_price": {
"amount": "9.99",
"currency": "USD"
},
"start_date": "2026-11-25T00:00:00Z"
}
'import requests
url = "https://www.closient.com/retailers/api/v1/in-store-promotions"
payload = {
"description": "Black Friday weekend",
"end_date": "2026-12-31T23:59:59Z",
"metadata": { "campaign_id": "bf-2026" },
"offer_id": "c4d5e6f7-8901-2345-abcd-ef6789012345",
"promotion_type": "SEASONAL",
"promotional_price": {
"amount": "9.99",
"currency": "USD"
},
"start_date": "2026-11-25T00:00:00Z"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
description: 'Black Friday weekend',
end_date: '2026-12-31T23:59:59Z',
metadata: {campaign_id: 'bf-2026'},
offer_id: 'c4d5e6f7-8901-2345-abcd-ef6789012345',
promotion_type: 'SEASONAL',
promotional_price: {amount: '9.99', currency: 'USD'},
start_date: '2026-11-25T00:00:00Z'
})
};
fetch('https://www.closient.com/retailers/api/v1/in-store-promotions', 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://www.closient.com/retailers/api/v1/in-store-promotions",
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([
'description' => 'Black Friday weekend',
'end_date' => '2026-12-31T23:59:59Z',
'metadata' => [
'campaign_id' => 'bf-2026'
],
'offer_id' => 'c4d5e6f7-8901-2345-abcd-ef6789012345',
'promotion_type' => 'SEASONAL',
'promotional_price' => [
'amount' => '9.99',
'currency' => 'USD'
],
'start_date' => '2026-11-25T00:00:00Z'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://www.closient.com/retailers/api/v1/in-store-promotions"
payload := strings.NewReader("{\n \"description\": \"Black Friday weekend\",\n \"end_date\": \"2026-12-31T23:59:59Z\",\n \"metadata\": {\n \"campaign_id\": \"bf-2026\"\n },\n \"offer_id\": \"c4d5e6f7-8901-2345-abcd-ef6789012345\",\n \"promotion_type\": \"SEASONAL\",\n \"promotional_price\": {\n \"amount\": \"9.99\",\n \"currency\": \"USD\"\n },\n \"start_date\": \"2026-11-25T00:00:00Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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://www.closient.com/retailers/api/v1/in-store-promotions")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"Black Friday weekend\",\n \"end_date\": \"2026-12-31T23:59:59Z\",\n \"metadata\": {\n \"campaign_id\": \"bf-2026\"\n },\n \"offer_id\": \"c4d5e6f7-8901-2345-abcd-ef6789012345\",\n \"promotion_type\": \"SEASONAL\",\n \"promotional_price\": {\n \"amount\": \"9.99\",\n \"currency\": \"USD\"\n },\n \"start_date\": \"2026-11-25T00:00:00Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.closient.com/retailers/api/v1/in-store-promotions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"Black Friday weekend\",\n \"end_date\": \"2026-12-31T23:59:59Z\",\n \"metadata\": {\n \"campaign_id\": \"bf-2026\"\n },\n \"offer_id\": \"c4d5e6f7-8901-2345-abcd-ef6789012345\",\n \"promotion_type\": \"SEASONAL\",\n \"promotional_price\": {\n \"amount\": \"9.99\",\n \"currency\": \"USD\"\n },\n \"start_date\": \"2026-11-25T00:00:00Z\"\n}"
response = http.request(request)
puts response.read_body{
"description": "Black Friday weekend",
"end_date": "2026-12-31T23:59:59Z",
"id": "9f8e7d6c-5b4a-3210-fedc-ba9876543210",
"is_active": true,
"metadata": {
"campaign_id": "bf-2026"
},
"offer_id": "c4d5e6f7-8901-2345-abcd-ef6789012345",
"promotion_type": "SEASONAL",
"promotional_price": {
"amount": "9.99",
"currency": "USD"
},
"short_id": "keATfB8VP2gSjcnTbsMNQL",
"start_date": "2026-11-25T00:00:00Z"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}Create in-store offer promotion
Create a time-windowed promotional price on an in-store offer. end_date must be strictly after start_date; the database enforces this with a check constraint. Currency is inherited from the offer’s parent PhysicalStore — there is no per-promotion currency override. Returns 404 (rather than 403) when the caller lacks MANAGE_OFFERS to avoid leaking offer existence.
curl --request POST \
--url https://www.closient.com/retailers/api/v1/in-store-promotions \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"description": "Black Friday weekend",
"end_date": "2026-12-31T23:59:59Z",
"metadata": {
"campaign_id": "bf-2026"
},
"offer_id": "c4d5e6f7-8901-2345-abcd-ef6789012345",
"promotion_type": "SEASONAL",
"promotional_price": {
"amount": "9.99",
"currency": "USD"
},
"start_date": "2026-11-25T00:00:00Z"
}
'import requests
url = "https://www.closient.com/retailers/api/v1/in-store-promotions"
payload = {
"description": "Black Friday weekend",
"end_date": "2026-12-31T23:59:59Z",
"metadata": { "campaign_id": "bf-2026" },
"offer_id": "c4d5e6f7-8901-2345-abcd-ef6789012345",
"promotion_type": "SEASONAL",
"promotional_price": {
"amount": "9.99",
"currency": "USD"
},
"start_date": "2026-11-25T00:00:00Z"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
description: 'Black Friday weekend',
end_date: '2026-12-31T23:59:59Z',
metadata: {campaign_id: 'bf-2026'},
offer_id: 'c4d5e6f7-8901-2345-abcd-ef6789012345',
promotion_type: 'SEASONAL',
promotional_price: {amount: '9.99', currency: 'USD'},
start_date: '2026-11-25T00:00:00Z'
})
};
fetch('https://www.closient.com/retailers/api/v1/in-store-promotions', 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://www.closient.com/retailers/api/v1/in-store-promotions",
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([
'description' => 'Black Friday weekend',
'end_date' => '2026-12-31T23:59:59Z',
'metadata' => [
'campaign_id' => 'bf-2026'
],
'offer_id' => 'c4d5e6f7-8901-2345-abcd-ef6789012345',
'promotion_type' => 'SEASONAL',
'promotional_price' => [
'amount' => '9.99',
'currency' => 'USD'
],
'start_date' => '2026-11-25T00:00:00Z'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://www.closient.com/retailers/api/v1/in-store-promotions"
payload := strings.NewReader("{\n \"description\": \"Black Friday weekend\",\n \"end_date\": \"2026-12-31T23:59:59Z\",\n \"metadata\": {\n \"campaign_id\": \"bf-2026\"\n },\n \"offer_id\": \"c4d5e6f7-8901-2345-abcd-ef6789012345\",\n \"promotion_type\": \"SEASONAL\",\n \"promotional_price\": {\n \"amount\": \"9.99\",\n \"currency\": \"USD\"\n },\n \"start_date\": \"2026-11-25T00:00:00Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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://www.closient.com/retailers/api/v1/in-store-promotions")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"Black Friday weekend\",\n \"end_date\": \"2026-12-31T23:59:59Z\",\n \"metadata\": {\n \"campaign_id\": \"bf-2026\"\n },\n \"offer_id\": \"c4d5e6f7-8901-2345-abcd-ef6789012345\",\n \"promotion_type\": \"SEASONAL\",\n \"promotional_price\": {\n \"amount\": \"9.99\",\n \"currency\": \"USD\"\n },\n \"start_date\": \"2026-11-25T00:00:00Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.closient.com/retailers/api/v1/in-store-promotions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"Black Friday weekend\",\n \"end_date\": \"2026-12-31T23:59:59Z\",\n \"metadata\": {\n \"campaign_id\": \"bf-2026\"\n },\n \"offer_id\": \"c4d5e6f7-8901-2345-abcd-ef6789012345\",\n \"promotion_type\": \"SEASONAL\",\n \"promotional_price\": {\n \"amount\": \"9.99\",\n \"currency\": \"USD\"\n },\n \"start_date\": \"2026-11-25T00:00:00Z\"\n}"
response = http.request(request)
puts response.read_body{
"description": "Black Friday weekend",
"end_date": "2026-12-31T23:59:59Z",
"id": "9f8e7d6c-5b4a-3210-fedc-ba9876543210",
"is_active": true,
"metadata": {
"campaign_id": "bf-2026"
},
"offer_id": "c4d5e6f7-8901-2345-abcd-ef6789012345",
"promotion_type": "SEASONAL",
"promotional_price": {
"amount": "9.99",
"currency": "USD"
},
"short_id": "keATfB8VP2gSjcnTbsMNQL",
"start_date": "2026-11-25T00:00:00Z"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}Authorizations
Body
Payload for creating a new in-store offer promotion.
offer_id, promotional_price, start_date, and end_date are required;
everything else has a sensible default. end_date must be strictly after
start_date — sending an inverted window returns 422.
UUID of the parent InStoreOffer this promotion applies to. The offer must already exist; create it via the in-store offers API before attaching promotions. Immutable after creation — moving a promotion to a different offer means deleting and recreating.
22^[23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{22}$Time-windowed override for the offer's regular price, as {"amount", "currency"} with both required together. Must be non-negative. When multiple promotions overlap on the same offer the cheapest active one wins; $0 is allowed and intentional for free-with-purchase BOGO arms (it is not a sentinel for 'unknown').
Show child attributes
Show child attributes
{ "amount": "5.99", "currency": "USD" }
Timestamp at which this promotion becomes effective (inclusive). Must be strictly before end_date — the database enforces end_date > start_date.
Timestamp at which this promotion stops being effective (inclusive). A daily Celery beat task flips is_active to false once this passes; the row is kept for historical pricing rather than deleted.
Developer-attached key/value data. Send {} or null to clear. Empty-string values delete that key. Omitted keys are preserved.
Show child attributes
Show child attributes
Merchandising context — display-only, does not change resolution semantics. Use SEASONAL for time-of-year promotions (Black Friday, holiday), CLEARANCE for end-of-life inventory, BOGO for buy-one-get-one arms (often at promotional_price=0), BUNDLE for discounts that apply when buying with another product, INTRODUCTORY for launch pricing, LOYALTY for member-only prices, and SALE (the default) for everything else.
SALE, CLEARANCE, BOGO, BUNDLE, SEASONAL, INTRODUCTORY, LOYALTY Optional human-readable label shown alongside the promoted price (e.g. 'Black Friday weekend', 'Member appreciation week'). Free-form, up to 255 characters. Empty string when no label is needed.
255Soft-deactivate flag. true means the promotion is eligible for cheapest-active resolution within its date window; false excludes it (the daily beat task auto-flips this to false once end_date passes). Use the update endpoint to set this to false rather than deleting if you want to preserve the historical pricing row.
Response
OK
A time-windowed promotional price on an :class:InStoreOffer.
Mirrors :class:apps.retailers.models.InStoreOfferPromotion. The row stores
promotional_price as an amount plus its own ISO 4217 currency;
nothing is read through to the parent PhysicalStore.
Stable UUID primary key of the promotion. Use this for cross-references.
22^[23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{22}$URL-safe shortuuid (base57) encoding of id. Up to 22 characters; preferred over id in human-shareable URLs and log lines.
22UUID of the parent InStoreOffer this promotion applies to. The offer must already exist; create it via the in-store offers API before attaching promotions. Immutable after creation — moving a promotion to a different offer means deleting and recreating.
22^[23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{22}$Timestamp at which this promotion becomes effective (inclusive). Must be strictly before end_date — the database enforces end_date > start_date.
Timestamp at which this promotion stops being effective (inclusive). A daily Celery beat task flips is_active to false once this passes; the row is kept for historical pricing rather than deleted.
Developer-attached key/value data attached to this object. Up to 50 keys; key max 40 chars, value max 500 chars.
Show child attributes
Show child attributes
Time-windowed override for the offer's regular price, as {"amount", "currency"} with both required together. Must be non-negative. When multiple promotions overlap on the same offer the cheapest active one wins; $0 is allowed and intentional for free-with-purchase BOGO arms (it is not a sentinel for 'unknown').
Show child attributes
Show child attributes
{ "amount": "5.99", "currency": "USD" }
Merchandising context — display-only, does not change resolution semantics. Use SEASONAL for time-of-year promotions (Black Friday, holiday), CLEARANCE for end-of-life inventory, BOGO for buy-one-get-one arms (often at promotional_price=0), BUNDLE for discounts that apply when buying with another product, INTRODUCTORY for launch pricing, LOYALTY for member-only prices, and SALE (the default) for everything else.
SALE, CLEARANCE, BOGO, BUNDLE, SEASONAL, INTRODUCTORY, LOYALTY Optional human-readable label shown alongside the promoted price (e.g. 'Black Friday weekend', 'Member appreciation week'). Free-form, up to 255 characters. Empty string when no label is needed.
255Soft-deactivate flag. true means the promotion is eligible for cheapest-active resolution within its date window; false excludes it (the daily beat task auto-flips this to false once end_date passes). Use the update endpoint to set this to false rather than deleting if you want to preserve the historical pricing row.