Getting estimates
Get Delivery Estimates
Before you begin, make sure you have an active Dora API store token. If you don’t have one, please login into your dora account, create a store custom store and copy the generated token for that store.
Integration Steps
Integrating Dora’s Delivery Estimates API into your application is straightforward. Follow these simple steps to get started:
- Include the Dora API script in your HTML:
-
Implement the checkout() function in your JavaScript to trigger the delivery estimate widget.
-
Customize the checkout object with the necessary parameters such as sender address, customer details, delivery information, and callbacks.
-
Call the checkout.setup() method to prepare the widget.
-
Finally, use the checkout.open() method to display the widget and retrieve delivery estimates when the “Get Estimates” button is clicked.
Here’s a sample HTML and JavaScript code snippet to help you get started: