Listar pedidos
curl --request GET \
--url https://api.tiny.com.br/public-api/v3/pedidos \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tiny.com.br/public-api/v3/pedidos"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tiny.com.br/public-api/v3/pedidos', 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.tiny.com.br/public-api/v3/pedidos",
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.tiny.com.br/public-api/v3/pedidos"
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.tiny.com.br/public-api/v3/pedidos")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tiny.com.br/public-api/v3/pedidos")
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{
"itens": [
{
"id": 123,
"situacao": 123,
"numeroPedido": 123,
"ecommerce": {
"id": 123,
"nome": "<string>",
"numeroPedidoEcommerce": "<string>",
"numeroPedidoCanalVenda": "<string>",
"canalVenda": "<string>"
},
"dataCriacao": "<string>",
"dataPrevista": "<string>",
"cliente": {
"nome": "<string>",
"codigo": "<string>",
"fantasia": "<string>",
"tipoPessoa": "J",
"cpfCnpj": "<string>",
"inscricaoEstadual": "<string>",
"rg": "<string>",
"telefone": "<string>",
"celular": "<string>",
"email": "<string>",
"endereco": {
"endereco": "<string>",
"numero": "<string>",
"complemento": "<string>",
"bairro": "<string>",
"municipio": "<string>",
"cep": "<string>",
"uf": "<string>",
"pais": "<string>"
},
"id": 123
},
"valor": "<string>",
"vendedor": {
"id": 123,
"nome": "<string>"
},
"transportador": {
"id": 123,
"nome": "<string>",
"fretePorConta": "R",
"formaEnvio": {
"id": 123,
"nome": "<string>"
},
"formaFrete": {
"id": 123,
"nome": "<string>"
},
"codigoRastreamento": "<string>",
"urlRastreamento": "<string>"
},
"origemPedido": 0
}
],
"paginacao": {
"limit": 123,
"offset": 123,
"total": 123
}
}{
"mensagem": "Ocorreram erros de validação",
"detalhes": [
{
"campo": "codigo",
"mensagem": "O campo código é obrigatório"
}
]
}Pedidos
Listar pedidos
GET
/
pedidos
Listar pedidos
curl --request GET \
--url https://api.tiny.com.br/public-api/v3/pedidos \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tiny.com.br/public-api/v3/pedidos"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tiny.com.br/public-api/v3/pedidos', 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.tiny.com.br/public-api/v3/pedidos",
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.tiny.com.br/public-api/v3/pedidos"
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.tiny.com.br/public-api/v3/pedidos")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tiny.com.br/public-api/v3/pedidos")
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{
"itens": [
{
"id": 123,
"situacao": 123,
"numeroPedido": 123,
"ecommerce": {
"id": 123,
"nome": "<string>",
"numeroPedidoEcommerce": "<string>",
"numeroPedidoCanalVenda": "<string>",
"canalVenda": "<string>"
},
"dataCriacao": "<string>",
"dataPrevista": "<string>",
"cliente": {
"nome": "<string>",
"codigo": "<string>",
"fantasia": "<string>",
"tipoPessoa": "J",
"cpfCnpj": "<string>",
"inscricaoEstadual": "<string>",
"rg": "<string>",
"telefone": "<string>",
"celular": "<string>",
"email": "<string>",
"endereco": {
"endereco": "<string>",
"numero": "<string>",
"complemento": "<string>",
"bairro": "<string>",
"municipio": "<string>",
"cep": "<string>",
"uf": "<string>",
"pais": "<string>"
},
"id": 123
},
"valor": "<string>",
"vendedor": {
"id": 123,
"nome": "<string>"
},
"transportador": {
"id": 123,
"nome": "<string>",
"fretePorConta": "R",
"formaEnvio": {
"id": 123,
"nome": "<string>"
},
"formaFrete": {
"id": 123,
"nome": "<string>"
},
"codigoRastreamento": "<string>",
"urlRastreamento": "<string>"
},
"origemPedido": 0
}
],
"paginacao": {
"limit": 123,
"offset": 123,
"total": 123
}
}{
"mensagem": "Ocorreram erros de validação",
"detalhes": [
{
"campo": "codigo",
"mensagem": "O campo código é obrigatório"
}
]
}Query Parameters
Pesquisa por número do pedido
Pesquisa por nome do cliente
Pesquisa por código do cliente
Pesquisa por CPF/CNPJ do cliente
Pesquisa através da data de criação do pedido
Pesquisa através da data de criação do pedido
Pesquisa através da data de atualização do pedido
Pesquisa com base na situação informada
- 8 - Dados Incompletos
- 0 - Aberta
- 3 - Aprovada
- 4 - Preparando Envio
- 1 - Faturada
- 7 - Pronto Envio
- 5 - Enviada
- 6 - Entregue
- 2 - Cancelada
- 9 - Nao Entregue
Available options:
8, 0, 3, 4, 1, 7, 5, 6, 2, 9 Pesquisa por número do pedido no e-commerce
Pesquisa por id do vendedor
Pesquisa por marcadores
Pesquise através da origem do pedido (0 = Pedido de Venda, 1 = PDV)
Available options:
0, 1 Define a ordenação da listagem por ordem crescente ou decrescente
- asc - Crescente
- desc - Descrescente
Available options:
asc, desc Limite da paginação
Offset da paginação
