Skip to main content
POST
Price a delivery

Authorizations

Authorization
string
header
required

Your API key, sent as Authorization: Bearer <key>. Live and test keys are separate; the key you send decides which world the call acts in. To try calls, use a test key (it starts with lst_test_): no real courier is sent and no real money moves, but webhooks fire and the dropoff.phone you give can receive WhatsApp messages, so use your own number. A live key (it starts with lst_live_) books and charges real deliveries.

Body

application/json

The trip to price.

store_id
string
required

The st_ id of the store the courier collects from.

dropoff
object
required

Where the order goes.

payment_method
enum<string>

How the customer pays.

Available options:
prepaid,
cash,
card
order_value_cents
integer

The value of the order, in centavos. Required for a cash quote, where it is what the courier collects.

Required range: x >= 0
business_fee_share
integer

The percent of the delivery fee the store pays. Defaults to the store's own.

Required range: 0 <= x <= 100
business_fee_cap_cents
integer

The most the store pays toward the fee, in centavos.

Required range: x >= 0
pickup_ready_at
string<date-time>

When the order will be ready, ISO-8601 in UTC. Must be in the future.

vehicle
enum<string>

Defaults to moto.

Available options:
moto,
car
manifest
object | null

The descriptive item list for the courier. Money never comes from it; its only effect on the trip is that an xlarge item makes it a car. Absent, null, {} and {"items": null} all mean no cart.

Response

Created.

A delivery priced and held for a short while. Hand id to POST /v1/deliveries as quote_id to book at exactly this price.

id
string
required

The quote id, qt_ prefixed.

Example:

"qt_5nW3jP8vT2xQ6bM9cZ1sRdKe"

fee_cents
integer
required

The total delivery fee, in centavos, and the number a booking against this quote is held to. business_fee_cents plus customer_fee_cents always add back to it.

business_fee_cents
integer
required

The part of the fee the store pays.

customer_fee_cents
integer
required

The part of the fee the customer pays.

cash_to_collect_cents
integer | null
required

What the courier collects at the door on a cash order: the order value plus the customer's share of the fee. Null on every quote that is not a cash quote, which is not the same as 0 (a cash order that collects nothing).

currency
enum<string>
required

Always MXN; money is integer centavos.

Available options:
MXN
pickup_duration_min
integer | null
required

Minutes until a courier is expected at the store, when the quote came back with an estimate. Null otherwise.

dropoff_eta_at
string<date-time> | null
required

When the order is expected at the door, when the quote came back with an estimate. Null otherwise.

expires_at
string<date-time>
required

The deadline for booking this price. Past it, a create answers quote_expired and you quote again.

test
boolean
required

Whether the quote belongs to the sandbox world.

created_at
string<date-time>
required
vehicle
enum<string>
required

What this price was built for: car when you asked for one or an item was sized xlarge, moto otherwise. Always present.

Available options:
moto,
car
Example:

"moto"