# Retrieve a quote

Retrieves a quote with a specified ID.

Endpoint: GET /quotes/{id}
Version: latest
Security: SecretApiKey, JWT

## Path parameters

- `id` (string, required)
  ID of the resource.

## Query parameters

- `expand` (string)
  Expands a request to include embedded objects within the `_embedded` property of the response. This field accepts a comma-separated list of objects. For more information, see [Embedded resources](https://www.rebilly.com/docs/dev-docs/expand-embedded-resources).

## Header parameters

- `Accept` (string)
  Type of response media.

## Response 200 fields

- `id` (string)
  ID of the quote.
  Example: qt_01HXBZMEGPETPHJZH6V4RHBMA8
- `type` (string, required)
  Type of the quote. When a quote is accepted, a new order is created.
  Enum: "creation"
- `acceptanceFulfillment` (array)
  List of `acceptanceConditions` with fulfillment status.
- `acceptanceFulfillment.condition` (string)
  Enum: "customer", "payment", "organization"
- `acceptanceFulfillment.isFulfilled` (boolean)
- `isNewOrder` (boolean)
  Specifies if the order is a new order.
  Example: true
- `invoiceId` (string)
  ID of the payment invoice.
  Example: in_0YVF9605RKC62BP14NE2R7V2XT
- `status` (string)
  Status of the quote.
  Enum: "draft", "issued", "accepted", "rejected", "canceled", "expired"
- `websiteId` (string, required)
  ID of the website. A website is where an organization obtains a customer. For more information, see [Obtain an organization ID and website ID](https://www.rebilly.com/docs/settings/organizations-and-websites/#obtain-your-organization-id-and-website-id).
  Example: web_0YV7DE4Z26DQSA1AC92FBJ7SEG
- `customerId` (string, required)
  ID of the customer resource.
  Example: cus_0YV7DDSDD1C8DA64KHH2W33CPF
- `order` (object, required)
  Properties of the related order.
- `order.id` (string, required)
  ID of the related order.
  Example: ord_01HVKA5975PJBSQ1SX72G3MSZC
- `order.items` (array, required)
  Items included in the quote.
- `order.items.id` (string)
  ID of the quote item.
  Example: qt_itm_01HXCEQNR3F1G2A6RX6HPS3KFY
- `order.items.type` (string, required)
  Specifies the type of order item.
  Enum: "one-time-sale"
- `order.items.quantity` (integer)
  Number of product units in the specified plan. Quantity for metered billing is always 0.
- `order.items.quantityFilled` (number | null)
  Number of filled product units. This field is not used for metered billing plans.
  Example: 5.125
- `order.items.plan` (any, required)
  Plan details.
- `order.items.description` (string)
  Description of the quote item.
  Example: Charge per approved transaction with DCC
- `order.items.priceDescription` (string)
  Price description of the quote item. This value is only used for metered billing items.
  Example: 50% of the markup for approved transactions
- `order.items.usageLimits` (any)
- `order.items.createdTime` (string)
  Date and time when the resource is created. This value is set automatically when the resource is created.
- `order.items.updatedTime` (string)
  Date and time when the resource is updated. This value is set automatically when the resource is updated.
- `order.items.quantity` (integer)
  Number of product units in the specified plan.
- `order.autopay` (boolean)
  Specifies if payment attempts for the related order are made automatically. If autopay is enabled, the payment is retrieved from the customer on the renewal date using the payment instrument that is set at `paymentInstrumentId`, or the default payment instrument on the order.
- `order.shipping` (object)
  Shipping settings.
- `order.deliveryAddress` (any)
  Delivery address of the order.
- `order.billingAddress` (any)
  Billing address of the order.
- `order.startTime` (string | null)
  Date and time when the created order starts. If this value is `null`, the quote acceptance time is used.
- `order.isLegacy` (boolean)
  Specifies if the order is a legacy order. If omitted when the quote is created, the value follows the order model that is used by the organization: `false` for the current order model and `true` for the legacy order model. If omitted when the quote is updated, the value does not change. Organizations that use the current order model cannot set this value to `true`.
  Example: true
- `invoicePreview` (object)
  Preview of the quote invoice.
- `invoicePreview.currency` (string)
  Currency code in ISO 4217 format.
  Example: USD
- `invoicePreview.initialAmounts` (object)
  Total amounts of the initial invoice.
- `invoicePreview.initialAmounts.amount` (number)
  Amount of the invoice.
- `invoicePreview.initialAmounts.subtotalAmount` (number)
  Subtotal amount of the invoice.
- `invoicePreview.initialAmounts.discountAmount` (number)
  Discount amount that is applied to the invoice.
- `invoicePreview.initialAmounts.shippingAmount` (number)
  Shipping amount that is applied to the invoice.
- `invoicePreview.initialAmounts.taxAmount` (number)
  Tax amount that is applied to the invoice.
- `invoicePreview.recurringAmounts` (object | null)
  Total amounts of the recurring invoice. This includes recurring items only. If the quote does not have recurring items, the value of this field is `null`.
- `invoicePreview.recurringAmounts.amount` (number)
  Amount of the invoice.
- `invoicePreview.recurringAmounts.subtotalAmount` (number)
  Subtotal amount of the invoice.
- `invoicePreview.recurringAmounts.discountAmount` (number)
  Discount amount that is applied to the invoice.
- `invoicePreview.recurringAmounts.shippingAmount` (number)
  Shipping amount that is applied to the invoice.
- `invoicePreview.recurringAmounts.taxAmount` (number)
  Tax amount that is applied to the invoice.
- `invoicePreview.items` (array)
  Invoice items.
- `invoicePreview.items.quoteItemId` (string)
  ID of the related quote item.
  Example: qt_itm_01HXCEQNR3F1G2A6RX6HPS3KFY
- `invoicePreview.items.type` (string)
  Type of the invoice item.
  Enum: "debit", "credit"
- `invoicePreview.items.name` (string)
  Name of the invoice item.
- `invoicePreview.items.description` (string)
  Description of the invoice item.
  Example: Charge per approved transaction with DCC
- `invoicePreview.items.priceDescription` (string)
  Price description of the invoice item.
  Example: 50% of the markup for approved transactions
- `invoicePreview.items.unitPrice` (number | null)
  Unit price of the invoice item.
- `invoicePreview.items.quantity` (integer)
  Quantity of the invoice item.
- `invoicePreview.items.period` (string | null)
  Date interval of the invoice item.
- `invoicePreview.items.setupUnitPrice` (number | null)
  Unit price of the invoice item.
- `invoicePreview.items.trialUnitPrice` (number | null)
  Unit price of the invoice item.
- `invoicePreview.items.trialPeriod` (string | null)
  Date interval of the invoice item trial.
- `invoicePreview.items.taxAmount` (number | null)
  Tax amount of the invoice item.
- `invoicePreview.items.setupTaxAmount` (number | null)
  Tax amount of the setup that is applied to the invoice.
- `invoicePreview.items.trialTaxAmount` (number | null)
  Tax amount of the trial that is applied to the invoice.
- `paymentTerms` (string)
  Payment terms for the customer which are displayed on the quote.
- `expirationTime` (string | null)
  Date and time when the quote expires. A new or updated expiration time must be later than the current time. The default expiration time is one month from the time the quote is issued. In a `draft` state, this field may be `null`.
- `issuedTime` (string | null)
  Date and time when the quote is issued.
- `acceptedTime` (string | null)
  Date and time when the quote is accepted.
- `rejectedTime` (string | null)
  Date and time when the quote is rejected.
- `canceledTime` (string | null)
  Date and time when the quote is canceled.
- `redirectUrl` (string)
  URL to redirect the customer to when a quote is rejected. The default value is the website URL.
- `signature` (object)
  Written signature and printed organization name.
- `signature.showWrittenSignatureLines` (boolean)
  Specifies whether to show written signature lines.
- `signature.organizationPrintedName` (string | null)
  Printed name of the organization.
- `tax` (object)
  Taxes.
- `couponIds` (array | null)
  List of coupons to redeem on the customer and apply to the related invoice. For more information, see [Coupons](https://www.rebilly.com/docs/settings/coupons-and-discounts/).
- `_links` (array)
  Related links.
- `_links.href` (string)
  Link URL.
- `_links.rel` (string)
  Type of link. If the quote is issued, a customer can be redirected to the `invoicePaymentFormUrl` value to pay the related invoice using one of the methods which are available to the customer.
  Enum: "self", "quoteAcceptanceFormUrl", "invoicePaymentFormUrl"
- `_embedded` (object)
  Embedded objects that are requested by the `expand` query parameter.
- `_embedded.customer` (object)
- `_embedded.website` (object)
- `_embedded.order` (object)
- `_embedded.invoice` (object)
- `type` (string, required)
  Type of the quote. When a quote is accepted, quote items and settings are applied to the related order. Change quotes can only be created for orders with `active` or `trial-ended` status. For `trial-ended` orders, use this quote type to convert a trial-only order to a regular recurring order.
  Enum: "change"
- `order.renewalPolicy` (string)
  Policy for managing service periods and trial state of the related order when the quote is accepted. The `reset` and `retain` values are deprecated. The deprecated `keepTrial` flag is ignored unless `retain` is used, or this field is omitted. If this field is omitted, this value defaults to `retainRecurring`. If this field is omitted and `keepTrial` is `true`, `renewalPolicy` is set to `retainTrialThenRecurring`.
  Enum: "resetToRecurring", "retainRecurring", "retainTrialThenRecurring", "reset", "retain"
- `order.prorated` (boolean)
  Specifies whether to give a pro rata credit for the amount of time remaining between the `effectiveTime` and the end of the current period. In addition, if the `renewalTime` is retained, by setting the `renewalPolicy` to `retainRecurring` or `retainTrialThenRecurring`, a pro rata debit occurs for the amount between the `effectiveTime` and the `renewalTime` as a percentage of the normal period length.
- `order.effectiveTime` (string | null)
  Date from which the renewal time for `reset` operations and proration calculations are made. If this field is omitted, this value defaults to the time of quote acceptance.
- `order.applyAt` (string)
  Time when the new items are applied. - `now`: The items change at once. `prorated`, `renewalPolicy` and `effectiveTime` apply. - `nextRenewal`: The current items stay until the next renewal. The new items are billed on the next renewal invoice. `prorated` and `renewalPolicy` are ignored. Omit `effectiveTime`. If the request includes `effectiveTime`, a validation error is returned. `couponIds` and `usageSettings` are not supported. If the request includes either field, a validation error is returned. `interimOnly` must be `true`. A later request replaces the pending change. The pending change is locked when the next renewal invoice is issued. One-time sale items that are already on the order are retained. A one-time sale item cannot be added with `nextRenewal`.
  Enum: "now", "nextRenewal"
- `order.keepTrial` (boolean)
  Deprecated. Use the `retainTrialThenRecurring` value of `renewalPolicy` instead. Specifies if the order must retain its active trial. This field is only applicable if `renewalPolicy` is set to the deprecated value `retain`, or omitted. If `renewalPolicy` is omitted and this field is `true`, `renewalPolicy` is set to `retainTrialThenRecurring`.
- `order.interimOnly` (boolean)
  Specifies if the quotation invoice must include interim items only. If this value is set to `false`, all upcoming items are included. With `applyAt` set to `nextRenewal`, this value must be `true`. To bill the next period now, issue the upcoming invoice of the order.
- `order.usageSettings` (array)
  Usage settings for items with metered billing.
- `order.usageSettings.productId` (string, required)
  ID of the product to use to transfer usage. If the `policy` value is `transfer`, and an existing item and a new item are of the same product, usage can be transferred to the new item. If a new item of the same product does not exist, or does not have a metered billing plan, this transfer is ignored.
  Example: prod_0YV7DENSVGDBW9S71XZNNYYQ0X
- `order.usageSettings.policy` (string, required)
  Policy for removed items that have a metered billing plan.
  Enum: "reset", "transfer"
- `order.autopay` (boolean | null)
  Specifies if payment attempts for the related order are made automatically. If autopay is enabled, the payment is retrieved from the customer on the renewal date using the payment instrument that is set at `paymentInstrumentId`, or the default payment instrument on the order. If this value is `null`, the related order autopay is not affected.
- `order.shipping` (object)
  Shipping settings of the order. If this value is omitted, the order shipping is not affected.
- `order.deliveryAddress` (any)
  Delivery address of the order. If this value is `null`, the order delivery address is not affected.
- `order.billingAddress` (any)
  Billing address of the order. If this value is `null`, the order billing address is not affected.
- `type` (string, required)
  Type of the quote. When a quote is accepted, quote items and settings are applied to the order and the order is reactivated.
  Enum: "reactivation"
- `order.effectiveTime` (string | null)
  Date and time when the service period starts, unless the order is canceled but still active. If the order is still active, the order continues for the current service period. If this field is omitted, this value defaults to the current time.
- `order.renewalTime` (string | null)
  Date and time of the next order renewal. If this field is omitted, this value is computed from the `effectiveTime` field. If the order is canceled but still active, it is ignored and the next renewal occurs as scheduled.
- `order.paymentInstrumentId` (string | null)
  ID of the payment instrument. If this field is omitted, the order payment instrument remains unchanged.
  Example: inst_0YVB8KPKNXCBR9EDX7JHSED75N
- `order.includeUnpaidInvoices` (boolean)
  Specifies whether the quote invoice includes items from outstanding unpaid and past-due invoices for the related order. When this value is `true`, the quote invoice includes charges for eligible items from those invoices. When the quote is accepted, only invoices included in the quote that remain unpaid or past due and can be voided are voided.
  Example: false

## Response 401 fields

- `status` (integer)
  HTTP status code.
- `type` (string)
  Problem type in the form of a [URI](https://tools.ietf.org/html/rfc3986) reference. It should provide human-readable documentation for the problem type. When this member is not present, its value is assumed to be "about:blank".
- `title` (string)
  Short, human-readable summary of the problem type. Other than for the purposes of localization, this should not change from occurrence to occurrence of the problem.
- `detail` (string)
  Human-readable explanation that is specific to this occurrence of the problem.
- `instance` (string)
  URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.

## Response 403 fields

- `status` (integer)
  HTTP status code.
- `error` (string)
  Message that describes why the request is forbidden. Most responses use a descriptive message, such as `Not allowed to change security settings`. If the organization requires multi-factor authentication (MFA) and MFA verification has not been completed for the session, this value is `mfa_required`. If the request sets `requireMfa` to `true` and MFA verification has not been completed for the session, this value is `mfa_required_for_caller`.
- `type` (string)
  Problem type in the form of a [URI](https://tools.ietf.org/html/rfc3986) reference. It should provide human-readable documentation for the problem type. When this member is not present, its value is assumed to be "about:blank".
- `title` (string)
  Short, human-readable summary of the problem type. Other than for the purposes of localization, this should not change from occurrence to occurrence of the problem.
- `detail` (string)
  Human-readable explanation that is specific to this occurrence of the problem.
- `instance` (string)
  URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.

## Response 404 fields

- `status` (integer)
  HTTP status code.
- `type` (string)
  Problem type in the form of a [URI](https://tools.ietf.org/html/rfc3986) reference. It should provide human-readable documentation for the problem type. When this member is not present, its value is assumed to be "about:blank".
- `title` (string)
  Short, human-readable summary of the problem type. Other than for the purposes of localization, this should not change from occurrence to occurrence of the problem.
- `detail` (string)
  Human-readable explanation that is specific to this occurrence of the problem.
- `instance` (string)
  URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
