System Admin Operations
8 API calls in this section.
Create Recurring Subscription
/tenant-subscriptionsCreates a new recurring subscription (MONTHLY/ANNUAL). Creates Stripe Customer if needed, creates subscription with inline pricing, and finalizes the invoice immediately.
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
tenant_id | string | — |
type | string | — |
amount | number | — |
note_public | string | — |
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/tenant-subscriptions" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3 --header "Content-Type: application/json" \4 --data-raw '{5 "tenant_id": "<TENANT_UUID>",6 "type": "MONTHLY",7 "amount": 49.99,8 "note_public": "Standard Plan"9}'Response examples
No saved response example. Use Try it to inspect a staging response.
Create Unlimited Subscription
/tenant-subscriptions/unlimitedCreates a one-time 'UNLIMITED' subscription. AUTOMATICALLY CANCELS any existing recurring subscription for the tenant. Generates a one-off invoice. A tenant notification email (tenant_subscription_unlimited_invoice_created) is sent after Stripe invoice finalization webhook.
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
tenant_id | string | — |
amount | number | — |
note_public | string | — |
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/tenant-subscriptions/unlimited" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3 --header "Content-Type: application/json" \4 --data-raw '{5 "tenant_id": "<TENANT_UUID>",6 "amount": 500,7 "note_public": "Lifetime Access"8}'Response examples
No saved response example. Use Try it to inspect a staging response.
List Subscriptions
/tenant-subscriptionsLists all tenant subscriptions with pagination and filtering.
Query parameters
| Parameter | Type | Description |
|---|---|---|
page | string | Example: |
limit | string | Example: |
searchOptional | string | — |
statusOptional | string | Example: |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/tenant-subscriptions?page=1&limit=10" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"Response examples
No saved response example. Use Try it to inspect a staging response.
Get Subscription Details
/tenant-subscriptions/:tenantIdGets detailed subscription info and history for a specific tenant. Response content type is always application/json. If there is an unpaid invoice, response includes data.subscription.pendingInvoice for both recurring (MONTHLY/ANNUAL) and UNLIMITED plans.
Path parameters
| Parameter | Type | Description |
|---|---|---|
tenantIdRequired | string | Example: |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/tenant-subscriptions/${TENANTID}" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"Response examples
No saved response example. Use Try it to inspect a staging response.
Disable Subscription
/tenant-subscriptions/:id/disableManually disables a subscription and sends a tenant admin notification email (tenant_subscription_disabled).
Path parameters
| Parameter | Type | Description |
|---|---|---|
idRequired | string | Example: |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/tenant-subscriptions/${ID}/disable" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"Response examples
No saved response example. Use Try it to inspect a staging response.
Reactivate Subscription
/tenant-subscriptions/:id/reactivateReactivates a manually disabled subscription and sends a tenant admin notification email (tenant_subscription_activated).
Path parameters
| Parameter | Type | Description |
|---|---|---|
idRequired | string | Example: |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/tenant-subscriptions/${ID}/reactivate" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"Response examples
No saved response example. Use Try it to inspect a staging response.
Update Subscription (Price/Plan)
/tenant-subscriptions/:idUpdates subscription details.
Parameters
price_amount: New price (optional)type: 'MONTHLY' or 'ANNUAL' (optional)effective_from: Controls how the change is applied to Stripe (optional, defaults toimmediate_no_prorate).immediate_prorated: Updates immediately, Stripe calculates the difference and sends an invoice.immediate_no_prorate: Updates immediately, ignores price difference (no invoice).end_of_period: Updates at the end of the current billing cycle (Schedule). Note: Currently simplified toimmediate_no_proratein code until full Schedule support is added.
When plan/amount changes, a tenant admin notification email (tenant_subscription_plan_changed) is emitted.
Path parameters
| Parameter | Type | Description |
|---|---|---|
idRequired | string | Example: |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
price_amount | number | — |
type | string | — |
effective_from | string | — |
note_public | string | — |
note_internal | string | — |
1curl --globoff --request PATCH "https://staging-api.ondi.io/functions/v1/tenant-subscriptions/${ID}" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3 --header "Content-Type: application/json" \4 --data-raw '{5 "price_amount": 150,6 "type": "ANNUAL",7 "effective_from": "immediate_prorated",8 "note_public": "Plan Upgrade",9 "note_internal": "Admin update"10}'Response examples
No saved response example. Use Try it to inspect a staging response.
Trigger Nightly Sweep (Manual)
/tenant-subscription-sweepManually triggers the subscription status sweep.
Notes
If system setting
tenant_subscription.enabled=false, the sweep is skipped (no recompute, no emails).When enabled, sweep emits lifecycle and reminder emails (
tenant_subscription_warning,tenant_subscription_suspended,tenant_subscription_resumed,tenant_subscription_activated,tenant_subscription_due_reminder,tenant_subscription_suspension_notice).
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/tenant-subscription-sweep" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"Response examples
No saved response example. Use Try it to inspect a staging response.