The order subscription object
A comprehensive list of the order subscription resource's attributes and relationships
An order subscription object is returned as part of the response body of each successful list, retrieve, create or update API call to the /api/order_subscriptions
endpoint.
Fields
Field | Type | Description |
---|---|---|
type |
|
|
id |
| The order subscription unique identifier |
links.self |
| The order subscription endpoint URL |
attributes.number |
| Unique identifier for the subscription (numeric). |
attributes.status |
| The subscription status. One of 'draft' (default), 'inactive', 'active', or 'cancelled'. |
attributes.frequency |
| The frequency of the subscription. Use one of the supported within 'hourly', 'daily', 'weekly', 'monthly', 'two-month', 'three-month', 'four-month', 'six-month', 'yearly', or provide your custom crontab expression (min unit is hour). Must be supported by existing associated subscription_model. |
attributes.activate_by_source_order |
| Indicates if the subscription will be activated considering the placed source order as its first run. |
attributes.place_target_order |
| Indicates if the subscription created orders are automatically placed at the end of the copy. |
attributes.renewal_alert_period |
| Indicates the number of hours the renewal alert will be triggered before the subscription next run. Must be included between 1 and 720 hours. |
attributes.customer_email |
| The email address of the customer, if any, associated to the source order. |
attributes.starts_at |
| The activation date/time of this subscription. |
attributes.expires_at |
| The expiration date/time of this subscription (must be after starts_at). |
attributes.last_run_at |
| The date/time of the subscription last run. |
attributes.next_run_at |
| The date/time of the subscription next run. Can be updated but only in the future, to copy with frequency changes. |
attributes.occurrencies |
| The number of times this subscription has run. |
attributes.errors_count |
| Indicates the number of subscription errors, if any. |
attributes.succeeded_on_last_run |
| Indicates if the subscription has succeeded on its last run. |
attributes._activate |
| Send this attribute if you want to mark this subscription as active. |
attributes._deactivate |
| Send this attribute if you want to mark this subscription as inactive. |
attributes._cancel |
| Send this attribute if you want to mark this subscription as cancelled. |
attributes._convert |
| Send this attribute if you want to convert a manual subscription to an automatic one. A subscription model is required before conversion. |
attributes.created_at |
| Time at which the resource was created. |
attributes.updated_at |
| Time at which the resource was last updated. |
attributes.reference |
| A string that you can use to add any external identifier to the resource. This can be useful for integrating the resource to an external system, like an ERP, a marketing tool, a CRM, or whatever. |
attributes.reference_origin |
| Any identifier of the third party system that defines the reference code. |
attributes.metadata |
| Set of key-value pairs that you can attach to the resource. This can be useful for storing additional information about the resource in a structured format. |
relationships.market |
| The associated market, inherited from the source order if not specified. |
relationships.subscription_model |
| The subscription model associated to the market. |
relationships.source_order |
| The source order which generated the subscription. |
relationships.customer |
| The subscription customer. |
relationships.customer_payment_source |
| The associated customer_payment_source. |
relationships.order_subscription_items |
| The associated order subscription items. |
relationships.order_factories |
| The associated order factories. |
relationships.recurring_order_copies |
| The associated recurring_order copies. |
relationships.orders |
| The associated copied orders. |
relationships.events |
| The associated events. |
relationships.tags |
| The associated tags. |
relationships.versions |
| The associated changes. |
meta.mode |
| The resource environment (can be one of |
Last updated