curl --request PUT \
--url https://api.speedsellx.io/v2/public/checkouts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"name": "<string>",
"template": "<string>",
"checkout_theme_id": 2,
"status": "<string>",
"dark_mode": true,
"primary_color": "<string>",
"header_bg_color": "<string>",
"header_text_color": "<string>",
"logo": "<string>",
"top_banner": "<string>",
"top_2_banner": "<string>",
"sidebar_banner": "<string>",
"footer_banner": "<string>"
}
'import requests
url = "https://api.speedsellx.io/v2/public/checkouts/{id}"
payload = {
"name": "<string>",
"template": "<string>",
"checkout_theme_id": 2,
"status": "<string>",
"dark_mode": True,
"primary_color": "<string>",
"header_bg_color": "<string>",
"header_text_color": "<string>",
"logo": "<string>",
"top_banner": "<string>",
"top_2_banner": "<string>",
"sidebar_banner": "<string>",
"footer_banner": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
template: '<string>',
checkout_theme_id: 2,
status: '<string>',
dark_mode: true,
primary_color: '<string>',
header_bg_color: '<string>',
header_text_color: '<string>',
logo: '<string>',
top_banner: '<string>',
top_2_banner: '<string>',
sidebar_banner: '<string>',
footer_banner: '<string>'
})
};
fetch('https://api.speedsellx.io/v2/public/checkouts/{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.speedsellx.io/v2/public/checkouts/{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([
'name' => '<string>',
'template' => '<string>',
'checkout_theme_id' => 2,
'status' => '<string>',
'dark_mode' => true,
'primary_color' => '<string>',
'header_bg_color' => '<string>',
'header_text_color' => '<string>',
'logo' => '<string>',
'top_banner' => '<string>',
'top_2_banner' => '<string>',
'sidebar_banner' => '<string>',
'footer_banner' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-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://api.speedsellx.io/v2/public/checkouts/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"template\": \"<string>\",\n \"checkout_theme_id\": 2,\n \"status\": \"<string>\",\n \"dark_mode\": true,\n \"primary_color\": \"<string>\",\n \"header_bg_color\": \"<string>\",\n \"header_text_color\": \"<string>\",\n \"logo\": \"<string>\",\n \"top_banner\": \"<string>\",\n \"top_2_banner\": \"<string>\",\n \"sidebar_banner\": \"<string>\",\n \"footer_banner\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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.speedsellx.io/v2/public/checkouts/{id}")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"template\": \"<string>\",\n \"checkout_theme_id\": 2,\n \"status\": \"<string>\",\n \"dark_mode\": true,\n \"primary_color\": \"<string>\",\n \"header_bg_color\": \"<string>\",\n \"header_text_color\": \"<string>\",\n \"logo\": \"<string>\",\n \"top_banner\": \"<string>\",\n \"top_2_banner\": \"<string>\",\n \"sidebar_banner\": \"<string>\",\n \"footer_banner\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.speedsellx.io/v2/public/checkouts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"template\": \"<string>\",\n \"checkout_theme_id\": 2,\n \"status\": \"<string>\",\n \"dark_mode\": true,\n \"primary_color\": \"<string>\",\n \"header_bg_color\": \"<string>\",\n \"header_text_color\": \"<string>\",\n \"logo\": \"<string>\",\n \"top_banner\": \"<string>\",\n \"top_2_banner\": \"<string>\",\n \"sidebar_banner\": \"<string>\",\n \"footer_banner\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"seller_id": 123,
"product_id": 123,
"checkout_theme_id": 123,
"name": "<string>",
"template": "<string>",
"status": "<string>",
"dark_mode": true,
"primary_color": "<string>",
"pix_enabled": true,
"credit_card_enabled": true,
"billet_enabled": true,
"pix_discount_amount": 123,
"credit_card_discount_amount": 123,
"billet_discount_amount": 123,
"max_installments": 123,
"payment_method_paypal_enabled": true,
"payment_method_cc_paypal_enabled": true,
"backredirect_enabled": true,
"backredirect_url": "<string>",
"default": true,
"logo": "<string>",
"top_banner": "<string>",
"top_2_banner": "<string>",
"sidebar_banner": "<string>",
"footer_banner": "<string>",
"custom_head_script": "<string>",
"custom_body_script": "<string>",
"sku": "<string>",
"public_url": "<string>",
"social_proof_rating": 123,
"social_proof_count": 123
}
}{
"status": "error",
"error": "unauthenticated"
}{
"status": "error",
"error": "insufficient_scope"
}{
"status": "error",
"error": "not_found"
}{
"status": "error",
"error": "idempotency_in_progress"
}{
"message": "<string>",
"errors": {}
}Atualizar checkout
Aplica os campos de apresentação da lista permitida (nome, template, tema, status, modo escuro, as três cores e os cinco slots de imagem) a um checkout da conta da chave.
É um merge, não uma substituição. Todos os campos são opcionais e toda coluna fora da lista permitida mantém o valor que tem, inclusive os meios de pagamento, o backredirect e os scripts customizados. Uma requisição que envia só o name não apaga o resto.
Um checkout de outra conta responde 404 sem escrever nada. Exige o escopo checkouts:write e o header Idempotency-Key.
curl --request PUT \
--url https://api.speedsellx.io/v2/public/checkouts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"name": "<string>",
"template": "<string>",
"checkout_theme_id": 2,
"status": "<string>",
"dark_mode": true,
"primary_color": "<string>",
"header_bg_color": "<string>",
"header_text_color": "<string>",
"logo": "<string>",
"top_banner": "<string>",
"top_2_banner": "<string>",
"sidebar_banner": "<string>",
"footer_banner": "<string>"
}
'import requests
url = "https://api.speedsellx.io/v2/public/checkouts/{id}"
payload = {
"name": "<string>",
"template": "<string>",
"checkout_theme_id": 2,
"status": "<string>",
"dark_mode": True,
"primary_color": "<string>",
"header_bg_color": "<string>",
"header_text_color": "<string>",
"logo": "<string>",
"top_banner": "<string>",
"top_2_banner": "<string>",
"sidebar_banner": "<string>",
"footer_banner": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
template: '<string>',
checkout_theme_id: 2,
status: '<string>',
dark_mode: true,
primary_color: '<string>',
header_bg_color: '<string>',
header_text_color: '<string>',
logo: '<string>',
top_banner: '<string>',
top_2_banner: '<string>',
sidebar_banner: '<string>',
footer_banner: '<string>'
})
};
fetch('https://api.speedsellx.io/v2/public/checkouts/{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.speedsellx.io/v2/public/checkouts/{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([
'name' => '<string>',
'template' => '<string>',
'checkout_theme_id' => 2,
'status' => '<string>',
'dark_mode' => true,
'primary_color' => '<string>',
'header_bg_color' => '<string>',
'header_text_color' => '<string>',
'logo' => '<string>',
'top_banner' => '<string>',
'top_2_banner' => '<string>',
'sidebar_banner' => '<string>',
'footer_banner' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-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://api.speedsellx.io/v2/public/checkouts/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"template\": \"<string>\",\n \"checkout_theme_id\": 2,\n \"status\": \"<string>\",\n \"dark_mode\": true,\n \"primary_color\": \"<string>\",\n \"header_bg_color\": \"<string>\",\n \"header_text_color\": \"<string>\",\n \"logo\": \"<string>\",\n \"top_banner\": \"<string>\",\n \"top_2_banner\": \"<string>\",\n \"sidebar_banner\": \"<string>\",\n \"footer_banner\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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.speedsellx.io/v2/public/checkouts/{id}")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"template\": \"<string>\",\n \"checkout_theme_id\": 2,\n \"status\": \"<string>\",\n \"dark_mode\": true,\n \"primary_color\": \"<string>\",\n \"header_bg_color\": \"<string>\",\n \"header_text_color\": \"<string>\",\n \"logo\": \"<string>\",\n \"top_banner\": \"<string>\",\n \"top_2_banner\": \"<string>\",\n \"sidebar_banner\": \"<string>\",\n \"footer_banner\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.speedsellx.io/v2/public/checkouts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"template\": \"<string>\",\n \"checkout_theme_id\": 2,\n \"status\": \"<string>\",\n \"dark_mode\": true,\n \"primary_color\": \"<string>\",\n \"header_bg_color\": \"<string>\",\n \"header_text_color\": \"<string>\",\n \"logo\": \"<string>\",\n \"top_banner\": \"<string>\",\n \"top_2_banner\": \"<string>\",\n \"sidebar_banner\": \"<string>\",\n \"footer_banner\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"seller_id": 123,
"product_id": 123,
"checkout_theme_id": 123,
"name": "<string>",
"template": "<string>",
"status": "<string>",
"dark_mode": true,
"primary_color": "<string>",
"pix_enabled": true,
"credit_card_enabled": true,
"billet_enabled": true,
"pix_discount_amount": 123,
"credit_card_discount_amount": 123,
"billet_discount_amount": 123,
"max_installments": 123,
"payment_method_paypal_enabled": true,
"payment_method_cc_paypal_enabled": true,
"backredirect_enabled": true,
"backredirect_url": "<string>",
"default": true,
"logo": "<string>",
"top_banner": "<string>",
"top_2_banner": "<string>",
"sidebar_banner": "<string>",
"footer_banner": "<string>",
"custom_head_script": "<string>",
"custom_body_script": "<string>",
"sku": "<string>",
"public_url": "<string>",
"social_proof_rating": 123,
"social_proof_count": 123
}
}{
"status": "error",
"error": "unauthenticated"
}{
"status": "error",
"error": "insufficient_scope"
}{
"status": "error",
"error": "not_found"
}{
"status": "error",
"error": "idempotency_in_progress"
}{
"message": "<string>",
"errors": {}
}Authorizations
A chave de API da conta, no formato sk_{modo}_{prefixo}.{segredo}.
Headers
Chave única da operação. Obrigatória em toda requisição que altera dados; sem ela a resposta é 422 idempotency_key_required. Um reenvio com a mesma chave e o mesmo corpo repete a resposta guardada.
255Path Parameters
Body
Body of PUT /v2/public/checkouts/{id}: the allowlisted presentation columns of a checkout, every one of them optional. Ported from the source UpdateCheckoutRequest (SHA 70cd772) minus secondary_color, which the core's checkout has no column for.
Everything else about the checkout (payment methods, countdown, thank-you pages, custom scripts, which checkout is the product's default) stays out on purpose: those are the panel's, and the patch leaves them exactly as stored.
255100Not checked against checkout_themes: that table is Checkout's and this module may not query it. An unknown id is refused by the foreign key rather than by a probe of another context's table.
x >= 150303030Each image is either a base64 data URI (a new one) or the stored value echoed back; Checkout decides which and uploads accordingly.
Response
ApiCheckoutResource
Show child attributes
Show child attributes