Consultar os números públicos do Hub
GET
/api/seller/external/v1/hub/metric
curl --request GET \ --get "https://api.spelt.com.br/api/seller/external/v1/hub/metric" \ --header "Authorization: Bearer splt_live_SUA_CHAVE" \ --header "Content-Type: application/json" \ --header "Accept: application/json"const url = new URL( "https://api.spelt.com.br/api/seller/external/v1/hub/metric");
const headers = { "Authorization": "Bearer splt_live_SUA_CHAVE", "Content-Type": "application/json", "Accept": "application/json",};
fetch(url, { method: "GET", headers,}).then(response => response.json());$client = new \GuzzleHttp\Client();$url = 'https://api.spelt.com.br/api/seller/external/v1/hub/metric';$response = $client->get( $url, [ 'headers' => [ 'Authorization' => 'Bearer splt_live_SUA_CHAVE', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ]);$body = $response->getBody();print_r(json_decode((string) $body));import requestsimport json
url = 'https://api.spelt.com.br/api/seller/external/v1/hub/metric'headers = { 'Authorization': 'Bearer splt_live_SUA_CHAVE', 'Content-Type': 'application/json', 'Accept': 'application/json'}
response = requests.request('GET', url, headers=headers)response.json()As chaves que o perfil público expõe e o catálogo de números disponíveis, cada um com o valor atual.
Authorizations
Seção intitulada “Authorizations”Responses
Seção intitulada “Responses”Media typeapplication/json
object
data
object
keys
Array<string>
catalog
Array<object>
object
key
string
label
string
description
string
value
string
available
boolean
hint
string
enabled
boolean
cached_for_seconds
integer
Example
{ "data": { "keys": [ "active_customers" ], "catalog": [ { "key": "active_customers", "label": "Clientes ativos", "description": "…", "value": "312", "available": true, "hint": "Verificado pelo Spelt", "enabled": true } ], "cached_for_seconds": 3600 }}