# Rate estimate

Rate estimate request lets you show your delivery rates directly to customers.

## Rate request <a href="#h_ee6e0b6db7" id="h_ee6e0b6db7"></a>

We send a rate request when a customer goes to the rate page in Shopify checkout. To format the rate request:

1. Go to the App Setup page

   [![](https://downloads.intercomcdn.com/i/o/688861450/4d912114e109b1a55d2f8d27/image.png?expires=1725953400\&signature=ba505f2b3ce93c68917e848871e8596ed2ca722fd4a393c0b9423c01103abcd9\&req=cigvHs9%2FmYRfFb4f3HP0gGMVG4p6BnLCHeTFO%2F3riTGfIXCcSeTy8IWUX%2BiW%0AmII%3D%0A)](https://downloads.intercomcdn.com/i/o/688861450/4d912114e109b1a55d2f8d27/image.png?expires=1725953400\&signature=ba505f2b3ce93c68917e848871e8596ed2ca722fd4a393c0b9423c01103abcd9\&req=cigvHs9%2FmYRfFb4f3HP0gGMVG4p6BnLCHeTFO%2F3riTGfIXCcSeTy8IWUX%2BiW%0AmII%3D%0A)
2. Click Rate estimate

   [![](https://downloads.intercomcdn.com/i/o/688862093/47358120074f928d95036593/image.png?expires=1725953400\&signature=221579bd2d31f73b92c84fc1cea842b85ebb43b9282605fc907adcd6e7eba04b\&req=cigvHs98nYhcFb4f3HP0gBZQbQhkQX5dRnUD7A48I4CCA%2Bem7rwBgzVqoQtP%0Ak1k%3D%0A)](https://downloads.intercomcdn.com/i/o/688862093/47358120074f928d95036593/image.png?expires=1725953400\&signature=221579bd2d31f73b92c84fc1cea842b85ebb43b9282605fc907adcd6e7eba04b\&req=cigvHs98nYhcFb4f3HP0gBZQbQhkQX5dRnUD7A48I4CCA%2Bem7rwBgzVqoQtP%0Ak1k%3D%0A)

First, choose between 2 rate modes:

* Manual
* Automatic

If you don’t want to offer rate estimates, you can set the rate mode to Manual. Merchants will then need to set up rates on their own. If you set the mode to Automatic, you will need to format the rate estimate request.

## Format the rate API Endpoint <a href="#h_8d007df3e8" id="h_8d007df3e8"></a>

The rate request is a POST to an endpoint of your choice. We will use your Staging/Production endpoint as the base, so you only need to add the missing path to your rate estimate endpoint.

[![](https://downloads.intercomcdn.com/i/o/688862710/298bcedede2a7ad82d17ef92/image.png?expires=1725953400\&signature=91b3f848375c62b61842d96aa8436d98944216b027eedc5f37c44a9e5a0b41b1\&req=cigvHs98moBfFb4f3HP0gKAJhgtNIriQ4dGZg7cO5oKaWgbb%2F756eGMHdp0%2F%0Aae5UR%2Fh7jsWA2%2BsHUg%3D%3D%0A)](https://downloads.intercomcdn.com/i/o/688862710/298bcedede2a7ad82d17ef92/image.png?expires=1725953400\&signature=91b3f848375c62b61842d96aa8436d98944216b027eedc5f37c44a9e5a0b41b1\&req=cigvHs98moBfFb4f3HP0gKAJhgtNIriQ4dGZg7cO5oKaWgbb%2F756eGMHdp0%2F%0Aae5UR%2Fh7jsWA2%2BsHUg%3D%3D%0A)

If your rate estimate endpoint is completely different than the general endpoint you set up earlier, just make sure you include https\:// in the URL.

[![](https://downloads.intercomcdn.com/i/o/688863580/6418a7813edbcbcea530fa22/image.png?expires=1725953400\&signature=d241d1f0691ef20f419f8361bbcb9e58186adfa826acdd66b8e920c0951e349f\&req=cigvHs99mIlfFb4f3HP0gN%2BsUk%2BaaR2NxwKJyc22StlNobWco1CqZ5mUd8%2Bc%0AMI%2BfpH%2B0C3rIVjFrtQ%3D%3D%0A)](https://downloads.intercomcdn.com/i/o/688863580/6418a7813edbcbcea530fa22/image.png?expires=1725953400\&signature=d241d1f0691ef20f419f8361bbcb9e58186adfa826acdd66b8e920c0951e349f\&req=cigvHs99mIlfFb4f3HP0gN%2BsUk%2BaaR2NxwKJyc22StlNobWco1CqZ5mUd8%2Bc%0AMI%2BfpH%2B0C3rIVjFrtQ%3D%3D%0A)

## Format the rate estimate request <a href="#h_74e9740a75" id="h_74e9740a75"></a>

The format of the request body needs to be valid JSON. We support liquid variables that are on our [rate estimate list](https://partners.zapiet.com/docs/last-mile/allowed-variables), and you can use any [liquid filter](https://shopify.dev/docs/themes/liquid/reference/filters). Here’s an example request that will be prefilled automatically for you:

[![](https://zapiet-ltd-2e9268abd76f.intercom-attachments-7.com/i/o/525543687/e491488896efa902c0db28b8/mPNOO99jfApykRak7XeclDJ3jbO5cdYr7A.PNG-1620038518?expires=1725953400\&signature=ac4c36d2df062a4e1ddb830530b3595bd88d72e8bb1a2b765378a962cef8f07d\&req=cSIiE819m4lYFb4f3HP0gGQl5OsZxqBEWsg4IdlSNpAbNP8Idavr%2FqWMhal9%0AHB2VwGVR%2BBXFvtE%2FIQ%3D%3D%0A)](https://zapiet-ltd-2e9268abd76f.intercom-attachments-7.com/i/o/525543687/e491488896efa902c0db28b8/mPNOO99jfApykRak7XeclDJ3jbO5cdYr7A.PNG-1620038518?expires=1725953400\&signature=ac4c36d2df062a4e1ddb830530b3595bd88d72e8bb1a2b765378a962cef8f07d\&req=cSIiE819m4lYFb4f3HP0gGQl5OsZxqBEWsg4IdlSNpAbNP8Idavr%2FqWMhal9%0AHB2VwGVR%2BBXFvtE%2FIQ%3D%3D%0A)

### Line item schema <a href="#h_14e6c4778f" id="h_14e6c4778f"></a>

If you need line items in your request, create the json for one line item in the Line item schema section. You can then pass the array of line items in the request body by using the ####{{ line\_items }} liquid variable.

## Rate response <a href="#h_87e831caf6" id="h_87e831caf6"></a>

Please return only 1 rate in your response.

### Rate identifier <a href="#h_8d0cfcddad" id="h_8d0cfcddad"></a>

[![](https://zapiet-ltd-2e9268abd76f.intercom-attachments-7.com/i/o/525543688/fc7680b06c02de87d0b5b44b/jLJGuGLXu2aUPKdzemfc53lr-Pm081fIIg.png-1620043308?expires=1725953400\&signature=d5a5d659f80c5bddfa7733c79f543a66a048e5e581d30c362ea4f7cc9b0a7991\&req=cSIiE819m4lXFb4f3HP0gLa%2Blz8rSVMmbBWFIdJ3uysQ8a%2FFavA4ruNF8Ube%0AYcPWGSrM26XmKAIPOA%3D%3D%0A)](https://zapiet-ltd-2e9268abd76f.intercom-attachments-7.com/i/o/525543688/fc7680b06c02de87d0b5b44b/jLJGuGLXu2aUPKdzemfc53lr-Pm081fIIg.png-1620043308?expires=1725953400\&signature=d5a5d659f80c5bddfa7733c79f543a66a048e5e581d30c362ea4f7cc9b0a7991\&req=cSIiE819m4lXFb4f3HP0gLa%2Blz8rSVMmbBWFIdJ3uysQ8a%2FFavA4ruNF8Ube%0AYcPWGSrM26XmKAIPOA%3D%3D%0A)

Enter the field name where you return the rate identifier. If you don’t have a rate identifier, leave the field blank.

### Rate price <a href="#h_55f131524b" id="h_55f131524b"></a>

[![](https://zapiet-ltd-2e9268abd76f.intercom-attachments-7.com/i/o/525543691/77eca26fd6b59c9ddb944ced/ug5aW2zF_WDD6tOECsQlKAHniTvtYvCNzg.png-1620043460?expires=1725953400\&signature=aa100f69a7ab39bc9cb2dee29c8ffe506afc486ec3f571d0837e54a96d28cf1b\&req=cSIiE819m4heFb4f3HP0gNiVlNvnJq4b1Zg1TedauoxnSBlIXbryqUQNq5n9%0AOgrMlJihDkTuKTGqug%3D%3D%0A)](https://zapiet-ltd-2e9268abd76f.intercom-attachments-7.com/i/o/525543691/77eca26fd6b59c9ddb944ced/ug5aW2zF_WDD6tOECsQlKAHniTvtYvCNzg.png-1620043460?expires=1725953400\&signature=aa100f69a7ab39bc9cb2dee29c8ffe506afc486ec3f571d0837e54a96d28cf1b\&req=cSIiE819m4heFb4f3HP0gNiVlNvnJq4b1Zg1TedauoxnSBlIXbryqUQNq5n9%0AOgrMlJihDkTuKTGqug%3D%3D%0A)

Select whether you return the price in Cents or Dollars, and enter the field name for the price

### Rate currency <a href="#h_faa13ce59a" id="h_faa13ce59a"></a>

[![](https://zapiet-ltd-2e9268abd76f.intercom-attachments-7.com/i/o/525543693/143b474d0c32d0b0d2013c57/KZzskKQ2b_9qpvLpefpuGi0Pf7aEN5KD4g.png-1620043513?expires=1725953400\&signature=73ec3adaf50ae81d7834a18e8da9a8fe6391def39e535c6830225b606dcfc9fd\&req=cSIiE819m4hcFb4f3HP0gEqJ9WOdnvuzNLU6tXeTebCjtHc4T0nQoQ1hsqzI%0AVXxKqPpAu92kRh99uw%3D%3D%0A)](https://zapiet-ltd-2e9268abd76f.intercom-attachments-7.com/i/o/525543693/143b474d0c32d0b0d2013c57/KZzskKQ2b_9qpvLpefpuGi0Pf7aEN5KD4g.png-1620043513?expires=1725953400\&signature=73ec3adaf50ae81d7834a18e8da9a8fe6391def39e535c6830225b606dcfc9fd\&req=cSIiE819m4hcFb4f3HP0gEqJ9WOdnvuzNLU6tXeTebCjtHc4T0nQoQ1hsqzI%0AVXxKqPpAu92kRh99uw%3D%3D%0A)

Enter the field name if you support multiple currencies, or the currency code if you return only one currency.

## Merchant perspective <a href="#h_df731d7b81" id="h_df731d7b81"></a>

When a merchant sets up your integration, they can choose:

* Whether they want to use your rates
* To offer free delivery after a certain threshold
* Name the rate however they want
* Adjust the handling fee

[![](https://zapiet-ltd-2e9268abd76f.intercom-attachments-7.com/i/o/525543697/2a04471017e296850fc6eab2/rwq7AzW8IDFuU5hPHDRBUkk1KfDLpbeCRg.png-1620044343?expires=1725953400\&signature=93b76fe0220356e7e3d765b266ed0e1ddc973db7b95ff692eb7bb014d71ec416\&req=cSIiE819m4hYFb4f3HP0gHnb4h4sGxLJ9gM4dJpCpk5NqoSWWhG6OR9Yv1nA%0AS5hbsqHFrFVUKIW4yw%3D%3D%0A)](https://zapiet-ltd-2e9268abd76f.intercom-attachments-7.com/i/o/525543697/2a04471017e296850fc6eab2/rwq7AzW8IDFuU5hPHDRBUkk1KfDLpbeCRg.png-1620044343?expires=1725953400\&signature=93b76fe0220356e7e3d765b266ed0e1ddc973db7b95ff692eb7bb014d71ec416\&req=cSIiE819m4hYFb4f3HP0gHnb4h4sGxLJ9gM4dJpCpk5NqoSWWhG6OR9Yv1nA%0AS5hbsqHFrFVUKIW4yw%3D%3D%0A)

## Testing rates <a href="#h_2d36e58dc5" id="h_2d36e58dc5"></a>

The only way to test rates estimate is to go through Shopify checkout while using our app. If you would like us to give you a test environment that’s ready to go, send us an email at <partners@zapiet.com>..


---

# Agent Instructions: 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:

```
GET https://docs.zapiet.com/last-mile-api/rate-estimate.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
