API - Get Products endpoint
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.
- Created the Get Products endpoint.
- Updated the Get Quote endpoint. It now accepts the
product_codeand dimension parameters (
- Updated the Create Order endpoint. It now accepts the
first_mile_optionparameter 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:
GET /api/quoteto get a quote.
- Display the quote as “Sendle Shipping” or something similar.
POST /api/orderswith the same details to submit the order.
And here's that flow with the new Get Products endpoint:
GET /api/productsto get a set of quotes.
- 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).
- Display all valid quotes with the included product names (e.g. “Sendle Standard”, “Sendle Express”).
POST /api/orderswith the same details, plus the selected product code, to submit the order.
This endpoint is stable and we intend to make backwards-compatible improvements over time.