cURL
curl --request POST 'https://api.integrateledger.com/v1/reservations/run_123/release?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.releaseReservation({ requestId: "run_123", customerId: "user_123" });import os
from integrateledger import ledger
client = ledger(api_key=os.environ["LEDGER_API_KEY"])
client.release_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": "<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."
}{
"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."
}Reservations
Release a reservation
Let a reservation’s credits go without charging anything.
POST
/
v1
/
reservations
/
{requestId}
/
release
cURL
curl --request POST 'https://api.integrateledger.com/v1/reservations/run_123/release?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.releaseReservation({ requestId: "run_123", customerId: "user_123" });import os
from integrateledger import ledger
client = ledger(api_key=os.environ["LEDGER_API_KEY"])
client.release_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": "<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."
}{
"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."
}Ends a held reservation without charging it, for work that failed or was cancelled. Its credits are available again at once. Releasing a released or expired reservation changes nothing and returns it with
idempotent: true. One a track already settled returns 409 reservation_already_settled, and a track with a released reservation’s request_id returns 409 reservation_released.
Needs the Credits permission at Track.Authorizations
Path Parameters
Query Parameters
Response
Released, or already released or expired