---
updatedAt: 2026-10-15T15:08:20.000Z
agentTools:
  projectIndex: https://developers.easyship.com/llms.txt
---

# How to get Shipping Rates

<HTMLBlock>{`
<style>
  /* Every rule is scoped to the guide wrapper class. The build doubles that class in each
     selector so it outranks ReadMe's .markdown-body rules; !important only where ReadMe wins anyway. */
  .es-guide.es-guide { --es-text: #374151; --es-muted: #6B7280; --es-head: #111827; --es-line: #E5E7EB; --es-soft: #F9FAFB; --es-link: #1d75b3; --es-link-soft: rgba(29,117,179,.08); --es-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-family: inherit; color: var(--es-text); font-size: 15px; line-height: 1.65; max-width: 780px; margin: 0; padding: 0 0 40px; background: #FFFFFF; }
  .es-guide.es-guide *, .es-guide.es-guide *::before, .es-guide.es-guide *::after { box-sizing: border-box; }

  .es-guide.es-guide .subtitle { font-size: 16px; color: var(--es-muted); margin: 0 0 20px; line-height: 1.6; }
  .es-guide.es-guide h2 { font-size: 20px !important; font-weight: 600 !important; color: var(--es-head); margin: 0 0 12px !important; padding: 0 !important; border: 0 !important; letter-spacing: -0.01em; line-height: 1.3 !important; }
  .es-guide.es-guide h3 { font-size: 16px; font-weight: 600; color: var(--es-head); margin: 24px 0 8px; }
  .es-guide.es-guide section { padding: 0; margin: 0; }
  .es-guide.es-guide section + section { border-top: 1px solid var(--es-line); margin-top: 32px; padding-top: 28px; }
  .es-guide.es-guide p { margin: 0 0 12px; font-size: 15px; color: var(--es-text); }
  .es-guide.es-guide strong { color: var(--es-head); font-weight: 600; }
  .es-guide.es-guide ul { margin: 0 0 12px; padding-left: 20px; }
  .es-guide.es-guide ul li { font-size: 15px; line-height: 1.7; }

  /* Links: no underline anywhere (ReadMe forces one on .markdown-body a[href]) */
  .es-guide.es-guide a, .es-guide.es-guide a[href], .es-guide.es-guide a:hover, .es-guide.es-guide a:focus { color: var(--es-link); text-decoration: none !important; box-shadow: none !important; }
  .es-guide.es-guide a:hover { color: #165887; }

  /* Inline code (ReadMe wraps it in its own component; keep it quiet) */
  .es-guide.es-guide code, .es-guide.es-guide code span { font-family: var(--es-mono) !important; font-size: 13px !important; color: #1F2937 !important; background: #F3F4F6; padding: 1px 5px; border-radius: 4px; border: 0; white-space: normal; }
  .es-guide.es-guide code span { background: none; padding: 0; }

  /* Endpoint pills */
  .es-guide.es-guide .api-refs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; padding: 0; }
  .es-guide.es-guide .api-ref-pill { display: inline-flex !important; align-items: center; gap: 8px; height: 30px; padding: 0 12px 0 6px; border-radius: 8px; border: 1px solid var(--es-line); background: #fff; font-family: var(--es-mono); font-size: 12.5px; line-height: 1; color: #1F2937 !important; white-space: nowrap; transition: border-color .15s, background .15s; }
  .es-guide.es-guide .api-ref-pill:hover { border-color: #C7D2DE; background: var(--es-soft); color: #111827 !important; }
  .es-guide.es-guide .method { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 5px; font-family: var(--es-mono); font-size: 10.5px; font-weight: 700; letter-spacing: .02em; line-height: 1; background: rgba(29,117,179,.12); color: #165887; }
  .es-guide.es-guide .method.get { background: rgba(16,185,129,.14); color: #047857; }
  .es-guide.es-guide .method.delete { background: rgba(239,68,68,.12); color: #B91C1C; }
  .es-guide.es-guide .method.patch { background: rgba(245,158,11,.15); color: #B45309; }

  /* Callouts */
  .es-guide.es-guide .callout { background: var(--es-soft); border: 1px solid var(--es-line); border-left: 3px solid var(--es-link); padding: 12px 16px; border-radius: 8px; margin: 16px 0 !important; font-size: 14px; color: var(--es-text); }
  .es-guide.es-guide .callout.warn { border-left-color: #F59E0B; background: #FFFBEB; border-color: #FDE68A; }
  .es-guide.es-guide .callout.tip  { border-left-color: #10B981; background: #F0FDF4; border-color: #BBF7D0; }

  /* Code group (Mintlify / Razorpay style) */
  .es-guide.es-guide .es-codegroup { margin: 12px 0 20px; border: 1px solid rgba(3,7,18,.08); border-radius: 14px; background: var(--es-soft); padding: 2px; overflow: hidden; }
  .es-guide.es-guide .es-codehead { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 12px 6px 14px; font-size: 12px; line-height: 20px; }
  .es-guide.es-guide .es-codetab { position: relative; font-weight: 600; color: var(--es-link); padding: 2px 0; }
  .es-guide.es-guide .es-codetab::after { content: ""; position: absolute; left: 0; right: 0; bottom: -7px; height: 2px; border-radius: 2px; background: var(--es-link); }
  .es-guide.es-guide .es-codemeta { font-family: var(--es-mono); font-size: 11.5px; color: var(--es-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .es-guide.es-guide .es-status { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: #047857; }
  .es-guide.es-guide .es-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #10B981; }
  .es-guide.es-guide .es-code { display: block; white-space: pre; margin: 0; background: #FFFFFF; color: #24292F; border: 1px solid rgba(3,7,18,.06); border-radius: 12px; padding: 14px 16px; overflow-x: auto; font-family: var(--es-mono); font-size: 13px; line-height: 1.7; tab-size: 2; }
  .es-guide.es-guide .es-code .comment { color: #6E7781; font-style: italic; }
  .es-guide.es-guide .es-code .string  { color: #0A3069; }
  .es-guide.es-guide .es-code .key     { color: #0550AE; }
  .es-guide.es-guide .es-code .bool    { color: #CF222E; }
  .es-guide.es-guide .es-code .num     { color: #0550AE; }
  .es-guide.es-guide .es-code .method-line { color: #8250DF; font-weight: 600; }
  .es-guide.es-guide .es-code .flag    { color: #953800; }
  .es-guide.es-guide .es-code .cmd     { color: #8250DF; font-weight: 600; }

  /* Tables (ReadMe sets .markdown-body table { display:block }) */
  .es-guide.es-guide .table-wrap { overflow-x: auto; margin: 12px 0 20px; border: 1px solid var(--es-line); border-radius: 10px; }
  .es-guide.es-guide table { display: table !important; width: 100% !important; border-collapse: collapse !important; border: 0 !important; margin: 0 !important; font-size: 14px; table-layout: auto; }
  .es-guide.es-guide thead, .es-guide.es-guide tbody, .es-guide.es-guide tr { background: none !important; border: 0 !important; }
  .es-guide.es-guide th { text-align: left !important; font-weight: 600; font-size: 12px; text-transform: none; letter-spacing: 0; color: var(--es-muted); padding: 10px 14px !important; border: 0 !important; border-bottom: 1px solid var(--es-line) !important; background: var(--es-soft) !important; vertical-align: middle !important; }
  .es-guide.es-guide td { padding: 10px 14px !important; border: 0 !important; border-bottom: 1px solid var(--es-line) !important; vertical-align: top !important; font-size: 14px; color: var(--es-text); text-align: left !important; background: #fff !important; }
  .es-guide.es-guide tr:last-child td { border-bottom: 0 !important; }
  .es-guide.es-guide td p, .es-guide.es-guide th p { margin: 0 !important; }

  .es-guide.es-guide .badge { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 999px; white-space: nowrap; line-height: 18px; }
  .es-guide.es-guide .badge-deprecated { background: #FEF3C7; color: #92400E; }
  .es-guide.es-guide .badge-latest     { background: #DCFCE7; color: #166534; }
  .es-guide.es-guide .badge-supported  { background: var(--es-link-soft); color: #165887; }
  .es-guide.es-guide .badge-error      { background: #FEE2E2; color: #991B1B; }
  .es-guide.es-guide .check { color: #059669; font-weight: 700; }
  .es-guide.es-guide .cross { color: #DC2626; font-weight: 700; }

  /* At a glance */
  .es-guide.es-guide .glance { display: flex; flex-wrap: wrap; border: 1px solid var(--es-line); border-radius: 10px; overflow: hidden; margin: 0 0 24px; }
  .es-guide.es-guide .glance > div { flex: 1 1 170px; padding: 12px 16px; border-right: 1px solid var(--es-line); margin-right: -1px; }
  .es-guide.es-guide .glance .g-label { font-size: 11.5px; font-weight: 600; color: var(--es-muted); margin-bottom: 2px; }
  .es-guide.es-guide .glance .g-value { font-size: 14px; font-weight: 500; color: var(--es-head); line-height: 1.45; }

  /* Cards */
  .es-guide.es-guide .card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 12px 0 20px; }
  .es-guide.es-guide .card { border: 1px solid var(--es-line); border-radius: 10px; padding: 16px 18px; background: #fff; }
  .es-guide.es-guide .card .card-icon { font-size: 18px; margin-bottom: 4px; }
  .es-guide.es-guide .card .card-head { font-size: 15px; font-weight: 600; color: var(--es-head); margin-bottom: 4px; }
  .es-guide.es-guide .card p { font-size: 14px; margin: 0 0 8px; }
  .es-guide.es-guide .card p:last-child { margin-bottom: 0; }
  .es-guide.es-guide .card .card-tag { display: inline-block; font-size: 11px; font-weight: 600; color: #165887; background: var(--es-link-soft); border-radius: 999px; padding: 1px 9px; margin-bottom: 8px; }

  /* Flow diagram */
  .es-guide.es-guide .flow { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; margin: 8px 0 20px; }
  .es-guide.es-guide .flow .flow-step { flex: 1 1 150px; border: 1px solid var(--es-line); border-radius: 10px; padding: 10px 14px; background: var(--es-soft); }
  .es-guide.es-guide .flow .flow-num { font-size: 11.5px; font-weight: 600; color: var(--es-muted); }
  .es-guide.es-guide .flow .flow-title { font-size: 14px; font-weight: 600; color: var(--es-head); margin: 1px 0 2px; }
  .es-guide.es-guide .flow .flow-sub { font-size: 12px; color: var(--es-muted); font-family: var(--es-mono); word-break: break-word; }
  .es-guide.es-guide .flow .flow-arrow { align-self: center; color: #9CA3AF; font-size: 16px; flex: 0 0 auto; }

  .es-guide.es-guide .example-block { border: 1px solid var(--es-line); border-radius: 10px; padding: 16px 20px; margin-bottom: 20px; background: var(--es-soft); }

  /* Numbered steps (ReadMe adds list padding and li+li margins) */
  .es-guide.es-guide .step-list { counter-reset: steps; list-style: none !important; padding: 0 !important; margin: 0 0 16px !important; }
  .es-guide.es-guide .step-list > li { counter-increment: steps; display: flex; gap: 14px; margin: 0 0 24px !important; padding: 0 !important; list-style: none !important; }
  .es-guide.es-guide .step-list > li::before { content: counter(steps); flex-shrink: 0; width: 24px; height: 24px; background: var(--es-link-soft); color: #165887; border-radius: 50%; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
  .es-guide.es-guide .step-body { flex: 1; min-width: 0; }
  .es-guide.es-guide .step-body > strong { display: block; font-size: 15px; color: var(--es-head); margin-bottom: 6px; }
  .es-guide.es-guide .step-body p { margin: 0 0 10px; }

  .es-guide.es-guide .faq-item { border-bottom: 1px solid var(--es-line); padding: 14px 0; }
  .es-guide.es-guide .faq-item:last-child { border-bottom: 0; }
  .es-guide.es-guide .faq-q { font-weight: 600; font-size: 15px; color: var(--es-head); margin-bottom: 4px; }
  .es-guide.es-guide .faq-a { font-size: 14.5px; color: var(--es-text); }

  .es-guide.es-guide .related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 8px; }
  .es-guide.es-guide .related-card { display: flex !important; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--es-line); border-radius: 10px; background: #fff; transition: border-color .15s; }
  .es-guide.es-guide .related-card:hover { border-color: #C7D2DE; }
  .es-guide.es-guide .related-card .card-title { font-size: 14px; font-weight: 600; color: var(--es-head); }
  .es-guide.es-guide .related-card .card-sub { font-size: 12px; color: var(--es-muted); font-family: var(--es-mono); }

  .es-guide.es-guide .notice { border: 1px solid #FDE68A; border-left: 3px solid #F59E0B; background: #FFFBEB; border-radius: 8px; padding: 12px 16px; margin: 0 0 24px; }
  .es-guide.es-guide .notice-header { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
  .es-guide.es-guide .notice-title { font-size: 14.5px; font-weight: 600; color: var(--es-head); }
  .es-guide.es-guide .notice-date { font-size: 11.5px; font-weight: 600; color: #92400E; background: #FEF3C7; padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
  .es-guide.es-guide .notice p { margin: 0 0 4px; font-size: 14px; }
  .es-guide.es-guide .notice p:last-child { margin-bottom: 0; }

  .es-guide.es-guide .toc { background: var(--es-soft); border: 1px solid var(--es-line); border-radius: 10px; padding: 14px 18px; margin: 0 0 28px; }
  .es-guide.es-guide .toc-title { font-size: 12px; font-weight: 600; color: var(--es-muted); margin-bottom: 6px; }
  .es-guide.es-guide .toc ol { margin: 0 !important; padding-left: 18px !important; }
  .es-guide.es-guide .toc li { font-size: 14px; line-height: 1.8; margin: 0 !important; }

  /* Remove before publishing: marks facts that product still needs to confirm */
  .es-guide.es-guide .confirm { background: #FEF08A; color: #713F12; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 4px; white-space: nowrap; }

  .es-guide.es-guide .doc-footer { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--es-line); font-size: 13px; color: var(--es-muted); }

  @media (max-width: 640px) {
    .es-guide.es-guide .flow .flow-arrow { display: none; }
    .es-guide.es-guide .flow .flow-step { flex-basis: 100%; }
    .es-guide.es-guide .es-code { font-size: 12px; padding: 12px; }
    .es-guide.es-guide .glance > div { flex-basis: 100%; border-right: 0; border-bottom: 1px solid var(--es-line); }
  }
</style>

<div class="es-guide">
<p class="subtitle">Compare live prices and delivery times from every courier on your account in one call, with taxes and duties included, then choose the best option for each order.</p>

<div class="api-refs">
  <a class="api-ref-pill" href="https://developers.easyship.com/reference/rates_request"><span class="method">POST</span>/rates</a>
  <a class="api-ref-pill" href="https://developers.easyship.com/reference/shipments_create"><span class="method">POST</span>/shipments</a>
</div>

<div class="glance">
  <div><div class="g-label">What it does</div><div class="g-value">Returns every available courier option for a parcel</div></div>
  <div><div class="g-label">You need</div><div class="g-value">From address, to address, parcel weight and items</div></div>
  <div><div class="g-label">Scope</div><div class="g-value"><code>public.rate:read</code></div></div>
  <div><div class="g-label">Next step</div><div class="g-value">Create a shipment with the chosen <code>courier_service.id</code></div></div>
</div>

<div class="toc">
  <div class="toc-title">On this page</div>
  <ol>
    <li><a href="#uses">When to use it</a></li>
    <li><a href="#how">How it works</a></li>
    <li><a href="#request">Request rates</a></li>
    <li><a href="#read">Read and pick a rate</a></li>
    <li><a href="#options">Useful options</a></li>
    <li><a href="#faq">FAQ and troubleshooting</a></li>
  </ol>
</div>

<section id="uses">
  <h2>When to use it</h2>
  <div class="card-grid">
    <div class="card"><div class="card-icon">&#128722;</div><div class="card-head">Rates at checkout</div><p>Show buyers cheapest, fastest and best-value options. <a href="https://developers.easyship.com/docs/how-to-display-rates-at-checkout">Checkout guide &#8594;</a></p></div>
    <div class="card"><div class="card-icon">&#9881;&#65039;</div><div class="card-head">Auto-select a courier</div><p>Pick a courier in your backend automatically before you buy the label.</p></div>
    <div class="card"><div class="card-icon">&#127757;</div><div class="card-head">Landed cost</div><p>Quote shipping, tax and duty together for international orders.</p></div>
  </div>
</section>

<section id="how">
  <h2>How it works</h2>
  <div class="flow">
    <div class="flow-step"><div class="flow-num">Step 1</div><div class="flow-title">Request rates</div><div class="flow-sub">POST /rates</div></div>
    <div class="flow-arrow">&#8594;</div>
    <div class="flow-step"><div class="flow-num">Step 2</div><div class="flow-title">Pick a rate</div><div class="flow-sub">courier_service.id</div></div>
    <div class="flow-arrow">&#8594;</div>
    <div class="flow-step"><div class="flow-num">Step 3</div><div class="flow-title">Create shipment</div><div class="flow-sub">POST /shipments</div></div>
    <div class="flow-arrow">&#8594;</div>
    <div class="flow-step"><div class="flow-num">Step 4</div><div class="flow-title">Buy label</div><div class="flow-sub">POST /shipments/{id}/label</div></div>
  </div>
  <p>Easyship gets live prices from every eligible courier service, applies your <a href="https://developers.easyship.com/docs/how-to-automate-your-shipments">shipping rules</a> (if enabled), and ranks the results for you.</p>
</section>

<section id="request">
  <h2>Request rates</h2>
<div class="es-codegroup"><div class="es-codehead"><span class="es-codetab">cURL</span><span class="es-codemeta">POST /2024-09/rates</span></div><div class="es-code"><span class="cmd">curl</span> <span class="flag">-X</span> <span class="method-line">POST</span> https://public-api.easyship.com/2024-09/rates \
  <span class="flag">-H</span> <span class="string">"Authorization: Bearer $EASYSHIP_TOKEN"</span> \
  <span class="flag">-H</span> <span class="string">"Content-Type: application/json"</span> \
  <span class="flag">-d</span> '{
    <span class="key">"origin_address"</span>: {
      <span class="key">"line_1"</span>: <span class="string">"1 Market St"</span>, <span class="key">"city"</span>: <span class="string">"San Francisco"</span>, <span class="key">"state"</span>: <span class="string">"CA"</span>,
      <span class="key">"postal_code"</span>: <span class="string">"94105"</span>, <span class="key">"country_alpha2"</span>: <span class="string">"US"</span>
    },
    <span class="key">"destination_address"</span>: {
      <span class="key">"line_1"</span>: <span class="string">"10 Downing Street"</span>, <span class="key">"city"</span>: <span class="string">"London"</span>,
      <span class="key">"postal_code"</span>: <span class="string">"SW1A 2AA"</span>, <span class="key">"country_alpha2"</span>: <span class="string">"GB"</span>
    },
    <span class="key">"incoterms"</span>: <span class="string">"DDU"</span>,
    <span class="key">"courier_settings"</span>: { <span class="key">"apply_shipping_rules"</span>: <span class="bool">true</span>, <span class="key">"show_courier_logo_url"</span>: <span class="bool">true</span> },
    <span class="key">"shipping_settings"</span>: { <span class="key">"units"</span>: { <span class="key">"weight"</span>: <span class="string">"kg"</span>, <span class="key">"dimensions"</span>: <span class="string">"cm"</span> } },
    <span class="key">"parcels"</span>: [{
      <span class="key">"total_actual_weight"</span>: <span class="num">1.2</span>,
      <span class="key">"box"</span>: { <span class="key">"length"</span>: <span class="num">30</span>, <span class="key">"width"</span>: <span class="num">20</span>, <span class="key">"height"</span>: <span class="num">10</span> },
      <span class="key">"items"</span>: [{
        <span class="key">"description"</span>: <span class="string">"T-shirt"</span>, <span class="key">"category"</span>: <span class="string">"fashion"</span>, <span class="key">"hs_code"</span>: <span class="string">"61091000"</span>,
        <span class="key">"quantity"</span>: <span class="num">2</span>, <span class="key">"declared_currency"</span>: <span class="string">"USD"</span>, <span class="key">"declared_customs_value"</span>: <span class="num">25</span>
      }]
    }]
  }'</div></div>
  <div class="callout warn"><strong>Shipping to or within the US, CA, MX or AU?</strong> Always send <code>city</code> and <code>state</code> for both addresses. Some couriers won't return a rate without them.</div>
</section>

<section id="read">
  <h2>Read and pick a rate</h2>
  <p>The response has a <code>rates</code> array with one entry per courier service:</p>
<div class="es-codegroup"><div class="es-codehead"><span class="es-codetab">Response</span><span class="es-codemeta"><span class="es-status">200 OK</span></span></div><div class="es-code">{
  <span class="key">"rates"</span>: [{
    <span class="key">"courier_service"</span>: {
      <span class="key">"id"</span>: <span class="string">"01563646-58c1-4607-8fe0-cae3e33c0001"</span>,
      <span class="key">"name"</span>: <span class="string">"DHL Express Worldwide"</span>,
      <span class="key">"umbrella_name"</span>: <span class="string">"DHL"</span>
    },
    <span class="key">"currency"</span>: <span class="string">"USD"</span>,
    <span class="key">"total_charge"</span>: <span class="num">38.40</span>,
    <span class="key">"shipment_charge"</span>: <span class="num">32.00</span>,
    <span class="key">"fuel_surcharge"</span>: <span class="num">6.40</span>,
    <span class="key">"min_delivery_time"</span>: <span class="num">2</span>,
    <span class="key">"max_delivery_time"</span>: <span class="num">4</span>,
    <span class="key">"estimated_import_tax"</span>: <span class="num">10.00</span>,
    <span class="key">"estimated_import_duty"</span>: <span class="num">0.0</span>,
    <span class="key">"cost_rank"</span>: <span class="num">2.0</span>,
    <span class="key">"delivery_time_rank"</span>: <span class="num">1.0</span>,
    <span class="key">"value_for_money_rank"</span>: <span class="num">1.0</span>,
    <span class="key">"easyship_rating"</span>: <span class="num">4.0</span>
  }]
}</div></div>
  <div class="table-wrap"><table>
    <thead><tr><th>Field</th><th>What it tells you</th></tr></thead>
    <tbody>
      <tr><td><code>courier_service.id</code></td><td><strong>What you pass to Create a Shipment</strong></td></tr>
      <tr><td><code>total_charge</code></td><td>What you pay (shipping + surcharges + fees)</td></tr>
      <tr><td><code>min_delivery_time</code> / <code>max_delivery_time</code></td><td>Delivery estimate in working days</td></tr>
      <tr><td><code>estimated_import_tax</code> / <code>estimated_import_duty</code></td><td>What the buyer pays on import (see <a href="https://developers.easyship.com/docs/how-to-calculate-taxes-and-duties">Taxes and Duties</a>)</td></tr>
      <tr><td><code>cost_rank</code> = 1</td><td>&#128176; Cheapest</td></tr>
      <tr><td><code>delivery_time_rank</code> = 1</td><td>&#9889; Fastest</td></tr>
      <tr><td><code>value_for_money_rank</code> = 1</td><td>&#11088; Best value</td></tr>
    </tbody>
  </table></div>
  <div class="callout tip"><strong>Simple checkout pattern:</strong> show three options, labelled Cheapest, Fastest and Best value, using the three rank fields.</div>
</section>

<section id="options">
  <h2>Useful options</h2>
  <div class="table-wrap"><table>
    <thead><tr><th>Option</th><th>Effect</th></tr></thead>
    <tbody>
      <tr><td><code>incoterms: "DDP"</code></td><td>Taxes and duties are added to the price you pay, so the buyer pays nothing on delivery</td></tr>
      <tr><td><code>calculate_tax_and_duties: false</code></td><td>Skips T&amp;D estimates, so the call isn't billed as T&amp;D (DDU only)</td></tr>
      <tr><td><code>set_as_residential</code></td><td>Applies residential delivery surcharges where the courier charges them</td></tr>
      <tr><td><code>insurance</code></td><td>Adds the insurance fee to each rate</td></tr>
      <tr><td><code>courier_settings.apply_shipping_rules</code></td><td>Applies your shipping rules (e.g. hide a courier, force a box)</td></tr>
      <tr><td><code>filter_options</code></td><td>Filters the returned rates</td></tr>
    </tbody>
  </table></div>
</section>

<section id="faq">
  <h2>FAQ and troubleshooting</h2>
  <div class="faq-item">
    <div class="faq-q">Why am I getting an empty <code>rates</code> array?</div>
    <div class="faq-a">The usual causes are a missing <code>city</code> or <code>state</code>, a weight over the courier's limit, or no courier enabled for that route. Check your enabled couriers in the dashboard.</div>
  </div>
  <div class="faq-item">
    <div class="faq-q">Why does sandbox show fewer couriers?</div>
    <div class="faq-a">Sandbox returns sample couriers only. Use production to see your full list.</div>
  </div>
  <div class="faq-item">
    <div class="faq-q">Is the price held after I request it?</div>
    <div class="faq-a">No. Rates are live. If time has passed, request rates again before you buy the label.</div>
  </div>
  <div class="faq-item">
    <div class="faq-q">How do I resolve a <code>422 invalid_content</code>?</div>
    <div class="faq-a">A required field is missing. <code>origin_address</code>, <code>destination_address</code> and <code>parcels</code> are required. The <code>details</code> array names the field.</div>
  </div>
</section>

<section id="related">
  <h2>Related</h2>
  <div class="related-grid">
    <a class="related-card" href="https://developers.easyship.com/docs/how-to-display-rates-at-checkout"><span class="card-title">Display Rates at Checkout</span><span class="card-sub">Guide</span></a>
    <a class="related-card" href="https://developers.easyship.com/docs/how-to-calculate-taxes-and-duties"><span class="card-title">Calculate Taxes and Duties</span><span class="card-sub">Guide</span></a>
    <a class="related-card" href="https://developers.easyship.com/docs/how-to-automate-your-shipments"><span class="card-title">Automate your Shipments</span><span class="card-sub">Shipping rules</span></a>
    <a class="related-card" href="https://developers.easyship.com/docs/overview-flow-guide"><span class="card-title">Overview Flow Guide</span><span class="card-sub">Full shipment lifecycle</span></a>
  </div>
</section>

<div class="doc-footer">

  API version: <strong>2024-09</strong> &#183; Questions? Contact your account manager or <a href="mailto:support@easyship.com">support@easyship.com</a>
</div>
</div>

`}</HTMLBlock>