Update promotion
curl --request POST \
--url https://api.tagada.io/api/public/v1/promotions/update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "promo_123",
"data": {
"storeId": "store_123",
"name": "Winter Sale 30% Off",
"automatic": false,
"enabled": true,
"usageLimit": 200,
"startDate": "2025-12-01T00:00:00.000Z",
"endDate": "2026-02-28T23:59:59.000Z",
"ruleOperator": "AND",
"combinesWithOrderLevelDiscounts": false,
"combinesWithLineItemDiscounts": false,
"combinesWithShippingDiscounts": false,
"forceCombine": false,
"rules": [],
"actions": [
{
"type": "OrderAdjustment",
"adjustmentType": "percentage",
"adjustmentPercentage": 20
}
]
}
}
'import requests
url = "https://api.tagada.io/api/public/v1/promotions/update"
payload = {
"id": "promo_123",
"data": {
"storeId": "store_123",
"name": "Winter Sale 30% Off",
"automatic": False,
"enabled": True,
"usageLimit": 200,
"startDate": "2025-12-01T00:00:00.000Z",
"endDate": "2026-02-28T23:59:59.000Z",
"ruleOperator": "AND",
"combinesWithOrderLevelDiscounts": False,
"combinesWithLineItemDiscounts": False,
"combinesWithShippingDiscounts": False,
"forceCombine": False,
"rules": [],
"actions": [
{
"type": "OrderAdjustment",
"adjustmentType": "percentage",
"adjustmentPercentage": 20
}
]
}
}
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({
id: 'promo_123',
data: {
storeId: 'store_123',
name: 'Winter Sale 30% Off',
automatic: false,
enabled: true,
usageLimit: 200,
startDate: '2025-12-01T00:00:00.000Z',
endDate: '2026-02-28T23:59:59.000Z',
ruleOperator: 'AND',
combinesWithOrderLevelDiscounts: false,
combinesWithLineItemDiscounts: false,
combinesWithShippingDiscounts: false,
forceCombine: false,
rules: [],
actions: [
{
type: 'OrderAdjustment',
adjustmentType: 'percentage',
adjustmentPercentage: 20
}
]
}
})
};
fetch('https://api.tagada.io/api/public/v1/promotions/update', 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.tagada.io/api/public/v1/promotions/update",
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([
'id' => 'promo_123',
'data' => [
'storeId' => 'store_123',
'name' => 'Winter Sale 30% Off',
'automatic' => false,
'enabled' => true,
'usageLimit' => 200,
'startDate' => '2025-12-01T00:00:00.000Z',
'endDate' => '2026-02-28T23:59:59.000Z',
'ruleOperator' => 'AND',
'combinesWithOrderLevelDiscounts' => false,
'combinesWithLineItemDiscounts' => false,
'combinesWithShippingDiscounts' => false,
'forceCombine' => false,
'rules' => [
],
'actions' => [
[
'type' => 'OrderAdjustment',
'adjustmentType' => 'percentage',
'adjustmentPercentage' => 20
]
]
]
]),
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.tagada.io/api/public/v1/promotions/update"
payload := strings.NewReader("{\n \"id\": \"promo_123\",\n \"data\": {\n \"storeId\": \"store_123\",\n \"name\": \"Winter Sale 30% Off\",\n \"automatic\": false,\n \"enabled\": true,\n \"usageLimit\": 200,\n \"startDate\": \"2025-12-01T00:00:00.000Z\",\n \"endDate\": \"2026-02-28T23:59:59.000Z\",\n \"ruleOperator\": \"AND\",\n \"combinesWithOrderLevelDiscounts\": false,\n \"combinesWithLineItemDiscounts\": false,\n \"combinesWithShippingDiscounts\": false,\n \"forceCombine\": false,\n \"rules\": [],\n \"actions\": [\n {\n \"type\": \"OrderAdjustment\",\n \"adjustmentType\": \"percentage\",\n \"adjustmentPercentage\": 20\n }\n ]\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.tagada.io/api/public/v1/promotions/update")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"promo_123\",\n \"data\": {\n \"storeId\": \"store_123\",\n \"name\": \"Winter Sale 30% Off\",\n \"automatic\": false,\n \"enabled\": true,\n \"usageLimit\": 200,\n \"startDate\": \"2025-12-01T00:00:00.000Z\",\n \"endDate\": \"2026-02-28T23:59:59.000Z\",\n \"ruleOperator\": \"AND\",\n \"combinesWithOrderLevelDiscounts\": false,\n \"combinesWithLineItemDiscounts\": false,\n \"combinesWithShippingDiscounts\": false,\n \"forceCombine\": false,\n \"rules\": [],\n \"actions\": [\n {\n \"type\": \"OrderAdjustment\",\n \"adjustmentType\": \"percentage\",\n \"adjustmentPercentage\": 20\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tagada.io/api/public/v1/promotions/update")
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 \"id\": \"promo_123\",\n \"data\": {\n \"storeId\": \"store_123\",\n \"name\": \"Winter Sale 30% Off\",\n \"automatic\": false,\n \"enabled\": true,\n \"usageLimit\": 200,\n \"startDate\": \"2025-12-01T00:00:00.000Z\",\n \"endDate\": \"2026-02-28T23:59:59.000Z\",\n \"ruleOperator\": \"AND\",\n \"combinesWithOrderLevelDiscounts\": false,\n \"combinesWithLineItemDiscounts\": false,\n \"combinesWithShippingDiscounts\": false,\n \"forceCombine\": false,\n \"rules\": [],\n \"actions\": [\n {\n \"type\": \"OrderAdjustment\",\n \"adjustmentType\": \"percentage\",\n \"adjustmentPercentage\": 20\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "promo_123",
"name": "Winter Sale 30% Off",
"enabled": true
}{
"message": "<string>",
"code": "<string>",
"issues": [
{
"message": "<string>"
}
]
}promotions
Update promotion
Update an existing promotion by ID. To manage redeemable codes for the promotion, use the /promotion-codes/* endpoints — this endpoint does not accept a promotionCodes array.
POST
/
api
/
public
/
v1
/
promotions
/
update
Update promotion
curl --request POST \
--url https://api.tagada.io/api/public/v1/promotions/update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "promo_123",
"data": {
"storeId": "store_123",
"name": "Winter Sale 30% Off",
"automatic": false,
"enabled": true,
"usageLimit": 200,
"startDate": "2025-12-01T00:00:00.000Z",
"endDate": "2026-02-28T23:59:59.000Z",
"ruleOperator": "AND",
"combinesWithOrderLevelDiscounts": false,
"combinesWithLineItemDiscounts": false,
"combinesWithShippingDiscounts": false,
"forceCombine": false,
"rules": [],
"actions": [
{
"type": "OrderAdjustment",
"adjustmentType": "percentage",
"adjustmentPercentage": 20
}
]
}
}
'import requests
url = "https://api.tagada.io/api/public/v1/promotions/update"
payload = {
"id": "promo_123",
"data": {
"storeId": "store_123",
"name": "Winter Sale 30% Off",
"automatic": False,
"enabled": True,
"usageLimit": 200,
"startDate": "2025-12-01T00:00:00.000Z",
"endDate": "2026-02-28T23:59:59.000Z",
"ruleOperator": "AND",
"combinesWithOrderLevelDiscounts": False,
"combinesWithLineItemDiscounts": False,
"combinesWithShippingDiscounts": False,
"forceCombine": False,
"rules": [],
"actions": [
{
"type": "OrderAdjustment",
"adjustmentType": "percentage",
"adjustmentPercentage": 20
}
]
}
}
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({
id: 'promo_123',
data: {
storeId: 'store_123',
name: 'Winter Sale 30% Off',
automatic: false,
enabled: true,
usageLimit: 200,
startDate: '2025-12-01T00:00:00.000Z',
endDate: '2026-02-28T23:59:59.000Z',
ruleOperator: 'AND',
combinesWithOrderLevelDiscounts: false,
combinesWithLineItemDiscounts: false,
combinesWithShippingDiscounts: false,
forceCombine: false,
rules: [],
actions: [
{
type: 'OrderAdjustment',
adjustmentType: 'percentage',
adjustmentPercentage: 20
}
]
}
})
};
fetch('https://api.tagada.io/api/public/v1/promotions/update', 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.tagada.io/api/public/v1/promotions/update",
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([
'id' => 'promo_123',
'data' => [
'storeId' => 'store_123',
'name' => 'Winter Sale 30% Off',
'automatic' => false,
'enabled' => true,
'usageLimit' => 200,
'startDate' => '2025-12-01T00:00:00.000Z',
'endDate' => '2026-02-28T23:59:59.000Z',
'ruleOperator' => 'AND',
'combinesWithOrderLevelDiscounts' => false,
'combinesWithLineItemDiscounts' => false,
'combinesWithShippingDiscounts' => false,
'forceCombine' => false,
'rules' => [
],
'actions' => [
[
'type' => 'OrderAdjustment',
'adjustmentType' => 'percentage',
'adjustmentPercentage' => 20
]
]
]
]),
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.tagada.io/api/public/v1/promotions/update"
payload := strings.NewReader("{\n \"id\": \"promo_123\",\n \"data\": {\n \"storeId\": \"store_123\",\n \"name\": \"Winter Sale 30% Off\",\n \"automatic\": false,\n \"enabled\": true,\n \"usageLimit\": 200,\n \"startDate\": \"2025-12-01T00:00:00.000Z\",\n \"endDate\": \"2026-02-28T23:59:59.000Z\",\n \"ruleOperator\": \"AND\",\n \"combinesWithOrderLevelDiscounts\": false,\n \"combinesWithLineItemDiscounts\": false,\n \"combinesWithShippingDiscounts\": false,\n \"forceCombine\": false,\n \"rules\": [],\n \"actions\": [\n {\n \"type\": \"OrderAdjustment\",\n \"adjustmentType\": \"percentage\",\n \"adjustmentPercentage\": 20\n }\n ]\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.tagada.io/api/public/v1/promotions/update")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"promo_123\",\n \"data\": {\n \"storeId\": \"store_123\",\n \"name\": \"Winter Sale 30% Off\",\n \"automatic\": false,\n \"enabled\": true,\n \"usageLimit\": 200,\n \"startDate\": \"2025-12-01T00:00:00.000Z\",\n \"endDate\": \"2026-02-28T23:59:59.000Z\",\n \"ruleOperator\": \"AND\",\n \"combinesWithOrderLevelDiscounts\": false,\n \"combinesWithLineItemDiscounts\": false,\n \"combinesWithShippingDiscounts\": false,\n \"forceCombine\": false,\n \"rules\": [],\n \"actions\": [\n {\n \"type\": \"OrderAdjustment\",\n \"adjustmentType\": \"percentage\",\n \"adjustmentPercentage\": 20\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tagada.io/api/public/v1/promotions/update")
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 \"id\": \"promo_123\",\n \"data\": {\n \"storeId\": \"store_123\",\n \"name\": \"Winter Sale 30% Off\",\n \"automatic\": false,\n \"enabled\": true,\n \"usageLimit\": 200,\n \"startDate\": \"2025-12-01T00:00:00.000Z\",\n \"endDate\": \"2026-02-28T23:59:59.000Z\",\n \"ruleOperator\": \"AND\",\n \"combinesWithOrderLevelDiscounts\": false,\n \"combinesWithLineItemDiscounts\": false,\n \"combinesWithShippingDiscounts\": false,\n \"forceCombine\": false,\n \"rules\": [],\n \"actions\": [\n {\n \"type\": \"OrderAdjustment\",\n \"adjustmentType\": \"percentage\",\n \"adjustmentPercentage\": 20\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "promo_123",
"name": "Winter Sale 30% Off",
"enabled": true
}{
"message": "<string>",
"code": "<string>",
"issues": [
{
"message": "<string>"
}
]
}⌘I
