curl --request GET \
--url https://external.pleo.io/v1/subscriptions \
--header 'Authorization: Bearer <token>'import requests
url = "https://external.pleo.io/v1/subscriptions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://external.pleo.io/v1/subscriptions', 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://external.pleo.io/v1/subscriptions",
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://external.pleo.io/v1/subscriptions"
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://external.pleo.io/v1/subscriptions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://external.pleo.io/v1/subscriptions")
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": [
{
"createdAt": "2022-01-01T00:00:00Z",
"endpointUrl": "https://example.com/webhook",
"eventTypes": "v1.export-job.created",
"id": "123e4567-e89b-12d3-a456-426614174000",
"status": "ACTIVE",
"updatedAt": "2022-01-10T00:00:00Z",
"customHeaders": {
"user": "pass"
},
"deletedAt": "2022-01-01T00:00:00Z",
"deletedBy": "urn:pleo:organisation:12345678-1234-1234-1234-123456789012",
"endpointAuth": {
"credentials": {
"password": "password",
"token": "token",
"username": "username"
},
"type": "NONE"
}
}
],
"pagination": {
"currentRequestPagination": {
"parameters": {},
"after": "<string>",
"before": "<string>",
"limit": 123,
"offset": 123,
"sortingKeys": [
"<string>"
],
"sortingOrder": [
"ASC"
]
},
"hasNextPage": true,
"hasPreviousPage": true,
"endCursor": "<string>",
"startCursor": "<string>",
"total": 123
}
}"Bad Request""Cannot retrieve list of subscriptions due to infrastructure issue Please try after some time. If the problem persists, reach out to Pleo customer support."Get subscriptions
Retrieves a list of subscriptions for the specific event types (registered for the specific company or organisation by the third party application).
curl --request GET \
--url https://external.pleo.io/v1/subscriptions \
--header 'Authorization: Bearer <token>'import requests
url = "https://external.pleo.io/v1/subscriptions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://external.pleo.io/v1/subscriptions', 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://external.pleo.io/v1/subscriptions",
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://external.pleo.io/v1/subscriptions"
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://external.pleo.io/v1/subscriptions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://external.pleo.io/v1/subscriptions")
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": [
{
"createdAt": "2022-01-01T00:00:00Z",
"endpointUrl": "https://example.com/webhook",
"eventTypes": "v1.export-job.created",
"id": "123e4567-e89b-12d3-a456-426614174000",
"status": "ACTIVE",
"updatedAt": "2022-01-10T00:00:00Z",
"customHeaders": {
"user": "pass"
},
"deletedAt": "2022-01-01T00:00:00Z",
"deletedBy": "urn:pleo:organisation:12345678-1234-1234-1234-123456789012",
"endpointAuth": {
"credentials": {
"password": "password",
"token": "token",
"username": "username"
},
"type": "NONE"
}
}
],
"pagination": {
"currentRequestPagination": {
"parameters": {},
"after": "<string>",
"before": "<string>",
"limit": 123,
"offset": 123,
"sortingKeys": [
"<string>"
],
"sortingOrder": [
"ASC"
]
},
"hasNextPage": true,
"hasPreviousPage": true,
"endCursor": "<string>",
"startCursor": "<string>",
"total": 123
}
}"Bad Request""Cannot retrieve list of subscriptions due to infrastructure issue Please try after some time. If the problem persists, reach out to Pleo customer support."Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Filters subscriptions by status. If the value is null, all subscriptions for the specific event types (registered for the specific company or organisation by the third party application) are returned.
Filters subscriptions by versioned event types. If the value is null, all subscriptions for the specific event types (registered for the specific company or organisation by the third party application) are returned.
Lower bound of the page of data to return (cannot be used together with [after] or [offset])
Upper bound of the page of data to return (cannot be used together with [before] or [offset])
Offset of the page of data to return (cannot be used together with [before] or [after])
The maximum amount of items to return
The keys to sort the results by
The order to sort the results by. Must be the same length as [sortingKeys]; one order per key
ASC, ASC_NULLS_FIRST, ASC_NULLS_LAST, DESC, DESC_NULLS_FIRST, DESC_NULLS_LAST