Managing fulfillments for an order

For an order to be considered fulfilled, all of its line items must be fulfilled. For a line item to be considered fulfilled, it must be in a package with an assigned shipping fulfillment, and the shipping fulfillment must be complete. This section assumes you have ensured that each of the order's line items has been packaged and assigned to a shipping fulfillment — for details, see Handling unfulfilled line items.

Topics

Retrieving known fulfillments

If you have the fulfillment IDs of one or more known shipping fulfillments for an order, you can retrieve those shipping fulfillments to check their completion status.

Getting a single known fulfillment

If you have the IDs of a shipping fulfillment and the order it belongs to, use the Fulfillment API's getShippingFulfillment call to retrieve the known shipping fulfillment. The resource URI takes this form:

GET https://api.ebay.com/sell/fulfillment/v1/order/{orderId}/fulfillment/{fulfillmentId}

Insert the orderId value for the order and the fulfillmentId value for the shipping fulfillment; for example:

GET https://api.ebay.com/sell/fulfillment/v1/
   order/6498414015!260000000562911/shipping_fulfillment/1Z50992656936

Getting multiple known fulfillments

If you have retrieved an order using the getOrder or getOrders call, the order object will contain the fulfillmentHrefs array, which contains a list of one or more hypertext references in the form of URLs. Each URL can be used to invoke the getShippingFulfillment call to retrieve the details of a shipping fulfillment associated with this order.

Retrieving all fulfillments for an order

If you do not have the IDs of all the shipping fulfillments created for an order, use the getShippingFulfillments call to retrieve them all. The resource URI takes this form:

GET https://api.ebay.com/sell/fulfillment/v1/order/{orderId}/shipping_fulfillment

Insert the orderId value for the order; for example:

GET https://api.ebay.com/sell/fulfillment/v1/
   order/6498414015!260000000562911/shipping_fulfillment

All of the shipping fulfillments created for this order are returned in the response payload, and they should apply to all of the order's line items. If you are not sure whether all of the line items have been packaged and assigned to a shipping fulfillment, see Handling unfulfilled line items.

Ensuring completion

Once you have retrieved a shipping fulfillment for the order, you can check for its shippedDate field. if this field has been returned with a valid date and time, the shipping fulfillment is complete.

If a shipping fulfillment is not complete, you can use the getShippingFulfillment call to retrieve it again after a short wait and check for the shippedDate field. Once this field is returned for all of the order's shipping fulfillments, the order is fulfilled. You can confirm this by retrieving the order using the getOrder call and examining the orderFulfillmentStatus field in the response. This field should have a value of FULFILLED.