Listar pedidos
curl --request GET \
--url https://api.speedsellx.io/v2/public/orders \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.speedsellx.io/v2/public/orders"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.speedsellx.io/v2/public/orders', 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.speedsellx.io/v2/public/orders",
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>"
],
]);
$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.speedsellx.io/v2/public/orders"
req, _ := http.NewRequest("GET", url, nil)
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.speedsellx.io/v2/public/orders")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.speedsellx.io/v2/public/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": 123,
"uuid": "<string>",
"type": "<string>",
"status": "<string>",
"status_details": "<string>",
"seller_id": 123,
"product_id": 123,
"customer_id": 123,
"parent_id": 123,
"captured_at": "<string>",
"created_at": "<string>",
"settlement_currency": "<string>",
"settlement_total": "<string>",
"settlement_seller": "<string>",
"tracking": {
"sck": "<string>",
"src": "<string>",
"utm_source": "<string>",
"utm_campaign": "<string>",
"utm_medium": "<string>",
"utm_content": "<string>",
"utm_term": "<string>",
"fbclid": "<string>",
"gclid": "<string>",
"gbraid": "<string>",
"wbraid": "<string>",
"msclkid": "<string>",
"ttclid": "<string>",
"twclid": "<string>",
"li_fat_id": "<string>",
"epik": "<string>",
"cf_click_id": "<string>",
"rtkclickid": "<string>"
},
"country": "<string>",
"product_sku": "<string>"
}
],
"links": {
"first": "<string>",
"last": "<string>",
"prev": "<string>",
"next": "<string>"
},
"meta": {
"current_page": 2,
"from": 2,
"last_page": 2,
"links": [
{
"url": "<string>",
"label": "<string>",
"active": true
}
],
"path": "<string>",
"per_page": 1,
"to": 2,
"total": 1
}
}{
"status": "error",
"error": "unauthenticated"
}{
"status": "error",
"error": "insufficient_scope"
}Pedidos
Listar pedidos
Retorna uma página dos pedidos da conta da chave, cada um com o sku do produto que vendeu. Aceita o filtro type, per_page (padrão 15) e page (padrão 1). Exige o escopo orders:read.
GET
/
public
/
orders
Listar pedidos
curl --request GET \
--url https://api.speedsellx.io/v2/public/orders \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.speedsellx.io/v2/public/orders"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.speedsellx.io/v2/public/orders', 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.speedsellx.io/v2/public/orders",
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>"
],
]);
$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.speedsellx.io/v2/public/orders"
req, _ := http.NewRequest("GET", url, nil)
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.speedsellx.io/v2/public/orders")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.speedsellx.io/v2/public/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": 123,
"uuid": "<string>",
"type": "<string>",
"status": "<string>",
"status_details": "<string>",
"seller_id": 123,
"product_id": 123,
"customer_id": 123,
"parent_id": 123,
"captured_at": "<string>",
"created_at": "<string>",
"settlement_currency": "<string>",
"settlement_total": "<string>",
"settlement_seller": "<string>",
"tracking": {
"sck": "<string>",
"src": "<string>",
"utm_source": "<string>",
"utm_campaign": "<string>",
"utm_medium": "<string>",
"utm_content": "<string>",
"utm_term": "<string>",
"fbclid": "<string>",
"gclid": "<string>",
"gbraid": "<string>",
"wbraid": "<string>",
"msclkid": "<string>",
"ttclid": "<string>",
"twclid": "<string>",
"li_fat_id": "<string>",
"epik": "<string>",
"cf_click_id": "<string>",
"rtkclickid": "<string>"
},
"country": "<string>",
"product_sku": "<string>"
}
],
"links": {
"first": "<string>",
"last": "<string>",
"prev": "<string>",
"next": "<string>"
},
"meta": {
"current_page": 2,
"from": 2,
"last_page": 2,
"links": [
{
"url": "<string>",
"label": "<string>",
"active": true
}
],
"path": "<string>",
"per_page": 1,
"to": 2,
"total": 1
}
}{
"status": "error",
"error": "unauthenticated"
}{
"status": "error",
"error": "insufficient_scope"
}Authorizations
A chave de API da conta, no formato sk_{modo}_{prefixo}.{segredo}.
Query Parameters
Filtra pelo tipo do pedido.
Available options:
main, upsell, subscription_renewal