Spree Commerce

Try It Now
Shipping & Fulfillment | Spree Commerce hub

Shipping & Fulfillment

Shipping and fulfillment are some of the more common operations performed by the hub. These integrations are typically stateless and since store specific information (like credentials) are passed on each request, this means they can support multiple customers at once.

The following services are typically provided by such integrations (although it is not required to support all of them):

  • Send a new shipment
  • Get a list of shipments that have been shipped (since the last time we checked)
  • Get information on a specific shipment
  • Get inventory levels for a specific product
  • Get inventory levels for a list of products
  • Update the shipment with new information from the hub (new address, etc.)

Be sure to read the Integrations guide for general information on how integrations are used by the hub.

Exsiting Integrations

There are several existing integrations already supported by the hub with more integrations being written by the community as you read this. Exisitng integrations include:

Quiet Logistics
Ship Wire
Fosdick Fulfillment

These integrations are available for use in the hub but they are also open source. Please see the open source section of the integrations guide.

Creating a New Integration

Creating a shipping & fulfillment integration using the hub is very straightfoward, generally a very short list of web hooks are required to be implemented in order meet the needs of most dropping shipping and logistics providers.

This guide focuses on the specific consideration related to building shipping and fulfillment integrations. Make sure you also read the Build Your Own guide which has more general information on how to build integrations for the hub.

Webhooks

We have compiled a list of webhooks that you may be interested in providing. Webhooks are the only way to receive information from the hub. You can think of your webhooks as a list of services that your integration provides. For example, if you want to allow the hub to send you shipments you should implement the add_shipment webhook.

See the Webhooks guide for more detailed information about how webhooks work.

A typical shipping and/or fulfillment integration will often be interested in implementing one of the following webhooks:

Webhook Description
/add_shipment This can be called whenever there is a new shipment that is ready to be sent.
/get_shipments This can be called at regularly scehduled intervals and will retrieve shipment updates from the third party fulfillment provider (tracking numbers, etc.)
/get_inventory Regularly scheduled check for inventory levels.
/update_shipment Communicate changes to a previously created shipment (cancel, new address, etc. Feel free to skip this webhook if the provider does not support such functionality.

You are under no obligation to implement any of these webhooks although most integrations that deal with shipping and fulfillment implement at least some of them. For a complete list of webhooks see the Webhooks guide.