> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://api.leanmile.com/llms.txt.
> For full documentation content, see https://api.leanmile.com/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://api.leanmile.com/_mcp/server.

# 1. Get events for specific parcel

GET https://v1/trackings/{parcelId}

See GET /trackings for more info <br/> 
				<b>PS!</b> This endpoint is not intended for bulk data import and may subjected to rate limiting depending on the server load! Use GET /trackings for receiving events in bulk.

Reference: https://api.leanmile.com/otp-cc-flow/2-tracking/1-get-events-for-specific-parcel

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: OTP CC Flow
  version: 1.0.0
paths:
  /v1/trackings/{parcelId}:
    get:
      operationId: 1-get-events-for-specific-parcel
      summary: 1. Get events for specific parcel
      description: "See GET /trackings for more info <br/> \r\n\t\t\t\t<b>PS!</b> This endpoint is not intended for bulk data import and may subjected to rate limiting depending on the server load! Use GET /trackings for receiving events in bulk."
      tags:
        - subpackage_2Tracking
      parameters:
        - name: parcelId
          in: path
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: Basic authentication
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/2. Tracking_1. Get events for specific
                  parcel_Response_200
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/GetV1TrackingsParcelidRequestUnauthorizedError
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/GetV1TrackingsParcelidRequestInternalServerError
servers:
  - url: https:/
    description: https://{baseurl}
components:
  schemas:
    V1TrackingsParcelIdGetResponsesContentApplicationJsonSchemaDataItems:
      type: object
      properties:
        eventID:
          type: string
        eventCode:
          type: string
        eventTime:
          type: string
        eventMessage:
          type: string
        locationCode:
          type: string
        parcelClientID:
          type: string
        parcelParcelID:
          type: string
        destinationCountry:
          type: string
      required:
        - eventID
        - eventCode
        - eventTime
        - eventMessage
        - locationCode
        - parcelClientID
        - parcelParcelID
        - destinationCountry
      title: V1TrackingsParcelIdGetResponsesContentApplicationJsonSchemaDataItems
    2. Tracking_1. Get events for specific parcel_Response_200:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: >-
              #/components/schemas/V1TrackingsParcelIdGetResponsesContentApplicationJsonSchemaDataItems
        status:
          type: string
        message:
          type: string
        statusCode:
          type: string
        internalReference:
          type: string
      required:
        - data
        - status
        - message
        - statusCode
        - internalReference
      title: 2. Tracking_1. Get events for specific parcel_Response_200
    V1TrackingsParcelIdGetResponsesContentApplicationJsonSchemaData:
      type: object
      properties:
        nullable:
          type: boolean
        readOnly:
          type: boolean
      required:
        - nullable
        - readOnly
      title: V1TrackingsParcelIdGetResponsesContentApplicationJsonSchemaData
    GetV1TrackingsParcelidRequestUnauthorizedError:
      type: object
      properties:
        data:
          $ref: >-
            #/components/schemas/V1TrackingsParcelIdGetResponsesContentApplicationJsonSchemaData
        status:
          type: string
        message:
          type: string
        statusCode:
          type: string
        internalReference:
          type: string
      required:
        - data
        - status
        - message
        - statusCode
        - internalReference
      title: GetV1TrackingsParcelidRequestUnauthorizedError
    GetV1TrackingsParcelidRequestInternalServerError:
      type: object
      properties:
        data:
          $ref: >-
            #/components/schemas/V1TrackingsParcelIdGetResponsesContentApplicationJsonSchemaData
        status:
          type: string
        message:
          type: string
        statusCode:
          type: string
        internalReference:
          type: string
      required:
        - data
        - status
        - message
        - statusCode
        - internalReference
      title: GetV1TrackingsParcelidRequestInternalServerError
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic

```

## Examples



**Response**

```json
{
  "data": [
    {
      "eventID": "<string>",
      "eventCode": "<string>",
      "eventTime": "<string>",
      "eventMessage": "<string>",
      "locationCode": "<string>",
      "parcelClientID": "<string>",
      "parcelParcelID": "<string>",
      "destinationCountry": "<string>"
    },
    {
      "eventID": "<string>",
      "eventCode": "<string>",
      "eventTime": "<string>",
      "eventMessage": "<string>",
      "locationCode": "<string>",
      "parcelClientID": "<string>",
      "parcelParcelID": "<string>",
      "destinationCountry": "<string>"
    }
  ],
  "status": "<string>",
  "message": "<string>",
  "statusCode": "<integer>",
  "internalReference": "<string>"
}
```

**SDK Code**

```python 2. Tracking_1. Get events for specific parcel_example
import requests

url = "https://https/v1/trackings/CLFOX168240450085522"

response = requests.get(url, auth=("<username>", "<password>"))

print(response.json())
```

```javascript 2. Tracking_1. Get events for specific parcel_example
const url = 'https://https/v1/trackings/CLFOX168240450085522';
const credentials = btoa("<username>:<password>");

const options = {method: 'GET', headers: {Authorization: `Basic ${credentials}`}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go 2. Tracking_1. Get events for specific parcel_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://https/v1/trackings/CLFOX168240450085522"

	req, _ := http.NewRequest("GET", url, nil)

	req.SetBasicAuth("<username>", "<password>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby 2. Tracking_1. Get events for specific parcel_example
require 'uri'
require 'net/http'

url = URI("https://https/v1/trackings/CLFOX168240450085522")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request.basic_auth("<username>", "<password>")

response = http.request(request)
puts response.read_body
```

```java 2. Tracking_1. Get events for specific parcel_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://https/v1/trackings/CLFOX168240450085522")
  .basicAuth("<username>", "<password>")
  .asString();
```

```php 2. Tracking_1. Get events for specific parcel_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://https/v1/trackings/CLFOX168240450085522', [
  'headers' => [
  ],
    'auth' => ['<username>', '<password>'],
]);

echo $response->getBody();
```

```csharp 2. Tracking_1. Get events for specific parcel_example
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://https/v1/trackings/CLFOX168240450085522");
client.Authenticator = new HttpBasicAuthenticator("<username>", "<password>");
var request = new RestRequest(Method.GET);

IRestResponse response = client.Execute(request);
```

```swift 2. Tracking_1. Get events for specific parcel_example
import Foundation

let credentials = Data("<username>:<password>".utf8).base64EncodedString()

let headers = ["Authorization": "Basic \(credentials)"]

let request = NSMutableURLRequest(url: NSURL(string: "https://https/v1/trackings/CLFOX168240450085522")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```