> ## 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.

# List pickup locations near a postal code (public)

> Public, unauthenticated listing of pickup locations (carrier branches and Cubbo points)
near a postal code, used by the buyer tracking page to offer pickup. Each location comes
as a "rate" with a Spanish display name ready to show to the buyer and a `service_code`
that identifies the point.

- Without `order_id` the response contains only `rates`, for Mexico.
- With `order_id` (the encoded order identifier found in the order's Cubbo tracking
  link) the list is filtered to the points the order could actually be converted to,
  and `cnc_eligible` reports the outcome. When the order is not eligible, the unfiltered
  list is still returned together with `cnc_eligible: false` and a `code`; when
  `order_id` cannot be resolved the code is `CNC_INVALID_ORDER_ID`. The order's
  destination country drives the carrier search.
- `address` enables the carriers that need a street address; without it those carriers
  are skipped.
- A postal code that cannot be used answers 200 with an empty `rates` array. If any
  carrier lookup fails, the other carriers' locations are still returned.
- Omitting `postal_code` is not handled gracefully and results in HTTP 500.




## OpenAPI

````yaml /openapi.yaml get /carrier-services/pickup-locations
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:
  /carrier-services/pickup-locations:
    get:
      tags:
        - Click and collect
      summary: List pickup locations near a postal code (public)
      description: >
        Public, unauthenticated listing of pickup locations (carrier branches
        and Cubbo points)

        near a postal code, used by the buyer tracking page to offer pickup.
        Each location comes

        as a "rate" with a Spanish display name ready to show to the buyer and a
        `service_code`

        that identifies the point.


        - Without `order_id` the response contains only `rates`, for Mexico.

        - With `order_id` (the encoded order identifier found in the order's
        Cubbo tracking
          link) the list is filtered to the points the order could actually be converted to,
          and `cnc_eligible` reports the outcome. When the order is not eligible, the unfiltered
          list is still returned together with `cnc_eligible: false` and a `code`; when
          `order_id` cannot be resolved the code is `CNC_INVALID_ORDER_ID`. The order's
          destination country drives the carrier search.
        - `address` enables the carriers that need a street address; without it
        those carriers
          are skipped.
        - A postal code that cannot be used answers 200 with an empty `rates`
        array. If any
          carrier lookup fails, the other carriers' locations are still returned.
        - Omitting `postal_code` is not handled gracefully and results in HTTP
        500.
      operationId: listPickupLocations
      parameters:
        - name: postal_code
          in: query
          required: true
          description: >-
            Postal code to search around. When `order_id` is given and the
            order's zip code is known, that zip code is used instead.
          schema:
            type: string
            example: '06600'
        - name: address
          in: query
          required: false
          description: Street address, used by carriers that search by address
          schema:
            type: string
            example: Av. Insurgentes 100
        - name: order_id
          in: query
          required: false
          description: >-
            Encoded order identifier from the order's Cubbo tracking link.
            Enables eligibility filtering for that order.
          schema:
            type: string
            example: <encoded-order-id>
      responses:
        '200':
          description: >-
            Pickup locations, optionally with the order's click-and-collect
            eligibility
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PickupLocationsResponse'
              examples:
                withoutOrder:
                  value:
                    rates:
                      - service_name: >-
                          Recolecta en punto físico a 1.5km - Estafeta
                          Insurgentes - Lun a Vie: 10:00-18:00, Sáb:
                          10:00-14:00, Dom: cerrado
                        service_code: CUBBOCNCESTEST001
                        source: Av. Insurgentes 100, CDMX
                        description: Av. Insurgentes 100, CDMX
                      - service_name: Recolecta en punto físico a 0.8km - Punto Cubbo Centro
                        service_code: CUBBOCNCCUBBOCUBBO001
                        source: Calle Centro 300, CDMX, 06000
                        description: Calle Centro 300, CDMX, 06000
                eligibleOrder:
                  value:
                    rates:
                      - service_name: Recolecta en punto físico a 0.8km - Punto Cubbo Centro
                        service_code: CUBBOCNCCUBBOCUBBO001
                        source: Calle Centro 300, CDMX, 06000
                        description: Calle Centro 300, CDMX, 06000
                    cnc_eligible: true
                ineligibleOrder:
                  value:
                    rates: []
                    cnc_eligible: false
                    code: CNC_INVALID_ORDER_STATUS
                invalidOrderId:
                  value:
                    rates: []
                    cnc_eligible: false
                    code: CNC_INVALID_ORDER_ID
        '500':
          description: Unexpected error, including a missing `postal_code`
      security: []
components:
  schemas:
    PickupLocationsResponse:
      type: object
      required:
        - rates
      properties:
        rates:
          type: array
          description: Pickup locations found
          items:
            $ref: '#/components/schemas/PickupLocation'
        cnc_eligible:
          type: boolean
          description: >-
            Present only when `order_id` was sent; whether that order can be
            converted to click and collect
          example: true
        code:
          type: string
          description: >-
            Present only when `cnc_eligible` is false; why the order is not
            eligible, or `CNC_INVALID_ORDER_ID` when `order_id` could not be
            resolved
          enum:
            - CNC_INVALID_ORDER_ID
            - CNC_INVALID_ORDER_STATUS
            - CNC_MISSING_POSTAL_CODE
            - CNC_ORIGINAL_NOT_CUBBO_BILLED
            - CNC_ORIGINAL_NOT_NATIONAL_SHIPPING
            - CNC_RATE_CARD_UNAVAILABLE
          example: CNC_INVALID_ORDER_STATUS
    PickupLocation:
      type: object
      description: A pickup location as shown on the buyer tracking page
      required:
        - service_name
        - service_code
        - source
        - description
      properties:
        service_name:
          type: string
          description: >-
            Spanish display label with distance, point name and (for some
            carriers) opening hours
          example: >-
            Recolecta en punto físico a 1.5km - Estafeta Insurgentes - Lun a
            Vie: 10:00-18:00, Sáb: 10:00-14:00, Dom: cerrado
        service_code:
          type: string
          description: Identifier of the point (`CUBBOCNC` + carrier code + location id)
          example: CUBBOCNCESTEST001
        source:
          type: string
          description: Point address
          example: Av. Insurgentes 100, CDMX
        description:
          type: string
          description: Point address (same as `source`)
          example: Av. Insurgentes 100, CDMX
  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.