# SubscriptionProduct

A sellable subscription product: the organisation's hand-maintained catalogue of what a customer subscription or a subscription type can bill for. Subscription lines point at a product and inherit its price, interval and VAT rate.

## Used by
- GET /api/v2/subscription-products: List subscription products (SubscriptionProductList)
- POST /api/v2/subscription-products: Create a subscription product (SubscriptionProduct)
- GET /api/v2/subscription-products/{subscription_product}: Read a subscription product (SubscriptionProduct)
- PATCH /api/v2/subscription-products/{subscription_product}: Update a subscription product (SubscriptionProduct)
- POST /api/v2/subscription-products/{subscription_product}/actions/restore: Restore a deleted subscription product (SubscriptionProduct)

## SubscriptionProduct fields
- id (integer, required): Unique identifier.
- name (string ≤ 255, required): Product name as shown in the UI and on the subscription line.
- description (string or null, required, multiline): Invoice-line template for subscription lines built from this product. Supports the placeholder tokens {{$domain}}, {{$site}}, {{$server}}, {{$period}}, {{$product}} and {{$customer}}, which are filled in when the line is invoiced; the template itself is kept verbatim.
- purchase_price (decimal (2 dp) or null, required): What the product costs us, as a decimal string. Null when unknown.
- sales_price (decimal (2 dp) or null, required): What the customer is billed per interval, as a decimal string. Null when the line carries its own price.
- price_interval (string, required): Interval the sales price is charged per.
- is_hosting (boolean, required): Whether this is a hosting product: one sold against a concrete site or server, which is what lets a subscription line name the infrastructure it covers.
- vat_rate (integer or null, required): VAT rate as a whole percentage: 21 means 21%, not 0.21. Null when the rate is decided at invoicing time.
- exact_item_id (string or null ≤ 255, required): Exact Online article this product maps to, by Exact's own external identifier (`exact_items.exact_id`), not by a local id.
- exact_vat_code (string or null ≤ 255, required): Exact Online VAT code, by code (`exact_vat_codes.code`), not by id.
- exact_cost_center (string or null ≤ 255, required): Exact Online cost centre, by code (`exact_cost_centers.code`), not by id.
- created_at (timestamp (YYYY-MM-DDThh:mm:ssZ), required): Creation timestamp.
- updated_at (timestamp (YYYY-MM-DDThh:mm:ssZ), required): Last-write timestamp; use for incremental sync.
- deleted_at (timestamp (YYYY-MM-DDThh:mm:ssZ) or null, required): Soft-delete timestamp, `null` while live.
- links (SubscriptionProductLinks, required)
  - self (url, required): The canonical URI of this record.

## Variants

### SubscriptionProductList

What a collection returns, and what `?view=summary` returns on a single record.

15 fields.
Identical to the detail object above.

### SubscriptionProductSummary

The embedded form: what you get when another resource carries this one and you did not `include` it.

2 fields.
Omits: description, purchase_price, sales_price, price_interval, is_hosting, vat_rate, exact_item_id, exact_vat_code, exact_cost_center, created_at, updated_at, deleted_at, links

### SubscriptionProductLinks

The `links` object on this resource.

Keys: self

## Example
```json
{
  "id": 1,
  "name": "Managed hosting, small",
  "description": "Managed hosting for {{$site}} over {{$period}}.",
  "purchase_price": "1250.00",
  "sales_price": "49.50",
  "price_interval": "monthly",
  "is_hosting": true,
  "vat_rate": 21,
  "exact_item_id": "…",
  "exact_vat_code": "…",
  "exact_cost_center": "…",
  "created_at": "2026-03-04T09:15:00Z",
  "updated_at": "2026-03-04T09:15:00Z",
  "deleted_at": "2026-03-04T09:15:00Z",
  "links": {
    "self": "https://<your-url>/api/v2/work-items/1"
  }
}
```
