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

# 2.- Consultar C.P.

> Este endpoint permite consultar la información asociada a un **código postal dentro de México**. La respuesta incluye las colonias relacionadas, así como la ciudad y el estado correspondientes al código postal consultado, además de un identificador único de la transacción.

Esta información es utilizada para validar direcciones, autocompletar formularios y asegurar que los datos de envío correspondan a ubicaciones válidas dentro del territorio mexicano.



## OpenAPI

````yaml /openapi.json get /v1/zip-code-details/06010
openapi: 3.0.0
info:
  title: SHEEPING.IO - MODULO API
  version: 1.0.0
  description: >-
    Nuestro **Módulo API** está basado en el protocolo **REST**.


    Todas las respuestas de las peticiones se entregan en formato **JSON**


    (y, en casos específicos, **HTML**).


    A través de los distintos **endpoints**, podrás consultar y gestionar
    información relacionada con **envíos**, usuarios y procesos asociados a la
    plataforma.


    Este módulo cuenta con **dos entornos disponibles**:


    - **Sandbox (Pruebas)**
        
    - **Producción**
        

    Para acceder a cada entorno es necesario contar con el **token de
    autenticación correspondiente**.


    ### Colección Postman


    El **Módulo Usuarios** proporciona una **colección en formato JSON
    compatible con Postman**, la cual incluye:


    - Ejemplos de solicitudes
        
    - Ejemplos de respuestas
        
    - Headers preconfigurados
        

    Se recomienda abrir este archivo directamente en **Postman** para facilitar
    la visualización, ejecución de pruebas y validación de cada endpoint de
    forma rápida y estructurada.


    ---


    ## URL Base y Versionado


    Todos los endpoints de la API están disponibles bajo la siguiente **URL
    base**:


    ```

    https://apirest.sheeping.io/v1

     ```

    ### Versionado


    El **Módulo API** utiliza **versionado por URL**.


    En caso de futuras versiones (`/v2`, `/v3`, etc.), estas serán liberadas sin
    afectar las integraciones existentes.


    > Nota: Cualquier cambio relevante será notificado oportunamente para evitar
    interrupciones en los servicios ya integrados. 
      

    ---


    ## Autenticación


    El **Módulo API** autenticación mediante **Bearer Token**.


    Cada solicitud HTTP debe incluir el token en el encabezado (`Header`) de la
    petición.


    ### Headers requeridos


    ```

    Authorization: Bearer <TOKEN>

    Content-Type: application/json

     ```

    - El token identifica el ambiente y los permisos del cliente.
        
    - Sin un token válido, la API responderá con un **error de autenticación
    (401 Unauthorized)**.
        

    ---


    ## Ambientes disponibles


    El **Módulo Usuarios** proporciona **dos tokens de acceso**, uno por cada
    ambiente disponible.


    ### Sandbox (Pruebas)


    - Diseñado para **desarrollo y pruebas**
        
    - No genera envíos reales
        
    - No afecta datos de producción
        
    - Simula el comportamiento del entorno productivo
        

    ### Producción


    - Ambiente real y operativo
        
    - Genera **envíos y guías válidas**
        
    - Debe utilizarse **únicamente** después de validar la integración en
    Sandbox
        

    **Importante:**


    Es responsabilidad del usuario alternar correctamente entre los tokens de
    **Sandbox** y **Producción**, según el entorno en el que se encuentre
    trabajando.


    ---
servers:
  - url: https://apirest.sheeping.io
