> ## Documentation Index
> Fetch the complete documentation index at: https://developers.cubbo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Check which shipping method a shipping configuration would select for a postcode

> Simulates routing an order to the given postcode through one of the store's shipping
configurations (shipping groups, matched by name, case-insensitive) and returns the
shipping method that would be selected. Use it to validate coverage before creating
orders. When no shipping method in the configuration covers the destination, the
response is still HTTP 200 with `id: null` and a message.

- `country` accepts an English country name or an ISO 3166-1 two-letter code. Colombia
  is not supported by this endpoint.
- `shipping_scope` must be `international` when the destination country differs from
  the warehouse country.
- `is_cod` in the response names a dedicated cash-on-delivery shipping method; it does
  not indicate whether cash on delivery can be offered at checkout.




## OpenAPI

````yaml /openapi.yaml get /shipping-methods/configuration-coverage
openapi: 3.1.0
info:
  title: Cubbo Clients API
  version: '1.0'
  summary: >-
    Orders, inventory, replenishments, returns, shipping and webhooks for Cubbo
    fulfillment.
  description: >
    The Cubbo Clients API connects your store, ERP or marketplace with Cubbo's
    fulfillment network.

    All endpoints except `POST /auth/token` require a bearer token; see the
    Authentication guide.

    Request and response bodies are JSON. Errors are JSON objects with an
    `error` key.
  contact:
    name: Cubbo integrations
    email: integraciones@cubbo.com
servers:
  - url: https://api.cubbo.com/v1
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Authentication
    description: Exchange client credentials for a bearer token.
  - name: Orders
    description: Create, update, hold, cancel and read sales orders.
  - name: Shipping labels
    description: Read the shipping labels generated for an order.
  - name: Inventory
    description: Products and stock per store.
  - name: Lots
    description: Lot-level inventory for products with expiration or batch tracking.
  - name: Reports
    description: Bulk reports for reconciliation.
  - name: Replenishments
    description: Inbound shipments to the warehouse.
  - name: Returns
    description: Returns and exchanges.
  - name: Stores
    description: Store provisioning and settings.
  - name: Shipping methods
    description: Available shipping methods, coverage and quotes.
  - name: Click and collect
    description: Pickup points and in-store pickup orders.
