Deze referentie is alleen in het Engels. Naar het Nederlandse REST API-overzicht

Diese Referenz gibt es nur auf Englisch. Zur deutschen REST-API-Übersicht

Cette référence existe uniquement en anglais. Aller à la présentation de l'API REST en français

Esta referencia solo está en inglés. Ir a la introducción de la API REST en español

SubscriptionItem

SubscriptionItem

One line on a customer subscription: what is being sold, how many, at what purchase and sales price, and at what VAT percentage.

View as Markdown
Summary view
SubscriptionItemList, 22 fields. What a list returns by default.
Detail view
SubscriptionItem, 22 fields. The default for a single read and for every write.

These lines are what a renewal turns into sales-invoice rows, and a subscription with no lines cannot be invoiced.

Used by

GETList a subscription's lines/customer-subscriptions/{customer_subscription}/itemsSubscriptionItemList
POSTAdd a line to a subscription/customer-subscriptions/{customer_subscription}/itemsSubscriptionItem
GETRead a subscription line/subscription-items/{subscription_item}SubscriptionItem
PATCHUpdate a subscription line/subscription-items/{subscription_item}SubscriptionItem

Fields

Detail only
Only in the detail view.
Only with include
Only when you ask for it with include.
Server-assigned
Set by plnnrly, never by a request.
idinteger

Unique identifier.

customer_subscription_idintegerServer-assigned

The subscription this line belongs to. Taken from the path on create and never writable afterwards: a line cannot be moved to another subscription.

customer_subscriptionRef or CustomerSubscriptionSummary

The subscription this line belongs to.

subscribable_typestring or null

The kind of record subscribable points at; it says which branch of subscribable applies.

subscription_product

New values may be added.

subscribable_idinteger or null

The id of the record subscribable points at.

subscribableRef or SubscriptionProductSummary or null

What this line sells. Rendered as {"id": N} until named in ?include=subscribable, which additionally requires the read permission and token scope of the subscription_products prefix. Lines that bill a hosting domain or a server carry a subscribable_type this API publishes no shape for, and keep the {"id": N} form however they are requested; identify those from subscribable_type and subscribable_id yourself. Null on both halves is a free-text line priced by hand.

Which form you get depends on subscribable_type.

subscription_product
SubscriptionProductSummary
descriptionstring or nullMultiline

The line text, as printed on the invoice a renewal generates. May contain placeholders such as {{$domain}}; the API publishes the raw stored text and those are resolved only at invoice time.

quantityinteger

Number of units billed per period.

purchase_pricedecimal (2 dp)≥ 0

Cost price per unit, for margin bookkeeping only. It feeds neither generated amount below and appears on no invoice.

2 decimal places, not negative

sales_pricedecimal (2 dp)≥ 0

Sales price per unit, excluding VAT. This is what actually bills: a renewal copies it into the generated invoice row's unit price.

2 decimal places, not negative

Variants

SubscriptionItemList 22 fields

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

The same fields as the detail object.

SubscriptionItemSummary 2 fields

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

Leaves out: customer_subscription_id, customer_subscription, subscribable_type, subscribable_id, subscribable, quantity, purchase_price, sales_price, vat_rate, vat_amount, total_amount, sort_order, exact_item_id, exact_vat_code, exact_gl_account, exact_cost_center, created_at, updated_at, deleted_at, links

Polymorphic fields

subscribableWhich form you get depends on subscribable_type.

Columns deliberately not published

resource_idThe other half of that pair, withheld with it.
resource_typeThe hosting site or server a line is sold for has no published shape in this API, so it is not exposed.