Change the organization's budget or the default per member
const url = 'https://api.asklucy.eu/v1/org/quotas';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"default_member_limits":{"five_hours":{"amount":"50.00","currency":"EUR"},"week":{"amount":"50.00","currency":"EUR"},"month":{"amount":"50.00","currency":"EUR"}},"admin_monthly_budget":{"amount":"50.00","currency":"EUR"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.asklucy.eu/v1/org/quotas \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "default_member_limits": { "five_hours": { "amount": "50.00", "currency": "EUR" }, "week": { "amount": "50.00", "currency": "EUR" }, "month": { "amount": "50.00", "currency": "EUR" } }, "admin_monthly_budget": { "amount": "50.00", "currency": "EUR" } }'Either or both. admin_monthly_budget is what the whole organization
may spend per month (null: no budget of its own); it can’t be more
than the contract’s (contract_monthly_budget).
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”A field left out stays as it is.
object
A limit per window; a missing or null window sets no limit at this level.
object
Responses
Section titled “Responses”OK
object
object
Decimal amount, e.g. “12.50” (up to 6 decimals for small usage).
A limit per window; a missing or null window sets no limit at this level.
object
Example
{ "org_monthly_budget": { "amount": "50.00", "currency": "EUR" }, "admin_monthly_budget": { "amount": "50.00", "currency": "EUR" }, "contract_monthly_budget": { "amount": "50.00", "currency": "EUR" }, "org_spent_this_month": { "amount": "50.00", "currency": "EUR" }, "default_member_limits": { "five_hours": { "amount": "50.00", "currency": "EUR" }, "week": { "amount": "50.00", "currency": "EUR" }, "month": { "amount": "50.00", "currency": "EUR" } }}The request is invalid; errors lists what’s wrong.
RFC 9457 problem details.
object
For quota-exceeded, the window that is used up.
object
Null for a rolling window that hasn’t started.
organization when the organization’s budget is closer to running out than the member’s own limit.
Field-level problems (400 only).
object
JSON pointer into the request body.
Example
{ "type": "https://docs.asklucy.eu/errors/answer-in-progress", "quota": { "window": "five_hours", "limited_by": "personal", "request": { "status": "pending" } }}Headers
Section titled “Headers”Unique per request; quote it to support.
Missing, expired or invalid token.
RFC 9457 problem details.
object
For quota-exceeded, the window that is used up.
object
Null for a rolling window that hasn’t started.
organization when the organization’s budget is closer to running out than the member’s own limit.
Field-level problems (400 only).
object
JSON pointer into the request body.
Example
{ "type": "https://docs.asklucy.eu/errors/answer-in-progress", "quota": { "window": "five_hours", "limited_by": "personal", "request": { "status": "pending" } }}Headers
Section titled “Headers”Unique per request; quote it to support.
The token is valid but lacks the role this needs.
RFC 9457 problem details.
object
For quota-exceeded, the window that is used up.
object
Null for a rolling window that hasn’t started.
organization when the organization’s budget is closer to running out than the member’s own limit.
Field-level problems (400 only).
object
JSON pointer into the request body.
Example
{ "type": "https://docs.asklucy.eu/errors/answer-in-progress", "quota": { "window": "five_hours", "limited_by": "personal", "request": { "status": "pending" } }}Headers
Section titled “Headers”Unique per request; quote it to support.