Obter orçamento (proposta comercial)
curl --request GET \
--url https://api.tiny.com.br/public-api/v3/orcamentos/{idOrcamento} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tiny.com.br/public-api/v3/orcamentos/{idOrcamento}"
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/orcamentos/{idOrcamento}', 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/orcamentos/{idOrcamento}",
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/orcamentos/{idOrcamento}"
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/orcamentos/{idOrcamento}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tiny.com.br/public-api/v3/orcamentos/{idOrcamento}")
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,
"nomeModelo": "<string>",
"situacao": "<string>",
"numeroProposta": "<string>",
"contato": {
"id": 123
},
"data": "2024-01-01",
"observacao": "<string>",
"introducao": "<string>",
"assinatura": {
"saudacao": "<string>",
"responsavel": "<string>"
},
"dataProximoContato": "2024-01-01",
"listaPreco": {
"id": 123
},
"naturezaOperacao": {
"id": 123
},
"vendedor": {
"id": 123
},
"enderecoAlternativo": {
"idOrigem": 123,
"endereco": "<string>",
"enderecoNro": "<string>",
"complemento": "<string>",
"bairro": "<string>",
"municipio": "<string>",
"cep": "<string>",
"uf": "<string>",
"fone": "<string>",
"nomeDestinatario": "<string>",
"tipo": "<string>",
"cpfCnpj": "<string>",
"ie": "<string>"
},
"transportador": {
"id": 123,
"idFormaEnvio": 123,
"idFormaFrete": 123
},
"condicoesComerciais": {
"parcelas": {
"condicao": "<string>",
"dias": [
"<string>"
],
"obs": [
"<string>"
]
},
"textoLivre": "<string>"
},
"condicoesGerais": {
"validade": 123,
"dataPrevistaEntrega": "2024-01-01",
"descricaoPrazoEntrega": "<string>"
},
"itens": [
{
"produto": {
"id": 123,
"sku": "<string>",
"descricao": "<string>"
},
"quantidade": 123,
"valorUnitario": 123,
"descrComplementarOrc": "<string>",
"prazoDisponibilidade": 123
}
],
"valorSubtotal": 123,
"valorTotal": 123,
"extras": {
"descricao": "<string>",
"total": 123,
"desconto": 123,
"frete": 123,
"pesoLiq": 123,
"pesoBruto": 123
}
}{
"mensagem": "Ocorreram erros de validação",
"detalhes": [
{
"campo": "codigo",
"mensagem": "O campo código é obrigatório"
}
]
}Orcamentos
Obter orçamento (proposta comercial)
GET
/
orcamentos
/
{idOrcamento}
Obter orçamento (proposta comercial)
curl --request GET \
--url https://api.tiny.com.br/public-api/v3/orcamentos/{idOrcamento} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tiny.com.br/public-api/v3/orcamentos/{idOrcamento}"
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/orcamentos/{idOrcamento}', 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/orcamentos/{idOrcamento}",
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/orcamentos/{idOrcamento}"
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/orcamentos/{idOrcamento}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tiny.com.br/public-api/v3/orcamentos/{idOrcamento}")
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,
"nomeModelo": "<string>",
"situacao": "<string>",
"numeroProposta": "<string>",
"contato": {
"id": 123
},
"data": "2024-01-01",
"observacao": "<string>",
"introducao": "<string>",
"assinatura": {
"saudacao": "<string>",
"responsavel": "<string>"
},
"dataProximoContato": "2024-01-01",
"listaPreco": {
"id": 123
},
"naturezaOperacao": {
"id": 123
},
"vendedor": {
"id": 123
},
"enderecoAlternativo": {
"idOrigem": 123,
"endereco": "<string>",
"enderecoNro": "<string>",
"complemento": "<string>",
"bairro": "<string>",
"municipio": "<string>",
"cep": "<string>",
"uf": "<string>",
"fone": "<string>",
"nomeDestinatario": "<string>",
"tipo": "<string>",
"cpfCnpj": "<string>",
"ie": "<string>"
},
"transportador": {
"id": 123,
"idFormaEnvio": 123,
"idFormaFrete": 123
},
"condicoesComerciais": {
"parcelas": {
"condicao": "<string>",
"dias": [
"<string>"
],
"obs": [
"<string>"
]
},
"textoLivre": "<string>"
},
"condicoesGerais": {
"validade": 123,
"dataPrevistaEntrega": "2024-01-01",
"descricaoPrazoEntrega": "<string>"
},
"itens": [
{
"produto": {
"id": 123,
"sku": "<string>",
"descricao": "<string>"
},
"quantidade": 123,
"valorUnitario": 123,
"descrComplementarOrc": "<string>",
"prazoDisponibilidade": 123
}
],
"valorSubtotal": 123,
"valorTotal": 123,
"extras": {
"descricao": "<string>",
"total": 123,
"desconto": 123,
"frete": 123,
"pesoLiq": 123,
"pesoBruto": 123
}
}{
"mensagem": "Ocorreram erros de validação",
"detalhes": [
{
"campo": "codigo",
"mensagem": "O campo código é obrigatório"
}
]
}Path Parameters
Response
OK
Show child attributes
Show child attributes
Example:
"2024-01-01"
Show child attributes
Show child attributes
Example:
"2024-01-01"
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
Subtotal dos itens da proposta
Valor total da proposta (itens + extras - desconto + frete + impostos)
Show child attributes
Show child attributes
⌘I
