> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gomry.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quote

> Price a purchase, including tax on both legs, and return the signature the order must carry

# Quote

Prices a prospective purchase. Quoting is a **required step**, not an optimisation: Retail will not place an order without the `taxSignature` this returns, and your order endpoint should reject one whose signature does not match.

Quoting moves no money, so Retail may call it more than once for the same checkout.

## Body

<ParamField body="vendorKey" type="string" required>
  Your supplier identifier.
</ParamField>

<ParamField body="vendorListingId" type="string" required>
  The listing being bought, from [Listings](/vendor-api/listings).
</ParamField>

<ParamField body="quantity" type="integer" required>
  Tickets to price. Always one of the listing's `splits`.
</ParamField>

<ParamField body="retailPrice" type="number">
  The per-ticket price Gomry sells at, so you can quote the sales tax owed on the retail leg. **The order will carry the same value as `unitCost`**. If your system has no retail leg, ignore it.
</ParamField>

<ParamField body="reference" type="string">
  Retail's reference for the order this quote leads to. The order will carry the **same** value.

  If your system cannot price without taking the seats off the market (a hold or lock), key that hold on this reference. A replayed checkout then finds its own hold instead of taking a second one. A quote under one reference followed by an order under another should be refused.
</ParamField>

## Response

All amounts are totals for the whole `quantity`.

<ResponseField name="retailTax" type="number" required>
  Sales tax owed on the retail leg, in the event's jurisdiction. `0` only when none is due, never because `retailPrice` was ignored.
</ResponseField>

<ResponseField name="wholesaleTax" type="number" required>
  Tax you charge Gomry Retail on the wholesale leg. `0` where resale certificates apply.
</ResponseField>

<ResponseField name="taxSignature" type="string" required>
  Ties an order to this quote. Retail sends it back on [Place order](/vendor-api/place-order). If your system has no signature of its own, generate one you can verify, such as the id of the hold you placed.
</ResponseField>

<ResponseField name="totalCost" type="number" required>
  What Gomry Retail will pay you for this purchase, including `wholesaleTax`.
</ResponseField>

<ResponseField name="currency" type="string" required>
  ISO 4217 code for every amount above.
</ResponseField>

## Errors

Answer `400` when your system refuses the quote in words: the listing is gone, the quantity is not allowed, the hold could not be placed. Answer `404` for a listing you do not know. Retail declines the purchase before any order is placed, and the buyer is told the listing is no longer available.

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://integration.example.com/api/vendor/v1/quote" \
    -H "X-API-Key: $GOMRY_RETAIL_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "vendorKey": "acme",
      "vendorListingId": "tg_88412093",
      "quantity": 2,
      "retailPrice": 118.4,
      "reference": "8b1f3c5e2a9d4f7081c6e2b4a0d9f3e1"
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "retailTax": 17.76,
    "wholesaleTax": 0,
    "taxSignature": "lock_7d2e91c4",
    "totalCost": 192.0,
    "currency": "USD"
  }
  ```

  ```json 400 theme={null}
  {
    "error": {
      "code": "validation_error",
      "message": "Quantity 3 is not an allowed split for this listing"
    }
  }
  ```
</ResponseExample>
