Faturamento dos Sellers
curl --request GET \
--url https://api.example.com/sellers/revenueimport requests
url = "https://api.example.com/sellers/revenue"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/sellers/revenue', 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/sellers/revenue",
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/sellers/revenue"
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/sellers/revenue")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/sellers/revenue")
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",
"seller_name": "Loja do João",
"revenue": {
"total": 15490.50,
"month": 3750.80
}
},
{
"seller_id": "seller_456",
"seller_name": "Mega Store",
"revenue": {
"total": 68920.75,
"month": 12345.60
}
},
{
"seller_id": "seller_789",
"seller_name": "Boutique Maria",
"revenue": {
"total": 8950.25,
"month": 1890.30
}
}
]
Sellers
Faturamento dos Sellers
Endpoint para obter o faturamento de todos os sellers
GET
/
sellers
/
revenue
Faturamento dos Sellers
curl --request GET \
--url https://api.example.com/sellers/revenueimport requests
url = "https://api.example.com/sellers/revenue"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/sellers/revenue', 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/sellers/revenue",
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/sellers/revenue"
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/sellers/revenue")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/sellers/revenue")
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",
"seller_name": "Loja do João",
"revenue": {
"total": 15490.50,
"month": 3750.80
}
},
{
"seller_id": "seller_456",
"seller_name": "Mega Store",
"revenue": {
"total": 68920.75,
"month": 12345.60
}
},
{
"seller_id": "seller_789",
"seller_name": "Boutique Maria",
"revenue": {
"total": 8950.25,
"month": 1890.30
}
}
]
Faturamento dos Sellers
Este endpoint permite obter o faturamento de todos os sellers cadastrados na plataforma, incluindo dados de receita total e mensal.Parâmetros
Este endpoint não requer parâmetros específicos.Resposta
[
{
"seller_id": "seller_123",
"seller_name": "Loja do João",
"revenue": {
"total": 15490.50,
"month": 3750.80
}
},
{
"seller_id": "seller_456",
"seller_name": "Mega Store",
"revenue": {
"total": 68920.75,
"month": 12345.60
}
},
{
"seller_id": "seller_789",
"seller_name": "Boutique Maria",
"revenue": {
"total": 8950.25,
"month": 1890.30
}
}
]
Códigos de Resposta
200- Faturamento dos sellers retornado com sucesso401- Erro de autenticação
Observações
- O campo
revenue.totalrepresenta o faturamento total desde o início das atividades do seller. - O campo
revenue.monthrepresenta o faturamento do mês corrente. - Os valores são apresentados em reais (BRL).
- Este endpoint pode ser útil para análises de desempenho e relatórios gerenciais sobre o marketplace.
