Identificar o cliente logado
curl --request POST \
--url https://api.centralcart.io/v1/app/customer/identify \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"handoff": "V1StGXR8Z5jdHi6BmyT0eQx7KpLmN3cWaF9uYbZQsRtVhJdG"
}
'import requests
url = "https://api.centralcart.io/v1/app/customer/identify"
payload = { "handoff": "V1StGXR8Z5jdHi6BmyT0eQx7KpLmN3cWaF9uYbZQsRtVhJdG" }
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({handoff: 'V1StGXR8Z5jdHi6BmyT0eQx7KpLmN3cWaF9uYbZQsRtVhJdG'})
};
fetch('https://api.centralcart.io/v1/app/customer/identify', 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/customer/identify",
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([
'handoff' => 'V1StGXR8Z5jdHi6BmyT0eQx7KpLmN3cWaF9uYbZQsRtVhJdG'
]),
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/customer/identify"
payload := strings.NewReader("{\n \"handoff\": \"V1StGXR8Z5jdHi6BmyT0eQx7KpLmN3cWaF9uYbZQsRtVhJdG\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.centralcart.io/v1/app/customer/identify")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"handoff\": \"V1StGXR8Z5jdHi6BmyT0eQx7KpLmN3cWaF9uYbZQsRtVhJdG\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.centralcart.io/v1/app/customer/identify")
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 \"handoff\": \"V1StGXR8Z5jdHi6BmyT0eQx7KpLmN3cWaF9uYbZQsRtVhJdG\"\n}"
response = http.request(request)
puts response.read_body{
"customer": {
"store_id": 1234,
"email": "[email protected]",
"name": "Fulano de Tal",
"avatar": null,
"discord_id": null,
"issued_at": "2026-09-22T14:03:11.284Z"
}
}{
"errors": [
{
"message": "Passe inválido ou expirado.",
"code": "HANDOFF_INVALID"
}
]
}Clientes
Identificar o cliente logado
Troca um passe emitido pela vitrine pela identidade do cliente que está logado na loja. É como um sistema externo descobre, com segurança, quem está do outro lado da tela, sem pedir um segundo login.
O passe vem de GET /auth/handoff, chamado pela página da loja. Ele vale 60 segundos, funciona uma vez só e não serve para nada sem a chave de API da loja. Veja Identificação de cliente para o fluxo completo.
Este endpoint usa o escopo customers:identify, separado de customers:read porque é a credencial que sustenta o login de um sistema de terceiro.
A CentralCart responde quem é o cliente, e nada além disso. O que fazer com essa informação é regra do seu sistema.
POST
/
app
/
customer
/
identify
Identificar o cliente logado
curl --request POST \
--url https://api.centralcart.io/v1/app/customer/identify \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"handoff": "V1StGXR8Z5jdHi6BmyT0eQx7KpLmN3cWaF9uYbZQsRtVhJdG"
}
'import requests
url = "https://api.centralcart.io/v1/app/customer/identify"
payload = { "handoff": "V1StGXR8Z5jdHi6BmyT0eQx7KpLmN3cWaF9uYbZQsRtVhJdG" }
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({handoff: 'V1StGXR8Z5jdHi6BmyT0eQx7KpLmN3cWaF9uYbZQsRtVhJdG'})
};
fetch('https://api.centralcart.io/v1/app/customer/identify', 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/customer/identify",
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([
'handoff' => 'V1StGXR8Z5jdHi6BmyT0eQx7KpLmN3cWaF9uYbZQsRtVhJdG'
]),
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/customer/identify"
payload := strings.NewReader("{\n \"handoff\": \"V1StGXR8Z5jdHi6BmyT0eQx7KpLmN3cWaF9uYbZQsRtVhJdG\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.centralcart.io/v1/app/customer/identify")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"handoff\": \"V1StGXR8Z5jdHi6BmyT0eQx7KpLmN3cWaF9uYbZQsRtVhJdG\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.centralcart.io/v1/app/customer/identify")
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 \"handoff\": \"V1StGXR8Z5jdHi6BmyT0eQx7KpLmN3cWaF9uYbZQsRtVhJdG\"\n}"
response = http.request(request)
puts response.read_body{
"customer": {
"store_id": 1234,
"email": "[email protected]",
"name": "Fulano de Tal",
"avatar": null,
"discord_id": null,
"issued_at": "2026-09-22T14:03:11.284Z"
}
}{
"errors": [
{
"message": "Passe inválido ou expirado.",
"code": "HANDOFF_INVALID"
}
]
}