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

# Fetch a port

> Preview: Fetches one port by its id.



## OpenAPI

````yaml /openapi.json get /v1/ports/{id}
openapi: 3.1.0
info:
  title: OVRSEA API
  version: 1.3.2
servers:
  - url: https://api.cf.ovrsea.com
security: []
paths:
  /v1/ports/{id}:
    get:
      tags:
        - Ports
      summary: Fetch a port
      description: 'Preview: Fetches one port by its id.'
      parameters:
        - schema:
            pattern: ^[0-9]{1,18}$
            type: string
          in: path
          name: id
          required: true
          description: 'Preview: Numeric public id returned by the ports collection.'
      responses:
        '200':
          description: 'Preview: The port.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PortPreview'
        '400':
          description: 'Preview: The port id is malformed. The code is `invalid_request`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: >-
            Preview: The port is absent or not visible to the caller. The code
            is `port_not_found`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
components:
  schemas:
    PortPreview:
      modelName: PortPreview
      type: object
      description: 'Preview: Port returned by the ports collection.'
      properties:
        id:
          description: 'Preview: Public id of the port.'
          type: string
        name:
          description: 'Preview: Name of the port.'
          example: Le Havre
          type: string
        freight_mode:
          description: 'Preview: Freight mode handled by the port.'
          enum:
            - air
            - ocean
            - rail
          type: string
        unlocode:
          description: >-
            Preview: Canonical code. The ports collection accepts this value
            with or without its separator.
          example: FR/LEH
          type: string
        city:
          description: 'Preview: City of the port.'
          example: Le Havre
          type: string
        country:
          description: 'Preview: ISO 3166-1 alpha-2 country code.'
          example: FR
          type: string
    ApiError:
      modelName: ApiError
      type: object
      description: 'Preview: Error returned by a preview route.'
      properties:
        code:
          description: 'Preview: Stable code describing what went wrong.'
          type: string
        field:
          description: >-
            Preview: Request input that needs correction. For a query or path
            parameter, this is the parameter name. For one body input, this is
            its root-relative dot-separated path, with array indexes in
            brackets, such as `cargo.loads[0].count`. For a refusal concerning
            several inputs on one body object, this is that object's path. For a
            refusal concerning the request as a whole, this field is omitted.
          type: string
        message:
          description: 'Preview: One-sentence explanation and next step.'
          type: string
        retry_after_seconds:
          description: >-
            Preview: Number of seconds to wait before retrying, when the
            response is rate limited.
          type: integer
      required:
        - code
        - message

````

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