cURL
curl --request GET 'https://api.integrateledger.com/v1/reservations/run_123?customerId=user_123' \
-H "Authorization: Bearer $LEDGER_API_KEY"import ledger from "integrateledger";
const client = new ledger({ apiKey: process.env.LEDGER_API_KEY ?? "" });
await client.getReservation({ requestId: "run_123", customerId: "user_123" });import os
from integrateledger import ledger
client = ledger(api_key=os.environ["LEDGER_API_KEY"])
client.get_reservation(customer_id="user_123", request_id="run_123"){
"requestId": "<string>",
"customerId": "<string>",
"entityId": "<string>",
"featureId": "<string>",
"status": "held",
"credits": 123,
"settledCredits": 1,
"uncoveredCredits": 1,
"expiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"availableCredits": 1,
"idempotent": true
}{
"error": "<string>",
"message": "No customer \"user_123\" exists in this environment. Create it with POST /v1/customers, or check that the API key is for the right environment."
}{
"error": "<string>",
"message": "No customer \"user_123\" exists in this environment. Create it with POST /v1/customers, or check that the API key is for the right environment."
}{
"error": "insufficient_permissions",
"requiredScope": "customers:read",
"message": "No customer \"user_123\" exists in this environment. Create it with POST /v1/customers, or check that the API key is for the right environment."
}{
"error": "<string>",
"message": "No customer \"user_123\" exists in this environment. Create it with POST /v1/customers, or check that the API key is for the right environment."
}{
"error": "rate_limited",
"message": "No customer \"user_123\" exists in this environment. Create it with POST /v1/customers, or check that the API key is for the right environment."
}Reservations
Get a reservation
Read one reservation’s status, held credits and expiry.
GET
/
v1
/
reservations
/
{requestId}
cURL
curl --request GET 'https://api.integrateledger.com/v1/reservations/run_123?customerId=user_123' \
-H "Authorization: Bearer $LEDGER_API_KEY"import ledger from "integrateledger";
const client = new ledger({ apiKey: process.env.LEDGER_API_KEY ?? "" });
await client.getReservation({ requestId: "run_123", customerId: "user_123" });import os
from integrateledger import ledger
client = ledger(api_key=os.environ["LEDGER_API_KEY"])
client.get_reservation(customer_id="user_123", request_id="run_123"){
"requestId": "<string>",
"customerId": "<string>",
"entityId": "<string>",
"featureId": "<string>",
"status": "held",
"credits": 123,
"settledCredits": 1,
"uncoveredCredits": 1,
"expiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"availableCredits": 1,
"idempotent": true
}{
"error": "<string>",
"message": "No customer \"user_123\" exists in this environment. Create it with POST /v1/customers, or check that the API key is for the right environment."
}{
"error": "<string>",
"message": "No customer \"user_123\" exists in this environment. Create it with POST /v1/customers, or check that the API key is for the right environment."
}{
"error": "insufficient_permissions",
"requiredScope": "customers:read",
"message": "No customer \"user_123\" exists in this environment. Create it with POST /v1/customers, or check that the API key is for the right environment."
}{
"error": "<string>",
"message": "No customer \"user_123\" exists in this environment. Create it with POST /v1/customers, or check that the API key is for the right environment."
}{
"error": "rate_limited",
"message": "No customer \"user_123\" exists in this environment. Create it with POST /v1/customers, or check that the API key is for the right environment."
}Returns the reservation a check with
reserve made under requestId, with its status: held, settled (a track charged it: see settledCredits and uncoveredCredits), released, or expired (held past its expiry, so it no longer holds anything). availableCredits is the customer’s balance now, after every active reservation.
Reading never waits behind the customer’s tracks, and its availableCredits doesn’t yet include a renewal that is due until the next check or track grants it. An unknown requestId returns 404 reservation_not_found.
Needs the Credits permission at Check.Authorizations
Path Parameters
Query Parameters
Response
The reservation