List My Orders
curl --request GET \
--url https://api.centralcart.io/v1/webstore/account/order \
--header 'Authorization: Bearer <token>' \
--header 'x-store-domain: <x-store-domain>'import requests
url = "https://api.centralcart.io/v1/webstore/account/order"
headers = {
"x-store-domain": "<x-store-domain>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-store-domain': '<x-store-domain>', Authorization: 'Bearer <token>'}
};
fetch('https://api.centralcart.io/v1/webstore/account/order', 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/webstore/account/order",
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>",
"x-store-domain: <x-store-domain>"
],
]);
$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.centralcart.io/v1/webstore/account/order"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-store-domain", "<x-store-domain>")
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.centralcart.io/v1/webstore/account/order")
.header("x-store-domain", "<x-store-domain>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.centralcart.io/v1/webstore/account/order")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-store-domain"] = '<x-store-domain>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"meta": {
"total": 4,
"per_page": 10,
"current_page": 1,
"last_page": 1
},
"data": [
{
"id": "KgCzCUtJDsvM",
"status": "APPROVED",
"price": 49.9,
"currency": "BRL",
"gateway": "PIX",
"created_at": "2024-03-03T23:40:02.000-03:00",
"paid_at": "2024-03-03T23:43:12.000-03:00",
"packages": [
{
"id": 1,
"name": "VIP Inicial",
"quantity": 1,
"price": 49.9,
"image": "https://cdn.centralcart.io/stores/1/packages/image.png"
}
]
}
]
}{
"errors": [
{
"message": "Sessão inválida ou expirada.",
"code": "CUSTOMER_UNAUTHENTICATED"
}
]
}Conta do cliente
List My Orders
Pedidos do comprador autenticado, do mais recente para o mais antigo.
Traz o pedido em qualquer status, inclusive pendente, reembolsado, cancelado e recusado: o comprador vê o histórico completo, e o conteúdo entregue continua saindo apenas nos aprovados. Um checkout abandonado também vira pedido pendente, então filtre por
status no seu front se não quiser exibir tentativas não concluídas. O escopo vem sempre da sessão, e não existe parâmetro para consultar os pedidos de outra pessoa.GET
/
webstore
/
account
/
order
List My Orders
curl --request GET \
--url https://api.centralcart.io/v1/webstore/account/order \
--header 'Authorization: Bearer <token>' \
--header 'x-store-domain: <x-store-domain>'import requests
url = "https://api.centralcart.io/v1/webstore/account/order"
headers = {
"x-store-domain": "<x-store-domain>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-store-domain': '<x-store-domain>', Authorization: 'Bearer <token>'}
};
fetch('https://api.centralcart.io/v1/webstore/account/order', 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/webstore/account/order",
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>",
"x-store-domain: <x-store-domain>"
],
]);
$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.centralcart.io/v1/webstore/account/order"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-store-domain", "<x-store-domain>")
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.centralcart.io/v1/webstore/account/order")
.header("x-store-domain", "<x-store-domain>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.centralcart.io/v1/webstore/account/order")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-store-domain"] = '<x-store-domain>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"meta": {
"total": 4,
"per_page": 10,
"current_page": 1,
"last_page": 1
},
"data": [
{
"id": "KgCzCUtJDsvM",
"status": "APPROVED",
"price": 49.9,
"currency": "BRL",
"gateway": "PIX",
"created_at": "2024-03-03T23:40:02.000-03:00",
"paid_at": "2024-03-03T23:43:12.000-03:00",
"packages": [
{
"id": 1,
"name": "VIP Inicial",
"quantity": 1,
"price": 49.9,
"image": "https://cdn.centralcart.io/stores/1/packages/image.png"
}
]
}
]
}{
"errors": [
{
"message": "Sessão inválida ou expirada.",
"code": "CUSTOMER_UNAUTHENTICATED"
}
]
}Autorizações
access_token do comprador, devolvido por POST /webstore/auth/verify.
Cabeçalhos
Domínio da sua loja (ex: sualoja.centralcart.ai)
Parâmetros de consulta
Página (padrão: 1)
Pedidos por página (padrão: 10, máximo: 50)
⌘I