LAGO_URL="https://api.getlago.com"
API_KEY="__YOUR_API_KEY__"
curl --location --request GET "$LAGO_URL/api/v1/events/:transaction_id" \
--header "Authorization: Bearer $API_KEY"
from lago_python_client.client import Client
from lago_python_client.exceptions import LagoApiError
client = Client(api_key='__YOUR_API_KEY__')
try:
client.events.find("transaction_id")
except LagoApiError as e:
repair_broken_state(e) # do something on error or raise your own exception
require 'lago-ruby-client'
client = Lago::Api::Client.new(api_key: '__YOUR_API_KEY__')
client.events.get('transaction_id')
await client.events.findEvent("__UNIQUE_TRANSACTION_ID__");
{
"event": {
"transaction_id": "transaction_1234567890",
"lago_customer_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"code": "storage",
"timestamp": "2022-04-29T08:59:51.123Z",
"lago_subscription_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"external_subscription_id": "sub_1234567890",
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"precise_total_amount_cents": "1234.56",
"properties": {
"gb": 10
},
"created_at": "2022-04-29T08:59:51Z"
}
}{
"status": 401,
"error": "Unauthorized"
}{
"status": 403,
"error": "Forbidden",
"code": "feature_unavailable"
}{
"status": 404,
"error": "Not Found",
"code": "object_not_found"
}Retrieve an event
This endpoint is used for retrieving a specific usage measurement event that has been sent to a customer or a subscription.
Note that transaction_id is unique per external_subscription_id so multiple subscriptions can share the same transaction_id. This endpoint will only return the first event found with the given transaction_id.
WARNING: If your Lago organization is configured to use the Clickhouse-based event pipeline, multiple events can share the same transaction_id (with different timestamps). This endpoint will only return the first event found.
LAGO_URL="https://api.getlago.com"
API_KEY="__YOUR_API_KEY__"
curl --location --request GET "$LAGO_URL/api/v1/events/:transaction_id" \
--header "Authorization: Bearer $API_KEY"
from lago_python_client.client import Client
from lago_python_client.exceptions import LagoApiError
client = Client(api_key='__YOUR_API_KEY__')
try:
client.events.find("transaction_id")
except LagoApiError as e:
repair_broken_state(e) # do something on error or raise your own exception
require 'lago-ruby-client'
client = Lago::Api::Client.new(api_key: '__YOUR_API_KEY__')
client.events.get('transaction_id')
await client.events.findEvent("__UNIQUE_TRANSACTION_ID__");
{
"event": {
"transaction_id": "transaction_1234567890",
"lago_customer_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"code": "storage",
"timestamp": "2022-04-29T08:59:51.123Z",
"lago_subscription_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"external_subscription_id": "sub_1234567890",
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"precise_total_amount_cents": "1234.56",
"properties": {
"gb": 10
},
"created_at": "2022-04-29T08:59:51Z"
}
}{
"status": 401,
"error": "Unauthorized"
}{
"status": 403,
"error": "Forbidden",
"code": "feature_unavailable"
}{
"status": 404,
"error": "Not Found",
"code": "object_not_found"
}LAGO_URL="https://api.getlago.com"
API_KEY="__YOUR_API_KEY__"
curl --location --request GET "$LAGO_URL/api/v1/events/:transaction_id" \
--header "Authorization: Bearer $API_KEY"
from lago_python_client.client import Client
from lago_python_client.exceptions import LagoApiError
client = Client(api_key='__YOUR_API_KEY__')
try:
client.events.find("transaction_id")
except LagoApiError as e:
repair_broken_state(e) # do something on error or raise your own exception
require 'lago-ruby-client'
client = Lago::Api::Client.new(api_key: '__YOUR_API_KEY__')
client.events.get('transaction_id')
await client.events.findEvent("__UNIQUE_TRANSACTION_ID__");
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
This field represents the unique identifier sent for this specific event (must be URL encoded).
"transaction_1234567890"
Response
Event
Show child attributes
Show child attributes