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

# Fetch a shipment's tracking.

> Fetch a shipment's tracking with its OneChain shipment id.



## OpenAPI

````yaml openapi.json get /v1/tracking/{onechain_shipment_id}
openapi: 3.1.0
info:
  title: OneChain API
  version: 1.3.2
  x-logo:
    href: https://www.onechain-tms.com
    url: static/logo.png
servers:
  - url: localhost:8080
security: []
tags:
  - description: |-
      This API lets you fetch your data from ONECHAIN's servers.

      URL: https://api.onechain-tms.com
    name: Introduction
    x-displayName: Introduction
  - description: >-
      To safely access the resources exposed by our API, you will need to
      provide an authenticated token in your requests headers. Please reach out
      to your ONECHAIN’s Account Manager to get your token. 

        | Name of the header | Type of authentication |
        |--------------------|------------------------|
        | Authorization      | API AUTHORIZATION KEY  |

        Please note that the API authorization key must be prefixed with "Bearer "

        For example:

        `Authorization: Bearer 1234567890`
        
        
    name: Authentication
    x-displayName: Authentication
  - description: |-
      All endpoints fetching multiple items are paginated.

        Use `skip` to skip to the items you want to retrieve.

        Use `take` to define how many items you want to retrieve.

        `skip` and `take` are optional parameters.

        If you do not input them, `skip` equals to 0 and `take` equals to 10.

        Example:

        `/v1/shipments?skip=20&take=10`
        
    name: Pagination
    x-displayName: Pagination
  - name: Shipments
  - name: Purchase Orders
  - name: Documents
  - name: Locations
  - name: Invoices
  - name: Users
  - name: Reporting
  - description: <SchemaDefinition schemaRef="#/components/schemas/Shipment" />
    name: ShipmentObject
    x-displayName: ShipmentObject
  - description: <SchemaDefinition schemaRef="#/components/schemas/Tracking" />
    name: TrackingObject
    x-displayName: TrackingObject
  - description: <SchemaDefinition schemaRef="#/components/schemas/OrderPreparation" />
    name: OrderPreparationObject
    x-displayName: OrderPreparationObject
  - description: <SchemaDefinition schemaRef="#/components/schemas/PurchaseOrder" />
    name: PurchaseOrderObject
    x-displayName: PurchaseOrderObject
  - description: <SchemaDefinition schemaRef="#/components/schemas/TrackingEvent" />
    name: TrackingEventObject
    x-displayName: TrackingEventObject
  - description: <SchemaDefinition schemaRef="#/components/schemas/TrackingDate" />
    name: TrackingDateObject
    x-displayName: TrackingDateObject
  - description: <SchemaDefinition schemaRef="#/components/schemas/TrackingStep" />
    name: TrackingStepObject
    x-displayName: TrackingStepObject
  - description: <SchemaDefinition schemaRef="#/components/schemas/Product" />
    name: ProductObject
    x-displayName: ProductObject
  - description: <SchemaDefinition schemaRef="#/components/schemas/Port" />
    name: PortObject
    x-displayName: PortObject
  - description: <SchemaDefinition schemaRef="#/components/schemas/Coordinates" />
    name: CoordinatesObject
    x-displayName: CoordinatesObject
  - description: <SchemaDefinition schemaRef="#/components/schemas/Container" />
    name: ContainerObject
    x-displayName: ContainerObject
  - description: <SchemaDefinition schemaRef="#/components/schemas/User" />
    name: UserObject
    x-displayName: UserObject
  - description: <SchemaDefinition schemaRef="#/components/schemas/Load" />
    name: LoadObject
    x-displayName: LoadObject
  - description: <SchemaDefinition schemaRef="#/components/schemas/Document" />
    name: DocumentObject
    x-displayName: DocumentObject
  - description: <SchemaDefinition schemaRef="#/components/schemas/Invoice" />
    name: InvoiceObject
    x-displayName: InvoiceObject
  - description: <SchemaDefinition schemaRef="#/components/schemas/Location" />
    name: LocationObject
    x-displayName: LocationObject
  - description: <SchemaDefinition schemaRef="#/components/schemas/Price" />
    name: PriceObject
    x-displayName: PriceObject
  - description: <SchemaDefinition schemaRef="#/components/schemas/Quantity" />
    name: QuantityObject
    x-displayName: QuantityObject
  - description: <SchemaDefinition schemaRef="#/components/schemas/Size" />
    name: SizeObject
    x-displayName: SizeObject
  - description: <SchemaDefinition schemaRef="#/components/schemas/Volume" />
    name: VolumeObject
    x-displayName: VolumeObject
  - description: <SchemaDefinition schemaRef="#/components/schemas/Weight" />
    name: WeightObject
    x-displayName: WeightObject
  - description: <SchemaDefinition schemaRef="#/components/schemas/SimpleDate" />
    name: SimpleDateObject
    x-displayName: SimpleDateObject
  - description: <SchemaDefinition schemaRef="#/components/schemas/DateWithTime" />
    name: DateWithTimeObject
    x-displayName: DateWithTimeObject
