curl --request GET \
--url https://api.example.com/v1/admin/providers/capabilities \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/admin/providers/capabilities"
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))
}const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/v1/admin/providers/capabilities', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.example.com/v1/admin/providers/capabilities"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"items": [
{
"boleto": {
"batch": {
"maxItems": 25,
"supported": true
},
"cancel": true,
"chargeStartDates": true,
"documentNumber": true,
"earlyAcceptance": true,
"installments": true,
"instructions": true,
"instrumentBeforeRegistration": true,
"pdf": true,
"pdfReadiness": {
"initialBackoffMs": 200,
"maxBackoffMs": 2000,
"maxTotalWaitMs": 4000
},
"settlement": "DIRECT",
"titleSearch": true,
"types": [
"TRADITIONAL"
]
},
"numbering": {
"acceptsClientSupplied": true,
"echoIsAuthoritative": true,
"maxWidth": 11,
"mode": "PAYEE_OR_PROVIDER"
},
"operations": [
"BOLETO_ISSUANCE"
],
"payment": {
"segments": [
"BANKSLIP"
]
},
"providerType": "BTG",
"webhook": {
"inbound": true,
"resubscribe": true
}
}
]
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}List the capabilities of the tenant's connected providers
Returns, for each provider that is BOTH connected to the tenant AND installed on this deployment, what it declares it supports: the operation types it can be routed to, the boleto types and features, the nosso número mode, the payment segments and the inbound webhook features.
CONNECTED is the same rule as the PROVIDER_NOT_CONNECTED reason of configureProviderRoute: for a core provider, a usable credential of the tenant.
A request that needs a capability the provider of the operation does not declare is refused before any provider call with 422 PBP-0701 naming it in capability. A tenant with no connected provider is answered 200 with an empty items list.
Use it before configuring a route: a provider absent here is refused by configureProviderRoute (PROVIDER_NOT_CONNECTED or PROVIDER_NOT_INSTALLED), and one whose operations lacks the operation is refused with CAPABILITY_MISSING.
WHO MAY CALL IT: provider-routes:read.
curl --request GET \
--url https://api.example.com/v1/admin/providers/capabilities \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/admin/providers/capabilities"
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))
}const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/v1/admin/providers/capabilities', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.example.com/v1/admin/providers/capabilities"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"items": [
{
"boleto": {
"batch": {
"maxItems": 25,
"supported": true
},
"cancel": true,
"chargeStartDates": true,
"documentNumber": true,
"earlyAcceptance": true,
"installments": true,
"instructions": true,
"instrumentBeforeRegistration": true,
"pdf": true,
"pdfReadiness": {
"initialBackoffMs": 200,
"maxBackoffMs": 2000,
"maxTotalWaitMs": 4000
},
"settlement": "DIRECT",
"titleSearch": true,
"types": [
"TRADITIONAL"
]
},
"numbering": {
"acceptsClientSupplied": true,
"echoIsAuthoritative": true,
"maxWidth": 11,
"mode": "PAYEE_OR_PROVIDER"
},
"operations": [
"BOLETO_ISSUANCE"
],
"payment": {
"segments": [
"BANKSLIP"
]
},
"providerType": "BTG",
"webhook": {
"inbound": true,
"resubscribe": true
}
}
]
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}{
"code": "<string>",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example",
"upstream": {
"code": "E4001",
"message": "account not found at provider"
}
}Encabezados
¿Esta página le ayudó?

