cURL
curl --request POST \
--url https://api.cakto.com.br/public_api/products/{id}/bumps/position_update/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"id": "<string>",
"position": 123
}
]
'import requests
url = "https://api.cakto.com.br/public_api/products/{id}/bumps/position_update/"
payload = [
{
"id": "<string>",
"position": 123
}
]
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: '<string>', position: 123}])
};
fetch('https://api.cakto.com.br/public_api/products/{id}/bumps/position_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.cakto.com.br/public_api/products/{id}/bumps/position_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' => '<string>',
'position' => 123
]
]),
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;
}require 'uri'
require 'net/http'
url = URI("https://api.cakto.com.br/public_api/products/{id}/bumps/position_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 {\n \"id\": \"<string>\",\n \"position\": 123\n }\n]"
response = http.request(request)
puts response.read_bodyHttpResponse<String> response = Unirest.post("https://api.cakto.com.br/public_api/products/{id}/bumps/position_update/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"id\": \"<string>\",\n \"position\": 123\n }\n]")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.cakto.com.br/public_api/products/{id}/bumps/position_update/");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("[\n {\n \"id\": \"<string>\",\n \"position\": 123\n }\n]", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
{
"detail": "Posições atualizadas com sucesso."
}Order Bumps
Atualizar Posições dos Order Bumps
Altere a ordem de exibição dos order bumps no checkout. A posição define qual oferta aparece primeiro para o cliente.
POST
/
public_api
/
products
/
{id}
/
bumps
/
position_update
/
cURL
curl --request POST \
--url https://api.cakto.com.br/public_api/products/{id}/bumps/position_update/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"id": "<string>",
"position": 123
}
]
'import requests
url = "https://api.cakto.com.br/public_api/products/{id}/bumps/position_update/"
payload = [
{
"id": "<string>",
"position": 123
}
]
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: '<string>', position: 123}])
};
fetch('https://api.cakto.com.br/public_api/products/{id}/bumps/position_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.cakto.com.br/public_api/products/{id}/bumps/position_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' => '<string>',
'position' => 123
]
]),
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;
}require 'uri'
require 'net/http'
url = URI("https://api.cakto.com.br/public_api/products/{id}/bumps/position_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 {\n \"id\": \"<string>\",\n \"position\": 123\n }\n]"
response = http.request(request)
puts response.read_bodyHttpResponse<String> response = Unirest.post("https://api.cakto.com.br/public_api/products/{id}/bumps/position_update/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"id\": \"<string>\",\n \"position\": 123\n }\n]")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.cakto.com.br/public_api/products/{id}/bumps/position_update/");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("[\n {\n \"id\": \"<string>\",\n \"position\": 123\n }\n]", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
{
"detail": "Posições atualizadas com sucesso."
}Escopo
write products
Quando usar
- Reordenar as ofertas para priorizar a que mais converte
- Testar diferentes sequências de exibição
- Ajustar a hierarquia após adicionar um novo order bump
Como funciona
Envie um array com osid dos order bumps e suas novas position. A API atualiza a ordem de exibição no checkout automaticamente.
A oferta na posição 1 aparece primeiro. Coloque seu melhor conversor no topo.
Ids de order bump que não pertencem ao produto são ignorados silenciosamente — não geram erro, apenas não são atualizados. Confira a resposta ou liste os order bumps depois para validar que todos foram reordenados.
Authorizations
Token de autenticação do tipo Bearer {access_token}, onde {access_token} é o token obtido no fluxo de autenticação.
Path Parameters
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Response
Corpo da resposta status 200
Was this page helpful?