paths:
  /v1/tracking/{onechain_shipment_id}:
    get:
      tags:
        - Tracking
      summary: Fetch a shipment's tracking.
      description: Fetch a shipment's tracking with its OneChain shipment id.
      parameters:
        - schema:
            type: string
          in: path
          name: onechain_shipment_id
          required: true
      responses:
        '200':
          description: Returns tracking for a shipment
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Tracking'
                description: Returns tracking for a shipment
        '404':
          description: No tracking found
          content:
            application/json:
              schema:
                description: No tracking found
                type: object
components:
  schemas:
    Tracking:
      modelName: Tracking
      type: object
      properties:
        onechain_shipment_id:
          type: string
          example: BATE
        status:
          type: string
        tracking_steps:
          type: array
          items:
            $ref: '#/components/schemas/TrackingStep'
        ocean_coordinates:
          type: array
          items:
            $ref: '#/components/schemas/Coordinates'
    TrackingStep:
      modelName: TrackingStep
      type: object
      properties:
        type:
          type: string
          enum:
            - location
            - port
        location:
          $ref: '#/components/schemas/Location'
        port:
          $ref: '#/components/schemas/Port'
        events:
          type: array
          items:
            $ref: '#/components/schemas/TrackingEvent'
    Coordinates:
      modelName: Coordinates
      type: object
      properties:
        latitude:
          type: string
          example: '48.858093'
        longitude:
          type: string
          example: '2.294694'
    Location:
      type: object
      modelName: Location
      properties:
        id:
          type: string
          example: 12345
        company_name:
          type: string
          example: Logistics WorldWide Co
        name:
          type: string
          example: Saint Quentin warehouse
        address:
          type: string
          example: 357 allée des Tilleuls
        city:
          type: string
          example: Saint Quentin Fallavier
        zip_code:
          type: string
          example: 69300
        country:
          type: string
          example: FR
        contacts:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
                example: Thierry Henriet
              email:
                type: string
                example: log@patagonia.com
              phone:
                type: string
                example: 33134567891
        opening_hours:
          type: string
          example: Monday to Friday 8am to 5pm
        requires_appointment:
          type: boolean
          description: >-
            Specifies if appointments are required for loading and unloading at
            this location.
        requires_tailgate_truck:
          type: boolean
          description: Specifies if liftgate trucks are required for this location.
          example: false
        additional_information:
          type: string
          example: Please avoid Friday after 4pm
    Port:
      modelName: Port
      type: object
      properties:
        unlocode:
          type: string
          example: FR/LEH
        city:
          type: string
          example: Le Havre
        country:
          type: string
          example: FR
    TrackingEvent:
      modelName: TrackingEvent
      type: object
      properties:
        description:
          type: string
          example: Loaded on Vessel
        container_number:
          type: string
          example: MSDU8878398
        date:
          $ref: '#/components/schemas/DateWithTime'
        status:
          type: string
          enum:
            - estimated
            - actual
            - planned
            - problem
    DateWithTime:
      modelName: DateWithTime
      type: string
      example: '2021-09-20T10:02:09+01:00'

````