Faturamento do Seller
curl --request GET \
--url https://api.example.com/seller/{id}/billingimport requests
url = "https://api.example.com/seller/{id}/billing"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/seller/{id}/billing', 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.example.com/seller/{id}/billing",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/seller/{id}/billing"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/seller/{id}/billing")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/seller/{id}/billing")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"seller_id": "seller_123",
"billing": {
"total": 15490.50,
"history": [
{
"month": "2023-05",
"amount": 3750.80,
"transactions_count": 42
},
{
"month": "2023-04",
"amount": 3850.25,
"transactions_count": 38
},
{
"month": "2023-03",
"amount": 4120.75,
"transactions_count": 45
},
{
"month": "2023-02",
"amount": 2100.40,
"transactions_count": 25
},
{
"month": "2023-01",
"amount": 1668.30,
"transactions_count": 20
}
]
}
}
Sellers
Faturamento do Seller
Endpoint para obter o faturamento detalhado de um seller específico
GET
/
seller
/
{id}
/
billing
Faturamento do Seller
curl --request GET \
--url https://api.example.com/seller/{id}/billingimport requests
url = "https://api.example.com/seller/{id}/billing"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/seller/{id}/billing', 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.example.com/seller/{id}/billing",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/seller/{id}/billing"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/seller/{id}/billing")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/seller/{id}/billing")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"seller_id": "seller_123",
"billing": {
"total": 15490.50,
"history": [
{
"month": "2023-05",
"amount": 3750.80,
"transactions_count": 42
},
{
"month": "2023-04",
"amount": 3850.25,
"transactions_count": 38
},
{
"month": "2023-03",
"amount": 4120.75,
"transactions_count": 45
},
{
"month": "2023-02",
"amount": 2100.40,
"transactions_count": 25
},
{
"month": "2023-01",
"amount": 1668.30,
"transactions_count": 20
}
]
}
}
Faturamento do Seller
Este endpoint permite obter informações detalhadas sobre o faturamento de um seller específico, incluindo histórico de transações e totais.Parâmetros da URL
string
required
ID do seller
Resposta
{
"seller_id": "seller_123",
"billing": {
"total": 15490.50,
"history": [
{
"month": "2023-05",
"amount": 3750.80,
"transactions_count": 42
},
{
"month": "2023-04",
"amount": 3850.25,
"transactions_count": 38
},
{
"month": "2023-03",
"amount": 4120.75,
"transactions_count": 45
},
{
"month": "2023-02",
"amount": 2100.40,
"transactions_count": 25
},
{
"month": "2023-01",
"amount": 1668.30,
"transactions_count": 20
}
]
}
}
Códigos de Resposta
200- Faturamento do seller retornado com sucesso401- Erro de autenticação404- Seller não encontrado
Observações
- O campo
billing.totalrepresenta o faturamento total desde o início das atividades do seller. - O histórico (
billing.history) mostra os dados de faturamento mês a mês, ordenados do mais recente para o mais antigo. - Por padrão, são retornados os dados dos últimos 6 meses.
- Os valores são apresentados em reais (BRL).
- O campo
transactions_countindica o número de transações realizadas no período.
