/realms/{realmId}/organizations/{organizationId}/contracts/{contractId}/deals/{dealId}/cancel
curl --request POST \
--url https://api.platform.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/contracts/{contractId}/deals/{dealId}/cancel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cancelAllInvoices": true
}
'import requests
url = "https://api.platform.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/contracts/{contractId}/deals/{dealId}/cancel"
payload = { "cancelAllInvoices": True }
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({cancelAllInvoices: true})
};
fetch('https://api.platform.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/contracts/{contractId}/deals/{dealId}/cancel', 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/{dealId}/cancel",
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([
'cancelAllInvoices' => true
]),
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.platform.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/contracts/{contractId}/deals/{dealId}/cancel"
payload := strings.NewReader("{\n \"cancelAllInvoices\": true\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.platform.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/contracts/{contractId}/deals/{dealId}/cancel")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"cancelAllInvoices\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.platform.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/contracts/{contractId}/deals/{dealId}/cancel")
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 \"cancelAllInvoices\": true\n}"
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/{dealId}/cancel
POST
/
realms
/
{realmId}
/
organizations
/
{organizationId}
/
contracts
/
{contractId}
/
deals
/
{dealId}
/
cancel
/realms/{realmId}/organizations/{organizationId}/contracts/{contractId}/deals/{dealId}/cancel
curl --request POST \
--url https://api.platform.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/contracts/{contractId}/deals/{dealId}/cancel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cancelAllInvoices": true
}
'import requests
url = "https://api.platform.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/contracts/{contractId}/deals/{dealId}/cancel"
payload = { "cancelAllInvoices": True }
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({cancelAllInvoices: true})
};
fetch('https://api.platform.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/contracts/{contractId}/deals/{dealId}/cancel', 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/{dealId}/cancel",
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([
'cancelAllInvoices' => true
]),
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.platform.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/contracts/{contractId}/deals/{dealId}/cancel"
payload := strings.NewReader("{\n \"cancelAllInvoices\": true\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.platform.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/contracts/{contractId}/deals/{dealId}/cancel")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"cancelAllInvoices\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.platform.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/contracts/{contractId}/deals/{dealId}/cancel")
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 \"cancelAllInvoices\": true\n}"
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.
Path Parameters
Body
application/json
Response
200 - 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