Obter produto
curl --request GET \
--url https://api.tiny.com.br/public-api/v3/produtos/{idProduto} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tiny.com.br/public-api/v3/produtos/{idProduto}"
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/produtos/{idProduto}', 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/produtos/{idProduto}",
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/produtos/{idProduto}"
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/produtos/{idProduto}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tiny.com.br/public-api/v3/produtos/{idProduto}")
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,
"sku": "<string>",
"descricao": "<string>",
"tipo": "S",
"descricaoComplementar": "<string>",
"produtoPai": {
"id": 123,
"sku": "<string>",
"descricao": "<string>"
},
"unidade": "<string>",
"unidadePorCaixa": "<string>",
"ncm": "<string>",
"gtin": "<string>",
"garantia": "<string>",
"observacoes": "<string>",
"categoria": {
"id": 123,
"nome": "<string>",
"caminhoCompleto": "<string>"
},
"marca": {
"id": 123,
"nome": "<string>"
},
"dimensoes": {
"embalagem": {
"id": 123,
"descricao": "<string>"
},
"largura": 123,
"altura": 123,
"comprimento": 123,
"diametro": 123,
"pesoLiquido": 123,
"pesoBruto": 123,
"quantidadeVolumes": 123
},
"precos": {
"preco": 123,
"precoPromocional": 123,
"precoCusto": 123,
"precoCustoMedio": 123
},
"estoque": {
"controlar": true,
"sobEncomenda": true,
"diasPreparacao": 123,
"localizacao": "<string>",
"minimo": 123,
"maximo": 123,
"quantidade": 123
},
"fornecedores": [
{
"id": 123,
"nome": "<string>",
"codigoProdutoNoFornecedor": "<string>"
}
],
"seo": {
"titulo": "<string>",
"descricao": "<string>",
"keywords": [
"<string>"
],
"linkVideo": "<string>",
"slug": "<string>"
},
"tributacao": {
"gtinEmbalagem": "<string>",
"valorIPIFixo": 123,
"classeIPI": "<string>"
},
"anexos": [
{
"id": 123,
"url": "<string>",
"externo": true
}
],
"variacoes": [
{
"id": 123,
"descricao": "<string>",
"sku": "<string>",
"gtin": "<string>",
"precos": {
"preco": 123,
"precoPromocional": 123,
"precoCusto": 123,
"precoCustoMedio": 123
},
"estoque": {
"controlar": true,
"sobEncomenda": true,
"diasPreparacao": 123,
"localizacao": "<string>",
"minimo": 123,
"maximo": 123,
"quantidade": 123
},
"grade": [
{
"chave": "<string>",
"valor": "<string>"
}
]
}
],
"kit": [
{
"produto": {
"id": 123,
"sku": "<string>",
"descricao": "<string>"
},
"quantidade": 123
}
],
"producao": {
"produtos": [
{
"produto": {
"id": 123,
"sku": "<string>",
"descricao": "<string>"
},
"quantidade": 123
}
],
"etapas": [
"<string>"
]
},
"codigoListaServicos": "<string>"
}{
"mensagem": "Ocorreram erros de validação",
"detalhes": [
{
"campo": "codigo",
"mensagem": "O campo código é obrigatório"
}
]
}Produtos
Obter produto
GET
/
produtos
/
{idProduto}
Obter produto
curl --request GET \
--url https://api.tiny.com.br/public-api/v3/produtos/{idProduto} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tiny.com.br/public-api/v3/produtos/{idProduto}"
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/produtos/{idProduto}', 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/produtos/{idProduto}",
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/produtos/{idProduto}"
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/produtos/{idProduto}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tiny.com.br/public-api/v3/produtos/{idProduto}")
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,
"sku": "<string>",
"descricao": "<string>",
"tipo": "S",
"descricaoComplementar": "<string>",
"produtoPai": {
"id": 123,
"sku": "<string>",
"descricao": "<string>"
},
"unidade": "<string>",
"unidadePorCaixa": "<string>",
"ncm": "<string>",
"gtin": "<string>",
"garantia": "<string>",
"observacoes": "<string>",
"categoria": {
"id": 123,
"nome": "<string>",
"caminhoCompleto": "<string>"
},
"marca": {
"id": 123,
"nome": "<string>"
},
"dimensoes": {
"embalagem": {
"id": 123,
"descricao": "<string>"
},
"largura": 123,
"altura": 123,
"comprimento": 123,
"diametro": 123,
"pesoLiquido": 123,
"pesoBruto": 123,
"quantidadeVolumes": 123
},
"precos": {
"preco": 123,
"precoPromocional": 123,
"precoCusto": 123,
"precoCustoMedio": 123
},
"estoque": {
"controlar": true,
"sobEncomenda": true,
"diasPreparacao": 123,
"localizacao": "<string>",
"minimo": 123,
"maximo": 123,
"quantidade": 123
},
"fornecedores": [
{
"id": 123,
"nome": "<string>",
"codigoProdutoNoFornecedor": "<string>"
}
],
"seo": {
"titulo": "<string>",
"descricao": "<string>",
"keywords": [
"<string>"
],
"linkVideo": "<string>",
"slug": "<string>"
},
"tributacao": {
"gtinEmbalagem": "<string>",
"valorIPIFixo": 123,
"classeIPI": "<string>"
},
"anexos": [
{
"id": 123,
"url": "<string>",
"externo": true
}
],
"variacoes": [
{
"id": 123,
"descricao": "<string>",
"sku": "<string>",
"gtin": "<string>",
"precos": {
"preco": 123,
"precoPromocional": 123,
"precoCusto": 123,
"precoCustoMedio": 123
},
"estoque": {
"controlar": true,
"sobEncomenda": true,
"diasPreparacao": 123,
"localizacao": "<string>",
"minimo": 123,
"maximo": 123,
"quantidade": 123
},
"grade": [
{
"chave": "<string>",
"valor": "<string>"
}
]
}
],
"kit": [
{
"produto": {
"id": 123,
"sku": "<string>",
"descricao": "<string>"
},
"quantidade": 123
}
],
"producao": {
"produtos": [
{
"produto": {
"id": 123,
"sku": "<string>",
"descricao": "<string>"
},
"quantidade": 123
}
],
"etapas": [
"<string>"
]
},
"codigoListaServicos": "<string>"
}{
"mensagem": "Ocorreram erros de validação",
"detalhes": [
{
"campo": "codigo",
"mensagem": "O campo código é obrigatório"
}
]
}Path Parameters
Response
OK
- K - Kit
- S - Simples
- V - Com Variacoes
- F - Fabricado
- M - Materia Prima
Available options:
S - A - Ativo
- I - Inativo
- E - Excluido
Available options:
A, I, E Show child attributes
Show child attributes
- 0 - Nacional Exceto Codigo 3 A 5
- 4 - Nacional Producao Conforme Ajustes
- 5 - Nacional Conteudo Importacao Inferior 40
- 3 - Nacional Conteudo Importacao Superior 40
- 8 - Nacional Conteudo Importacao Superior 70
- 1 - Estrangeira Importacao Direta Exceto Codigo 6
- 6 - Estrangeira Importacao Direta Sem Similar
- 2 - Estrangeira Adquirida Mercado Interno
- 7 - Estrangeira Adquirida Mercado Interno Sem Similar
Available options:
0, 4, 5, 3, 8, 1, 6, 2, 7 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
- N - Normal
- P - Pai
- V - Variacao
Available options:
N, P, V ⌘I
