{"_id":"58112e72ded0340f0085d053","user":"55f2fd49b5b25021002b7dfd","project":"551e85be610f400d00837db7","parentDoc":null,"__v":0,"category":{"_id":"58112e72ded0340f0085d033","project":"551e85be610f400d00837db7","version":"58112e71ded0340f0085d02a","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-09-25T13:57:54.835Z","from_sync":false,"order":8,"slug":"api-resources","title":"Merchant API Resources"},"version":{"_id":"58112e71ded0340f0085d02a","project":"551e85be610f400d00837db7","__v":4,"createdAt":"2016-10-26T22:30:09.862Z","releaseDate":"2016-10-26T22:30:09.862Z","categories":["58112e72ded0340f0085d02b","58112e72ded0340f0085d02c","58112e72ded0340f0085d02d","58112e72ded0340f0085d02e","58112e72ded0340f0085d02f","58112e72ded0340f0085d030","58112e72ded0340f0085d031","58112e72ded0340f0085d032","58112e72ded0340f0085d033","58112e72ded0340f0085d034","581137cc604d3c230048b7e4","58dc367221742d0f00a73f98","590768e54669da0f00db5c0b"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"new designer","version_clean":"2.0.0","version":"2.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-09-14T04:31:42.548Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":11,"body":"#Properties\n[block:html]\n{\n  \"html\": \"<div class=\\\"property-table-wrap\\\">\\n    <table class=\\\"property-table\\\">\\n        <thead>\\n            <tr>\\n                <th class=\\\"prop-col\\\">Property</th>\\n                <th class=\\\"filter-col\\\">Filter</th>\\n                <th class=\\\"editable-col\\\">Edit</th>\\n                <th class=\\\"type-col\\\">Type</th>\\n                <th class=\\\"description-col\\\">Description</th>\\n            </tr>\\n        </thead>\\n\\n        <tbody class=\\\"properties\\\">\\n\\n            <tr class=\\\"fil ro\\\">\\n                <td class=\\\"prop-col\\\">id</td>\\n                <td class=\\\"filter-col\\\"></td>\\n                <td class=\\\"editable-col\\\"></td>\\n                <td class=\\\"type-col\\\">INT</td>\\n                <td class=\\\"description-col\\\">Unique identifier</td>\\n            </tr>\\n\\n            <tr class=\\\"fil rw\\\">\\n                <td class=\\\"prop-col\\\">autorenew</td>\\n                <td class=\\\"filter-col\\\"></td>\\n                <td class=\\\"editable-col\\\"></td>\\n                <td class=\\\"type-col\\\">BOOLEAN</td>\\n                <td class=\\\"description-col\\\"></td>\\n            </tr>\\n\\n            <tr class=\\\"fil ro\\\">\\n                <td class=\\\"prop-col\\\">credit</td>\\n                <td class=\\\"filter-col\\\"></td>\\n                <td class=\\\"editable-col\\\"></td>\\n                <td class=\\\"type-col\\\">INTEGER</td>\\n                <td class=\\\"description-col\\\"></td>\\n            </tr>\\n\\n            <tr class=\\\"fil rw\\\">\\n                <td class=\\\"prop-col\\\">end_date</td>\\n                <td class=\\\"filter-col\\\"></td>\\n                <td class=\\\"editable-col\\\"></td>\\n                <td class=\\\"type-col\\\">DATETIME</td>\\n                <td class=\\\"description-col\\\"></td>\\n            </tr>\\n\\n            <tr class=\\\"fil ro\\\">\\n                <td class=\\\"prop-col\\\">is_test</td>\\n                <td class=\\\"filter-col\\\"></td>\\n                <td class=\\\"editable-col\\\"></td>\\n                <td class=\\\"type-col\\\">BOOLEAN</td>\\n                <td class=\\\"description-col\\\"></td>\\n            </tr>\\n\\n            <tr class=\\\"fil rw\\\">\\n                <td class=\\\"prop-col\\\">note</td>\\n                <td class=\\\"filter-col\\\"></td>\\n                <td class=\\\"editable-col\\\"></td>\\n                <td class=\\\"type-col\\\">STRING</td>\\n                <td class=\\\"description-col\\\"></td>\\n            </tr>\\n\\n            <tr class=\\\"fil ro\\\">\\n                <td class=\\\"prop-col\\\">product_billing_id</td>\\n                <td class=\\\"filter-col\\\"></td>\\n                <td class=\\\"editable-col\\\"></td>\\n                <td class=\\\"type-col\\\">INTEGER</td>\\n                <td class=\\\"description-col\\\"></td>\\n            </tr>\\n\\n\\n            <tr class=\\\"fil ro\\\">\\n                <td class=\\\"prop-col\\\">skipped_date</td>\\n                <td class=\\\"filter-col\\\"></td>\\n                <td class=\\\"editable-col\\\"></td>\\n                <td class=\\\"type-col\\\">DATETIME</td>\\n                <td class=\\\"description-col\\\"></td>\\n            </tr>\\n\\n            <tr class=\\\"fil ro\\\">\\n                <td class=\\\"prop-col\\\">start_date</td>\\n                <td class=\\\"filter-col\\\"></td>\\n                <td class=\\\"editable-col\\\"></td>\\n                <td class=\\\"type-col\\\">DATETIME</td>\\n                <td class=\\\"description-col\\\"></td>\\n            </tr>\\n\\n            <tr class=\\\"fil ro\\\">\\n                <td class=\\\"prop-col\\\">status</td>\\n                <td class=\\\"filter-col\\\"></td>\\n                <td class=\\\"editable-col\\\"></td>\\n                <td class=\\\"type-col\\\">STRING</td>\\n                <td class=\\\"description-col\\\">User friendly name of this customers subscription status\\n\\nactive, pastdue, etc..</td>\\n            </tr>\\n\\n            <tr class=\\\"fil ro\\\">\\n                <td class=\\\"prop-col\\\">store_id</td>\\n                <td class=\\\"filter-col\\\"></td>\\n                <td class=\\\"editable-col\\\"></td>\\n                <td class=\\\"type-col\\\">INT</td>\\n                <td class=\\\"description-col\\\"></td>\\n            </tr>\\n\\n            <tr class=\\\"ro\\\">\\n                <td class=\\\"prop-col\\\">type</td>\\n                <td class=\\\"filter-col\\\"></td>\\n                <td class=\\\"editable-col\\\"></td>\\n                <td class=\\\"type-col\\\">STRING</td>\\n                <td class=\\\"description-col\\\">The type of the Element - in this case ```subscription```</td>\\n            </tr>\\n\\n            <tr class=\\\"ro\\\">\\n                <td class=\\\"prop-col\\\">url</td>\\n                <td class=\\\"filter-col\\\"></td>\\n                <td class=\\\"editable-col\\\"></td>\\n                <td class=\\\"type-col\\\">STRING</td>\\n                <td class=\\\"description-col\\\">Direct link to ```GET``` the full details of the customer</td>\\n            </tr>\\n            </tbody>\\n    </table>\\n</div>\\n\\n\"\n}\n[/block]\n## Relation Properties\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Property\",\n    \"h-1\": \"Resource\",\n    \"h-2\": \"Description\",\n    \"1-0\": \"billing\",\n    \"1-1\": \"[Product Billing](doc:product-billing)\",\n    \"1-2\": \"A reference to the re-billing information\",\n    \"2-0\": \"term\",\n    \"2-1\": \"[Subscription Term](doc:subscription-term)\",\n    \"2-2\": \"Cycle information about the subscription\",\n    \"0-0\": \"customer\",\n    \"0-1\": \"[Customer](doc:customer-1)\",\n    \"0-2\": \"The customer of the subscription\",\n    \"h-3\": \"Filter?\",\n    \"0-3\": \"Yes\",\n    \"1-3\": \"Yes\",\n    \"2-3\": \"Yes\",\n    \"3-0\": \"product\",\n    \"3-1\": \"[Subscription Product](doc:product)\",\n    \"3-2\": \"Information about the subscription product\",\n    \"3-3\": \"No\",\n    \"4-0\": \"instance\",\n    \"4-1\": \"instance\",\n    \"4-2\": \"Information about the product instance\",\n    \"4-3\": \"No\",\n    \"5-0\": \"subscription_gift_info\",\n    \"5-2\": \"Information about the gift recipient, if the subscription was purchased as a gift\",\n    \"5-3\": \"No\",\n    \"5-1\": \"[Subscription Gift Info](doc:subscription-gift-info)\"\n  },\n  \"cols\": 4,\n  \"rows\": 6\n}\n[/block]\nFor more on relationships between subscriptions, products, shipments, and orders, please check out [this customer-subscription-order relationship map](http://docs.cratejoy.com/docs/customers-to-orders-subs-shipments).\n\n\n## Additional Related Properties\nsee [Working with Object Relationships](doc:working-with-object-relationships) \n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"_md\",\n    \"0-1\": \"[Shipment Metadata](doc:shipment-metadata)\",\n    \"h-0\": \"Property\",\n    \"h-1\": \"Resource\",\n    \"h-2\": \"Description\",\n    \"1-0\": \"logs\",\n    \"1-1\": \"SubscriptionLogs\",\n    \"1-2\": \"The log messages associated with the Subscription.\",\n    \"2-0\": \"orders\",\n    \"2-1\": \"[Order](doc:order)\",\n    \"2-2\": \"The orders related to this subscription. Includes orders generated for each renewal.\",\n    \"3-0\": \"shipments\",\n    \"3-1\": \"[Shipment](doc:shipment)\",\n    \"3-2\": \"The shipments that fulfill this subscription.\",\n    \"4-0\": \"fulfillments\",\n    \"4-1\": \"[Fulfillment](doc:fulfillment)\",\n    \"4-2\": \"The fulfillments that map to this subscription\",\n    \"5-0\": \"cart_products\",\n    \"5-1\": \"[Cart Products](doc:cart-products)\",\n    \"h-3\": \"Filter?\",\n    \"5-2\": \"\",\n    \"5-3\": \"Yes\",\n    \"4-3\": \"Yes\",\n    \"3-3\": \"Yes\",\n    \"2-3\": \"Yes\",\n    \"0-3\": \"Yes\",\n    \"1-3\": \"Yes\"\n  },\n  \"cols\": 4,\n  \"rows\": 6\n}\n[/block]\nThe 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.\n\nOther helpful resources: [Subscription Coupons](doc:subscription-coupons)","excerpt":"Subscription data object specification for the Cratejoy Merchant API","slug":"subscription","type":"basic","title":"Subscription"}

Subscription

Subscription data object specification for the Cratejoy Merchant API

#Properties [block:html] { "html": "<div class=\"property-table-wrap\">\n <table class=\"property-table\">\n <thead>\n <tr>\n <th class=\"prop-col\">Property</th>\n <th class=\"filter-col\">Filter</th>\n <th class=\"editable-col\">Edit</th>\n <th class=\"type-col\">Type</th>\n <th class=\"description-col\">Description</th>\n </tr>\n </thead>\n\n <tbody class=\"properties\">\n\n <tr class=\"fil ro\">\n <td class=\"prop-col\">id</td>\n <td class=\"filter-col\"></td>\n <td class=\"editable-col\"></td>\n <td class=\"type-col\">INT</td>\n <td class=\"description-col\">Unique identifier</td>\n </tr>\n\n <tr class=\"fil rw\">\n <td class=\"prop-col\">autorenew</td>\n <td class=\"filter-col\"></td>\n <td class=\"editable-col\"></td>\n <td class=\"type-col\">BOOLEAN</td>\n <td class=\"description-col\"></td>\n </tr>\n\n <tr class=\"fil ro\">\n <td class=\"prop-col\">credit</td>\n <td class=\"filter-col\"></td>\n <td class=\"editable-col\"></td>\n <td class=\"type-col\">INTEGER</td>\n <td class=\"description-col\"></td>\n </tr>\n\n <tr class=\"fil rw\">\n <td class=\"prop-col\">end_date</td>\n <td class=\"filter-col\"></td>\n <td class=\"editable-col\"></td>\n <td class=\"type-col\">DATETIME</td>\n <td class=\"description-col\"></td>\n </tr>\n\n <tr class=\"fil ro\">\n <td class=\"prop-col\">is_test</td>\n <td class=\"filter-col\"></td>\n <td class=\"editable-col\"></td>\n <td class=\"type-col\">BOOLEAN</td>\n <td class=\"description-col\"></td>\n </tr>\n\n <tr class=\"fil rw\">\n <td class=\"prop-col\">note</td>\n <td class=\"filter-col\"></td>\n <td class=\"editable-col\"></td>\n <td class=\"type-col\">STRING</td>\n <td class=\"description-col\"></td>\n </tr>\n\n <tr class=\"fil ro\">\n <td class=\"prop-col\">product_billing_id</td>\n <td class=\"filter-col\"></td>\n <td class=\"editable-col\"></td>\n <td class=\"type-col\">INTEGER</td>\n <td class=\"description-col\"></td>\n </tr>\n\n\n <tr class=\"fil ro\">\n <td class=\"prop-col\">skipped_date</td>\n <td class=\"filter-col\"></td>\n <td class=\"editable-col\"></td>\n <td class=\"type-col\">DATETIME</td>\n <td class=\"description-col\"></td>\n </tr>\n\n <tr class=\"fil ro\">\n <td class=\"prop-col\">start_date</td>\n <td class=\"filter-col\"></td>\n <td class=\"editable-col\"></td>\n <td class=\"type-col\">DATETIME</td>\n <td class=\"description-col\"></td>\n </tr>\n\n <tr class=\"fil ro\">\n <td class=\"prop-col\">status</td>\n <td class=\"filter-col\"></td>\n <td class=\"editable-col\"></td>\n <td class=\"type-col\">STRING</td>\n <td class=\"description-col\">User friendly name of this customers subscription status\n\nactive, pastdue, etc..</td>\n </tr>\n\n <tr class=\"fil ro\">\n <td class=\"prop-col\">store_id</td>\n <td class=\"filter-col\"></td>\n <td class=\"editable-col\"></td>\n <td class=\"type-col\">INT</td>\n <td class=\"description-col\"></td>\n </tr>\n\n <tr class=\"ro\">\n <td class=\"prop-col\">type</td>\n <td class=\"filter-col\"></td>\n <td class=\"editable-col\"></td>\n <td class=\"type-col\">STRING</td>\n <td class=\"description-col\">The type of the Element - in this case ```subscription```</td>\n </tr>\n\n <tr class=\"ro\">\n <td class=\"prop-col\">url</td>\n <td class=\"filter-col\"></td>\n <td class=\"editable-col\"></td>\n <td class=\"type-col\">STRING</td>\n <td class=\"description-col\">Direct link to ```GET``` the full details of the customer</td>\n </tr>\n </tbody>\n </table>\n</div>\n\n" } [/block] ## Relation Properties [block:parameters] { "data": { "h-0": "Property", "h-1": "Resource", "h-2": "Description", "1-0": "billing", "1-1": "[Product Billing](doc:product-billing)", "1-2": "A reference to the re-billing information", "2-0": "term", "2-1": "[Subscription Term](doc:subscription-term)", "2-2": "Cycle information about the subscription", "0-0": "customer", "0-1": "[Customer](doc:customer-1)", "0-2": "The customer of the subscription", "h-3": "Filter?", "0-3": "Yes", "1-3": "Yes", "2-3": "Yes", "3-0": "product", "3-1": "[Subscription Product](doc:product)", "3-2": "Information about the subscription product", "3-3": "No", "4-0": "instance", "4-1": "instance", "4-2": "Information about the product instance", "4-3": "No", "5-0": "subscription_gift_info", "5-2": "Information about the gift recipient, if the subscription was purchased as a gift", "5-3": "No", "5-1": "[Subscription Gift Info](doc:subscription-gift-info)" }, "cols": 4, "rows": 6 } [/block] For more on relationships between subscriptions, products, shipments, and orders, please check out [this customer-subscription-order relationship map](http://docs.cratejoy.com/docs/customers-to-orders-subs-shipments). ## Additional Related Properties see [Working with Object Relationships](doc:working-with-object-relationships) [block:parameters] { "data": { "0-0": "_md", "0-1": "[Shipment Metadata](doc:shipment-metadata)", "h-0": "Property", "h-1": "Resource", "h-2": "Description", "1-0": "logs", "1-1": "SubscriptionLogs", "1-2": "The log messages associated with the Subscription.", "2-0": "orders", "2-1": "[Order](doc:order)", "2-2": "The orders related to this subscription. Includes orders generated for each renewal.", "3-0": "shipments", "3-1": "[Shipment](doc:shipment)", "3-2": "The shipments that fulfill this subscription.", "4-0": "fulfillments", "4-1": "[Fulfillment](doc:fulfillment)", "4-2": "The fulfillments that map to this subscription", "5-0": "cart_products", "5-1": "[Cart Products](doc:cart-products)", "h-3": "Filter?", "5-2": "", "5-3": "Yes", "4-3": "Yes", "3-3": "Yes", "2-3": "Yes", "0-3": "Yes", "1-3": "Yes" }, "cols": 4, "rows": 6 } [/block] 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](doc:subscription-coupons)