added

API - Get Products endpoint

📘

Executive Summary

This API change lets integrations select which type of Sendle shipping to use for each order – our Standard service, Express, etc. It introduces a new way to quote orders that returns this extra information, and a way to select which service to use when creating orders.


We've released the Get Products endpoint. When it comes to Sendle, each product is a different type of shipping service we offer. This endpoint lets you select between different products when ordering, where the current Get Quote endpoint only lets you see the price of our standard shipping product. It gives you and your users more control over how orders are shipped with Sendle.

Changes

  • Created the Get Products endpoint.
  • Updated the Get Quote endpoint. It now accepts the product_code and dimension parameters (length_value, width_value, height_value, dimension_units).
  • Updated the Create Order endpoint. It now accepts the product_code and dimensions parameters. The first_mile_option parameter has been deprecated in favour of supplying the product code.

Old vs New Flows

The Get Products endpoint is intended to replace the Get Quote endpoint. It's more flexible, gives you more information, and lets you access new shipping products without code changes on your side. The creating-an-order flow changes when you want to be product-aware.


Here's the order flow with the current Get Quote endpoint:

  1. GET /api/quote to get a quote.
  2. Display the quote as “Sendle Shipping” or something similar.
  3. POST /api/orders with the same details to submit the order.

And here's that flow with the new Get Products endpoint:

  1. GET /api/products to get a set of quotes.
  2. Filter the returned list according to the user’s configuration (e.g. your integration may select whether to show the pickup or drop off “Sendle Standard” product).
  3. Display all valid quotes with the included product names (e.g. “Sendle Standard”, “Sendle Express”).
  4. POST /api/orders with the same details, plus the selected product code, to submit the order.

Stability

This endpoint is stable and we intend to make backwards-compatible improvements over time.