> For the complete documentation index, see [llms.txt](https://docs.lionparcel.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lionparcel.com/api/api-reference-en/api-reference/rate-check-introduction/client-rate-check.md).

# Client Rate Check

This page explains the body parameters that must be sent to make a rate check request, including their function, data type, and example values.

### Description

This API is used to obtain Lion Parcel shipping rate information in real time based on the origin and destination locations.

The API returns all products available in `result[]`.

**Available information**

1. Route availability
2. Price of each product or service
3. COD availability at destination
4. Insurance price (*if filled in* `price`)

### **Endpoint** :

<table data-header-hidden><thead><tr><th width="58.90234375"></th><th></th></tr></thead><tbody><tr><td><code>GET</code></td><td><a href="https://api-stg-middleware.thelionparcel.com/v3/tariff?origin=&#x26;destination=&#x26;weight=&#x26;commodity=&#x26;length=&#x26;width=&#x26;height="><code>https://api-stg-middleware.thelionparcel.com/v3/tariff?origin=&#x26;destination=&#x26;weight=&#x26;commodity=&#x26;length=&#x26;width=&#x26;height=</code></a></td></tr><tr><td>URL</td><td><code>[BASE_URL]/v3/tariff?origin={origin}&#x26;destination={destination}&#x26;weight={weight}&#x26;commodity={commodity}&#x26;length={length}&#x26;width={width}&#x26;height={height}</code></td></tr></tbody></table>

### **Headers**

<table><thead><tr><th width="145.82421875">Name</th><th>Value</th></tr></thead><tbody><tr><td>Content-Type</td><td><code>application/json</code></td></tr><tr><td>Authorization:</td><td><code>Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjI0MTYxMTc4MzAsImlhdCI6MTc4NTM5NzgzMCwidXNlcm5hbWUiOiJCT09LSU5HQVBJQ09SUERVQUJFTEFTIiwiY2xpZW50X2NvZGUiOiJDTDQzNDU5IiwiY2xpZW50X2NvZGVfZ2VuZXNpcyI6IkNMNDM0NTkiLCJpbnRlZ3JhdGlvbl90b2tlbl9pZCI6NTMsInNob3BfZG9tYWluIjoiYm9va2luZ2FwaS5jb20iLCJwbGF0Zm9ybSI6IkFQSSBMaW9uIFBhcmNlbCJ9.At7BM4uqQWpWgJ6u-xqygXQ0fO3VcPruNMNLBobUORWVyfxr63KCOgWt9cbzOK-4ikdNmd-R7Np2oC0SdLifXLWjTfWhz2wQS7aITK0YjOMkBtrCsqWHG8xsK8MiXJheko4w8C9vn4vATMI7BDL1iySw8uXbpICiU7k8TvgF4U-uxsOZlIvfEva5S17ZGeGRYTik9qjIst7Aq8IlJBww3meEl9znlNkdyuFgLZg_cUU1Jc6o5-5fUkljHelDyFuPuDm3KEDuds3ov0YKTi1EYQu266KzTXdhgWtyf6-98RHQlbic6o_RZ4KeNb6YrtC63AHHLonmkrmUGH7TdH09sQ</code></td></tr></tbody></table>

### Parameter

| Parameter                | Required | Validation                              | Description                          | Example                      |
| ------------------------ | -------- | --------------------------------------- | ------------------------------------ | ---------------------------- |
| `origin`                 | Yes      | Minimum 1 alphanumeric character        | Origin location or district          | `KEBON JERUK, JAKARTA BARAT` |
| `destination`            | Yes      | Minimum 1 alphanumeric character        | Destination location or district     | `ANDIR, BANDUNG`             |
| `weight`                 | Yes      | Greater than `0` kg                     | Package weight in kilograms          | `1`                          |
| `commodity`              | Yes      | Minimum 1 character                     | Commodity code                       | `ABR036`                     |
| `price` or `goods_value` | No       | Greater than `0` if insurance is active | Item value for insurance calculation | `10000`                      |
| `length`                 | No       | Greater than `0` cm                     | Package length                       | `10`                         |
| `width`                  | No       | Greater than `0` cm                     | Package width                        | `10`                         |
| `height`                 | No       | Greater than `0` cm                     | Package height                       | `10`                         |

### Validation rules

* Weight must be greater than `0` kg.
* Weight `1–99` grams normalized to `0.1` kg.
* Submitted dimensions must be greater than `0` cm.
* Send `price` or `goods_value` greater than `0` to see results with insurance calculation.

## Test It: Cek Tarif Client

> Get a real-time shipping cost estimate for a given origin, destination, and package details.

```json
{"openapi":"3.0.3","info":{"title":"Lion Parcel API","version":"1.1.1"},"tags":[{"name":"Tariff","description":"Check estimated shipping cost."}],"servers":[{"url":"https://api-stg-middleware.thelionparcel.com","description":"Staging"}],"paths":{"/v3/tariff":{"get":{"operationId":"cekTarifClient","summary":"Test It: Cek Tarif Client","description":"Get a real-time shipping cost estimate for a given origin, destination, and package details.","tags":["Tariff"],"parameters":[{"name":"Authorization","in":"header","required":true,"description":"Staging Bearer token for this client.","schema":{"type":"string"}},{"name":"origin","in":"query","required":true,"description":"Origin area, in \"SUBDISTRICT, CITY\" format.","schema":{"type":"string"}},{"name":"destination","in":"query","required":true,"description":"Destination area, in \"SUBDISTRICT, CITY\" format.","schema":{"type":"string"}},{"name":"weight","in":"query","required":true,"description":"Package weight, in kg.","schema":{"type":"number"}},{"name":"commodity","in":"query","required":true,"description":"Commodity code for the goods being shipped.","schema":{"type":"string"}},{"name":"length","in":"query","required":false,"description":"Package length, in cm.","schema":{"type":"number"}},{"name":"width","in":"query","required":false,"description":"Package width, in cm.","schema":{"type":"number"}},{"name":"height","in":"query","required":false,"description":"Package height, in cm.","schema":{"type":"number"}},{"name":"price","in":"query","required":false,"description":"Declared value of the goods, in IDR, used for insurance calculation.","schema":{"type":"number"}}],"responses":{"200":{"description":"Tariff retrieved successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"origin":{"type":"string","description":"Resolved origin area."},"destination":{"type":"string","description":"Resolved destination area."},"commodity":{"type":"string","description":"Commodity code used."},"weight":{"type":"number","description":"Weight used for the calculation."},"is_cod_area":{"type":"boolean","description":"Whether COD is available for this route."},"is_insurance":{"type":"boolean","description":"Whether the shipment is insured."},"price":{"type":"number","description":"Declared value of the goods, in IDR."},"forward_area":{"type":"string","description":"Forwarding area, if any."},"result":{"type":"array","description":"List of available shipping options and their rates.","items":{"$ref":"#/components/schemas/TariffResultItem"}}}}}}},"400":{"description":"Could not calculate the tariff.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"$ref":"#/components/schemas/ErrorMessage"}}}}}}}}}},"components":{"schemas":{"TariffResultItem":{"type":"object","properties":{"row":{"type":"integer","description":"Row number in the result list."},"service_type":{"type":"string","description":"Service category, e.g. PACKAGE or DOCUMENT."},"product":{"type":"string","description":"Product code, e.g. REGPACK."},"publish_rate":{"type":"number","description":"Base published rate before surcharges."},"forward_rate":{"type":"number","description":"Additional forwarding fee, if the destination requires a forwarding partner."},"shipping_surcharge_rate":{"type":"number","description":"Extra shipping surcharge applied to this route."},"commodity_surcharge_rate":{"type":"number","description":"Extra fee based on the commodity type."},"heavy_weight_surcharge_rate":{"type":"number","description":"Extra fee applied for heavy shipments."},"insurance_rate":{"type":"number","description":"Insurance fee, if applicable."},"wood_packing_rate":{"type":"number","description":"Wood packing fee, if applicable."},"document_surcharge":{"type":"number","description":"Extra fee for document shipments."},"is_embargo":{"type":"boolean","description":"true = the destination is currently closed. false = the destination is available."},"estimasi_sla":{"type":"string","description":"Estimated delivery time (SLA)."},"status":{"type":"string","description":"ACTIVE = route available. INACTIVE = destination closed."},"total_tariff":{"type":"number","description":"Final tariff. Only present in /v3/tariff."},"base_rate":{"type":"number","description":"Base rate before discount. Only present in /v3/tariff."},"total_normal_tariff":{"type":"number","description":"Normal tariff before any promo discount."},"total_basic_tariff":{"type":"number","description":"Basic tariff excluding optional add-ons."},"is_promo":{"type":"boolean","description":"Whether a promotional discount currently applies."},"total_tariff_after_discount":{"type":"number","description":"Final tariff after promo discount is applied."},"cod_amount":{"type":"number","description":"COD amount, only present in /v3/tariffv4."},"cod_fee":{"type":"number","description":"Fee charged for enabling COD."},"gross_weight":{"type":"number","description":"Actual physical weight, in kg."},"volume_weight":{"type":"number","description":"Calculated volumetric weight, in kg."},"chargeable_weight":{"type":"number","description":"The higher of gross weight and volume weight — used to calculate the final tariff."}}},"ErrorMessage":{"type":"object","description":"Bilingual error message returned by the API.","properties":{"en":{"type":"string","description":"Error message in English."},"id":{"type":"string","description":"Error message in Indonesian."}}}}}}
```

### **Response**

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

```json
{
  "origin": "KEBON JERUK, JAKARTA BARAT",
  "destination": "ANDIR, BANDUNG",
  "commodity": "ABR036",
  "weight": 1,
  "is_cod_area": true,
  "is_insurance": true,
  "price": 10000,
  "forward_area": "ANDIR, BANDUNG",
  "result": [
    {
      "row": 1,
      "service_type": "PACKAGE",
      "product": "REGPACK",
      "publish_rate": 6300,
      "forward_rate": 2000,
      "shipping_surcharge_rate": 2700,
      "commodity_surcharge_rate": 0,
      "heavy_weight_surcharge_rate": 0,
      "insurance_rate": 950,
      "wood_packing_rate": 0,
      "woodpacking_additional_weight": 3,
      "document_surcharge": 0,
      "is_embargo": false,
      "estimasi_sla": "3 - 6 Days",
      "status": "ACTIVE",
      "total_tariff": 11000,
      "base_rate": 11000
    },
    {
      "row": 2,
      "service_type": "PACKAGE",
      "product": "JAGOPACK",
      "publish_rate": 5670,
      "forward_rate": 2000,
      "shipping_surcharge_rate": 2430,
      "commodity_surcharge_rate": 0,
      "heavy_weight_surcharge_rate": 0,
      "insurance_rate": 950,
      "wood_packing_rate": 0,
      "woodpacking_additional_weight": 3,
      "document_surcharge": 0,
      "is_embargo": false,
      "estimasi_sla": "3 - 8 Days",
      "status": "ACTIVE",
      "total_tariff": 10100,
      "base_rate": 10100
    },
    {
      "row": 3,
      "service_type": "PACKAGE",
      "product": "BIGPACK",
      "publish_rate": 4500,
      "forward_rate": 2000,
      "shipping_surcharge_rate": 1800,
      "commodity_surcharge_rate": 0,
      "heavy_weight_surcharge_rate": 0,
      "insurance_rate": 950,
      "wood_packing_rate": 0,
      "woodpacking_additional_weight": 3,
      "document_surcharge": 0,
      "is_embargo": false,
      "estimasi_sla": "3 - 8 Days",
      "status": "ACTIVE",
      "total_tariff": 8300,
      "base_rate": 8300
    },
    {
      "row": 4,
      "service_type": "PACKAGE",
      "product": "BIGPACKFAST",
      "publish_rate": 5985,
      "forward_rate": 1100,
      "shipping_surcharge_rate": 2565,
      "commodity_surcharge_rate": 0,
      "heavy_weight_surcharge_rate": 0,
      "insurance_rate": 950,
      "wood_packing_rate": 0,
      "woodpacking_additional_weight": 3,
      "document_surcharge": 0,
      "is_embargo": false,
      "estimasi_sla": "- Days",
      "status": "ACTIVE",
      "total_tariff": 9650,
      "base_rate": 9650
    }
  ]
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "message": {
    "en": "not-available",
    "id": "Route not available"
  }
}
```

{% endtab %}

{% tab title="500" %}

```json
{
  "message": {
    "en": "not-available",
    "id": "Route not available"
  }
}
```

{% 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.lionparcel.com/api/api-reference-en/api-reference/rate-check-introduction/client-rate-check.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
