{"_id":"58112e72ded0340f0085d059","__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"},"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"},"parentDoc":null,"user":"55253acaf0f4610d00f7193f","updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-06-11T16:22:06.416Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":10,"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 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\\\">INT</td>\\n                <td class=\\\"description-col\\\">Id of the product_billing record to which this batch is a member. Product billing records belong to products. Each subscription products will have its own list of shipment batches that are automatically generated as needed.</td>\\n            </tr>\\n\\n            <tr class=\\\"fil ro\\\">\\n                <td class=\\\"prop-col\\\">start</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 first date covered by the shipment batch</td>\\n            </tr>\\n\\n            <tr class=\\\"fil ro\\\">\\n                <td class=\\\"prop-col\\\">end</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 last date covered by this batch. After this date, the batch is finalized. We recommend that merchants ship each batch immediately after this time.</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\\\"></td>\\n            </tr>\\n\\n            </tbody>\\n    </table>\\n</div>\\n\\n\"\n}\n[/block]\nThe underlying logic for subscription businesses is pretty complicated when it comes to answering the question \"what do I ship right now?\". Shipment batches solve the problem by tying together shipments that need to go out at the same time. A shipment batch represent a group of shipments for a particular subscription product that all need to ship at the same time. If you have multiple subscription products, you may need to ship multiple batches at the same time. The end date of each batch is the same as the cutoff date for new subscribers to receive a box in that batch's shipment cycle.\n\nFor example, if you renew your subscribers on the 15th of every month, and your cutoff date (10 days prior) lands on the 5th of the month, then the end date for your batches will always been on the 5th of the month. After each batch hits an end date (each month on the 5th), you can safely ship all of its shipments, because that's the first moment you know that no additional shipments can come in for that batch.","excerpt":"Shipment data object","slug":"shipment-batches","type":"basic","title":"Shipment Batch"}

Shipment Batch

Shipment data object

#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 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\">INT</td>\n <td class=\"description-col\">Id of the product_billing record to which this batch is a member. Product billing records belong to products. Each subscription products will have its own list of shipment batches that are automatically generated as needed.</td>\n </tr>\n\n <tr class=\"fil ro\">\n <td class=\"prop-col\">start</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 first date covered by the shipment batch</td>\n </tr>\n\n <tr class=\"fil ro\">\n <td class=\"prop-col\">end</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 last date covered by this batch. After this date, the batch is finalized. We recommend that merchants ship each batch immediately after this time.</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\"></td>\n </tr>\n\n </tbody>\n </table>\n</div>\n\n" } [/block] The underlying logic for subscription businesses is pretty complicated when it comes to answering the question "what do I ship right now?". Shipment batches solve the problem by tying together shipments that need to go out at the same time. A shipment batch represent a group of shipments for a particular subscription product that all need to ship at the same time. If you have multiple subscription products, you may need to ship multiple batches at the same time. The end date of each batch is the same as the cutoff date for new subscribers to receive a box in that batch's shipment cycle. For example, if you renew your subscribers on the 15th of every month, and your cutoff date (10 days prior) lands on the 5th of the month, then the end date for your batches will always been on the 5th of the month. After each batch hits an end date (each month on the 5th), you can safely ship all of its shipments, because that's the first moment you know that no additional shipments can come in for that batch.