Subscription data object specification for the Cratejoy Merchant API
Properties
Property | Filter | Edit | Type | Description |
---|---|---|---|---|
id | INT | Unique identifier | ||
autorenew | BOOLEAN | |||
credit | INTEGER | |||
end_date | DATETIME | |||
is_test | BOOLEAN | |||
note | STRING | |||
product_billing_id | INTEGER | |||
skipped_date | DATETIME | |||
start_date | DATETIME | |||
status | STRING | User friendly name of this customers subscription status active, pastdue, etc.. | ||
store_id | INT | |||
type | STRING | The type of the Element - in this case ```subscription``` | ||
url | STRING | Direct link to ```GET``` the full details of the customer |
Relation Properties
Property | Resource | Description | Filter? |
---|---|---|---|
customer | Customer | The customer of the subscription | Yes |
billing | Product Billing | A reference to the re-billing information | Yes |
term | Subscription Term | Cycle information about the subscription | Yes |
product | Subscription Product | Information about the subscription product | No |
instance | instance | Information about the product instance | No |
subscription_gift_info | Subscription Gift Info | Information about the gift recipient, if the subscription was purchased as a gift | No |
address | Address | The address associated with the subscription | No |
For more on relationships between subscriptions, products, shipments, and orders, please check out this customer-subscription-order relationship map.
Additional Related Properties
see Working with Object Relationships
Property | Resource | Description | Filter? |
---|---|---|---|
_md | Shipment Metadata | Yes | |
logs | SubscriptionLogs | The log messages associated with the Subscription. | Yes |
orders | Order | The orders related to this subscription. Includes orders generated for each renewal. | Yes |
shipments | Shipment | The shipments that fulfill this subscription. | Yes |
fulfillments | Fulfillment | The fulfillments that map to this subscription | Yes |
cart_products | Cart Products | Yes |
The above properties are references to another Cratejoy resource or another collection of Cratejoy resources. The properties can either be a url to fetch the related resources OR contain the resources themselves.
Other helpful resources: Subscription Coupons
Enum values
When filtering collections on some fields, you have to use the enum values used in the database. For the subscription object, these are the status enum values:
- Unpaid (Deprecated)
- Active
- Cancelled
- Suspended (Deprecated)
- Expired
- Past_due
- Pending_renewal (Temporary state while renewals run)
- Renewing (Temporary state while renewals run)
- Unpaid_order_failed (Deprecated)
- Transferred (Deprecated)