{"_id":"58112e72ded0340f0085d052","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,"__v":1,"user":"55f2fd49b5b25021002b7dfd","project":"551e85be610f400d00837db7","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"},"updates":["587cf3b76dccbf0f00956c4b"],"next":{"pages":[],"description":""},"createdAt":"2015-09-14T04:20:36.016Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":9,"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\\\">adjusted_ordered_at</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 ship date. See important note below about what this actually means.</td>\\n            </tr>\\n\\n            <tr class=\\\"fil ro\\\">\\n                <td class=\\\"prop-col\\\">created_at</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\\\">Date the shipment was created</td>\\n            </tr>\\n          \\n          \\t<tr class=\\\"fil ro\\\">\\n                <td class=\\\"prop-col\\\">is_ecom</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\\\">Whether it's a non-subscription shipment or a subscription shipment.</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\\\">Whether it's a test shipment (created in test mode)</td>\\n            </tr>\\n\\n            <tr class=\\\"fil rw\\\">\\n                <td class=\\\"prop-col\\\">shipped_at</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\\\">When it was marked shipped.</td>\\n            </tr>\\n\\n            <tr class=\\\"fil rw\\\">\\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 \\\"unshipped\\\", \\\"shipped\\\", or \\\"cancelled\\\"</td>\\n            </tr>\\n\\n            <tr class=\\\"fil rw\\\">\\n                <td class=\\\"prop-col\\\">target_at</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 ship date. [Deprecated]</td>\\n            </tr>\\n\\n            <tr class=\\\"fil rw\\\">\\n                <td class=\\\"prop-col\\\">tracking_number</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 tracking number of the package</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            <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\\n            </tbody>\\n    </table>\\n</div>\\n\\n\"\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\": \"__*customer*__\",\n    \"0-1\": \"[Customer](doc:customer-1)\",\n    \"0-2\": \"A customer object\",\n    \"1-0\": \"__*fulfillments*__\",\n    \"1-1\": \"[Fulfillment](doc:fulfillment)\",\n    \"1-2\": \"A list of Fulfillments\",\n    \"2-0\": \"__*labels*__\",\n    \"2-1\": \"[ShippingLabel](doc:shippinglabel)\",\n    \"2-2\": \"A list of ShippingLabels\",\n    \"3-0\": \"__*ship_address*__\",\n    \"3-1\": \"[CustomerAddress](doc:customeraddress)\",\n    \"3-2\": \"Where the package is being shipped can be updated using the [CustomerAddress](doc:customeraddress) endpoint\",\n    \"h-3\": \"\",\n    \"0-3\": \"YES\",\n    \"1-3\": \"YES\"\n  },\n  \"cols\": 3,\n  \"rows\": 4\n}\n[/block]\n**bold** - may be used to filter collections\n\n## Additional Related Properties\nsee [Working with Object Relationships](doc:working-with-object-relationships) \n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Property\",\n    \"h-1\": \"Resource\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"**_md**\",\n    \"0-1\": \"Shipment Metadata\",\n    \"1-0\": \"**batch**\",\n    \"1-1\": \"[Shipment Batch](doc:shipment-batches)\",\n    \"1-2\": \"The batch the shipment belongs to\",\n    \"2-0\": \"**label_batch**\",\n    \"2-2\": \"The label printing batch for bulk printing\",\n    \"3-0\": \"**subscriptions**\",\n    \"3-1\": \"[Subscription](doc:subscription)\",\n    \"3-2\": \"The subscriptions attached to the shipment.\",\n    \"2-1\": \"\"\n  },\n  \"cols\": 3,\n  \"rows\": 4\n}\n[/block]\nThe above properties are references to another Cratejoy resource or another collection of Cratejoy resources.\n\nThe properties can either be a url to fetch the related resources OR contain the resources themselves\n\n## Target ship date and \"adjusted_ordered_at\"\n\nWith ecommerce (non-subscriotion) products, as well as subscription products using ad hoc billing, the \"adjusted_ordered_at\" is the target ship date. With other subscription products, shipments are lumped into batches and the actual ship date is sometime following the end of the batch date range.\n\nIf your product has a renewal date of the 15th with a 14-day cutoff window, you batches will be:\nA. January 1 - January 31\nB. February 1 - February 28 (or 29)\nC. March 1 - March 30\nE. etc.\n\nAny shipment with an adjusted_ordered_at anywhere from January 1 to January 31 will be in the \"A\" batch and should be shipped in early February. Thus, moving such a shipment's adjusted_ordered_at from 2016-01-01 to 2016-01-20 _wouldn't change when it ships_. It's still shipped early February.\n\nHowever, changing adjusted_ordered_at from 2016-01-30 to 2016-02-01 _would_ move it from batch A (shipping early February) to batch B (which ships early March).","excerpt":"Shipment data object","slug":"shipment","type":"basic","title":"Shipment"}

