Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ItsJhonAlex/Ecommerce/llms.txt

Use this file to discover all available pages before exploring further.

Query the active shipping rate for a specific province and currency combination to display accurate delivery costs to customers before they complete checkout. This endpoint is public — no authentication is required. The lookup returns the first active rate that matches both the destination province and the requested currency.

Look up a shipping rate

Returns the active shipping rate for the given province and currency pair. If no active rate is configured for that combination, the endpoint returns 404 with a localized error message.
curl "https://api.avanzarintimeshop.com/api/v1/shipping-rates?province=La+Habana&currency=USD"

Query parameters

province
string
required
The destination province to look up (e.g., "La Habana", "Santiago de Cuba", "Matanzas"). Must be a non-empty string. The value must exactly match the province as stored in the shipping rates table — use the same province values accepted by the checkout endpoint’s recipient.province field.
currency
string
required
ISO 4217 currency code, exactly 3 characters (e.g., "USD", "CUP"). The shipping rate table supports different prices per currency for the same province, so a province may have a USD rate and a CUP rate independently.

Response

shippingRate
ShippingRate
required
The active shipping rate record for the requested province and currency.
amountMinor is in cents (the smallest currency unit). To display a human-readable price, divide by 100. For example, amountMinor: 500 = $5.00 USD, and amountMinor: 15000 = 150.00 CUP. This matches how monetary values are stored and calculated throughout the entire Avanzar In Time Shop API — order subtotals, line totals, and payment amounts all use the same minor-unit convention.
Example response — 200 OK
{
  "shippingRate": {
    "id": "rate-0001-0000-0000-0000-000000000001",
    "province": "La Habana",
    "currency": "USD",
    "amountMinor": 500,
    "active": true
  }
}
Error response — 404 Not Found Returned when no active shipping rate exists for the requested province and currency combination. This means the store does not currently deliver to that province in that currency.
{
  "error": "Sin tarifa para ese destino"
}
Before presenting checkout to the customer, call this endpoint with their selected province and the store’s active currency. If you receive a 404, disable the checkout button and display a “Delivery not available to this province” message. This avoids the SHIPPING_NOT_SUPPORTED error at order submission time.

Province and currency uniqueness

Each (province, currency) pair has at most one shipping rate in the database. The table enforces a unique constraint on this combination. Calling this endpoint with a valid pair will always return exactly one result or 404 — never multiple rates.

Build docs developers (and LLMs) love