---
title: Preview Quote
slug: preview-quote
createdAt: 2026-08-25T19:28:59.170Z
---

{
  "id": "AeGjxZIxa7JuiYAxG-Lj-",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.nue.io/cpq/quotes:preview",
    "servers": [
      {
        "url": "https://api.nue.io/cpq/quotes:preview",
        "description": "Nue Production API Endpoint"
      },
      {
        "url": "https://api.sandbox.nue.io/cpq/quotes:preview",
        "description": "Nue Sandbox API Endpoint"
      }
    ],
    "name": "Preview Quote",
    "description": "<p>Runs the full pricing engine and returns calculated results without persisting any data. The request body is identical to Create Quote.</p>\n<p>Use preview mode for:</p>\n<ul>\n<li><strong>Pricing previews</strong> — Show customers a price before creating the quote</li>\n<li><strong>What-if scenarios</strong> — Test different quantities, terms, or discount combinations</li>\n<li><strong>Validation</strong> — Verify request payloads produce expected results</li>\n<li><strong>AI-driven workflows</strong> — Inspect warnings and errors before committing</li>\n</ul>\n<p>The response is identical to Create Quote except that all record IDs are <code>null</code>.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "example": "{\"opportunityId\":\"opp-123e4567-e89b-12d3-a456-426614174000\",\"name\":\"Pricing Preview\",\"subscriptionStartDate\":\"2025-01-01\",\"subscriptionEndDate\":\"2025-07-01\",\"subscriptionTerm\":6,\"subscriptionTermDimension\":\"Month\",\"products\":[{\"productSku\":\"NUE_ON_SALESFORCE\",\"uom\":\"User/Month\",\"quantity\":50},{\"productSku\":\"NUE_PLATFORM\",\"uom\":\"User/Month\",\"quantity\":25}]}",
          "examples": [
            {
              "label": "Preview a multi-product quote",
              "value": "{\"opportunityId\":\"opp-123e4567-e89b-12d3-a456-426614174000\",\"name\":\"Pricing Preview\",\"subscriptionStartDate\":\"2025-01-01\",\"subscriptionEndDate\":\"2025-07-01\",\"subscriptionTerm\":6,\"subscriptionTermDimension\":\"Month\",\"products\":[{\"productSku\":\"NUE_ON_SALESFORCE\",\"uom\":\"User/Month\",\"quantity\":50},{\"productSku\":\"NUE_PLATFORM\",\"uom\":\"User/Month\",\"quantity\":25}]}"
            }
          ],
          "description": "<p>Same schema as Create Quote. Quote header fields as top-level properties with a <code>products</code> array.</p>",
          "schema": [
            {
              "name": "name",
              "kind": "required",
              "type": "string",
              "description": "",
              "example": "Pricing Preview"
            },
            {
              "name": "opportunityId",
              "kind": "required",
              "type": "string",
              "description": ""
            },
            {
              "name": "subscriptionStartDate",
              "kind": "optional",
              "type": "string<date>",
              "description": "",
              "format": "date"
            },
            {
              "name": "subscriptionEndDate",
              "kind": "optional",
              "type": "string<date>",
              "description": "",
              "format": "date"
            },
            {
              "name": "subscriptionTerm",
              "kind": "optional",
              "type": "number",
              "description": ""
            },
            {
              "name": "subscriptionTermDimension",
              "kind": "optional",
              "type": "string<Month | Year>",
              "description": "",
              "enum": [
                "Month",
                "Year"
              ]
            },
            {
              "name": "discount",
              "kind": "optional",
              "type": "number",
              "description": ""
            },
            {
              "name": "discountAmount",
              "kind": "optional",
              "type": "number",
              "description": ""
            },
            {
              "name": "currencyIsoCode",
              "kind": "optional",
              "type": "string",
              "description": ""
            },
            {
              "name": "products",
              "kind": "required",
              "type": "array",
              "description": "",
              "modelRef": "#/components/schemas/AddQuoteProductRequest",
              "customType": "AddQuoteProductRequest[]",
              "schema": [
                {
                  "name": "productSku",
                  "kind": "optional",
                  "type": "string",
                  "description": "<p>The product SKU (StockKeepingUnit). Exactly one of <code>productSku</code> or <code>productName</code> must be supplied — passing both, or neither, returns a <code>PRODUCT_SKU_AND_NAME_EXCLUSIVE</code> validation error.</p>",
                  "example": "NUE_PLATFORM"
                },
                {
                  "name": "productName",
                  "kind": "optional",
                  "type": "string",
                  "description": "<p>The product name. Alternative to <code>productSku</code>. The first matching active product is selected; if multiple products share the name an <code>AMBIGUOUS_PRODUCT_NAME</code> error is returned and you should use <code>productSku</code> instead.</p>",
                  "example": "Nue Platform"
                },
                {
                  "name": "priceBookEntryId",
                  "kind": "optional",
                  "type": "string",
                  "description": "<p>Specific Price Book Entry ID. Narrows the candidate-PBE list to this entry. The PBE must still satisfy the order's currency and pricing-attribute conditions — if it does not, the API returns <code>PRICEBOOK_ENTRY_MISMATCH</code>.</p>",
                  "example": "01uxx000000ABCDEF"
                },
                {
                  "name": "quantity",
                  "kind": "optional",
                  "type": "number",
                  "description": "<p>Number of units. Required for top-level products. For add-ons, defaults to the bundle option's <code>DefaultQuantity</code>.</p>",
                  "example": 10,
                  "minimum": 0
                },
                {
                  "name": "uom",
                  "kind": "optional",
                  "type": "string",
                  "description": "<p>Unit of Measure name (must match an existing UOM, e.g. <code>User/Month</code>, <code>Hour</code>, <code>Each</code>). For top-level products, supply at least one of <code>priceBookEntryId</code>, <code>uom</code>, or <code>customPricingAttributes</code>.</p>",
                  "example": "User/Month"
                },
                {
                  "name": "startDate",
                  "kind": "optional",
                  "type": "string<date>",
                  "description": "<p>Per-product start date override. Defaults to the quote header's start date.</p>",
                  "example": "2025-01-01",
                  "format": "date"
                },
                {
                  "name": "endDate",
                  "kind": "optional",
                  "type": "string<date>",
                  "description": "<p>Per-product end date override. If <code>subscriptionTerm</code> is provided, the end date is calculated from <code>startDate</code> + <code>subscriptionTerm</code>.</p>",
                  "example": "2026-01-01",
                  "format": "date"
                },
                {
                  "name": "subscriptionTerm",
                  "kind": "optional",
                  "type": "number",
                  "description": "<p>Per-product subscription term override. Must be > 0. Defaults to the quote header's term.</p>",
                  "example": 12,
                  "minimum": 0
                },
                {
                  "name": "subscriptionTermDimension",
                  "kind": "optional",
                  "type": "string<Month | Year>",
                  "description": "Term dimension for the subscription term.",
                  "example": "Month",
                  "enum": [
                    "Month",
                    "Year"
                  ]
                },
                {
                  "name": "autoRenew",
                  "kind": "optional",
                  "type": "boolean",
                  "description": "<p>Whether this product line auto-renews. Defaults to the quote-level or product-level setting.</p>",
                  "example": true
                },
                {
                  "name": "evergreen",
                  "kind": "optional",
                  "type": "boolean",
                  "description": "<p>Whether this is an evergreen subscription (no fixed term). Cannot be combined with <code>subscriptionTerm</code> or <code>endDate</code>.</p>",
                  "example": false
                },
                {
                  "name": "billingPeriod",
                  "kind": "optional",
                  "type": "string",
                  "description": "<p>Billing period override. Per-line, both label (<code>Monthly</code>) and API value (<code>Month</code>) are accepted. Top-level header <code>billingPeriod</code> requires the API value.</p>",
                  "example": "Month"
                },
                {
                  "name": "billingTiming",
                  "kind": "optional",
                  "type": "string<In Advance | In Arrears>",
                  "description": "<p>Billing timing override — whether billed before or after service delivery.</p>",
                  "example": "In Advance",
                  "enum": [
                    "In Advance",
                    "In Arrears"
                  ]
                },
                {
                  "name": "renewalTerm",
                  "kind": "optional",
                  "type": "number",
                  "description": "<p>Renewal term in months. Must be > 0.</p>",
                  "example": 12,
                  "minimum": 0
                },
                {
                  "name": "discount",
                  "kind": "optional",
                  "type": "number",
                  "description": "<p>Discretionary discount percentage (0-100). Overrides header-level discount for this product. If both <code>discount</code> and <code>discountAmount</code> are set, <code>discount</code> takes precedence.</p>",
                  "example": 15.5,
                  "minimum": 0,
                  "maximum": 100
                },
                {
                  "name": "discountAmount",
                  "kind": "optional",
                  "type": "number",
                  "description": "<p>Discretionary discount amount (currency). Ignored if <code>discount</code> is also provided.</p>",
                  "example": 100,
                  "minimum": 0
                },
                {
                  "name": "priceTags",
                  "kind": "optional",
                  "type": "array",
                  "description": "Price or discount tags to apply to this product.",
                  "modelRef": "#/components/schemas/PriceTagInput",
                  "customType": "PriceTagInput[]",
                  "schema": [
                    {
                      "name": "code",
                      "kind": "optional",
                      "type": "string",
                      "description": "The price tag code.",
                      "example": "REGR_DISC_QTY_TIERED"
                    },
                    {
                      "name": "id",
                      "kind": "optional",
                      "type": "string",
                      "description": "The price tag ID.",
                      "example": "a0dcU000005sZRrQAM"
                    }
                  ]
                },
                {
                  "name": "customPricingAttributes",
                  "kind": "optional",
                  "type": "array",
                  "description": "<p>Custom Price Book Entry field values used to disambiguate multi-attribute pricing. Each entry's <code>name</code> must be the <strong>full Salesforce field API name</strong> including the namespace prefix and <code>__c</code> suffix (for example <code>Ruby__PricingAttribute_3__c</code>). Multiple attributes are AND'd together when filtering candidate PBEs.</p>",
                  "modelRef": "#/components/schemas/CustomPricingAttribute",
                  "customType": "CustomPricingAttribute[]",
                  "schema": [
                    {
                      "name": "name",
                      "kind": "required",
                      "type": "string",
                      "description": "<p>Full Salesforce field API name on the PriceBookEntry, including the package namespace prefix and <code>__c</code> suffix. Examples: <code>Ruby__PricingAttribute_3__c</code>, <code>Ruby__Segment__c</code>. Bare names without namespace or <code>__c</code> are rejected with <code>Invalid field &#x3C;name> for PricebookEntry</code>.</p>",
                      "example": "Ruby__PricingAttribute_3__c"
                    },
                    {
                      "name": "value",
                      "kind": "required",
                      "type": "string",
                      "description": "The value to match against the PriceBookEntry field. Compared as a string.",
                      "example": "New Business"
                    }
                  ]
                },
                {
                  "name": "addOns",
                  "kind": "optional",
                  "type": "array",
                  "description": "<p>Optional add-on products for bundles. Each add-on is itself a product request object.</p>",
                  "modelRef": "#/components/schemas/AddQuoteProductRequest",
                  "customType": "AddQuoteProductRequest[]",
                  "schema": [
                    {
                      "name": "",
                      "description": "",
                      "customType": "Circular-Reference"
                    }
                  ]
                },
                {
                  "name": "productOptionId",
                  "kind": "optional",
                  "type": "string",
                  "description": "<p>For add-on lines, targets a specific bundle option slot (RIM-20981). When set, productSku/productName become optional.</p>"
                },
                {
                  "name": "netSalesPrice",
                  "kind": "optional",
                  "type": "number",
                  "description": "<p>Explicit unit net sales price; back-calculates the discount. Mutually exclusive with discount and discountAmount.</p>"
                },
                {
                  "name": "paymentTerm",
                  "kind": "optional",
                  "type": "string",
                  "description": "<p>Per-line payment term override, e.g. 'Net 30'.</p>"
                },
                {
                  "name": "coTermAsset",
                  "kind": "optional",
                  "type": "string",
                  "description": "<p>Change-order only. Co-terminate this new line with the named Salesforce subscription number.</p>"
                },
                {
                  "name": "parentLineId",
                  "kind": "optional",
                  "type": "string",
                  "description": "<p>Update API only. Adds this product as an option child under the existing bundle line with this id, resolved against that bundle's live option config. May target the root bundle line or a nested sub-bundle line. Omit for a top-level add.</p>",
                  "example": "0QLRu00000AAvDcIAL"
                },
                {
                  "name": "customFields",
                  "kind": "optional",
                  "type": "map",
                  "description": "<p>Line-level custom field name/value pairs applied directly onto the created line item. Keys are Salesforce API names on the line object (QuoteLineItem or OrderProduct); an unknown field name is rejected. Supported on /cpq/quotes, /cpq/orders, and the addLineItems action of the </p><div></div> endpoints.<p></p>",
                  "example": "{\"CostCenter__c\":\"CC-1042\",\"Ruby__IncludedUnits__c\":25}",
                  "customType": "map<string, string>",
                  "schema": []
                },
                {
                  "name": "rampValues",
                  "kind": "optional",
                  "type": "array",
                  "description": "<p>Per-ramp Line Attribute values for a ramped line. Each entry sets custom field values on one ramp line, addressed by rampLineIndex. Ramp lines not named inherit the line-level value, then the Pricebook Entry default. Supported on /cpq/quotes and /cpq/orders.</p>",
                  "modelRef": "#/components/schemas/RampValueInput",
                  "customType": "RampValueInput[]",
                  "schema": [
                    {
                      "name": "rampLineIndex",
                      "kind": "optional",
                      "type": "integer",
                      "description": "<p>Which ramp line to apply the values to, 1-based in schedule order.</p>",
                      "example": 1
                    },
                    {
                      "name": "startDate",
                      "kind": "optional",
                      "type": "string<date>",
                      "description": "<p>The ramp line's start date, accepted as a readable alias for rampLineIndex. Ramp line dates are derived by the pricing engine, so this is not the addressing key; when both are given they must agree.</p>",
                      "example": "2026-01-01",
                      "format": "date"
                    },
                    {
                      "name": "fieldValues",
                      "kind": "optional",
                      "type": "map",
                      "description": "<p>Field name/value pairs applied to this ramp line only, overriding what it would otherwise inherit from its parent line.</p>",
                      "example": "{\"Overage_Rate__c\":3}",
                      "customType": "map<string, string>",
                      "schema": []
                    }
                  ]
                }
              ]
            },
            {
              "name": "priceTags",
              "kind": "optional",
              "type": "array",
              "description": "",
              "modelRef": "#/components/schemas/PriceTagInput",
              "customType": "PriceTagInput[]",
              "schema": [
                {
                  "name": "code",
                  "kind": "optional",
                  "type": "string",
                  "description": "The price tag code.",
                  "example": "REGR_DISC_QTY_TIERED"
                },
                {
                  "name": "id",
                  "kind": "optional",
                  "type": "string",
                  "description": "The price tag ID.",
                  "example": "a0dcU000005sZRrQAM"
                }
              ]
            }
          ],
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "ApiKeyAuth",
          "name": "nue-api-key",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "<p>Preview calculated successfully. All record IDs in the response are <code>null</code>.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "Response from Create Quote or Preview Quote endpoints.",
            "customType": "CreateQuoteResponse",
            "schema": [
              {
                "name": "status",
                "kind": "optional",
                "type": "string<SUCCEED | FAILURE>",
                "description": "Result status.",
                "enum": [
                  "SUCCEED",
                  "FAILURE"
                ]
              },
              {
                "name": "data",
                "kind": "optional",
                "type": "object",
                "description": "The quote and its line items.",
                "modelRef": "#/components/schemas/QuoteData",
                "customType": "QuoteData",
                "schema": [
                  {
                    "name": "quote",
                    "kind": "optional",
                    "type": "object",
                    "description": "<p>The Quote object with all calculated pricing fields. Contains an <code>id</code> if committed; <code>null</code> id if previewed.</p>",
                    "example": "",
                    "schema": [
                      {
                        "name": "id",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": "Quote record ID. Null in preview mode."
                      },
                      {
                        "name": "name",
                        "kind": "optional",
                        "type": "string",
                        "description": "Quote name."
                      },
                      {
                        "name": "opportunityId",
                        "kind": "optional",
                        "type": "string",
                        "description": "Associated Opportunity ID."
                      },
                      {
                        "name": "subscriptionStartDate",
                        "kind": "optional",
                        "type": "string<date>",
                        "description": "Quote subscription start date.",
                        "format": "date"
                      },
                      {
                        "name": "subscriptionEndDate",
                        "kind": "optional",
                        "type": "string<date>",
                        "description": "Quote subscription end date.",
                        "format": "date"
                      },
                      {
                        "name": "subscriptionTerm",
                        "kind": "optional",
                        "type": "number",
                        "description": "Subscription term."
                      },
                      {
                        "name": "listTotal",
                        "kind": "optional",
                        "type": "number",
                        "description": "Sum of all line item list total prices."
                      },
                      {
                        "name": "subtotal",
                        "kind": "optional",
                        "type": "number",
                        "description": "List total minus system discount amounts."
                      },
                      {
                        "name": "totalPrice",
                        "kind": "optional",
                        "type": "number",
                        "description": "Subtotal minus discretionary discount amounts."
                      },
                      {
                        "name": "discount",
                        "kind": "optional",
                        "type": "number",
                        "description": "<p>Header-level discount percentage.</p>"
                      },
                      {
                        "name": "discountAmount",
                        "kind": "optional",
                        "type": "number",
                        "description": "<p>Header-level discount amount.</p>"
                      },
                      {
                        "name": "currencyIsoCode",
                        "kind": "optional",
                        "type": "string",
                        "description": "<p>Currency ISO code (multi-currency orgs).</p>"
                      }
                    ]
                  },
                  {
                    "name": "quoteLineItems",
                    "kind": "optional",
                    "type": "array",
                    "description": "<p>All line items in flattened, depth-first order. Bundle parents appear first, followed by their children.</p>",
                    "modelRef": "#/components/schemas/QuoteLineItemDTO",
                    "customType": "QuoteLineItemDTO[]",
                    "schema": [
                      {
                        "name": "id",
                        "kind": "optional",
                        "type": "string",
                        "description": "Internal line item ID."
                      },
                      {
                        "name": "parentId",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": "<p>Parent line item ID (for bundle children). Null for root products.</p>"
                      },
                      {
                        "name": "quoteLineItem",
                        "kind": "optional",
                        "type": "object",
                        "description": "The line item with all calculated pricing fields.",
                        "example": "",
                        "schema": [
                          {
                            "name": "id",
                            "kind": "optional",
                            "type": "string",
                            "nullable": true,
                            "description": "Record ID. Null in preview mode."
                          },
                          {
                            "name": "productSku",
                            "kind": "optional",
                            "type": "string",
                            "description": "Product SKU."
                          },
                          {
                            "name": "productName",
                            "kind": "optional",
                            "type": "string",
                            "description": "Product name."
                          },
                          {
                            "name": "quantity",
                            "kind": "optional",
                            "type": "number",
                            "description": "Number of units."
                          },
                          {
                            "name": "listPrice",
                            "kind": "optional",
                            "type": "number",
                            "description": "<p>Per-unit list price from the Price Book Entry.</p>"
                          },
                          {
                            "name": "subscriptionTerm",
                            "kind": "optional",
                            "type": "number",
                            "description": "Term applied to this line."
                          },
                          {
                            "name": "listTotalPrice",
                            "kind": "optional",
                            "type": "number",
                            "description": "ListPrice x Quantity x Term."
                          },
                          {
                            "name": "systemDiscount",
                            "kind": "optional",
                            "type": "number",
                            "description": "<p>System discount percentage (from price/discount tags).</p>"
                          },
                          {
                            "name": "systemDiscountAmount",
                            "kind": "optional",
                            "type": "number",
                            "description": "System discount amount."
                          },
                          {
                            "name": "subtotal",
                            "kind": "optional",
                            "type": "number",
                            "description": "ListTotalPrice minus SystemDiscountAmount."
                          },
                          {
                            "name": "salesPrice",
                            "kind": "optional",
                            "type": "number",
                            "description": "<p>Per-unit sales price.</p>"
                          },
                          {
                            "name": "netSalesPrice",
                            "kind": "optional",
                            "type": "number",
                            "description": "<p>Per-unit net sales price after system discount.</p>"
                          },
                          {
                            "name": "discount",
                            "kind": "optional",
                            "type": "number",
                            "description": "Discretionary discount percentage."
                          },
                          {
                            "name": "discountAmount",
                            "kind": "optional",
                            "type": "number",
                            "description": "Discretionary discount amount."
                          },
                          {
                            "name": "totalPrice",
                            "kind": "optional",
                            "type": "number",
                            "description": "Subtotal minus DiscountAmount."
                          },
                          {
                            "name": "totalAmount",
                            "kind": "optional",
                            "type": "number",
                            "description": "TotalPrice plus TaxAmount."
                          },
                          {
                            "name": "subscriptionStartDate",
                            "kind": "optional",
                            "type": "string<date>",
                            "description": "<p>Line-level start date.</p>",
                            "format": "date"
                          },
                          {
                            "name": "subscriptionEndDate",
                            "kind": "optional",
                            "type": "string<date>",
                            "description": "<p>Line-level end date.</p>",
                            "format": "date"
                          },
                          {
                            "name": "billingPeriod",
                            "kind": "optional",
                            "type": "string",
                            "description": "Billing period."
                          },
                          {
                            "name": "billingTiming",
                            "kind": "optional",
                            "type": "string",
                            "description": "Billing timing."
                          },
                          {
                            "name": "autoRenew",
                            "kind": "optional",
                            "type": "boolean",
                            "description": "<p>Auto-renewal setting.</p>"
                          },
                          {
                            "name": "evergreen",
                            "kind": "optional",
                            "type": "boolean",
                            "description": "Whether this is an evergreen subscription."
                          }
                        ]
                      },
                      {
                        "name": "uom",
                        "kind": "optional",
                        "type": "object",
                        "description": "The resolved Unit of Measure.",
                        "example": "",
                        "schema": [
                          {
                            "name": "name",
                            "kind": "optional",
                            "type": "string",
                            "description": ""
                          },
                          {
                            "name": "quantityDimension",
                            "kind": "optional",
                            "type": "string",
                            "description": ""
                          },
                          {
                            "name": "termDimension",
                            "kind": "optional",
                            "type": "string",
                            "description": ""
                          }
                        ]
                      },
                      {
                        "name": "product",
                        "kind": "optional",
                        "type": "object",
                        "description": "Product metadata.",
                        "example": "",
                        "schema": [
                          {
                            "name": "id",
                            "kind": "optional",
                            "type": "string",
                            "description": ""
                          },
                          {
                            "name": "name",
                            "kind": "optional",
                            "type": "string",
                            "description": ""
                          },
                          {
                            "name": "sku",
                            "kind": "optional",
                            "type": "string",
                            "description": ""
                          },
                          {
                            "name": "revenueModel",
                            "kind": "optional",
                            "type": "string",
                            "description": "<p>Revenue model: Recurring, OneTime, Usage, Credit, CRBD, CCRBD.</p>"
                          }
                        ]
                      },
                      {
                        "name": "productOption",
                        "kind": "optional",
                        "type": "object",
                        "nullable": true,
                        "description": "<p>Product option details (for bundle children).</p>",
                        "example": "",
                        "schema": [
                          {
                            "name": "id",
                            "kind": "optional",
                            "type": "string",
                            "description": ""
                          },
                          {
                            "name": "optionType",
                            "kind": "optional",
                            "type": "string",
                            "description": "<p>Type: Bundled, Required, Optional, Recommended.</p>"
                          }
                        ]
                      },
                      {
                        "name": "appliedPriceTags",
                        "kind": "optional",
                        "type": "array",
                        "description": "<p>Price/discount tags applied to this line.</p>",
                        "example": "",
                        "itemType": "object",
                        "customType": "object[]",
                        "schema": [
                          {
                            "name": "id",
                            "kind": "optional",
                            "type": "string",
                            "description": ""
                          },
                          {
                            "name": "name",
                            "kind": "optional",
                            "type": "string",
                            "description": ""
                          },
                          {
                            "name": "code",
                            "kind": "optional",
                            "type": "string",
                            "description": ""
                          },
                          {
                            "name": "type",
                            "kind": "optional",
                            "type": "string",
                            "description": "Price or Discount."
                          }
                        ]
                      },
                      {
                        "name": "childrenLineItems",
                        "kind": "optional",
                        "type": "array",
                        "description": "<p>Nested child line items (for bundle parents).</p>",
                        "modelRef": "#/components/schemas/QuoteLineItemDTO",
                        "customType": "QuoteLineItemDTO[]",
                        "schema": [
                          {
                            "name": "",
                            "description": "",
                            "customType": "Circular-Reference"
                          }
                        ]
                      }
                    ]
                  }
                ]
              },
              {
                "name": "warnings",
                "kind": "optional",
                "type": "array",
                "description": "<p>Non-fatal warnings (present even on success).</p>",
                "modelRef": "#/components/schemas/Message",
                "customType": "Message[]",
                "schema": [
                  {
                    "name": "errorCode",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Severity level: Error, Warning, or FATAL.</p>"
                  },
                  {
                    "name": "errorType",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Specific error or warning code (e.g., PRODUCT_SKU_OR_NAME_REQUIRED, DUPLICATE_PRICE_TAG).</p>"
                  },
                  {
                    "name": "message",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Human-readable description.</p>"
                  }
                ]
              },
              {
                "name": "errors",
                "kind": "optional",
                "type": "array",
                "description": "<p>Error details. Populated when <code>status</code> is <code>FAILURE</code>.</p>",
                "modelRef": "#/components/schemas/Message",
                "customType": "Message[]",
                "schema": [
                  {
                    "name": "errorCode",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Severity level: Error, Warning, or FATAL.</p>"
                  },
                  {
                    "name": "errorType",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Specific error or warning code (e.g., PRODUCT_SKU_OR_NAME_REQUIRED, DUPLICATE_PRICE_TAG).</p>"
                  },
                  {
                    "name": "message",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Human-readable description.</p>"
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/CreateQuoteResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Validation error.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "<p>Error envelope returned by the CPQ REST endpoints, including Update Quote, Update Order, and PATCH /api/objects/{Quote,Order}/{id}. <code>errorDetails</code> is omitted when empty.</p>",
            "customType": "ApiErrorResponse",
            "schema": [
              {
                "name": "status",
                "kind": "optional",
                "type": "integer",
                "description": "HTTP status code.",
                "example": 400
              },
              {
                "name": "error",
                "kind": "optional",
                "type": "string",
                "description": "Short error title.",
                "example": "Failed to update quote"
              },
              {
                "name": "message",
                "kind": "optional",
                "type": "string",
                "description": "<p>Human-readable message. For a single failure it matches the first errorDetails entry.</p>"
              },
              {
                "name": "errorDetails",
                "kind": "optional",
                "type": "array",
                "description": "<p>One entry per failure, each with a semantic errorCode.</p>",
                "modelRef": "#/components/schemas/ErrorDetail",
                "customType": "ErrorDetail[]",
                "schema": [
                  {
                    "name": "errorCode",
                    "kind": "optional",
                    "type": "string",
                    "description": "Semantic error code.",
                    "example": "QUOTE_NOT_FOUND"
                  },
                  {
                    "name": "message",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Human-readable error message.</p>"
                  },
                  {
                    "name": "path",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Where in the request the error is about, when it is about one place, for example body.buckets[2]. Absent when the error is about the call as a whole.</p>",
                    "example": "body.buckets[2].allocations[0]"
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/ApiErrorResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "Authentication failed.",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "example-0-curl",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.nue.io/cpq/quotes:preview \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"name\": \"Pricing Preview\",\n     \"opportunityId\": \"\",\n     \"products\": [\n     {\n     \"customPricingAttributes\": [\n     {\n     \"name\": \"Ruby__PricingAttribute_3__c\",\n     \"value\": \"New Business\"\n     }\n     ]\n     }\n     ]\n     }'"
        },
        {
          "id": "example-1-javascript",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"name\": \"Pricing Preview\",\n   \"opportunityId\": \"\",\n   \"products\": [\n      {\n         \"customPricingAttributes\": [\n            {\n               \"name\": \"Ruby__PricingAttribute_3__c\",\n               \"value\": \"New Business\"\n            }\n         ]\n      }\n   ]\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.nue.io/cpq/quotes:preview\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "example-2-ruby",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.nue.io/cpq/quotes:preview\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"name\": \"Pricing Preview\",\n   \"opportunityId\": \"\",\n   \"products\": [\n      {\n         \"customPricingAttributes\": [\n            {\n               \"name\": \"Ruby__PricingAttribute_3__c\",\n               \"value\": \"New Business\"\n            }\n         ]\n      }\n   ]\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "example-3-python",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.nue.io/cpq/quotes:preview\"\n\npayload = json.dumps({\n   \"name\": \"Pricing Preview\",\n   \"opportunityId\": \"\",\n   \"products\": [\n      {\n         \"customPricingAttributes\": [\n            {\n               \"name\": \"Ruby__PricingAttribute_3__c\",\n               \"value\": \"New Business\"\n            }\n         ]\n      }\n   ]\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "example-0-curl"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// Preview calculated successfully. All record IDs in the response are null.\n{\n  \"status\": \"\",\n  \"data\": {\n    \"quote\": {\n      \"id\": \"\",\n      \"name\": \"\",\n      \"opportunityId\": \"\",\n      \"subscriptionStartDate\": \"\",\n      \"subscriptionEndDate\": \"\",\n      \"subscriptionTerm\": 0,\n      \"listTotal\": 0,\n      \"subtotal\": 0,\n      \"totalPrice\": 0,\n      \"discount\": 0,\n      \"discountAmount\": 0,\n      \"currencyIsoCode\": \"\"\n    },\n    \"quoteLineItems\": [\n      {\n        \"id\": \"\",\n        \"parentId\": \"\",\n        \"quoteLineItem\": {\n          \"id\": \"\",\n          \"productSku\": \"\",\n          \"productName\": \"\",\n          \"quantity\": 0,\n          \"listPrice\": 0,\n          \"subscriptionTerm\": 0,\n          \"listTotalPrice\": 0,\n          \"systemDiscount\": 0,\n          \"systemDiscountAmount\": 0,\n          \"subtotal\": 0,\n          \"salesPrice\": 0,\n          \"netSalesPrice\": 0,\n          \"discount\": 0,\n          \"discountAmount\": 0,\n          \"totalPrice\": 0,\n          \"totalAmount\": 0,\n          \"subscriptionStartDate\": \"\",\n          \"subscriptionEndDate\": \"\",\n          \"billingPeriod\": \"\",\n          \"billingTiming\": \"\",\n          \"autoRenew\": false,\n          \"evergreen\": false\n        },\n        \"uom\": {\n          \"name\": \"\",\n          \"quantityDimension\": \"\",\n          \"termDimension\": \"\"\n        },\n        \"product\": {\n          \"id\": \"\",\n          \"name\": \"\",\n          \"sku\": \"\",\n          \"revenueModel\": \"\"\n        },\n        \"productOption\": {\n          \"id\": \"\",\n          \"optionType\": \"\"\n        },\n        \"appliedPriceTags\": [\n          {\n            \"id\": \"\",\n            \"name\": \"\",\n            \"code\": \"\",\n            \"type\": \"\"\n          }\n        ],\n        \"childrenLineItems\": [\n          {\n            \"\": \"\"\n          }\n        ]\n      }\n    ]\n  },\n  \"warnings\": [\n    {\n      \"errorCode\": \"\",\n      \"errorType\": \"\",\n      \"message\": \"\"\n    }\n  ],\n  \"errors\": [\n    {\n      \"errorCode\": \"\",\n      \"errorType\": \"\",\n      \"message\": \"\"\n    }\n  ]\n}"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// Validation error.\n{\n  \"status\": 400,\n  \"error\": \"Failed to update quote\",\n  \"message\": \"\",\n  \"errorDetails\": [\n    {\n      \"errorCode\": \"QUOTE_NOT_FOUND\",\n      \"message\": \"\",\n      \"path\": \"body.buckets[2].allocations[0]\"\n    }\n  ]\n}"
        },
        {
          "id": "response-2-401",
          "language": "401",
          "code": "// Authentication failed.\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}