/realms/{realmId}/organizations/{organizationId}/contracts/{contractId}/deals
curl --request POST \
--url https://api.platform.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/contracts/{contractId}/deals \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.platform.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/contracts/{contractId}/deals"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.platform.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/contracts/{contractId}/deals', 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.platform.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/contracts/{contractId}/deals",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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.platform.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/contracts/{contractId}/deals"
req, _ := http.NewRequest("POST", 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.post("https://api.platform.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/contracts/{contractId}/deals")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.platform.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/contracts/{contractId}/deals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"realm": "<string>",
"organization": "<string>",
"contract": "<string>",
"chargeType": "SINGLE",
"status": "OPEN",
"startAt": "2023-11-07T05:31:56Z",
"products": [
{
"id": "<string>",
"identifier": "<string>",
"price": 123,
"type": "RECURRENT",
"chargeMethod": "INSTANT",
"description": "<string>",
"billingRule": {
"id": "<string>",
"name": "<string>",
"calculationMethod": "UNIT",
"dataSource": {
"type": "DATABASE",
"collection": "<string>",
"filter": {},
"field": "<string>",
"aggregate": "<string>"
}
},
"idProduct": "<string>"
}
],
"paymentMethods": [
"BANK_SLIP"
],
"creditParties": [
{
"document": "<string>",
"name": "<string>",
"email": "<string>",
"unit": "PERCENTAGE",
"amount": 123,
"account": {
"bank": "P3",
"type": "WALLET",
"identifier": {
"realm": "<string>",
"organization": "<string>",
"account": "<string>",
"wallet": "<string>"
},
"email": "<string>"
}
}
],
"debitParties": [
{
"document": "<string>",
"name": "<string>",
"email": "<string>",
"unit": "PERCENTAGE",
"amount": 123,
"account": {
"bank": "P3",
"type": "WALLET",
"email": "<string>",
"identifier": {
"realm": "<string>",
"organization": "<string>",
"account": "<string>",
"wallet": "<string>"
}
},
"address": {
"street": "<string>",
"number": "<string>",
"neighborhood": "<string>",
"city": "<string>",
"state": "<string>",
"postalCode": "<string>",
"complement": "<string>"
}
}
],
"closingAt": "<string>",
"firstChargeDate": "2023-11-07T05:31:56Z",
"numberOfInstallments": 123,
"dueAt": "<string>",
"createdBy": "<string>",
"updatedBy": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"endAt": "2023-11-07T05:31:56Z",
"secondaryPaymentMethods": [
"BANK_SLIP"
],
"fine": {
"amountType": "FIXED_VALUE",
"amount": 123
},
"interest": {
"amount": 123,
"amountType": "AMOUNT_CALENDAR_DAYS"
},
"discount": {
"amount": 123,
"amountType": "AMOUNT_PER_ANTECIPATION"
},
"paymentUrl": "<string>",
"paymentLinkValidity": "2023-11-07T05:31:56Z",
"settings": {
"createAllInvoicesOnStart": true,
"disableOpenStatus": true,
"callBackUrlForPaymentProvider": {
"success": "<string>",
"pending": "<string>",
"error": "<string>"
},
"invoiceNameType": "DEAL_DESCRIPTION",
"paymentLinkId": "<string>"
},
"externalCard": {
"id": "<string>",
"token": "<string>",
"lastFourDigits": "<string>"
}
}Contracts & Deals
/realms/{realmId}/organizations/{organizationId}/contracts/{contractId}/deals
POST
/
realms
/
{realmId}
/
organizations
/
{organizationId}
/
contracts
/
{contractId}
/
deals
/realms/{realmId}/organizations/{organizationId}/contracts/{contractId}/deals
curl --request POST \
--url https://api.platform.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/contracts/{contractId}/deals \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.platform.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/contracts/{contractId}/deals"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.platform.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/contracts/{contractId}/deals', 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.platform.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/contracts/{contractId}/deals",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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.platform.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/contracts/{contractId}/deals"
req, _ := http.NewRequest("POST", 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.post("https://api.platform.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/contracts/{contractId}/deals")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.platform.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/contracts/{contractId}/deals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"realm": "<string>",
"organization": "<string>",
"contract": "<string>",
"chargeType": "SINGLE",
"status": "OPEN",
"startAt": "2023-11-07T05:31:56Z",
"products": [
{
"id": "<string>",
"identifier": "<string>",
"price": 123,
"type": "RECURRENT",
"chargeMethod": "INSTANT",
"description": "<string>",
"billingRule": {
"id": "<string>",
"name": "<string>",
"calculationMethod": "UNIT",
"dataSource": {
"type": "DATABASE",
"collection": "<string>",
"filter": {},
"field": "<string>",
"aggregate": "<string>"
}
},
"idProduct": "<string>"
}
],
"paymentMethods": [
"BANK_SLIP"
],
"creditParties": [
{
"document": "<string>",
"name": "<string>",
"email": "<string>",
"unit": "PERCENTAGE",
"amount": 123,
"account": {
"bank": "P3",
"type": "WALLET",
"identifier": {
"realm": "<string>",
"organization": "<string>",
"account": "<string>",
"wallet": "<string>"
},
"email": "<string>"
}
}
],
"debitParties": [
{
"document": "<string>",
"name": "<string>",
"email": "<string>",
"unit": "PERCENTAGE",
"amount": 123,
"account": {
"bank": "P3",
"type": "WALLET",
"email": "<string>",
"identifier": {
"realm": "<string>",
"organization": "<string>",
"account": "<string>",
"wallet": "<string>"
}
},
"address": {
"street": "<string>",
"number": "<string>",
"neighborhood": "<string>",
"city": "<string>",
"state": "<string>",
"postalCode": "<string>",
"complement": "<string>"
}
}
],
"closingAt": "<string>",
"firstChargeDate": "2023-11-07T05:31:56Z",
"numberOfInstallments": 123,
"dueAt": "<string>",
"createdBy": "<string>",
"updatedBy": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"endAt": "2023-11-07T05:31:56Z",
"secondaryPaymentMethods": [
"BANK_SLIP"
],
"fine": {
"amountType": "FIXED_VALUE",
"amount": 123
},
"interest": {
"amount": 123,
"amountType": "AMOUNT_CALENDAR_DAYS"
},
"discount": {
"amount": 123,
"amountType": "AMOUNT_PER_ANTECIPATION"
},
"paymentUrl": "<string>",
"paymentLinkValidity": "2023-11-07T05:31:56Z",
"settings": {
"createAllInvoicesOnStart": true,
"disableOpenStatus": true,
"callBackUrlForPaymentProvider": {
"success": "<string>",
"pending": "<string>",
"error": "<string>"
},
"invoiceNameType": "DEAL_DESCRIPTION",
"paymentLinkId": "<string>"
},
"externalCard": {
"id": "<string>",
"token": "<string>",
"lastFourDigits": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
201 - application/json
Successful response
Available options:
SINGLE, RECURRENT, SUBSCRIPTION Available options:
OPEN, CANCELED, TERMINATED, EXPIRED, REVOKED Show child attributes
Show child attributes
Available options:
BANK_SLIP, PIX_INITIATION, PIX_AUTOMATIC, PIX, P2P Show child attributes
Show child attributes
Show child attributes
Show child attributes
Available options:
BANK_SLIP, PIX_INITIATION, PIX_AUTOMATIC, PIX, P2P 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