paths:
  /shipping-methods/configuration-coverage:
    get:
      tags:
        - Shipping methods
      summary: >-
        Check which shipping method a shipping configuration would select for a
        postcode
      description: >
        Simulates routing an order to the given postcode through one of the
        store's shipping

        configurations (shipping groups, matched by name, case-insensitive) and
        returns the

        shipping method that would be selected. Use it to validate coverage
        before creating

        orders. When no shipping method in the configuration covers the
        destination, the

        response is still HTTP 200 with `id: null` and a message.


        - `country` accepts an English country name or an ISO 3166-1 two-letter
        code. Colombia
          is not supported by this endpoint.
        - `shipping_scope` must be `international` when the destination country
        differs from
          the warehouse country.
        - `is_cod` in the response names a dedicated cash-on-delivery shipping
        method; it does
          not indicate whether cash on delivery can be offered at checkout.
      operationId: getShippingConfigurationCoverage
      parameters:
        - name: store_id
          in: query
          required: true
          description: Id of the store. Your credential must have access to it.
          schema:
            type: integer
            example: 1234
        - name: shipping_configuration_name
          in: query
          required: true
          description: >-
            Name of one of the store's shipping configurations (shipping
            groups); matched case-insensitively
          schema:
            type: string
            example: Economy
        - name: shipping_scope
          in: query
          required: true
          description: Scope of the shipment to simulate
          schema:
            type: string
            enum:
              - national
              - international
              - pickup
            example: national
        - name: postcode
          in: query
          required: true
          description: Destination postcode
          schema:
            type: string
            example: '06600'
        - name: country
          in: query
          required: true
          description: Destination country, as an English name or ISO 3166-1 alpha-2 code
          schema:
            type: string
            example: MX
        - name: for_cod
          in: query
          required: false
          description: Simulate a cash-on-delivery order
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: >-
            The selected shipping method, or `id: null` with a message when none
            covers the destination
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShippingCoverage'
              examples:
                covered:
                  value:
                    id: 12
                    carrier_name: ESTAFETA
                    shipping_type: national
                    delivery_type: Ground
                    country: MX
                    is_cod: false
                notCovered:
                  value:
                    id: null
                    message: no compatible shipping method found.
        '401':
          description: Missing or invalid token, or no access to the store
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
              examples:
                invalidToken:
                  value:
                    error: Unauthorized
                    message: invalid token
                noStoreAccess:
                  value:
                    error: Unauthorized
                    message: not allowed to show? this Store
        '422':
          description: Validation or business error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                missingParam:
                  value:
                    error: Parameter shipping_configuration_name is required
                invalidScope:
                  value:
                    error: >-
                      Parameter shipping_scope must be within ["international",
                      "national", "pickup"]
                storeNotFound:
                  value:
                    error: store_id 1234 not found
                unknownCountry:
                  value:
                    error: >-
                      Unrecognized country 'Narnia'. Try in english or using ISO
                      3166-1 two-letter code.
                colombiaUnsupported:
                  value:
                    error: This service is unavailable for country CO.
                configurationNotFound:
                  value:
                    error: shipping configuration not found with name 'Economy'
                scopeMismatch:
                  value:
                    error: shipping_scope 'national' selected for intenational order.
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - bearerAuth: []
components:
  schemas:
    ShippingCoverage:
      description: >-
        Result of a coverage check. Either the selected shipping method, or `id:
        null` with a message when nothing covers the destination.
      oneOf:
        - $ref: '#/components/schemas/ShippingMethod'
        - type: object
          required:
            - id
            - message
          properties:
            id:
              type: 'null'
              description: Always null when no method covers the destination
              example: null
            message:
              type: string
              description: Explanation
              example: no compatible shipping method found.
    UnauthorizedError:
      type: object
      description: Body of every 401 response
      properties:
        error:
          type: string
          description: Always `Unauthorized`
          example: Unauthorized
        message:
          type: string
          description: Why the request was refused
          example: invalid token
      required:
        - error
        - message
    Error:
      type: object
      description: Error body returned by every failed request.
      required:
        - error
      properties:
        error:
          type: string
          description: >-
            Human-readable description of the failure. For `401` responses it is
            always `Unauthorized`.
          example: Parameter store_id is required
        message:
          type: string
          description: >-
            Present on `401` responses only; the reason the request was
            rejected.
          example: invalid token
        code:
          type:
            - string
            - 'null'
          description: >-
            Stable machine-readable code, present on some order, return and
            replenishment errors.
          example: ORDER_ALREADY_EXISTS
        context:
          type:
            - object
            - 'null'
          description: >-
            Extra data about the failure when available, for example the id of
            the conflicting order.
          additionalProperties: true
          example:
            order_id: 987654
    ShippingMethod:
      type: object
      description: A shipping method as exposed to API clients
      required:
        - id
        - carrier_name
        - shipping_type
        - delivery_type
        - country
        - is_cod
      properties:
        id:
          type: integer
          description: Shipping method id
          example: 12
        carrier_name:
          type: string
          description: Customer-facing carrier name
          example: ESTAFETA
        shipping_type:
          type: string
          description: Scope of the method
          enum:
            - national
            - international
            - pickup
          example: national
        delivery_type:
          type: string
          description: Delivery service level
          enum:
            - SameDay
            - NextDay
            - Ground
            - Pickup
            - International
          example: Ground
        country:
          type: string
          description: ISO 3166-1 alpha-2 country of the method
          example: MX
        is_cod:
          type: boolean
          description: Whether this is a dedicated cash-on-delivery method
          example: false
  responses:
    InternalServerError:
      description: >-
        Unexpected error. Retry with backoff; if it persists, send the timestamp
        to Cubbo support.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: 'unexpected error, timestamp: 1760000000'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Token returned by `POST /auth/token`, sent as `Authorization: Bearer
        <token>`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.