---
title: Making an API Call
slug: making-an-api-call
icon: 📟
createdAt: 2022-05-27T02:47:09.000Z
---

## Overview

Here you will find out how to make API calls with your access token. The access token is always required for calling any of our APIs.

The following is the successful response body that you will get.

```json
{
    "data": [
        {
            "tracking_events": [
                {
                    "weight": 247.0,
                    "pieces": 16,
                    "flight_number": "",
                    "time": "2022/6/23 23:22:00",
                    "code": null,
                    "location": "HKG",
                    "is_estimated": false,
                    "description": "Freight on hand",
                    "serial_number": "1"
                }
             ],
            "awb_number": "16044945493",
            "id": "62eb2bd840dde2d263c11d21",
            "updated_at": "2022/7/17 8:19:01",
            "tracking_finished_time": "2022/7/15 8:13:43",
            "carrier": {
                "airline": "CATHAY PACIFIC AIRWAYS",
                "code": "CX"
            },
            "airport": {
                "origin": "HKG",
                "origin_code": null,
                "destination_code": null,
                "destination": "KIX"
            }
        }
    ]
}
```

## Steps

The following is a step-by-step instruction on calling the Container Tracking API endpoint in Postman.

::Image[]{src="https://api.archbee.com/api/optimize/Lg-kJrROagWWIkGSzPCn2/PUC93X6ZaR3ZzN_xllCgJ_makingapicallimage8.png" size="86" width="1051" height="461" caption="Making an API call" position="center" showCaption="true"}

:::hint{type="info"}
**Note:**

To import Rippey AI Postman Collection, please refer to the [Postman Collection](https://developers.rpalabs.io/postman-collection) section.
:::

### Step 1: Select the Authenticate Endpoint

Navigate to **Collection > Track and Trace > auth >login**.

::Image[]{src="https://api.archbee.com/api/optimize/Lg-kJrROagWWIkGSzPCn2/TqomibM7qVTd6Kr3QC98U_image.png" size="74" width="462" height="282" position="center" showCaption="false"}



### Step 2: Set the Authenticate Body

Generate an access token with the Authenticate `POST` method. Set the body with your **`key`** and **`secret`**.

![](https://api.archbee.com/api/optimize/Lg-kJrROagWWIkGSzPCn2/9_nsAiEsRSJihsF7pJUrG_b1.png)

### Step 3: Press the Send button

Press the **Send** button to call the authenticate API.

![](https://api.archbee.com/api/optimize/Lg-kJrROagWWIkGSzPCn2/KpmZHRQLrsfoZxQa4vU-z_image.png)

Below is the success response containing your **access token**.

![](https://api.archbee.com/api/optimize/Lg-kJrROagWWIkGSzPCn2/GnI_RWqAAGomxX-laV0yv_image.png)

:::hint{type="info"}
**Note:**

Go [here](https://developers.rpalabs.io/authenticate) to know more detail about the Authenticate endpoint.
:::

### Step 4: Add Authorization Header

![](https://api.archbee.com/api/optimize/Lg-kJrROagWWIkGSzPCn2/L1pqYHDzqXmgvnC6KJOfQ_image.png)

### Step 5: Subscribe to the cargo

Navigate to **Collection > Track and Trace > Air  | Ocean > subscribe air waybill | container**

:::hint{type="warning"}
Do not forget to add the Authorization header \[See step 4]
:::

![](https://api.archbee.com/api/optimize/Lg-kJrROagWWIkGSzPCn2/FA_KxtIMrJkIhi-YISXHi_image.png)

### Step 6: Select the Tracking Endpoint

Navigate to **Collection > Track and Trace > Air  | Ocean > get air waybills | containers**

:::hint{type="warning"}
Do not forget to add the Authorization header \[See step 4]
:::

![](https://api.archbee.com/api/optimize/Lg-kJrROagWWIkGSzPCn2/nXkmRy_PX4gqLgVemEhJ8_image.png)

### Step 7: Set the Params

Set which container you want to track in the query parameters.

![](https://api.archbee.com/api/optimize/Lg-kJrROagWWIkGSzPCn2/HFXrEw_WxCAhC_jBXaFI3_image.png)

### Step 8: Retrieve the Response

Now you are ready to call the `GET` Container Tracking API. Hit the **Send** button.

![](https://api.archbee.com/api/optimize/Lg-kJrROagWWIkGSzPCn2/TJsyB3YK8d-FuPCs1-iLN_image.png)

✅Done! You will get the container information details as seen in the example below.

:::CodeblockTabs
200 OK

```json
{
    "data": [
        {
            "tracking_events": [
                {
                    "weight": 247.0,
                    "pieces": 16,
                    "flight_number": "",
                    "time": "2022/6/23 23:22:00",
                    "code": null,
                    "location": "HKG",
                    "is_estimated": false,
                    "description": "Freight on hand",
                    "serial_number": "1"
                }
             ],
            "awb_number": "16044945493",
            "id": "62eb2bd840dde2d263c11d21",
            "updated_at": "2022/7/17 8:19:01",
            "tracking_finished_time": "2022/7/15 8:13:43",
            "carrier": {
                "airline": "CATHAY PACIFIC AIRWAYS",
                "code": "CX"
            },
            "airport": {
                "origin": "HKG",
                "origin_code": null,
                "destination_code": null,
                "destination": "KIX"
            }
        }
    ]
}
```
:::

:::hint{type="info"}
🚩  If you get an unsuccessful response, please see the [Error Handling](https://developers.rpalabs.io/error-handling) section to figure out how to handle the errors.
:::

### ✉️ Need some help?

If you encounter a problem or require assistance, please contact our support team with details regarding your request at [support@rippey.ai](mailto\:support@rpalabs.com). A representative will connect with you soon. 😊
