Events
Everything that happened in the account, the same documents webhooks send. Poll with ?after=.
Poll with GET /v1/events?after=evt_…: events newer than that one, oldest first, up to limit (1 to 100). Keep the last id as your cursor. Prefer webhooks for speed and use this to catch up after downtime. Names: event reference.
List events
GET /v1/events
Key scope webhooks:read
Newest first, 20 at a time. See pagination.
Query: type, object, limit, starting_after
curl "https://api.invoicing.respiresoft.com/v1/events?limit=10" \
-H "Authorization: Bearer $RESPIRESOFT_KEY"const res = await fetch("https://api.invoicing.respiresoft.com/v1/events?limit=10", {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.RESPIRESOFT_KEY}`,
},
})
const data = await res.json()
if (!res.ok) throw new Error(data.detail) // RFC 9457 problem document$ch = curl_init("https://api.invoicing.respiresoft.com/v1/events?limit=10");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("RESPIRESOFT_KEY"),
],
]);
$data = json_decode(curl_exec($ch), true);import os, uuid, requests
res = requests.request("GET", "https://api.invoicing.respiresoft.com/v1/events?limit=10",
headers={
"Authorization": "Bearer " + os.environ["RESPIRESOFT_KEY"],
},
)
data = res.json()Retrieve event
GET /v1/events/{id}
Key scope webhooks:read
curl "https://api.invoicing.respiresoft.com/v1/events/ID" \
-H "Authorization: Bearer $RESPIRESOFT_KEY"const res = await fetch("https://api.invoicing.respiresoft.com/v1/events/ID", {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.RESPIRESOFT_KEY}`,
},
})
const data = await res.json()
if (!res.ok) throw new Error(data.detail) // RFC 9457 problem document$ch = curl_init("https://api.invoicing.respiresoft.com/v1/events/ID");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("RESPIRESOFT_KEY"),
],
]);
$data = json_decode(curl_exec($ch), true);import os, uuid, requests
res = requests.request("GET", "https://api.invoicing.respiresoft.com/v1/events/ID",
headers={
"Authorization": "Bearer " + os.environ["RESPIRESOFT_KEY"],
},
)
data = res.json()