cURL
curl --request POST 'https://api.integrateledger.com/v1/licenses/release' \
-H "Authorization: Bearer $LEDGER_API_KEY" \
-H 'Content-Type: application/json' \
--data '{"customerId":"user_123","planId":"seat","entityId":"alice"}'import ledger from "integrateledger";
const client = new ledger({ apiKey: process.env.LEDGER_API_KEY ?? "" });
await client.releaseLicenseSeat({ customerId: "user_123", planId: "seat", entityId: "alice" });import os
from integrateledger import ledger
client = ledger(api_key=os.environ["LEDGER_API_KEY"])
client.release_license_seat(customer_id="user_123", plan_id="seat", entity_id="alice"){
"planId": "<string>",
"entityId": "<string>",
"slot": 123
}{
"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.",
"assigned": 1,
"itemChangeId": 123
}{
"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.",
"assigned": 1,
"itemChangeId": 123
}{
"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.",
"assigned": 1,
"itemChangeId": 123
}{
"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.",
"assigned": 1,
"itemChangeId": 123
}{
"error": "payload_too_large",
"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.",
"assigned": 1,
"itemChangeId": 123
}Licenses
Release a seat
Free the seat an entity holds, so it can be assigned again.
POST
/
v1
/
licenses
/
release
cURL
curl --request POST 'https://api.integrateledger.com/v1/licenses/release' \
-H "Authorization: Bearer $LEDGER_API_KEY" \
-H 'Content-Type: application/json' \
--data '{"customerId":"user_123","planId":"seat","entityId":"alice"}'import ledger from "integrateledger";
const client = new ledger({ apiKey: process.env.LEDGER_API_KEY ?? "" });
await client.releaseLicenseSeat({ customerId: "user_123", planId: "seat", entityId: "alice" });import os
from integrateledger import ledger
client = ledger(api_key=os.environ["LEDGER_API_KEY"])
client.release_license_seat(customer_id="user_123", plan_id="seat", entity_id="alice"){
"planId": "<string>",
"entityId": "<string>",
"slot": 123
}{
"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.",
"assigned": 1,
"itemChangeId": 123
}{
"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.",
"assigned": 1,
"itemChangeId": 123
}{
"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.",
"assigned": 1,
"itemChangeId": 123
}{
"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.",
"assigned": 1,
"itemChangeId": 123
}{
"error": "payload_too_large",
"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.",
"assigned": 1,
"itemChangeId": 123
}Frees the seat the entity holds of the customer’s license of the seat plan
planId, and answers { planId, entityId, slot }. The seat’s credits and allowances stop being the entity’s now. What it spent stays spent: the next entity assigned the seat this period gets what’s left. The customer still pays for the seat.
An entity that holds no seat of the license: 409 seat_not_assigned. Deleting an entity releases its seats too.
Needs the Billing permission.Authorizations
Body
application/json