Companies

Revoke a company's plan assignment

Changed on

Ends an active plan assignment now, the same as Revoke in the company plan dialog. The record stays, with status: revoked. Revoking an assignment that is already revoked or expired returns it unchanged. Revoking does not cancel a recurring plan invoice. Accepts an optional Idempotency-Key header. Requires plans.manage.

post/companies/{id}/plan-assignments/{assignmentId}/revoke

Request

  • Base URL: https://api.cavuno.com/v1
  • URL: https://api.cavuno.com/v1/companies/{id}/plan-assignments/{assignmentId}/revoke
  • Auth: HTTP bearer

Path parameters

idstring required

The company's opaque object id: the id field returned by the company endpoints (e.g. p17xq4c2b9r5gz3e8j0r6t4k7m2n9d5w). This is NOT the slug or display name; passing a slug like antler returns 404. To look up a company by name or slug, use GET /v1/companies, POST /v1/companies/search, or POST /v1/companies/find-or-create and read the returned id.

assignmentIdstring required

The plan assignment ID returned by the list or assign call.

Response

The plan assignment after the revoke.

idstring required

The plan assignment ID.

object'company_plan_assignment' required
companyIdstring required
planIdstring nullable required

The assigned plan. Null for a custom level granted in the dashboard without a plan.

planNamestring nullable required
source'manual' | 'purchase' | 'invoice' | 'synced' required

manual: assigned by an operator. purchase: bought at checkout. invoice: granted when a plan invoice was paid. synced: set by a membership sync.

status'active' | 'expired' | 'revoked' required

Only active assignments give the company its plan benefits.

expiresAtstring nullable required

ISO-8601 time the assignment ends, or null for no end.

createdAtstring required

ISO-8601 creation time.

updatedAtstring required

ISO-8601 time of the last change.

Changes