{"_id":"58112e73ded0340f0085d068","category":{"_id":"58112e72ded0340f0085d034","project":"551e85be610f400d00837db7","version":"58112e71ded0340f0085d02a","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-09-18T15:57:19.874Z","from_sync":false,"order":9,"slug":"api-subresources","title":"Merchant API Subresources"},"project":"551e85be610f400d00837db7","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"},"__v":0,"user":"55f2fd49b5b25021002b7dfd","parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-09-18T15:57:52.379Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":4,"body":"A fulfillment represents a single product_instance line item in a shipment. Each shipment contains one or more fulfillments. A sample call for viewing a shipment's fulfillments might be `http://api.cratejoy.com/v1/shipments/{ID}/?with=fulfillments`.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Properties\"\n}\n[/block]\nEach shipment contains one or more fulfillments, one for each product_instance in the shipment.\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 ro\\\">\\n                <td class=\\\"prop-col\\\">adjusted_fulfillment_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\\\">The target fulfillment date.</td>\\n            </tr>\\n          \\n            <tr class=\\\"fil ro\\\">\\n                <td class=\\\"prop-col\\\">cycle_number</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\\\">See below for notes on Fulfillment cycle numbers</td>\\n            </tr>          \\n          \\n            <tr class=\\\"fil ro\\\">\\n                <td class=\\\"prop-col\\\">fulfillment_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\\\">BOOL</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\\\">One of \\\"open\\\", \\\"closed\\\", or \\\"cancelled\\\"</td>\\n            </tr>\\n\\n            <tr class=\\\"fil ro\\\">\\n                <td class=\\\"prop-col\\\">shipment_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=\\\"fil ro\\\">\\n                <td class=\\\"prop-col\\\">shipping</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\\\">The cost of shipping.</td>\\n            </tr>\\n\\n            <tr class=\\\"fil ro\\\">\\n                <td class=\\\"prop-col\\\">subscription_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=\\\"fil ro\\\">\\n                <td class=\\\"prop-col\\\">tax</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=\\\"fil ro\\\">\\n                <td class=\\\"prop-col\\\">test</td>\\n                <td class=\\\"filter-col\\\"></td>\\n                <td class=\\\"editable-col\\\"></td>\\n                <td class=\\\"type-col\\\">BOOL</td>\\n                <td class=\\\"description-col\\\"></td>\\n            </tr>\\n\\n            <tr class=\\\"ro\\\">\\n                <td class=\\\"prop-col\\\">total_cycles</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\\\">Please see below for notes on fulfillment cycles</td>\\n            </tr>\\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\\\">Always <code>fulfillment</code></td>\\n            </tr>\\n            </tbody>\\n    </table>\\n</div>\"\n}\n[/block]\n## Default Related Properties\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Property\",\n    \"h-1\": \"Resource\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"instance\",\n    \"0-1\": \"Product Instance\",\n    \"0-2\": \"A product_instance object.\",\n    \"1-0\": \"order\",\n    \"1-1\": \"[Order](doc:order)\",\n    \"1-2\": \"The order that generated the shipment.\",\n    \"h-3\": \"Filterable?\",\n    \"0-3\": \"No\",\n    \"1-3\": \"No\"\n  },\n  \"cols\": 4,\n  \"rows\": 2\n}\n[/block]\n## Fulfillment Cycles\nCycles are useful for fulfillments when working with prepaid subscriptions. `cycle_number` indicates where the shipment falls within a prepaid subscription (starting at 0), while `total_cycles` shows the total number of shipments within that subscription. \n\n* A 6-month prepay, for example, would show fulfillment `cycle_number` of `0`, `1`, `2`, etc. in order for each fulfillment of the prepay. `total_cycles` would be `6`. When the 6-month prepay renews after 6 months, both cycles begin again.\n* Month-to-month shipments would show the fulfillment `cycle_number` of `0`, and a `total_cycles` of `1`. \n*  One-time product shipments will have `null` `cycle_number` and `total_cycles`.\n* Orders created by the Cratejoy admin will show a `cycle_number` of `-1` and `total_cycles` of `null`.","excerpt":"Fulfillment data object specification for the Cratejoy Merchant API","slug":"fulfillment","type":"basic","title":"Fulfillment"}

Fulfillment

Fulfillment data object specification for the Cratejoy Merchant API

A fulfillment represents a single product_instance line item in a shipment. Each shipment contains one or more fulfillments. A sample call for viewing a shipment's fulfillments might be `http://api.cratejoy.com/v1/shipments/{ID}/?with=fulfillments`. [block:api-header] { "type": "basic", "title": "Properties" } [/block] Each shipment contains one or more fulfillments, one for each product_instance in the shipment. [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 ro\">\n <td class=\"prop-col\">adjusted_fulfillment_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\">The target fulfillment date.</td>\n </tr>\n \n <tr class=\"fil ro\">\n <td class=\"prop-col\">cycle_number</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\">See below for notes on Fulfillment cycle numbers</td>\n </tr> \n \n <tr class=\"fil ro\">\n <td class=\"prop-col\">fulfillment_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\">BOOL</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\">One of \"open\", \"closed\", or \"cancelled\"</td>\n </tr>\n\n <tr class=\"fil ro\">\n <td class=\"prop-col\">shipment_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=\"fil ro\">\n <td class=\"prop-col\">shipping</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\">The cost of shipping.</td>\n </tr>\n\n <tr class=\"fil ro\">\n <td class=\"prop-col\">subscription_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=\"fil ro\">\n <td class=\"prop-col\">tax</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=\"fil ro\">\n <td class=\"prop-col\">test</td>\n <td class=\"filter-col\"></td>\n <td class=\"editable-col\"></td>\n <td class=\"type-col\">BOOL</td>\n <td class=\"description-col\"></td>\n </tr>\n\n <tr class=\"ro\">\n <td class=\"prop-col\">total_cycles</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\">Please see below for notes on fulfillment cycles</td>\n </tr>\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\">Always <code>fulfillment</code></td>\n </tr>\n </tbody>\n </table>\n</div>" } [/block] ## Default Related Properties [block:parameters] { "data": { "h-0": "Property", "h-1": "Resource", "h-2": "Description", "0-0": "instance", "0-1": "Product Instance", "0-2": "A product_instance object.", "1-0": "order", "1-1": "[Order](doc:order)", "1-2": "The order that generated the shipment.", "h-3": "Filterable?", "0-3": "No", "1-3": "No" }, "cols": 4, "rows": 2 } [/block] ## Fulfillment Cycles Cycles are useful for fulfillments when working with prepaid subscriptions. `cycle_number` indicates where the shipment falls within a prepaid subscription (starting at 0), while `total_cycles` shows the total number of shipments within that subscription. * A 6-month prepay, for example, would show fulfillment `cycle_number` of `0`, `1`, `2`, etc. in order for each fulfillment of the prepay. `total_cycles` would be `6`. When the 6-month prepay renews after 6 months, both cycles begin again. * Month-to-month shipments would show the fulfillment `cycle_number` of `0`, and a `total_cycles` of `1`. * One-time product shipments will have `null` `cycle_number` and `total_cycles`. * Orders created by the Cratejoy admin will show a `cycle_number` of `-1` and `total_cycles` of `null`.