security: []
paths:
  /v1/zip-code-details/06010:
    get:
      summary: 2.- Consultar C.P.
      description: >-
        Este endpoint permite consultar la información asociada a un **código
        postal dentro de México**. La respuesta incluye las colonias
        relacionadas, así como la ciudad y el estado correspondientes al código
        postal consultado, además de un identificador único de la transacción.


        Esta información es utilizada para validar direcciones, autocompletar
        formularios y asegurar que los datos de envío correspondan a ubicaciones
        válidas dentro del territorio mexicano.
      parameters:
        - name: Authorization
          in: header
          schema:
            type: string
          example: Bearer <TOKEN>
      responses:
        '200':
          description: 200 OK
          headers:
            Date:
              schema:
                type: string
              example: Mon, 05 Jan 2026 06:37:30 GMT
            Transfer-Encoding:
              schema:
                type: string
              example: chunked
            Connection:
              schema:
                type: string
              example: keep-alive
            Server:
              schema:
                type: string
              example: cloudflare
            Nel:
              schema:
                type: string
              example: '{"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}'
            Vary:
              schema:
                type: string
              example: Accept, Accept-Language, Origin
            Allow:
              schema:
                type: string
              example: GET, HEAD, OPTIONS
            Content-Language:
              schema:
                type: string
              example: es-mx
            X-Frame-Options:
              schema:
                type: string
              example: DENY
            X-Content-Type-Options:
              schema:
                type: string
              example: nosniff
            Referrer-Policy:
              schema:
                type: string
              example: same-origin
            Cross-Origin-Opener-Policy:
              schema:
                type: string
              example: same-origin
            cf-cache-status:
              schema:
                type: string
              example: DYNAMIC
            Report-To:
              schema:
                type: string
              example: >-
                {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=4ZABCmhhaDIJbJWSqehNYcPuaJ2zKVcmegn7LKGb6UHJpwfqmfwAK6pCEzpUcaa6eHnQr4vgxwcewXFCCHjoYS%2Fmxxu3ysi7sXA0MQloYKXFC6fzM%2BISF1z8yVZb%2Bak%3D"}]}
            Content-Encoding:
              schema:
                type: string
              example: br
            CF-RAY:
              schema:
                type: string
              example: 9b90f7a45bdd21b6-GDL
            alt-svc:
              schema:
                type: string
              example: h3=":443"; ma=86400
          content:
            application/json:
              schema:
                type: object
                properties:
                  zip_code:
                    type: string
                    format: utc-millisec
                  neighborhoods:
                    type: array
                    items:
                      type: string
                  city:
                    type: string
                  state:
                    type: string
                  transaction_id:
                    type: string
              example:
                zip_code: '06010'
                neighborhoods:
                  - 'Centro  area 2 '
                city: Cuauhtemoc
                state: Ciudad de Mexico
                transaction_id: edcd3d0c-f08a-4bfa-b9fd-cf67d09e6d12
        '400':
          description: 400 Bad Request
          headers:
            Date:
              schema:
                type: string
              example: Tue, 06 Jan 2026 00:34:21 GMT
            Content-Length:
              schema:
                type: integer
              example: 212
            Connection:
              schema:
                type: string
              example: keep-alive
            Server:
              schema:
                type: string
              example: cloudflare
            Nel:
              schema:
                type: string
              example: '{"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}'
            Vary:
              schema:
                type: string
              example: Accept, Accept-Language, Origin
            Allow:
              schema:
                type: string
              example: GET, HEAD, OPTIONS
            Content-Language:
              schema:
                type: string
              example: es-mx
            X-Frame-Options:
              schema:
                type: string
              example: DENY
            X-Content-Type-Options:
              schema:
                type: string
              example: nosniff
            Referrer-Policy:
              schema:
                type: string
              example: same-origin
            Cross-Origin-Opener-Policy:
              schema:
                type: string
              example: same-origin
            cf-cache-status:
              schema:
                type: string
              example: DYNAMIC
            Report-To:
              schema:
                type: string
              example: >-
                {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=oDzCbO2a7bb5SSe4Xui72Jq0GC%2BrPa19lOEKStD64XjRZhF1nIWfQdanT0j2kUzKs6g89tTX4UOzbSQ7zv4Z7TDNiLamIygfLbtVD8ncDzJHDXxTbxXciv4yLRN1uS8%3D"}]}
            CF-RAY:
              schema:
                type: string
              example: 9b972112d86821b2-GDL
            alt-svc:
              schema:
                type: string
              example: h3=":443"; ma=86400
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details:
                        type: object
                        properties:
                          zip_code:
                            type: array
                            items:
                              type: string
                  transaction_id:
                    type: string
              example:
                error:
                  code: INVALID_ZIP_CODE
                  message: El código postal es incorrecto.
                  details:
                    zip_code:
                      - El código postal proporcionado no es válido.
                transaction_id: ed5f0ec7-2fe6-444e-b050-259bac2ccd91
        '401':
          description: 401 Unauthorized
          headers:
            Date:
              schema:
                type: string
              example: Mon, 05 Jan 2026 06:38:27 GMT
            Transfer-Encoding:
              schema:
                type: string
              example: chunked
            Connection:
              schema:
                type: string
              example: keep-alive
            Server:
              schema:
                type: string
              example: cloudflare
            Nel:
              schema:
                type: string
              example: '{"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}'
            Vary:
              schema:
                type: string
              example: Origin
            X-Content-Type-Options:
              schema:
                type: string
              example: nosniff
            Referrer-Policy:
              schema:
                type: string
              example: same-origin
            Cross-Origin-Opener-Policy:
              schema:
                type: string
              example: same-origin
            cf-cache-status:
              schema:
                type: string
              example: DYNAMIC
            Report-To:
              schema:
                type: string
              example: >-
                {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=dRBpQ7eFEK2wMpvp9GV9ABF8mIr%2BTY0wWlixqsCsm5ccOvvUWwR2Yw%2FcfwkLVO%2BVt5WQg5%2BwV%2BqQin9g%2FvE%2BHZxeNoJjaQ47PZem1u0rXk7l350gfrL6rawOpyv9RsY%3D"}]}
            CF-RAY:
              schema:
                type: string
              example: 9b90f90aac2d21b6-GDL
            alt-svc:
              schema:
                type: string
              example: h3=":443"; ma=86400
        '403':
          description: 403 Forbidden
          headers:
            Date:
              schema:
                type: string
              example: Mon, 05 Jan 2026 06:53:52 GMT
            Transfer-Encoding:
              schema:
                type: string
              example: chunked
            Connection:
              schema:
                type: string
              example: keep-alive
            Server:
              schema:
                type: string
              example: cloudflare
            Nel:
              schema:
                type: string
              example: '{"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}'
            Vary:
              schema:
                type: string
              example: Accept, Accept-Language, Origin
            Allow:
              schema:
                type: string
              example: GET, HEAD, OPTIONS
            Content-Language:
              schema:
                type: string
              example: es-mx
            X-Frame-Options:
              schema:
                type: string
              example: DENY
            X-Content-Type-Options:
              schema:
                type: string
              example: nosniff
            Referrer-Policy:
              schema:
                type: string
              example: same-origin
            Cross-Origin-Opener-Policy:
              schema:
                type: string
              example: same-origin
            cf-cache-status:
              schema:
                type: string
              example: DYNAMIC
            Report-To:
              schema:
                type: string
              example: >-
                {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=MsSOiElBXdy7egeMjf5EHJJ3vVtuNtAFQJy8bXY7AuafZga5R4wSidRB0SGG8hq6DBr3vIS%2FvEl14nwa0nlDtpxvOb5FQJkVfaemyFOgRmdbxSapopwhLroYefpi8Ko%3D"}]}
            Content-Encoding:
              schema:
                type: string
              example: br
            CF-RAY:
              schema:
                type: string
              example: 9b910f9e8aaa219e-GDL
            alt-svc:
              schema:
                type: string
              example: h3=":443"; ma=86400
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details:
                        nullable: true
                  transaction_id:
                    type: string
              example:
                error:
                  code: USER_INACTIVE_ERROR
                  message: >-
                    Lo sentimos no puedes realizar esta acción debido a que tu
                    cuenta no esta activa, favor de contactar a tu asesor.
                  details: null
                transaction_id: 2aefad11-a0f6-4c7d-9601-fdc03309faaf
        '405':
          description: 405 Method Not Allowed
          headers:
            Date:
              schema:
                type: string
              example: Mon, 05 Jan 2026 06:39:08 GMT
            Content-Length:
              schema:
                type: integer
              example: 61
            Connection:
              schema:
                type: string
              example: keep-alive
            Server:
              schema:
                type: string
              example: cloudflare
            Nel:
              schema:
                type: string
              example: '{"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}'
            Vary:
              schema:
                type: string
              example: Accept, Accept-Language, Origin
            Allow:
              schema:
                type: string
              example: GET, HEAD, OPTIONS
            Content-Language:
              schema:
                type: string
              example: es-mx
            X-Frame-Options:
              schema:
                type: string
              example: DENY
            X-Content-Type-Options:
              schema:
                type: string
              example: nosniff
            Referrer-Policy:
              schema:
                type: string
              example: same-origin
            Cross-Origin-Opener-Policy:
              schema:
                type: string
              example: same-origin
            cf-cache-status:
              schema:
                type: string
              example: DYNAMIC
            Report-To:
              schema:
                type: string
              example: >-
                {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=I4j1kPsCKLZDVklcgrUsqrefv2Gpm3gGEY47AMMK83c7sZ%2BLLpfCYCQtwEFdEYGhURHwk4W6BPdD17RGoj7nR8g4lJDnfV2UM6f3nG0lGfhMM75rf9FzAGsqT9eJmq8%3D"}]}
            CF-RAY:
              schema:
                type: string
              example: 9b90fa0cd92321b6-GDL
            alt-svc:
              schema:
                type: string
              example: h3=":443"; ma=86400
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                  status_code:
                    type: integer
              example:
                detail: Método "POST" no permitido.
                status_code: 405
        '406':
          description: 406 Not Acceptable
          headers:
            Date:
              schema:
                type: string
              example: Tue, 06 Jan 2026 00:34:58 GMT
            Content-Length:
              schema:
                type: integer
              example: 228
            Connection:
              schema:
                type: string
              example: keep-alive
            Server:
              schema:
                type: string
              example: cloudflare
            Nel:
              schema:
                type: string
              example: '{"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}'
            Vary:
              schema:
                type: string
              example: Accept, Accept-Language, Origin
            Allow:
              schema:
                type: string
              example: GET, HEAD, OPTIONS
            Content-Language:
              schema:
                type: string
              example: es-mx
            X-Frame-Options:
              schema:
                type: string
              example: DENY
            X-Content-Type-Options:
              schema:
                type: string
              example: nosniff
            Referrer-Policy:
              schema:
                type: string
              example: same-origin
            Cross-Origin-Opener-Policy:
              schema:
                type: string
              example: same-origin
            cf-cache-status:
              schema:
                type: string
              example: DYNAMIC
            Report-To:
              schema:
                type: string
              example: >-
                {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=5wNp833rxG7t4oYqrtaBZ%2BAZ%2BohCFqSzrvgNCXEvbO6IZY2v8yiXIe7Jtp%2FPz2wcdQRWcpkq0UulWuyJiYMIzMuwqzMH3nxRhehooYGjMLJyKn5bCk1IzMx3aa4kZmE%3D"}]}
            CF-RAY:
              schema:
                type: string
              example: 9b9721f7687821b2-GDL
            alt-svc:
              schema:
                type: string
              example: h3=":443"; ma=86400
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details:
                        type: object
                        properties:
                          zip_code:
                            type: array
                            items:
                              type: string
                  transaction_id:
                    type: string
              example:
                error:
                  code: REQUEST_ERROR_406
                  message: Datos de la solicitud incompletos.
                  details:
                    zip_code:
                      - >-
                        Asegúrese de que este campo no tenga más de 5
                        caracteres.
                transaction_id: 4616f149-1c0c-403e-8a2a-9000e9a9f660
        '500':
          description: 500 Internal Server Error
          headers:
            Date:
              schema:
                type: string
              example: Tue, 06 Jan 2026 00:34:58 GMT
            Content-Length:
              schema:
                type: integer
              example: 228
            Connection:
              schema:
                type: string
              example: keep-alive
            Server:
              schema:
                type: string
              example: cloudflare
            Nel:
              schema:
                type: string
              example: '{"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}'
            Vary:
              schema:
                type: string
              example: Accept, Accept-Language, Origin
            Allow:
              schema:
                type: string
              example: GET, HEAD, OPTIONS
            Content-Language:
              schema:
                type: string
              example: es-mx
            X-Frame-Options:
              schema:
                type: string
              example: DENY
            X-Content-Type-Options:
              schema:
                type: string
              example: nosniff
            Referrer-Policy:
              schema:
                type: string
              example: same-origin
            Cross-Origin-Opener-Policy:
              schema:
                type: string
              example: same-origin
            cf-cache-status:
              schema:
                type: string
              example: DYNAMIC
            Report-To:
              schema:
                type: string
              example: >-
                {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=5wNp833rxG7t4oYqrtaBZ%2BAZ%2BohCFqSzrvgNCXEvbO6IZY2v8yiXIe7Jtp%2FPz2wcdQRWcpkq0UulWuyJiYMIzMuwqzMH3nxRhehooYGjMLJyKn5bCk1IzMx3aa4kZmE%3D"}]}
            CF-RAY:
              schema:
                type: string
              example: 9b9721f7687821b2-GDL
            alt-svc:
              schema:
                type: string
              example: h3=":443"; ma=86400
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details:
                        nullable: true
                  transaction_id:
                    type: string
              example:
                error:
                  code: INTERNAL_SERVER_ERROR
                  message: >-
                    Lo sentimos hubo un error inesperado, favor de intentar mas
                    tarde.
                  details: null
                transaction_id: 9f091a8a-a214-4c23-8b89-560670c64714

````

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