curl --request PATCH \
--url https://api.centralcart.io/v1/app/promo/{promo-id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Leve mais, pague menos",
"type": "PROGRESSIVE",
"condition_mode": "VALUE",
"starts_at": "2026-10-01T00:00:00.000-03:00",
"targets": [
{
"type": "STORE"
}
],
"tiers": [
{
"min_amount": 100,
"reward_type": "VALUE",
"reward_value": 15
}
]
}
'import requests
url = "https://api.centralcart.io/v1/app/promo/{promo-id}"
payload = {
"name": "Leve mais, pague menos",
"type": "PROGRESSIVE",
"condition_mode": "VALUE",
"starts_at": "2026-10-01T00:00:00.000-03:00",
"targets": [{ "type": "STORE" }],
"tiers": [
{
"min_amount": 100,
"reward_type": "VALUE",
"reward_value": 15
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Leve mais, pague menos',
type: 'PROGRESSIVE',
condition_mode: 'VALUE',
starts_at: '2026-10-01T00:00:00.000-03:00',
targets: [{type: 'STORE'}],
tiers: [{min_amount: 100, reward_type: 'VALUE', reward_value: 15}]
})
};
fetch('https://api.centralcart.io/v1/app/promo/{promo-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.centralcart.io/v1/app/promo/{promo-id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Leve mais, pague menos',
'type' => 'PROGRESSIVE',
'condition_mode' => 'VALUE',
'starts_at' => '2026-10-01T00:00:00.000-03:00',
'targets' => [
[
'type' => 'STORE'
]
],
'tiers' => [
[
'min_amount' => 100,
'reward_type' => 'VALUE',
'reward_value' => 15
]
]
]),
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.centralcart.io/v1/app/promo/{promo-id}"
payload := strings.NewReader("{\n \"name\": \"Leve mais, pague menos\",\n \"type\": \"PROGRESSIVE\",\n \"condition_mode\": \"VALUE\",\n \"starts_at\": \"2026-10-01T00:00:00.000-03:00\",\n \"targets\": [\n {\n \"type\": \"STORE\"\n }\n ],\n \"tiers\": [\n {\n \"min_amount\": 100,\n \"reward_type\": \"VALUE\",\n \"reward_value\": 15\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.centralcart.io/v1/app/promo/{promo-id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Leve mais, pague menos\",\n \"type\": \"PROGRESSIVE\",\n \"condition_mode\": \"VALUE\",\n \"starts_at\": \"2026-10-01T00:00:00.000-03:00\",\n \"targets\": [\n {\n \"type\": \"STORE\"\n }\n ],\n \"tiers\": [\n {\n \"min_amount\": 100,\n \"reward_type\": \"VALUE\",\n \"reward_value\": 15\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.centralcart.io/v1/app/promo/{promo-id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Leve mais, pague menos\",\n \"type\": \"PROGRESSIVE\",\n \"condition_mode\": \"VALUE\",\n \"starts_at\": \"2026-10-01T00:00:00.000-03:00\",\n \"targets\": [\n {\n \"type\": \"STORE\"\n }\n ],\n \"tiers\": [\n {\n \"min_amount\": 100,\n \"reward_type\": \"VALUE\",\n \"reward_value\": 15\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"store_id": 123,
"name": "<string>",
"type": "PROGRESSIVE",
"condition_mode": "QUANTITY",
"enabled": true,
"starts_at": "<string>",
"ends_at": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"targets": [
{
"type": "STORE",
"id": 123
}
],
"tiers": [
{
"id": 123,
"store_id": 123,
"promo_id": 123,
"min_amount": 123,
"reward_type": "PERCENTAGE",
"reward_value": 123,
"reward_quantity": 123,
"created_at": "<string>",
"updated_at": "<string>",
"targets": [
{
"type": "STORE",
"id": 123
}
]
}
]
}Update Promo
Atualiza uma promoção.
curl --request PATCH \
--url https://api.centralcart.io/v1/app/promo/{promo-id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Leve mais, pague menos",
"type": "PROGRESSIVE",
"condition_mode": "VALUE",
"starts_at": "2026-10-01T00:00:00.000-03:00",
"targets": [
{
"type": "STORE"
}
],
"tiers": [
{
"min_amount": 100,
"reward_type": "VALUE",
"reward_value": 15
}
]
}
'import requests
url = "https://api.centralcart.io/v1/app/promo/{promo-id}"
payload = {
"name": "Leve mais, pague menos",
"type": "PROGRESSIVE",
"condition_mode": "VALUE",
"starts_at": "2026-10-01T00:00:00.000-03:00",
"targets": [{ "type": "STORE" }],
"tiers": [
{
"min_amount": 100,
"reward_type": "VALUE",
"reward_value": 15
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Leve mais, pague menos',
type: 'PROGRESSIVE',
condition_mode: 'VALUE',
starts_at: '2026-10-01T00:00:00.000-03:00',
targets: [{type: 'STORE'}],
tiers: [{min_amount: 100, reward_type: 'VALUE', reward_value: 15}]
})
};
fetch('https://api.centralcart.io/v1/app/promo/{promo-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.centralcart.io/v1/app/promo/{promo-id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Leve mais, pague menos',
'type' => 'PROGRESSIVE',
'condition_mode' => 'VALUE',
'starts_at' => '2026-10-01T00:00:00.000-03:00',
'targets' => [
[
'type' => 'STORE'
]
],
'tiers' => [
[
'min_amount' => 100,
'reward_type' => 'VALUE',
'reward_value' => 15
]
]
]),
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.centralcart.io/v1/app/promo/{promo-id}"
payload := strings.NewReader("{\n \"name\": \"Leve mais, pague menos\",\n \"type\": \"PROGRESSIVE\",\n \"condition_mode\": \"VALUE\",\n \"starts_at\": \"2026-10-01T00:00:00.000-03:00\",\n \"targets\": [\n {\n \"type\": \"STORE\"\n }\n ],\n \"tiers\": [\n {\n \"min_amount\": 100,\n \"reward_type\": \"VALUE\",\n \"reward_value\": 15\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.centralcart.io/v1/app/promo/{promo-id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Leve mais, pague menos\",\n \"type\": \"PROGRESSIVE\",\n \"condition_mode\": \"VALUE\",\n \"starts_at\": \"2026-10-01T00:00:00.000-03:00\",\n \"targets\": [\n {\n \"type\": \"STORE\"\n }\n ],\n \"tiers\": [\n {\n \"min_amount\": 100,\n \"reward_type\": \"VALUE\",\n \"reward_value\": 15\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.centralcart.io/v1/app/promo/{promo-id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Leve mais, pague menos\",\n \"type\": \"PROGRESSIVE\",\n \"condition_mode\": \"VALUE\",\n \"starts_at\": \"2026-10-01T00:00:00.000-03:00\",\n \"targets\": [\n {\n \"type\": \"STORE\"\n }\n ],\n \"tiers\": [\n {\n \"min_amount\": 100,\n \"reward_type\": \"VALUE\",\n \"reward_value\": 15\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"store_id": 123,
"name": "<string>",
"type": "PROGRESSIVE",
"condition_mode": "QUANTITY",
"enabled": true,
"starts_at": "<string>",
"ends_at": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"targets": [
{
"type": "STORE",
"id": 123
}
],
"tiers": [
{
"id": 123,
"store_id": 123,
"promo_id": 123,
"min_amount": 123,
"reward_type": "PERCENTAGE",
"reward_value": 123,
"reward_quantity": 123,
"created_at": "<string>",
"updated_at": "<string>",
"targets": [
{
"type": "STORE",
"id": 123
}
]
}
]
}Autorizações
Token de API gerado no painel da CentralCart.
Parâmetros de caminho
ID da promoção
Corpo
Nome da promoção, até 35 caracteres
PROGRESSIVE dá desconto maior conforme o carrinho cresce. BUY_X_PAY_Y dá desconto em produtos escolhidos ao atingir o mínimo
PROGRESSIVE, BUY_X_PAY_Y Se o mínimo das faixas é em unidades ou em valor (R$)
QUANTITY, VALUE Início da promoção
Produtos que contam para atingir o mínimo, de 1 a 10 alvos
Show child attributes
Show child attributes
Faixas, de 1 a 10, cada uma com um mínimo diferente. O BUY_X_PAY_Y aceita uma faixa só
Show child attributes
Show child attributes
Ativa a promoção. Padrão true na criação; na atualização mantém o estado atual
Fim da promoção. Omita ou envie null para não expirar
Resposta
Promoção atualizada.
ID da promoção
ID da loja
Nome da promoção
Tipo da promoção
PROGRESSIVE, BUY_X_PAY_Y Se o mínimo das faixas é em unidades ou em valor (R$)
QUANTITY, VALUE Indica se a promoção está ativada
Início da promoção
Fim da promoção. null não expira
Data de criação
Data da última atualização
Produtos que contam para atingir o mínimo
Show child attributes
Show child attributes
Faixas, do menor para o maior mínimo
Show child attributes
Show child attributes