Shipment data object

Properties

Property Filter Edit Type Description
id INT Unique identifier
product_billing_id INT 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.
start DATETIME The first date covered by the shipment batch
end DATETIME 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.
type STRING

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.