Shipment

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 rw\">\n <td class=\"prop-col\">adjusted_ordered_at</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 ship date. See important note below about what this actually means.</td>\n </tr>\n\n <tr class=\"fil ro\">\n <td class=\"prop-col\">created_at</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\">Date the shipment was created</td>\n </tr>\n \n \t<tr class=\"fil ro\">\n <td class=\"prop-col\">is_ecom</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\">Whether it's a non-subscription shipment or a subscription shipment.</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\">Whether it's a test shipment (created in test mode)</td>\n </tr>\n\n <tr class=\"fil rw\">\n <td class=\"prop-col\">shipped_at</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\">When it was marked shipped.</td>\n </tr>\n\n <tr class=\"fil rw\">\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 \"unshipped\", \"shipped\", or \"cancelled\"</td>\n </tr>\n\n <tr class=\"fil rw\">\n <td class=\"prop-col\">target_at</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 ship date. [Deprecated]</td>\n </tr>\n\n <tr class=\"fil rw\">\n <td class=\"prop-col\">tracking_number</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 tracking number of the package</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 <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\n </tbody>\n </table>\n</div>\n\n" } [/block] ## Default Related Properties [block:parameters] { "data": { "h-0": "Property", "h-1": "Resource", "h-2": "Description", "0-0": "__*customer*__", "0-1": "[Customer](doc:customer-1)", "0-2": "A customer object", "1-0": "__*fulfillments*__", "1-1": "[Fulfillment](doc:fulfillment)", "1-2": "A list of Fulfillments", "2-0": "__*labels*__", "2-1": "[ShippingLabel](doc:shippinglabel)", "2-2": "A list of ShippingLabels", "3-0": "__*ship_address*__", "3-1": "[CustomerAddress](doc:customeraddress)", "3-2": "Where the package is being shipped can be updated using the [CustomerAddress](doc:customeraddress) endpoint", "h-3": "", "0-3": "YES", "1-3": "YES" }, "cols": 3, "rows": 4 } [/block] **bold** - may be used to filter collections ## Additional Related Properties see [Working with Object Relationships](doc:working-with-object-relationships) [block:parameters] { "data": { "h-0": "Property", "h-1": "Resource", "h-2": "Description", "0-0": "**_md**", "0-1": "Shipment Metadata", "1-0": "**batch**", "1-1": "[Shipment Batch](doc:shipment-batches)", "1-2": "The batch the shipment belongs to", "2-0": "**label_batch**", "2-2": "The label printing batch for bulk printing", "3-0": "**subscriptions**", "3-1": "[Subscription](doc:subscription)", "3-2": "The subscriptions attached to the shipment.", "2-1": "" }, "cols": 3, "rows": 4 } [/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 ## Target ship date and "adjusted_ordered_at" With ecommerce (non-subscriotion) products, as well as subscription products using ad hoc billing, the "adjusted_ordered_at" is the target ship date. With other subscription products, shipments are lumped into batches and the actual ship date is sometime following the end of the batch date range. If your product has a renewal date of the 15th with a 14-day cutoff window, you batches will be: A. January 1 - January 31 B. February 1 - February 28 (or 29) C. March 1 - March 30 E. etc. Any shipment with an adjusted_ordered_at anywhere from January 1 to January 31 will be in the "A" batch and should be shipped in early February. Thus, moving such a shipment's adjusted_ordered_at from 2016-01-01 to 2016-01-20 _wouldn't change when it ships_. It's still shipped early February. However, changing adjusted_ordered_at from 2016-01-30 to 2016-02-01 _would_ move it from batch A (shipping early February) to batch B (which ships early March).