Obter pedido
curl --request GET \
--url https://api.tiny.com.br/public-api/v3/pedidos/{idPedido} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tiny.com.br/public-api/v3/pedidos/{idPedido}"
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/{idPedido}', 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/{idPedido}",
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/{idPedido}"
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/{idPedido}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tiny.com.br/public-api/v3/pedidos/{idPedido}")
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{
"id": 123,
"numeroPedido": 123,
"idNotaFiscal": 123,
"dataFaturamento": "<string>",
"valorTotalProdutos": 123,
"valorTotalPedido": 123,
"listaPreco": {
"id": 123,
"nome": "<string>",
"acrescimoDesconto": 123
},
"cliente": {
"nome": "<string>",
"codigo": "<string>",
"fantasia": "<string>",
"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
},
"enderecoEntrega": {
"endereco": "<string>",
"numero": "<string>",
"complemento": "<string>",
"bairro": "<string>",
"municipio": "<string>",
"cep": "<string>",
"uf": "<string>",
"pais": "<string>",
"nomeDestinatario": "<string>",
"cpfCnpj": "<string>",
"tipoPessoa": "<string>",
"telefone": "<string>",
"inscricaoEstadual": "<string>"
},
"ecommerce": {
"id": 123,
"nome": "<string>",
"numeroPedidoEcommerce": "<string>",
"numeroPedidoCanalVenda": "<string>",
"canalVenda": "<string>"
},
"transportador": {
"id": 123,
"nome": "<string>",
"formaEnvio": {
"id": 123,
"nome": "<string>"
},
"formaFrete": {
"id": 123,
"nome": "<string>"
},
"codigoRastreamento": "<string>",
"urlRastreamento": "<string>"
},
"deposito": {
"id": 123,
"nome": "<string>"
},
"vendedor": {
"id": 123,
"nome": "<string>"
},
"naturezaOperacao": {
"id": 123,
"nome": "<string>"
},
"intermediador": {
"id": 123,
"nome": "<string>",
"cnpj": "<string>",
"cnpjPagamentoInstituicao": "<string>"
},
"pagamento": {
"formaRecebimento": {
"id": 123,
"nome": "<string>"
},
"meioPagamento": {
"id": 123,
"nome": "<string>"
},
"condicaoPagamento": "<string>",
"parcelas": [
{
"dias": 123,
"data": "2024-01-01",
"valor": 123,
"observacoes": "<string>",
"formaRecebimento": {
"id": 123,
"nome": "<string>"
},
"meioPagamento": {
"id": 123,
"nome": "<string>"
}
}
]
},
"itens": [
{
"produto": {
"id": 123,
"sku": "<string>",
"descricao": "<string>"
},
"quantidade": 123,
"valorUnitario": 123,
"infoAdicional": "<string>"
}
],
"pagamentosIntegrados": [
{
"valor": 123,
"tipoPagamento": 123,
"cnpjIntermediador": "<string>",
"codigoAutorizacao": "<string>",
"codigoBandeira": 123
}
],
"data": "2024-01-01",
"dataEntrega": "2024-01-01",
"numeroOrdemCompra": "<string>",
"valorDesconto": 123,
"valorFrete": 123,
"valorOutrasDespesas": 123,
"dataPrevista": "2024-01-01",
"dataEnvio": "2024-01-01 00:00:00",
"observacoes": "<string>",
"observacoesInternas": "<string>",
"origemPedido": 123
}{
"mensagem": "Ocorreram erros de validação",
"detalhes": [
{
"campo": "codigo",
"mensagem": "O campo código é obrigatório"
}
]
}Pedidos
Obter pedido
GET
/
pedidos
/
{idPedido}
Obter pedido
curl --request GET \
--url https://api.tiny.com.br/public-api/v3/pedidos/{idPedido} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tiny.com.br/public-api/v3/pedidos/{idPedido}"
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/{idPedido}', 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/{idPedido}",
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/{idPedido}"
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/{idPedido}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tiny.com.br/public-api/v3/pedidos/{idPedido}")
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{
"id": 123,
"numeroPedido": 123,
"idNotaFiscal": 123,
"dataFaturamento": "<string>",
"valorTotalProdutos": 123,
"valorTotalPedido": 123,
"listaPreco": {
"id": 123,
"nome": "<string>",
"acrescimoDesconto": 123
},
"cliente": {
"nome": "<string>",
"codigo": "<string>",
"fantasia": "<string>",
"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
},
"enderecoEntrega": {
"endereco": "<string>",
"numero": "<string>",
"complemento": "<string>",
"bairro": "<string>",
"municipio": "<string>",
"cep": "<string>",
"uf": "<string>",
"pais": "<string>",
"nomeDestinatario": "<string>",
"cpfCnpj": "<string>",
"tipoPessoa": "<string>",
"telefone": "<string>",
"inscricaoEstadual": "<string>"
},
"ecommerce": {
"id": 123,
"nome": "<string>",
"numeroPedidoEcommerce": "<string>",
"numeroPedidoCanalVenda": "<string>",
"canalVenda": "<string>"
},
"transportador": {
"id": 123,
"nome": "<string>",
"formaEnvio": {
"id": 123,
"nome": "<string>"
},
"formaFrete": {
"id": 123,
"nome": "<string>"
},
"codigoRastreamento": "<string>",
"urlRastreamento": "<string>"
},
"deposito": {
"id": 123,
"nome": "<string>"
},
"vendedor": {
"id": 123,
"nome": "<string>"
},
"naturezaOperacao": {
"id": 123,
"nome": "<string>"
},
"intermediador": {
"id": 123,
"nome": "<string>",
"cnpj": "<string>",
"cnpjPagamentoInstituicao": "<string>"
},
"pagamento": {
"formaRecebimento": {
"id": 123,
"nome": "<string>"
},
"meioPagamento": {
"id": 123,
"nome": "<string>"
},
"condicaoPagamento": "<string>",
"parcelas": [
{
"dias": 123,
"data": "2024-01-01",
"valor": 123,
"observacoes": "<string>",
"formaRecebimento": {
"id": 123,
"nome": "<string>"
},
"meioPagamento": {
"id": 123,
"nome": "<string>"
}
}
]
},
"itens": [
{
"produto": {
"id": 123,
"sku": "<string>",
"descricao": "<string>"
},
"quantidade": 123,
"valorUnitario": 123,
"infoAdicional": "<string>"
}
],
"pagamentosIntegrados": [
{
"valor": 123,
"tipoPagamento": 123,
"cnpjIntermediador": "<string>",
"codigoAutorizacao": "<string>",
"codigoBandeira": 123
}
],
"data": "2024-01-01",
"dataEntrega": "2024-01-01",
"numeroOrdemCompra": "<string>",
"valorDesconto": 123,
"valorFrete": 123,
"valorOutrasDespesas": 123,
"dataPrevista": "2024-01-01",
"dataEnvio": "2024-01-01 00:00:00",
"observacoes": "<string>",
"observacoesInternas": "<string>",
"origemPedido": 123
}{
"mensagem": "Ocorreram erros de validação",
"detalhes": [
{
"campo": "codigo",
"mensagem": "O campo código é obrigatório"
}
]
}Path Parameters
Identificador do pedido
Response
OK
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
- 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 Example:
"2024-01-01"
Example:
"2024-01-01"
Example:
"2024-01-01"
Example:
"2024-01-01 00:00:00"
Origem do pedido (0 = Pedido de Venda, 1 = PDV)
⌘I
