admin

Attach a negotiated price and/or record a tenant's monthly credit allocation

Platform-admin only. With no negotiated_stripe_price_id this only edits the live allocation, as before. With one, it's validated against Stripe and attached — the live allocation is untouched until the customer subscribes and the webhook syncs it.

put/v1/admin/tenants/{tenant_id}/subscription-package

Request

  • Base URL: https://api.patricia.app (the document declares no server; this is the origin it was published from)
  • URL: https://api.patricia.app/v1/admin/tenants/{tenant_id}/subscription-package
  • Auth: HTTP bearer

Path parameters

tenant_idstring uuid required

Request body

monthly_credit_grantinteger required
negotiated_stripe_price_idstring nullable

A hand-made Stripe price to attach; validated against Stripe before it's saved.

reasonstring required

Why this allocation is changing.

expected_monthly_credit_grantinteger nullable required

The monthly_credit_grant GET most recently reported (null if it reported none, meaning the workspace had no row yet). A 409 means someone else changed it first: reload and re-apply.

Response

Successful Response

tenant_idstring uuid required
monthly_credit_grantinteger nullable required

This tenant's own LIVE allocation, or null when the workspace has no subscription row yet.

default_monthly_credit_grantinteger required

The fleet default an unset workspace runs on.

stripe_customer_idstring nullable

This workspace's cus_… id, or null.

stripe_subscription_idstring nullable

The synced sub_… id, or null.

cancelable_stripe_subscription_idstring nullable

The sub_… a revert would cancel, or null when nothing bills the attached price.

tierstring nullable

The tier Stripe last synced onto this row.

statusstring nullable

The subscription status Stripe last synced.

current_period_endstring date-time nullable

The synced current period end.

last_grant_atstring date-time nullable

When the monthly sweep last granted this row.

negotiated_stripe_price_idstring nullable

The attached negotiated price, or null.

negotiated_monthly_price_centsinteger nullable

Stripe's amount for that price.

negotiated_monthly_credit_grantinteger nullable

The negotiated allocation; promoted into monthly_credit_grant once synced.

has_attached_packageboolean required

Whether a negotiated price is attached — an offer, not a sale.

on_negotiated_packageboolean required

Whether the workspace is actually billing on it right now.

Changes

No recorded changes to this operation across all 1 revision of this API.