/api/v1/subscriptions/{record}/contracts
Add a subscription contract
Record a contract term and update the subscriptionu2019s current contract dates.
Last updated
Request
POST /api/v1/subscriptions/{record}/contracts
Requires subscriptions:lifecycle. See token permissions. Every listed permission is required for this endpoint.
Send Authorization: Bearer YOUR_API_TOKEN and Accept: application/json. Send request bodies as JSON with Content-Type: application/json. This workflow write requires Idempotency-Key. Reuse the same key only when retrying the same action.
record is the numeric subscription ID in your token’s organization.
Query parameters
This endpoint does not use query parameters.
Request body
| Field | Type | Usage |
|---|---|---|
contract_term |
string | Required. one_year, two_year, three_year, four_year, or five_year. |
start_date |
string | Required. YYYY-MM-DD. |
end_date |
string | Optional, but cannot be null when supplied. YYYY-MM-DD, on or after start_date; omitted end date is calculated from the term. |
auto_renew |
boolean | Optional. Defaults to false. |
description |
string or null | Optional. Plain text, up to 10,000 characters. |
Fetch available values before choosing IDs. IDs and required fields vary by organization.
Example
Set ASSETCENTER_API_TOKEN as described in the quick start. Replace example record and option IDs with values from your organization. Set IDEMPOTENCY_KEY to a new UUID for this action; keep it for retries.
curl --request POST "https://my.assetcenter.app/api/v1/subscriptions/123/contracts" \
--header "Authorization: Bearer $ASSETCENTER_API_TOKEN" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--header "Idempotency-Key: $IDEMPOTENCY_KEY" \
--data '{"contract_term":"one_year","start_date":"2026-09-07","auto_renew":false}'
Response
201 Created. Illustrative response structure. Event arrays, to-do/space values, and current state depend on the action and the record.
{
"data": {
"subscription_id": 123,
"subscription_event_ids": [
901
],
"todo": null,
"state": {
"status": "available",
"billing_type": "subscription",
"license_count": 10,
"billing_frequency": "monthly",
"price_model": "per_license",
"cost": "12.00",
"contract_term": "one_year",
"contract_start_date": "2026-09-07",
"contract_end_date": "2027-09-07"
},
"attachments_count": 0,
"comments_count": 0
}
}
Behavior and constraints
Uses start_date as the contract event date; do not send event_date. A start date before a newer contract returns 409. Restore cancelled or retired subscriptions before adding a contract.
This action does not accept attachments or comments; sending either returns 422.
Errors
401 means the token is missing, expired, revoked, or not a customer API token. 403 means a required permission or administrator access is missing. 404 means the record or child record is unavailable in this organization. 422 identifies invalid or unsupported input; inspect the errors object when present. 409 indicates a conflicting state or concurrent change; inspect the message and refresh the record before deciding how to proceed. Reusing an idempotency key with a different method, path, or body also returns 409. 429 means a rate limit was reached. See error handling and rate limits.