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
.
Properties
Each shipment contains one or more fulfillments, one for each product_instance in the shipment.
Property | Filter | Edit | Type | Description |
---|---|---|---|---|
id | INT | Unique identifier | ||
adjusted_fulfillment_date | DATETIME | The target fulfillment date. | ||
cycle_number | INT | See below for notes on Fulfillment cycle numbers | ||
fulfillment_date | DATETIME | |||
is_test | BOOL | |||
status | STRING | One of "open", "closed", or "cancelled" | ||
shipment_id | INT | |||
shipping | INT | The cost of shipping. | ||
subscription_id | INT | |||
tax | INT | |||
test | BOOL | |||
total_cycles | INT | Please see below for notes on fulfillment cycles | ||
type | STRING | Always fulfillment |
Default Related Properties
Property | Resource | Description | Filterable? |
---|---|---|---|
instance | Product Instance | A product_instance object. | No |
order | Order | The order that generated the shipment. | No |
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
of0
,1
,2
, etc. in order for each fulfillment of the prepay.total_cycles
would be6
. When the 6-month prepay renews after 6 months, both cycles begin again. - Month-to-month shipments would show the fulfillment
cycle_number
of0
, and atotal_cycles
of1
. - One-time product shipments will have
null
cycle_number
andtotal_cycles
. - Orders created by the Cratejoy admin will show a
cycle_number
of-1
andtotal_cycles
ofnull
.