Limited AvailabilityAccess to the Compliance API is currently limited to approved partners. Endpoints, request/response shapes, and field names may change before reaching general availability — use against staging for early integration work and coordinate with your CorpNet account manager before relying on Compliance API calls in production-critical paths. Report issues or feedback to your account manager.
POST /v1/partners/{partnerId}/subscriptions/{subscriptionId}/cancel
Cancels a subscription. Behavior differs based on service category:
- Registered Agent subscriptions require a replacement proof document (your customer's substitute RA confirmation, attached as base64-encoded file). CorpNet creates a cancellation request in
Ready for Reviewstatus; final cancellation occurs after review. - All other service categories cancel immediately and the subscription status is set to
Cancelled.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
partnerId | String | Yes | Your Account PID. |
subscriptionId | String | Yes | Subscription Plan identifier. |
Request Body — Registered Agent cancellations
{
"title": "RA Service Replacement Proof",
"extension": "pdf",
"base64": "JVBERi0xLjQKJeLjz9M..."
}| Field | Type | Required | Description |
|---|---|---|---|
title | String | Yes | Human-readable file title. |
extension | String | Yes | File extension without leading dot (e.g., pdf, png). |
base64 | String | Yes | Base64-encoded file contents. |
Request Body — non-RA cancellations
Send an empty object:
{}Example
# Non-RA cancellation
curl -s -X POST \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{}' \
"https://api.corpnet.com/v1/partners/P123456/subscriptions/a0S5e000001ABCD/cancel"Response — 200 OK
200 OK{ "serviceId": "a0S5e000001ABCD", "status": "success" }
Envelope noteThis endpoint returns a flat
{ serviceId, status }shape — it does not use the standard{ data, statusCode, message }envelope. Branch on the HTTP status code; thestatusstring is human-readable.
Error Responses
{ "statusCode": 400, "message": "Subscripion plan is required.", "data": null }
{ "statusCode": 400, "message": "The subscription is already cancelled.", "data": null }
{ "statusCode": 400, "message": "\"title\", \"extension\", and \"base64\" are required.", "data": null }| Cause | Resolution |
|---|---|
| Subscription already cancelled | Inspect status via Get a Subscription before issuing the cancel. |
| Missing RA proof fields | Registered Agent cancellations require title, extension, and base64. Provide all three. |
subscriptionId not found | Confirm the identifier is correct and belongs to your partner. |
Notes
- For Registered Agent cancellations, CorpNet's compliance team reviews the replacement proof before final cancellation takes effect. The HTTP 200 confirms the cancellation request was accepted into the review queue, not that the subscription is immediately cancelled.
- The
"Subscripion plan is required."error message is verbatim from the API — the misspelling is the actual server response. Parse onstatusCode, not onmessagetext.