Checkout API
Pre-purchase endpoints for showing live shipping options at customer checkout. Use the shipping-rates endpoint to fetch carrier rates for a given route, and the delivery-options endpoint to fetch the curated options configured for the merchant. Neither call creates a shipment.
Checkout
Real-time rate and delivery-option lookups used at the customer checkout step. Stateless: no shipment is created by these calls.
These endpoints are typically called by storefront frontends or headless commerce middleware, and handle higher request volume than the per-shipment management endpoints.
2 operations · 0 objects
/checkout/shipping-ratesGet shipping rates
Returns live shipping rates from eligible carriers for a future shipment. Stateless: no shipment is created.
Headers
| Name | Value | Required | Description |
|---|---|---|---|
| Authorization | Bearer YOUR-ACCESS-TOKEN | Yes | OAuth 2.0 bearer token obtained from `POST /oauth/token`. |
| x-api-key | YOUR-API-KEY | Yes | Your tenant's API key, issued in the Carriyo Dashboard. Required on every request except `POST /oauth/token`. |
| tenant-id | YOUR-TENANT-ID | Yes | Your Carriyo tenant ID, shown in the Carriyo Dashboard. Required on every request except `POST /oauth/token`. |
| Content-Type | application/json | Yes | Media type of the request body. |
Request body
application/jsonSchema: shipping-rates-requestrequired- Pickup address for the shipment. You can either pass a free-form address or a predefined location. For forward shipments, you must pass a predefined pickup location. Carriyo will copy the contact and address fields from the specified location. To specify the location, you can use Carriyo's internal location ID (
partner_location_id), or your own location code (partner_location_code) as defined when you created the location in Carriyo. For reverse shipments, you can pass the customer's pickup address as a free-form pickup address. - Dropoff address for the shipment. You can either pass a free-form address or a predefined location. For forward shipments, you can pass the customer's dropoff address as a free-form address. For reverse shipments, you must pass a predefined dropoff location. Carriyo will copy the contact and address fields from the specified location. To specify the location, you can use Carriyo's internal location ID (
partner_location_id), or your own location code (partner_location_code) as defined when you created the location in Carriyo.
Responses
Need the full machine-readable spec? Download the OpenAPI document →
/checkout/delivery-optionsGet delivery options
Returns the delivery options that match the supplied cart or order details at checkout time.
Delivery options are configured per merchant in the Carriyo dashboard. Each option declares the carrier account that fulfils it, a shipping fee, an estimated delivery window, and a set of optional conditions. This endpoint evaluates the configured conditions against the order details you supply inline and returns the matching options, typically rendered to the shopper as the delivery choices on the checkout page.
Both DELIVERY and COLLECTION options can be returned. The shopper has not chosen between
them at this point, so customer represents where the customer is, not where the order is
being delivered. For DELIVERY options the customer's location is also the delivery
destination; for COLLECTION options it's used to find applicable collection points.
Supplying order details
Pass the order details inline in the request body. Only merchant is required; populate the
remaining fields based on which conditions the merchant has configured. This endpoint does
not look up existing orders; all order data must be provided directly in the request.
Restricting by delivery method
Pass delivery_methods to limit the response to only the methods you can render. For
example, send ["DELIVERY"] from a storefront that doesn't support pickup points, or
["COLLECTION"] from a click-and-collect locator screen. Omit the field to receive all
matching methods.
What gets evaluated
Each condition only applies when the merchant has configured it on a delivery option. The corresponding order field is read only if such a condition exists, so callers only need to populate the fields relevant to the rules in use.
| Condition (configured on the option) | Evaluated against |
|---|---|
| Working days / blackout days | order_date (defaults to now); timezone derived from
customer.country |
| Customer geography | customer.{country, state, city, area} |
| Order value range | payment.order_total |
| Weight range | Sum of line_items[].weight (converted to kg) |
| Payment type | Derived: CASH_ON_DELIVERY if payment.payment_on_delivery > 0,
otherwise PRE_PAID |
| Fulfillment location | fulfillment_locations[]. Pass one or more candidate
fulfillment locations. An option matches if at least one of the supplied locations is in the
option's allowlist (or the option has no allowlist). For a configured Carriyo location,
supply either partner_location_code (your own code, recommended for storefront
integrations) or partner_location_id (Carriyo's internal ID); free-form address fields
are also accepted |
Collection points for COLLECTION options
For each matching COLLECTION option, Carriyo also returns a list of eligible collection
points (configured Carriyo locations with the collection_location flag enabled) under
customer_collection_locations on the response item. Three pieces of input shape the
result:
customer.coords: when supplied (latitude/longitude), Carriyo computes the distance from the customer to each location and sorts the result nearest-first. Locations without coordinates are excluded from a distance-bound result. When customer coordinates aren't supplied, locations are returned in the merchant-configured order with no distance field.max_collection_distance(request): a client-supplied upper bound on the returned distance. Effective only when customer coordinates are supplied.customer_collection_max_distance(per-option, configured by the merchant): a hard upper bound the merchant authored for this option. Carriyo applies the smaller of this and the request'smax_collection_distancewhen filtering.
The result list is capped at max_collection_locations (defaults to 10 when omitted,
capped server-side at 50).
Response
An array of matching delivery options, each with its carrier account, computed shipping fee, and estimated arrival window. The array is empty if no configured option matches the supplied order.
Headers
| Name | Value | Required | Description |
|---|---|---|---|
| Authorization | Bearer YOUR-ACCESS-TOKEN | Yes | OAuth 2.0 bearer token obtained from `POST /oauth/token`. |
| x-api-key | YOUR-API-KEY | Yes | Your tenant's API key, issued in the Carriyo Dashboard. Required on every request except `POST /oauth/token`. |
| tenant-id | YOUR-TENANT-ID | Yes | Your Carriyo tenant ID, shown in the Carriyo Dashboard. Required on every request except `POST /oauth/token`. |
| Content-Type | application/json | Yes | Media type of the request body. |
Request body
application/jsonSchema: delivery-options-requestrequired- The items in the order. The total order weight used for weight range condition evaluation is the sum of
weight.valueacross line items, converted to kg. Quantity is not factored in. If a line ships multiple units, setweight.valueto the total weight contributed by that line, not the per-unit weight. - Candidate locations the order could be fulfilled from (origin/warehouse/store). Pass one or more, and Carriyo returns the options whose fulfillment-location allowlist contains at least one of these (options without an allowlist are unconstrained). Per option, the first matching location is used to drive origin-country-based estimated arrival and, for
PASS_THROUGHpricing, the carrier rate quote. Each entry may be a free-form address, or, for a configured Carriyo location, supplypartner_location_code(your own code, recommended) orpartner_location_id(Carriyo's internal ID), and the rest of the address is populated from the location record. - The customer's location. Drives customer-geography conditions and the timezone used for working-day / blackout-day evaluation. Strongly recommended for any non-trivial result. For
DELIVERYoptions this is also the implicit delivery destination. ForCOLLECTIONoptions it's used to find applicable collection points. The shopper has not chosen between the two at this stage; the field captures where the customer is, not where the order is being delivered. - Restrict the response to options of the listed methods. When omitted or empty, all methods are returned. Useful when the storefront has separate UI tabs for delivery and click-and-collect, or when the integration only supports one method (e.g., Shopify's standard Carrier Service API has no pickup-point concept, so the Shopify connector sets this to
["DELIVERY"]). - Client-supplied upper bound on the distance from the customer's location to a returned collection point. The effective cap used by Carriyo is the smaller of this value and any per-option
customer_collection_max_distanceconfigured by the merchant. When the customer's coordinates aren't supplied, this cap can't be enforced and is ignored.
Responses
- The fulfilment method for this option: -
DELIVERY: courier delivers to the customer's address. -COLLECTION: customer collects from a designated location. -DIGITAL: no physical fulfilment. Aligns withFulfillmentOrder.delivery_methodon the order model.Values:COLLECTIONDELIVERYDIGITAL - Eligible collection points for this option. Populated only when
delivery_methodisCOLLECTION. Sorted nearest-first when the customer's coordinates are supplied; otherwise returned in the merchant-configured order. May be empty if the option has no linked locations or none are within the effective distance cap.
Need the full machine-readable spec? Download the OpenAPI document →
Delivery Options
Manage the curated delivery options shown at customer checkout. Each option carries the carrier account that fulfils it, the customer-facing pricing and timing, and the eligibility conditions (geography, order value, weight, payment type) under which it appears.
These are the management endpoints: create, read, update, delete. For the runtime endpoint shoppers indirectly hit at checkout, see the Checkout tag above.
5 operations · 0 objects
/delivery-optionsCreate delivery option
Creates a customer-facing delivery option (e.g. 'Same Day', 'Next Day Premium') with its associated carrier, schedule, fee, and eligibility conditions.
Headers
| Name | Value | Required | Description |
|---|---|---|---|
| Authorization | Bearer YOUR-ACCESS-TOKEN | Yes | OAuth 2.0 bearer token obtained from `POST /oauth/token`. |
| x-api-key | YOUR-API-KEY | Yes | Your tenant's API key, issued in the Carriyo Dashboard. Required on every request except `POST /oauth/token`. |
| tenant-id | YOUR-TENANT-ID | Yes | Your Carriyo tenant ID, shown in the Carriyo Dashboard. Required on every request except `POST /oauth/token`. |
| Content-Type | application/json | Yes | Media type of the request body. |
Request body
application/jsonSchema: delivery-optionrequiredResponses
delivery-optionNeed the full machine-readable spec? Download the OpenAPI document →
/delivery-optionsList delivery options
Returns the merchant's delivery options.
Headers
| Name | Value | Required | Description |
|---|---|---|---|
| Authorization | Bearer YOUR-ACCESS-TOKEN | Yes | OAuth 2.0 bearer token obtained from `POST /oauth/token`. |
| x-api-key | YOUR-API-KEY | Yes | Your tenant's API key, issued in the Carriyo Dashboard. Required on every request except `POST /oauth/token`. |
| tenant-id | YOUR-TENANT-ID | Yes | Your Carriyo tenant ID, shown in the Carriyo Dashboard. Required on every request except `POST /oauth/token`. |
Responses
Need the full machine-readable spec? Download the OpenAPI document →
/delivery-options/{id}Get delivery option
Returns the specified delivery option.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | Delivery option ID. |
Headers
| Name | Value | Required | Description |
|---|---|---|---|
| Authorization | Bearer YOUR-ACCESS-TOKEN | Yes | OAuth 2.0 bearer token obtained from `POST /oauth/token`. |
| x-api-key | YOUR-API-KEY | Yes | Your tenant's API key, issued in the Carriyo Dashboard. Required on every request except `POST /oauth/token`. |
| tenant-id | YOUR-TENANT-ID | Yes | Your Carriyo tenant ID, shown in the Carriyo Dashboard. Required on every request except `POST /oauth/token`. |
Responses
delivery-optionNeed the full machine-readable spec? Download the OpenAPI document →
/delivery-options/{id}Update delivery option
Updates the specified delivery option.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | Delivery option ID. |
Headers
| Name | Value | Required | Description |
|---|---|---|---|
| Authorization | Bearer YOUR-ACCESS-TOKEN | Yes | OAuth 2.0 bearer token obtained from `POST /oauth/token`. |
| x-api-key | YOUR-API-KEY | Yes | Your tenant's API key, issued in the Carriyo Dashboard. Required on every request except `POST /oauth/token`. |
| tenant-id | YOUR-TENANT-ID | Yes | Your Carriyo tenant ID, shown in the Carriyo Dashboard. Required on every request except `POST /oauth/token`. |
| Content-Type | application/json | Yes | Media type of the request body. |
Request body
application/jsonSchema: delivery-optionrequiredResponses
delivery-optionNeed the full machine-readable spec? Download the OpenAPI document →
/delivery-options/{id}Delete delivery option
Permanently deletes the specified delivery option.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | Delivery option ID. |
Headers
| Name | Value | Required | Description |
|---|---|---|---|
| Authorization | Bearer YOUR-ACCESS-TOKEN | Yes | OAuth 2.0 bearer token obtained from `POST /oauth/token`. |
| x-api-key | YOUR-API-KEY | Yes | Your tenant's API key, issued in the Carriyo Dashboard. Required on every request except `POST /oauth/token`. |
| tenant-id | YOUR-TENANT-ID | Yes | Your Carriyo tenant ID, shown in the Carriyo Dashboard. Required on every request except `POST /oauth/token`. |
Responses
Need the full machine-readable spec? Download the OpenAPI document →