Obter checkout por sku
curl --request GET \
--url https://api.speedsellx.io/v2/public/checkouts/by-sku/{sku} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.speedsellx.io/v2/public/checkouts/by-sku/{sku}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.speedsellx.io/v2/public/checkouts/by-sku/{sku}', 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/by-sku/{sku}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.speedsellx.io/v2/public/checkouts/by-sku/{sku}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.speedsellx.io/v2/public/checkouts/by-sku/{sku}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.speedsellx.io/v2/public/checkouts/by-sku/{sku}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
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"
}Checkouts
Obter checkout por sku
Retorna um checkout pelo sku que aparece na URL pública
GET
/
public
/
checkouts
/
by-sku
/
{sku}
Obter checkout por sku
curl --request GET \
--url https://api.speedsellx.io/v2/public/checkouts/by-sku/{sku} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.speedsellx.io/v2/public/checkouts/by-sku/{sku}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.speedsellx.io/v2/public/checkouts/by-sku/{sku}', 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/by-sku/{sku}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.speedsellx.io/v2/public/checkouts/by-sku/{sku}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.speedsellx.io/v2/public/checkouts/by-sku/{sku}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.speedsellx.io/v2/public/checkouts/by-sku/{sku}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
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"
}Requer o escopo
checkouts:read. O sku é o identificador que aparece no fim da URL que o comprador abre, então esta é a consulta de quem guardou o link do checkout e não o id.
Um sku que não existe, ou que pertence a outra conta, retorna 404.⌘I