Before requesting a delivery, you can provide your end users with the option to generate estimate for the delivery fee for the locations you are delivering from and to by using the Burq API to generate a quote via the Generate Quote endpoint:

/v1/quote

curl --location --request POST 'https://api.burqup.com/v1/quote' \
--header 'x-api-key: <your-api-key-here>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "pickup_address": "125 Western Ave, Allston, MA, 02134",
    "dropoff_address": "123 Western Ave, Allston, MA, 02134"
}'

Invoking this code will return a payload as follows.

[{
    "id": "40efpmxcks0dkqma",
    "fee": 2425,
    "created": "2021-08-06T13:19:49.953Z",
    "dropoff_at": "2021-08-15T13:06:37.113Z",
    "currency": "USD",
    "expires": "2021-08-06T14:19:49.953Z",
    "service": "senpex"
}]

📘

Quotes Are Optional

Note that generating a quote is optional — you can skip that step if your workflow doesn't require it.

Scheduling Delivery

By default when a Delivery is created, it is treated as unscheduled and uninitiated (with a status of request).

To initiate delivery immediately, either create the delivery with the initiate flag or call the Initiate Delivery operation (see also: Initiating Delivery ).

However, if you would like to schedule a delivery for a particular time, you must set either the pickup_at field or the dropoff_at fields when you are generating a quote. Note that you cannot set both.

curl --location --request POST 'https://webhook.site/1c99ebf7-0ad8-4fd0-9506-1b6d04428f24' \
--header 'x-api-key: <your-api-key-here>' \
--header 'Content-Type: application/json' \
--data-raw '{
  "pickup_address": "125 Western Ave, Allston, MA, 02134",
  "pickup_at": "2022-05-16T13:14:10+0000",
  "dropoff_address": "127 Western Ave, Allston, MA, 02134"
}'