Get all clients for the organization
curl --request GET \
--url https://api.payable.run/api/v1/clients \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.payable.run/api/v1/clients"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.payable.run/api/v1/clients', 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.payable.run/api/v1/clients",
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.payable.run/api/v1/clients"
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.payable.run/api/v1/clients")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.payable.run/api/v1/clients")
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{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"firstName": "João",
"lastName": "Silva",
"phone": "11999999999",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "OVERDUE",
"createdAt": {},
"updatedAt": {},
"cpf": "12345678901",
"email": "[email protected]",
"occupation": {},
"observation": {},
"cep": {},
"city": {},
"neighborhood": {},
"street": {},
"address": {},
"streetNumber": {},
"state": "SP",
"isSandbox": true,
"debtCount": 123,
"totalDebtAmount": 123,
"outstandingAmount": 123,
"openDebtCount": 123,
"overdueDebtCount": 123,
"paidDebtCount": 123,
"nextDueDate": {},
"channelPreferences": {
"whatsapp": {
"status": "open",
"mutedUntil": {},
"optedOutAt": {},
"source": {},
"reason": "already_paid",
"reasonDetail": {}
},
"email": {
"status": "open",
"mutedUntil": {},
"optedOutAt": {},
"source": {},
"reason": "already_paid",
"reasonDetail": {}
},
"sms": {
"status": "open",
"mutedUntil": {},
"optedOutAt": {},
"source": {},
"reason": "already_paid",
"reasonDetail": {}
}
},
"overIndebtednessReportedAt": "2023-11-07T05:31:56Z",
"overIndebtednessSource": "agent"
}
],
"pagination": {
"nextCursor": null
}
}{
"type": "https://docs.payable.run/errors/validation_error",
"title": "Bad Request",
"status": 400,
"detail": "One or more request fields are invalid.",
"instance": "/api/v1/clients",
"code": "VALIDATION_ERROR",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errors": [
{
"message": "<string>",
"field": "<string>"
}
]
}Clients
Get all clients for the organization
GET
/
api
/
v1
/
clients
Get all clients for the organization
curl --request GET \
--url https://api.payable.run/api/v1/clients \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.payable.run/api/v1/clients"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.payable.run/api/v1/clients', 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.payable.run/api/v1/clients",
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.payable.run/api/v1/clients"
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.payable.run/api/v1/clients")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.payable.run/api/v1/clients")
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{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"firstName": "João",
"lastName": "Silva",
"phone": "11999999999",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "OVERDUE",
"createdAt": {},
"updatedAt": {},
"cpf": "12345678901",
"email": "[email protected]",
"occupation": {},
"observation": {},
"cep": {},
"city": {},
"neighborhood": {},
"street": {},
"address": {},
"streetNumber": {},
"state": "SP",
"isSandbox": true,
"debtCount": 123,
"totalDebtAmount": 123,
"outstandingAmount": 123,
"openDebtCount": 123,
"overdueDebtCount": 123,
"paidDebtCount": 123,
"nextDueDate": {},
"channelPreferences": {
"whatsapp": {
"status": "open",
"mutedUntil": {},
"optedOutAt": {},
"source": {},
"reason": "already_paid",
"reasonDetail": {}
},
"email": {
"status": "open",
"mutedUntil": {},
"optedOutAt": {},
"source": {},
"reason": "already_paid",
"reasonDetail": {}
},
"sms": {
"status": "open",
"mutedUntil": {},
"optedOutAt": {},
"source": {},
"reason": "already_paid",
"reasonDetail": {}
}
},
"overIndebtednessReportedAt": "2023-11-07T05:31:56Z",
"overIndebtednessSource": "agent"
}
],
"pagination": {
"nextCursor": null
}
}{
"type": "https://docs.payable.run/errors/validation_error",
"title": "Bad Request",
"status": 400,
"detail": "One or more request fields are invalid.",
"instance": "/api/v1/clients",
"code": "VALIDATION_ERROR",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errors": [
{
"message": "<string>",
"field": "<string>"
}
]
}