Criar conta a pagar
curl --request POST \
--url https://api.tiny.com.br/public-api/v3/contas-pagar \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"dataVencimento": "2024-01-01",
"valor": 123,
"contato": {
"id": 123
},
"data": "2024-01-01",
"numeroDocumento": "<string>",
"historico": "<string>",
"categoria": {
"id": 123
},
"dataCompetencia": "2024-01",
"diaVencimento": 123,
"quantidadeParcelas": 123,
"diaSemanaVencimento": 123
}
'import requests
url = "https://api.tiny.com.br/public-api/v3/contas-pagar"
payload = {
"dataVencimento": "2024-01-01",
"valor": 123,
"contato": { "id": 123 },
"data": "2024-01-01",
"numeroDocumento": "<string>",
"historico": "<string>",
"categoria": { "id": 123 },
"dataCompetencia": "2024-01",
"diaVencimento": 123,
"quantidadeParcelas": 123,
"diaSemanaVencimento": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dataVencimento: '2024-01-01',
valor: 123,
contato: {id: 123},
data: '2024-01-01',
numeroDocumento: '<string>',
historico: '<string>',
categoria: {id: 123},
dataCompetencia: '2024-01',
diaVencimento: 123,
quantidadeParcelas: 123,
diaSemanaVencimento: 123
})
};
fetch('https://api.tiny.com.br/public-api/v3/contas-pagar', 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/contas-pagar",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'dataVencimento' => '2024-01-01',
'valor' => 123,
'contato' => [
'id' => 123
],
'data' => '2024-01-01',
'numeroDocumento' => '<string>',
'historico' => '<string>',
'categoria' => [
'id' => 123
],
'dataCompetencia' => '2024-01',
'diaVencimento' => 123,
'quantidadeParcelas' => 123,
'diaSemanaVencimento' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.tiny.com.br/public-api/v3/contas-pagar"
payload := strings.NewReader("{\n \"dataVencimento\": \"2024-01-01\",\n \"valor\": 123,\n \"contato\": {\n \"id\": 123\n },\n \"data\": \"2024-01-01\",\n \"numeroDocumento\": \"<string>\",\n \"historico\": \"<string>\",\n \"categoria\": {\n \"id\": 123\n },\n \"dataCompetencia\": \"2024-01\",\n \"diaVencimento\": 123,\n \"quantidadeParcelas\": 123,\n \"diaSemanaVencimento\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.tiny.com.br/public-api/v3/contas-pagar")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"dataVencimento\": \"2024-01-01\",\n \"valor\": 123,\n \"contato\": {\n \"id\": 123\n },\n \"data\": \"2024-01-01\",\n \"numeroDocumento\": \"<string>\",\n \"historico\": \"<string>\",\n \"categoria\": {\n \"id\": 123\n },\n \"dataCompetencia\": \"2024-01\",\n \"diaVencimento\": 123,\n \"quantidadeParcelas\": 123,\n \"diaSemanaVencimento\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tiny.com.br/public-api/v3/contas-pagar")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dataVencimento\": \"2024-01-01\",\n \"valor\": 123,\n \"contato\": {\n \"id\": 123\n },\n \"data\": \"2024-01-01\",\n \"numeroDocumento\": \"<string>\",\n \"historico\": \"<string>\",\n \"categoria\": {\n \"id\": 123\n },\n \"dataCompetencia\": \"2024-01\",\n \"diaVencimento\": 123,\n \"quantidadeParcelas\": 123,\n \"diaSemanaVencimento\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": 123
}{
"mensagem": "Ocorreram erros de validação",
"detalhes": [
{
"campo": "codigo",
"mensagem": "O campo código é obrigatório"
}
]
}Contas a pagar
Criar conta a pagar
POST
/
contas-pagar
Criar conta a pagar
curl --request POST \
--url https://api.tiny.com.br/public-api/v3/contas-pagar \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"dataVencimento": "2024-01-01",
"valor": 123,
"contato": {
"id": 123
},
"data": "2024-01-01",
"numeroDocumento": "<string>",
"historico": "<string>",
"categoria": {
"id": 123
},
"dataCompetencia": "2024-01",
"diaVencimento": 123,
"quantidadeParcelas": 123,
"diaSemanaVencimento": 123
}
'import requests
url = "https://api.tiny.com.br/public-api/v3/contas-pagar"
payload = {
"dataVencimento": "2024-01-01",
"valor": 123,
"contato": { "id": 123 },
"data": "2024-01-01",
"numeroDocumento": "<string>",
"historico": "<string>",
"categoria": { "id": 123 },
"dataCompetencia": "2024-01",
"diaVencimento": 123,
"quantidadeParcelas": 123,
"diaSemanaVencimento": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dataVencimento: '2024-01-01',
valor: 123,
contato: {id: 123},
data: '2024-01-01',
numeroDocumento: '<string>',
historico: '<string>',
categoria: {id: 123},
dataCompetencia: '2024-01',
diaVencimento: 123,
quantidadeParcelas: 123,
diaSemanaVencimento: 123
})
};
fetch('https://api.tiny.com.br/public-api/v3/contas-pagar', 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/contas-pagar",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'dataVencimento' => '2024-01-01',
'valor' => 123,
'contato' => [
'id' => 123
],
'data' => '2024-01-01',
'numeroDocumento' => '<string>',
'historico' => '<string>',
'categoria' => [
'id' => 123
],
'dataCompetencia' => '2024-01',
'diaVencimento' => 123,
'quantidadeParcelas' => 123,
'diaSemanaVencimento' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.tiny.com.br/public-api/v3/contas-pagar"
payload := strings.NewReader("{\n \"dataVencimento\": \"2024-01-01\",\n \"valor\": 123,\n \"contato\": {\n \"id\": 123\n },\n \"data\": \"2024-01-01\",\n \"numeroDocumento\": \"<string>\",\n \"historico\": \"<string>\",\n \"categoria\": {\n \"id\": 123\n },\n \"dataCompetencia\": \"2024-01\",\n \"diaVencimento\": 123,\n \"quantidadeParcelas\": 123,\n \"diaSemanaVencimento\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.tiny.com.br/public-api/v3/contas-pagar")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"dataVencimento\": \"2024-01-01\",\n \"valor\": 123,\n \"contato\": {\n \"id\": 123\n },\n \"data\": \"2024-01-01\",\n \"numeroDocumento\": \"<string>\",\n \"historico\": \"<string>\",\n \"categoria\": {\n \"id\": 123\n },\n \"dataCompetencia\": \"2024-01\",\n \"diaVencimento\": 123,\n \"quantidadeParcelas\": 123,\n \"diaSemanaVencimento\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tiny.com.br/public-api/v3/contas-pagar")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dataVencimento\": \"2024-01-01\",\n \"valor\": 123,\n \"contato\": {\n \"id\": 123\n },\n \"data\": \"2024-01-01\",\n \"numeroDocumento\": \"<string>\",\n \"historico\": \"<string>\",\n \"categoria\": {\n \"id\": 123\n },\n \"dataCompetencia\": \"2024-01\",\n \"diaVencimento\": 123,\n \"quantidadeParcelas\": 123,\n \"diaSemanaVencimento\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": 123
}{
"mensagem": "Ocorreram erros de validação",
"detalhes": [
{
"campo": "codigo",
"mensagem": "O campo código é obrigatório"
}
]
}Body
application/json
Example:
"2024-01-01"
Show child attributes
Show child attributes
Example:
"2024-01-01"
Show child attributes
Show child attributes
Example:
"2024-01"
- U - Unica
- W - Semanal
- Q - Quinzenal
- M - Mensal
- T - Trimestral
- S - Semestral
- A - Anual
- P - Parcelada
Available options:
U, W, Q, M, T, S, A, P - 0 - Nao Definida
- 2 - Dinheiro
- 3 - Credito
- 4 - Debito
- 5 - Boleto
- 6 - Deposito
- 7 - Cheque
- 8 - Crediario
- 10 - Outra
- 12 - Duplicata Mercantil
- 14 - Vale
- 15 - Pix
- 16 - Vale Alimentacao
- 17 - Vale Refeicao
- 18 - Vale Presente
- 19 - Vale Combustivel
- 20 - Deposito Bancario
- 21 - Transferencia Bancaria Carteira Digital
- 22 - Fidelidade Cashback Credito Virtual
Available options:
0, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 15, 16, 17, 18, 19, 20, 21, 22 Response
OK
⌘I
