> For the complete documentation index, see [llms.txt](https://docs.terminal.africa/tship/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.terminal.africa/tship/rate/get-rates-for-shipment-2.md).

# Get Rates for Shipment \[STREAM]

## /rates/stream

<mark style="color:blue;">`GET`</mark> `https://api.terminal.africa/v1/rates/shipment/stream`

This endpoint allows you to retrieve rates for a shipment via a stream for improved performance. For more information on streaming apis, see [here](https://blog.axway.com/learning-center/apis/api-streaming/streaming-apis-examples). This endpoint can be used for single or multi-piece shipments.

To return cash on delivery rates for carriers who supports cash-on-delivery,  ***s***&#x65;t ***cash\_on\_delivery*** to true if ***shipment\_id*** does not include a ***shipment\_type*** of `cash-on-delivery`.&#x20;

Rate streaming response handling works a bit differently from your standard rates api, for an example of how to fetch rates using this api please see&#x20;

#### Query Parameters

| Name               | Type    | Description                                                                                                                                                                                                                |
| ------------------ | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| currency           | string  | Currency for rates. Defaults to ***NGN***. Available options are ***AED***, ***AUD***, ***CAD***, ***CNY***, ***EUR***, ***GBP***, ***GHS***, ***HKD***, ***KES***, ***NGN***, ***TZS***, ***UGX***, ***USD***, ***ZAR***. |
| pickup\_address    | string  | Unique id for pickup address. Required if ***shipment\_id*** not provided.                                                                                                                                                 |
| delivery\_address  | string  | Unique id for delivery address. Required if ***shipment\_id*** not provided.                                                                                                                                               |
| shipment\_id       | string  | Unique id of shipment. Required if ***delivery\_address*** and ***pickup\_address*** not provided.                                                                                                                         |
| parcel\_id         | string  | Unique id of parcel. Not required if shipment id is provided.                                                                                                                                                              |
| parcel\_ids        | string  | Unique list of parcel ids. Not required if shipment id is provided.                                                                                                                                                        |
| cash\_on\_delivery | boolean | Set to true to return rates for carriers who supports cash-on-delivery                                                                                                                                                     |

#### Headers

| Name                                            | Type   | Description                      |
| ----------------------------------------------- | ------ | -------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | Set value to `Bearer SECRET_KEY` |

{% tabs %}
{% tab title="200 Start Event" %}

```
{
    "type": "start",
    "carriers": [
        "gokada",
        "store-pickup",
        "kwik",
        "ups",
        "ship-to-naija",
        "topship",
        "darum",
        "gigl",
        "get-messenger",
        "dhl-ng",
        "sendstack",
        "dellyman",
        "redstar",
        "qc-express",
        "fez-delivery"
    ]
}
```

{% endtab %}

{% tab title="200 Carrier Event" %}

```json
{
    "type": "carrier",
    "carrier_slug": "redstar",
    "carrier_name": "Redstar Express",
    "rates": [
        {
            "carrier_logo": "https://terminal-static-file.s3.us-east-1.amazonaws.com/images/Redstar.svg",
            "carrier_name": "Redstar Express",
            "carrier_reference": "CA-EPTEBPNPW7HWULW0",
            "carrier_slug": "redstar",
            "currency": "NGN",
            "insurance_coverage": 0,
            "insurance_fee": 0,
            "includes_insurance": false,
            "includes_duties": false,
            "metadata": {
                "default_parcel": {
                    "packaging_dimension": {
                        "length": 10,
                        "height": 1,
                        "width": 10
                    },
                    "parcel_total_weight": 2,
                    "parcel_value": 20000,
                    "packages": [
                        {
                            "weight": 2,
                            "dimensions": {
                                "length": 10,
                                "width": 10,
                                "height": 1
                            }
                        }
                    ]
                },
                "address_payload": {
                    "pickup_address": {
                        "city": "Ikeja",
                        "state": "Lagos",
                        "country": "NG",
                        "zip": "121006"
                    },
                    "delivery_address": {
                        "city": "Ikeja",
                        "state": "Lagos",
                        "country": "NG",
                        "zip": "121006"
                    }
                },
                "true_weight": 2,
                "score": 0,
                "avgRating": 0,
                "insurance_fee": 0,
                "insurance_currency": "NGN",
                "insurance_default_fee": 0,
                "insurance_default_currency": "NGN",
                "cod_processing_fee": 0,
                "shipment_service_charge": 300,
                "shipment_items": [
                    {
                        "name": "Invoices and Trade Documents",
                        "description": "Invoices and Trade Documents",
                        "hs_code": "4911998000",
                        "hs_code_id": "",
                        "quantity": 1,
                        "value": 10000,
                        "weight": 1,
                        "currency": "NGN",
                        "type": "document",
                        "manufacturer_country": "NG"
                    },
                    {
                        "name": "Eye make-up preparations",
                        "description": "Eye make-up preparations",
                        "hs_code": "3304200000",
                        "hs_code_id": "HS-VGIZLSP0F7IU8QNM",
                        "quantity": 1,
                        "value": 10000,
                        "weight": 1,
                        "currency": "NGN",
                        "type": "parcel",
                        "manufacturer_country": "NG"
                    }
                ]
            },
            "pickup_available": true,
            "user": "USER-27450202164",
            "pickup_address": "AD-CJABDZV5H2IBE9Y5",
            "delivery_address": "AD-Q3191G2Y13DJ0DRW",
            "parcel": "PC-A7QJ2GMR3L5M65L3",
            "amount": 3622.32,
            "default_amount": 3622.32,
            "default_currency": "NGN",
            "carrier_rate_description": "Normal Delivery",
            "delivery_date": "2026-05-17T09:36:49.530Z",
            "delivery_eta": 7200,
            "delivery_time": "Within 4 business days",
            "id": "rate_xEmyg9hZWFsdWFOK",
            "pickup_date": "2026-05-13T09:36:49.530Z",
            "pickup_eta": 1440,
            "pickup_time": "Within 24 Hours",
            "rate_id": "RT-9KFR7MWCQFIO96NU",
            "supports_duty": false,
            "requires_duty": false,
            "regulatory_documents": []
        }
    ]
}
```

{% endtab %}

{% tab title="200 Completed Event" %}

```json
{
    "type": "complete",
    "status": true,
    "message": "Rates retrieved successfully",
    "data": [
        {
            "amount": 3075,
            "cargo_type": "",
            "carrier_logo": "https://terminal-static-file.s3.us-east-1.amazonaws.com/images/Dellyman.svg",
            "carrier_name": "Dellyman",
            "carrier_rate_description": "Standard",
            "carrier_reference": "CA-EMBFYYC4LO4IHFTW",
            "carrier_slug": "dellyman",
            "currency": "NGN",
            "domain": "",
            "default_amount": 3075,
            "default_currency": "NGN",
            "delivery_address": "AD-Q3191G2Y13DJ0DRW",
            "delivery_date": "2026-05-12T12:36:49.529Z",
            "delivery_eta": 180,
            "delivery_time": "Within 1 business day",
            "dropoff_available": false,
            "dropoff_only": false,
            "dropoff_required": false,
            "wordpress_used": false,
            "insurance_coverage": 0,
            "includes_duties": false,
            "insurance_fee": 0,
            "includes_insurance": false,
            "metadata": {
                "default_parcel": {
                    "packaging_dimension": {
                        "length": 10,
                        "height": 1,
                        "width": 10
                    },
                    "parcel_total_weight": 2,
                    "parcel_value": 20000,
                    "packages": [
                        {
                            "weight": 2,
                            "dimensions": {
                                "length": 10,
                                "width": 10,
                                "height": 1
                            }
                        }
                    ]
                },
                "address_payload": {
                    "pickup_address": {
                        "city": "Ikeja",
                        "state": "Lagos",
                        "country": "NG",
                        "zip": "121006"
                    },
                    "delivery_address": {
                        "city": "Ikeja",
                        "state": "Lagos",
                        "country": "NG",
                        "zip": "121006"
                    }
                },
                "true_weight": 2,
                "distance": 1.2864789292736152,
                "score": 0,
                "avgRating": 0,
                "insurance_fee": 0,
                "insurance_currency": "NGN",
                "insurance_default_fee": 0,
                "insurance_default_currency": "NGN",
                "cod_processing_fee": 0,
                "shipment_service_charge": 300,
                "shipment_items": [
                    {
                        "name": "Invoices and Trade Documents",
                        "description": "Invoices and Trade Documents",
                        "hs_code": "4911998000",
                        "hs_code_id": "",
                        "quantity": 1,
                        "value": 10000,
                        "weight": 1,
                        "currency": "NGN",
                        "type": "document",
                        "manufacturer_country": "NG"
                    },
                    {
                        "name": "Eye make-up preparations",
                        "description": "Eye make-up preparations",
                        "hs_code": "3304200000",
                        "hs_code_id": "HS-VGIZLSP0F7IU8QNM",
                        "quantity": 1,
                        "value": 10000,
                        "weight": 1,
                        "currency": "NGN",
                        "type": "parcel",
                        "manufacturer_country": "NG"
                    }
                ]
            },
            "parcel": "PC-A7QJ2GMR3L5M65L3",
            "parcels": [],
            "pickup_address": "AD-CJABDZV5H2IBE9Y5",
            "pickup_available": true,
            "pickup_date": "2026-05-12T10:36:49.529Z",
            "pickup_eta": 60,
            "pickup_time": "Within 1 Hour",
            "rate_id": "RT-OKZCAPV7BTQAZU9I",
            "real_pickup_eta": false,
            "real_delivery_eta": false,
            "regulatory_documents": [],
            "source": "api",
            "supports_duty": false,
            "requires_duty": false,
            "type": "standard",
            "used": false,
            "user": "USER-27450202164",
            "_id": "6a02f4b250380a51ccadcbf0",
            "__v": 0,
            "created_at": "2026-05-12T09:36:50.225Z",
            "updated_at": "2026-05-12T09:36:50.225Z",
            "id": "6a02f4b250380a51ccadcbf0"
        },
        {
            "amount": 3332.5,
            "cargo_type": "",
            "carrier_logo": "https://terminal-static-file.s3.us-east-1.amazonaws.com/images/FEZ+Delivery.svg",
            "carrier_name": "Fez Delivery",
            "carrier_rate_description": "Standard",
            "carrier_reference": "CA-TNVVUT1XVB1ULV5Q",
            "carrier_slug": "fez-delivery",
            "currency": "NGN",
            "domain": "",
            "default_amount": 3332.5,
            "default_currency": "NGN",
            "delivery_address": "AD-Q3191G2Y13DJ0DRW",
            "delivery_date": "2026-05-14T09:36:49.531Z",
            "delivery_eta": 2880,
            "delivery_time": "Within 2 business days",
            "dropoff_available": false,
            "dropoff_only": false,
            "dropoff_required": false,
            "wordpress_used": false,
            "insurance_coverage": 0,
            "includes_duties": false,
            "insurance_fee": 0,
            "includes_insurance": false,
            "metadata": {
                "default_parcel": {
                    "packaging_dimension": {
                        "length": 10,
                        "height": 1,
                        "width": 10
                    },
                    "parcel_total_weight": 2,
                    "parcel_value": 20000,
                    "packages": [
                        {
                            "weight": 2,
                            "dimensions": {
                                "length": 10,
                                "width": 10,
                                "height": 1
                            }
                        }
                    ]
                },
                "address_payload": {
                    "pickup_address": {
                        "city": "Ikeja",
                        "state": "Lagos",
                        "country": "NG",
                        "zip": "121006"
                    },
                    "delivery_address": {
                        "city": "Ikeja",
                        "state": "Lagos",
                        "country": "NG",
                        "zip": "121006"
                    }
                },
                "true_weight": 2,
                "score": 0,
                "avgRating": 0,
                "insurance_fee": 0,
                "insurance_currency": "NGN",
                "insurance_default_fee": 0,
                "insurance_default_currency": "NGN",
                "cod_processing_fee": 0,
                "shipment_service_charge": 300,
                "shipment_items": [
                    {
                        "name": "Invoices and Trade Documents",
                        "description": "Invoices and Trade Documents",
                        "hs_code": "4911998000",
                        "hs_code_id": "",
                        "quantity": 1,
                        "value": 10000,
                        "weight": 1,
                        "currency": "NGN",
                        "type": "document",
                        "manufacturer_country": "NG"
                    },
                    {
                        "name": "Eye make-up preparations",
                        "description": "Eye make-up preparations",
                        "hs_code": "3304200000",
                        "hs_code_id": "HS-VGIZLSP0F7IU8QNM",
                        "quantity": 1,
                        "value": 10000,
                        "weight": 1,
                        "currency": "NGN",
                        "type": "parcel",
                        "manufacturer_country": "NG"
                    }
                ]
            },
            "parcel": "PC-A7QJ2GMR3L5M65L3",
            "parcels": [],
            "pickup_address": "AD-CJABDZV5H2IBE9Y5",
            "pickup_available": true,
            "pickup_date": "2026-05-14T09:36:49.531Z",
            "pickup_eta": 2880,
            "pickup_time": "Within 48 Hours",
            "rate_id": "RT-YWQKH23IJJ4J7I5N",
            "real_pickup_eta": false,
            "real_delivery_eta": false,
            "regulatory_documents": [],
            "source": "api",
            "supports_duty": false,
            "requires_duty": false,
            "type": "standard",
            "used": false,
            "user": "USER-27450202164",
            "_id": "6a02f4b250380a51ccadcbf1",
            "__v": 0,
            "created_at": "2026-05-12T09:36:50.225Z",
            "updated_at": "2026-05-12T09:36:50.225Z",
            "id": "6a02f4b250380a51ccadcbf1"
        },
        {
            "amount": 3622.32,
            "cargo_type": "",
            "carrier_logo": "https://terminal-static-file.s3.us-east-1.amazonaws.com/images/Redstar.svg",
            "carrier_name": "Redstar Express",
            "carrier_rate_description": "Normal Delivery",
            "carrier_reference": "CA-EPTEBPNPW7HWULW0",
            "carrier_slug": "redstar",
            "currency": "NGN",
            "domain": "",
            "default_amount": 3622.32,
            "default_currency": "NGN",
            "delivery_address": "AD-Q3191G2Y13DJ0DRW",
            "delivery_date": "2026-05-17T09:36:49.530Z",
            "delivery_eta": 7200,
            "delivery_time": "Within 4 business days",
            "dropoff_available": false,
            "dropoff_only": false,
            "dropoff_required": false,
            "wordpress_used": false,
            "insurance_coverage": 0,
            "includes_duties": false,
            "insurance_fee": 0,
            "includes_insurance": false,
            "metadata": {
                "default_parcel": {
                    "packaging_dimension": {
                        "length": 10,
                        "height": 1,
                        "width": 10
                    },
                    "parcel_total_weight": 2,
                    "parcel_value": 20000,
                    "packages": [
                        {
                            "weight": 2,
                            "dimensions": {
                                "length": 10,
                                "width": 10,
                                "height": 1
                            }
                        }
                    ]
                },
                "address_payload": {
                    "pickup_address": {
                        "city": "Ikeja",
                        "state": "Lagos",
                        "country": "NG",
                        "zip": "121006"
                    },
                    "delivery_address": {
                        "city": "Ikeja",
                        "state": "Lagos",
                        "country": "NG",
                        "zip": "121006"
                    }
                },
                "true_weight": 2,
                "score": 0,
                "avgRating": 0,
                "insurance_fee": 0,
                "insurance_currency": "NGN",
                "insurance_default_fee": 0,
                "insurance_default_currency": "NGN",
                "cod_processing_fee": 0,
                "shipment_service_charge": 300,
                "shipment_items": [
                    {
                        "name": "Invoices and Trade Documents",
                        "description": "Invoices and Trade Documents",
                        "hs_code": "4911998000",
                        "hs_code_id": "",
                        "quantity": 1,
                        "value": 10000,
                        "weight": 1,
                        "currency": "NGN",
                        "type": "document",
                        "manufacturer_country": "NG"
                    },
                    {
                        "name": "Eye make-up preparations",
                        "description": "Eye make-up preparations",
                        "hs_code": "3304200000",
                        "hs_code_id": "HS-VGIZLSP0F7IU8QNM",
                        "quantity": 1,
                        "value": 10000,
                        "weight": 1,
                        "currency": "NGN",
                        "type": "parcel",
                        "manufacturer_country": "NG"
                    }
                ]
            },
            "parcel": "PC-A7QJ2GMR3L5M65L3",
            "parcels": [],
            "pickup_address": "AD-CJABDZV5H2IBE9Y5",
            "pickup_available": true,
            "pickup_date": "2026-05-13T09:36:49.530Z",
            "pickup_eta": 1440,
            "pickup_time": "Within 24 Hours",
            "rate_id": "RT-9KFR7MWCQFIO96NU",
            "real_pickup_eta": false,
            "real_delivery_eta": false,
            "regulatory_documents": [],
            "source": "api",
            "supports_duty": false,
            "requires_duty": false,
            "type": "standard",
            "used": false,
            "user": "USER-27450202164",
            "_id": "6a02f4b250380a51ccadcbf2",
            "__v": 0,
            "created_at": "2026-05-12T09:36:50.225Z",
            "updated_at": "2026-05-12T09:36:50.225Z",
            "id": "6a02f4b250380a51ccadcbf2"
        },
        {
            "amount": 5297.25,
            "cargo_type": "",
            "carrier_logo": "https://terminal-static-file.s3.us-east-1.amazonaws.com/images/DHL.svg",
            "carrier_name": "DHL Express",
            "carrier_rate_description": "DOMESTIC",
            "carrier_reference": "CA-81957188177",
            "carrier_slug": "dhl-ng",
            "currency": "NGN",
            "domain": "",
            "default_amount": 5297.25,
            "default_currency": "NGN",
            "delivery_address": "AD-Q3191G2Y13DJ0DRW",
            "delivery_date": "2026-05-17T09:36:49.553Z",
            "delivery_eta": 7200,
            "delivery_time": "Within 4 business days",
            "dropoff_available": true,
            "dropoff_only": false,
            "dropoff_required": false,
            "wordpress_used": false,
            "insurance_coverage": 0,
            "includes_duties": false,
            "insurance_fee": 0,
            "includes_insurance": false,
            "metadata": {
                "default_parcel": {
                    "packaging_dimension": {
                        "length": 10,
                        "height": 1,
                        "width": 10
                    },
                    "parcel_total_weight": 2,
                    "parcel_value": 20000,
                    "packages": [
                        {
                            "weight": 2,
                            "dimensions": {
                                "length": 10,
                                "width": 10,
                                "height": 1
                            }
                        }
                    ]
                },
                "address_payload": {
                    "pickup_address": {
                        "city": "Ikeja",
                        "state": "Lagos",
                        "country": "NG",
                        "zip": "121006"
                    },
                    "delivery_address": {
                        "city": "Ikeja",
                        "state": "Lagos",
                        "country": "NG",
                        "zip": "121006"
                    }
                },
                "true_weight": 2,
                "localProductCode": "N",
                "productCode": "N",
                "markup_version": 19,
                "score": 15,
                "_id": null,
                "avgActualTurnaroundTime": 4,
                "avgActualPickupTime": 31,
                "avgRating": {
                    "_id": null,
                    "avgRating": 3.5
                },
                "insurance_fee": 0,
                "insurance_currency": "NGN",
                "insurance_default_fee": 0,
                "insurance_default_currency": "NGN",
                "cod_processing_fee": 0,
                "shipment_service_charge": 300,
                "shipment_items": [
                    {
                        "name": "Invoices and Trade Documents",
                        "description": "Invoices and Trade Documents",
                        "hs_code": "4911998000",
                        "hs_code_id": "",
                        "quantity": 1,
                        "value": 10000,
                        "weight": 1,
                        "currency": "NGN",
                        "type": "document",
                        "manufacturer_country": "NG"
                    },
                    {
                        "name": "Eye make-up preparations",
                        "description": "Eye make-up preparations",
                        "hs_code": "3304200000",
                        "hs_code_id": "HS-VGIZLSP0F7IU8QNM",
                        "quantity": 1,
                        "value": 10000,
                        "weight": 1,
                        "currency": "NGN",
                        "type": "parcel",
                        "manufacturer_country": "NG"
                    }
                ],
                "recommended": true
            },
            "parcel": "PC-A7QJ2GMR3L5M65L3",
            "parcels": [],
            "pickup_address": "AD-CJABDZV5H2IBE9Y5",
            "pickup_available": true,
            "pickup_date": "2026-05-12T09:36:49.553Z",
            "pickup_eta": 0,
            "pickup_time": "Within 1 business day",
            "rate_id": "RT-I2OMCANTVCDWMRJ0",
            "real_pickup_eta": false,
            "real_delivery_eta": false,
            "regulatory_documents": [],
            "source": "api",
            "supports_duty": false,
            "requires_duty": false,
            "type": "standard",
            "used": false,
            "user": "USER-27450202164",
            "_id": "6a02f4b250380a51ccadcbf3",
            "__v": 0,
            "created_at": "2026-05-12T09:36:50.225Z",
            "updated_at": "2026-05-12T09:36:50.225Z",
            "id": "6a02f4b250380a51ccadcbf3"
        }
    ],
    "errors": [
        {
            "carrier_slug": "gokada",
            "carrier_name": "Gokada",
            "message": "Gokada is not supported on this platform"
        },
        {
            "carrier_slug": "topship",
            "carrier_name": "Topship",
            "message": "Topship is not supported on this platform"
        },
        {
            "carrier_slug": "get-messenger",
            "carrier_name": "Messenger",
            "message": "Messenger is not supported on this platform"
        },
        {
            "carrier_slug": "sendstack",
            "carrier_name": "Sendstack",
            "message": "Sendstack is not supported on this platform"
        },
        {
            "carrier_slug": "kwik",
            "carrier_name": "Kwik Delivery",
            "message": "Kwik Delivery is currently unavailable"
        },
        {
            "carrier_slug": "ups",
            "carrier_name": "United Parcel Services",
            "message": "United Parcel Services does not support local shipments"
        },
        {
            "carrier_slug": "darum",
            "carrier_name": "Darum",
            "message": "Darum is currently unavailable"
        },
        {
            "carrier_slug": "gigl",
            "carrier_name": "GIG Logistics",
            "message": "GIG Logistics is currently unavailable"
        },
        {
            "carrier_slug": "qc-express",
            "carrier_name": "QC Express",
            "message": "QC Express is currently unavailable"
        },
        {
            "carrier_slug": "ship-to-naija",
            "carrier_name": "Ship to Naija",
            "message": "Ship to Naija has no available rates for this shipment route"
        }
    ]
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.terminal.africa/tship/rate/get-rates-for-shipment-2.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
