---
title: Invoice Preview
slug: Zs8D-invoice-preview
docTags: 
createdAt: 2026-08-25T19:28:59.170Z
---

{
  "id": "J3aP07AUrPPewzaYMHPEJ",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.nue.io/orders/invoice-preview",
    "servers": [
      {
        "url": "https://api.nue.io/orders/invoice-preview",
        "description": "**Production Environment** - Live production server for all customer-facing operations. Use this for production integrations with real customer data and transactions."
      },
      {
        "url": "https://api.sandbox.nue.io/orders/invoice-preview",
        "description": "**Sandbox Environment** - Safe testing environment with sample data for development and integration testing. No rate limits apply. Data is reset weekly. Perfect for prototyping and QA testing."
      }
    ],
    "name": "Invoice Preview",
    "description": "<p>Computes invoice preview data for an initial order or change order without persisting any data. Use this endpoint to show customers what they will be billed before committing.</p>\n<p><strong>Two modes via a single endpoint:</strong></p>\n<ul>\n<li><strong>Initial order preview</strong>: Include <code>orderProducts</code> to preview invoices for a new order. Accepts the same product fields as <code>POST /orders</code>.</li>\n<li><strong>Change order preview</strong>: Include <code>assetChanges</code> to preview invoices for modifications to existing subscriptions. Accepts the same change fields as <code>POST /change-orders</code>.</li>\n</ul>\n<p>Exactly one of <code>orderProducts</code> or <code>assetChanges</code> must be present. The endpoint runs the full pricing engine (product resolution, bundle expansion, price tags, discounts) and returns computed invoices, but writes nothing to the database.</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",
          "description": "<p>Exactly one of 'orderProducts' (initial order) or 'assetChanges' (change order) must be present.</p>",
          "schema": [
            {
              "name": "customer",
              "kind": "optional",
              "type": "object",
              "description": "Customer placing the order. Required for initial order previews.",
              "example": "",
              "schema": [
                {
                  "name": "id",
                  "kind": "required",
                  "type": "string",
                  "description": "The unique identifier for the customer."
                }
              ]
            },
            {
              "name": "effectiveDate",
              "kind": "optional",
              "type": "string<date>",
              "description": "<p>Effective date of the order (ISO 8601 format, e.g., '2025-07-01'). Used for initial order previews.</p>",
              "format": "date"
            },
            {
              "name": "orderProducts",
              "kind": "optional",
              "type": "array",
              "description": "<p>Product lines for an initial order preview. Accepts the same fields as POST /orders orderProducts. Mutually exclusive with assetChanges.</p>",
              "example": "",
              "itemType": "object",
              "customType": "object[]",
              "schema": [
                {
                  "name": "priceBookEntryId",
                  "kind": "required",
                  "type": "string",
                  "description": "The unique identifier for the price book entry."
                },
                {
                  "name": "quantity",
                  "kind": "required",
                  "type": "number",
                  "description": "The quantity of the product being ordered."
                },
                {
                  "name": "subscriptionStartDate",
                  "kind": "required",
                  "type": "string<date>",
                  "description": "<p>The start date for the subscription (ISO 8601 format).</p>",
                  "format": "date"
                },
                {
                  "name": "subscriptionTerm",
                  "kind": "optional",
                  "type": "number",
                  "description": "The duration of the subscription in months."
                },
                {
                  "name": "coTermAsset",
                  "kind": "optional",
                  "type": "string",
                  "description": "<p>Asset number (SUB-XXXXXX) of an existing subscription to co-term with.</p>"
                },
                {
                  "name": "addOns",
                  "kind": "optional",
                  "type": "array",
                  "description": "Product options to configure for bundles.",
                  "example": "",
                  "itemType": "object",
                  "customType": "object[]",
                  "schema": [
                    {
                      "name": "productOptionId",
                      "kind": "required",
                      "type": "string",
                      "description": "The unique identifier for the product option."
                    },
                    {
                      "name": "productOptionQuantity",
                      "kind": "optional",
                      "type": "number",
                      "description": "The quantity of the product option."
                    },
                    {
                      "name": "subscriptionStartDate",
                      "kind": "optional",
                      "type": "string",
                      "description": "<p>Start date for the add-on subscription. Defaults to parent product's start date.</p>"
                    },
                    {
                      "name": "subscriptionTerm",
                      "kind": "optional",
                      "type": "number",
                      "description": "Duration in months. Defaults to parent product's term."
                    }
                  ]
                }
              ]
            },
            {
              "name": "assetChanges",
              "kind": "optional",
              "type": "array",
              "description": "<p>Asset changes for a change order preview. Accepts the same fields as POST /change-orders assetChanges. Mutually exclusive with orderProducts.</p>",
              "example": "",
              "itemType": "object",
              "customType": "object[]",
              "schema": [
                {
                  "name": "changeType",
                  "kind": "required",
                  "type": "string<UpdateQuantity | UpdateTerm | Renew | CoTerm | Cancel | ConvertFreeTrial | Upgrade | Downgrade | Swap | Reconfigure>",
                  "description": "Type of change to apply to the asset.",
                  "enum": [
                    "UpdateQuantity",
                    "UpdateTerm",
                    "Renew",
                    "CoTerm",
                    "Cancel",
                    "ConvertFreeTrial",
                    "Upgrade",
                    "Downgrade",
                    "Swap",
                    "Reconfigure"
                  ]
                },
                {
                  "name": "assetNumber",
                  "kind": "required",
                  "type": "string",
                  "description": "<p>Unique identifier for the asset (subscription name, e.g., SUB-00003725).</p>"
                },
                {
                  "name": "quantity",
                  "kind": "optional",
                  "type": "number",
                  "description": "<p>Delta quantity (required for UpdateQuantity). Must be non-zero.</p>"
                },
                {
                  "name": "startDate",
                  "kind": "optional",
                  "type": "string<date>",
                  "description": "<p>Start date for the change (required for UpdateQuantity, Upgrade, Downgrade, Swap, Reconfigure).</p>",
                  "format": "date"
                },
                {
                  "name": "term",
                  "kind": "optional",
                  "type": "number",
                  "description": "<p>New term for the subscription (required for UpdateTerm). Must be non-zero.</p>"
                },
                {
                  "name": "renewalTerm",
                  "kind": "optional",
                  "type": "number",
                  "description": "<p>Term for renewal (required for Renew).</p>"
                },
                {
                  "name": "coTermDate",
                  "kind": "optional",
                  "type": "string<date>",
                  "description": "<p>Date to co-terminate the subscription to (required for CoTerm).</p>",
                  "format": "date"
                },
                {
                  "name": "cancellationDate",
                  "kind": "optional",
                  "type": "string<date>",
                  "description": "<p>Date to cancel the subscription (required for Cancel).</p>",
                  "format": "date"
                },
                {
                  "name": "targetPriceBookEntryId",
                  "kind": "optional",
                  "type": "string",
                  "description": "<p>Target price book entry ID (required for Upgrade, Downgrade, Swap).</p>"
                },
                {
                  "name": "addOns",
                  "kind": "optional",
                  "type": "array",
                  "description": "<p>Add-on configurations for bundle reconfiguration (required for Reconfigure).</p>",
                  "example": "",
                  "itemType": "object",
                  "customType": "object[]",
                  "schema": [
                    {
                      "name": "productOptionId",
                      "kind": "required",
                      "type": "string",
                      "description": "<p>Product option ID for the bundle add-on.</p>"
                    },
                    {
                      "name": "reconfigureEffectiveDate",
                      "kind": "required",
                      "type": "string<date>",
                      "description": "Effective date for the reconfiguration.",
                      "format": "date"
                    },
                    {
                      "name": "productOptionQuantity",
                      "kind": "required",
                      "type": "number",
                      "description": "Quantity for the product option."
                    }
                  ]
                }
              ]
            },
            {
              "name": "products",
              "kind": "optional",
              "type": "array",
              "description": "<p>New products to add alongside a change order (cross-sell). Must be accompanied by at least one entry in assetChanges.</p>",
              "example": "",
              "itemType": "object",
              "customType": "object[]",
              "schema": [
                {
                  "name": "priceBookEntryId",
                  "kind": "required",
                  "type": "string",
                  "description": "Price book entry ID identifying the product to add."
                },
                {
                  "name": "quantity",
                  "kind": "required",
                  "type": "number",
                  "description": "<p>Quantity to add (must be positive).</p>"
                },
                {
                  "name": "subscriptionStartDate",
                  "kind": "required",
                  "type": "string<date>",
                  "description": "Effective start date for the new product.",
                  "format": "date"
                },
                {
                  "name": "subscriptionTerm",
                  "kind": "optional",
                  "type": "number",
                  "description": "Subscription term in months. Mutually exclusive with coTermAsset."
                },
                {
                  "name": "coTermAsset",
                  "kind": "optional",
                  "type": "string",
                  "description": "<p>Existing subscription number to co-term with. Mutually exclusive with subscriptionTerm.</p>"
                }
              ]
            },
            {
              "name": "billingPeriod",
              "kind": "optional",
              "type": "string",
              "description": "<p>Billing period for the order (e.g., Month, Quarter, Semi-Annual, Annual).</p>"
            },
            {
              "name": "billingAccountId",
              "kind": "optional",
              "type": "string",
              "description": "The billing account ID."
            },
            {
              "name": "description",
              "kind": "optional",
              "type": "string",
              "description": "Description of the order."
            },
            {
              "name": "customFields",
              "kind": "optional",
              "type": "object",
              "description": "Custom fields for the order.",
              "example": "",
              "schema": []
            },
            {
              "name": "timeZone",
              "kind": "optional",
              "type": "string",
              "description": "<p>Time zone for date calculations (change order previews).</p>"
            },
            {
              "name": "poNumber",
              "kind": "optional",
              "type": "string",
              "description": "Purchase order number."
            },
            {
              "name": "poDate",
              "kind": "optional",
              "type": "string<date>",
              "description": "Purchase order date.",
              "format": "date"
            }
          ],
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "ApiKeyAuth",
          "name": "nue-api-key",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Invoice preview computed successfully. The response shape depends on the request type.",
        "jsonExample": "",
        "isExpanded": true,
        "subExamples": [
          {
            "label": "GENERATED",
            "code": "// Invoice preview computed successfully. The response shape depends on the request type.\n{\n  \"previewInvoices\": [\n    {\n      \"id\": \"\",\n      \"invoiceNumber\": \"\",\n      \"amount\": 0,\n      \"amountWithoutTax\": 0,\n      \"currencyIsoCode\": \"\",\n      \"invoiceDate\": \"\",\n      \"dueDate\": \"\",\n      \"startDate\": \"\",\n      \"endDate\": \"\",\n      \"status\": \"\",\n      \"items\": [\n        {\n          \"productName\": \"\",\n          \"amount\": 0,\n          \"quantity\": 0,\n          \"unitPrice\": 0,\n          \"startDate\": \"\",\n          \"endDate\": \"\"\n        }\n      ]\n    }\n  ],\n  \"previews\": [\n    {\n      \"assetNumber\": \"\",\n      \"priceSummary\": {\n        \"totalPrice\": 0,\n        \"totalAmount\": 0,\n        \"todayChargePrice\": 0,\n        \"todayChargeAmount\": 0,\n        \"nextBillingPeriodPrice\": 0,\n        \"nextBillingPeriodAmount\": 0,\n        \"nextBillingDate\": \"\"\n      },\n      \"previewResult\": {\n        \"assetNumber\": \"\",\n        \"quantity\": 0,\n        \"term\": 0,\n        \"startDate\": \"\",\n        \"endDate\": \"\",\n        \"cancellationDate\": \"\",\n        \"orderPrice\": {},\n        \"billingPrice\": {},\n        \"changes\": [\n          {\n            \"changeType\": \"\",\n            \"deltaACV\": 0,\n            \"deltaARR\": 0,\n            \"deltaCMRR\": 0,\n            \"deltaTCV\": 0,\n            \"discountAmount\": 0,\n            \"discountPercentage\": 0,\n            \"endDate\": \"\",\n            \"lineType\": \"\",\n            \"listTotal\": 0,\n            \"netSalesPrice\": 0,\n            \"quantity\": 0,\n            \"refId\": \"\",\n            \"salesPrice\": 0,\n            \"startDate\": \"\",\n            \"subtotal\": 0,\n            \"systemDiscount\": 0,\n            \"systemDiscountAmount\": 0,\n            \"term\": 0,\n            \"totalAmount\": 0,\n            \"totalPrice\": 0\n          }\n        ],\n        \"childrenAssets\": [\n          {\n            \"assetNumber\": \"\",\n            \"quantity\": 0,\n            \"term\": 0,\n            \"startDate\": \"\",\n            \"endDate\": \"\",\n            \"cancellationDate\": \"\",\n            \"reconfigureStartDate\": \"\",\n            \"convertFreeTrialStartDate\": \"\",\n            \"orderPrice\": \"\",\n            \"billingPrice\": \"\",\n            \"changes\": [\n              {\n                \"changeType\": \"\",\n                \"deltaACV\": 0,\n                \"deltaARR\": 0,\n                \"deltaCMRR\": 0,\n                \"deltaTCV\": 0,\n                \"discountAmount\": 0,\n                \"discountPercentage\": 0,\n                \"endDate\": \"\",\n                \"lineType\": \"\",\n                \"listTotal\": 0,\n                \"netSalesPrice\": 0,\n                \"quantity\": 0,\n                \"refId\": \"\",\n                \"salesPrice\": 0,\n                \"startDate\": \"\",\n                \"subtotal\": 0,\n                \"systemDiscount\": 0,\n                \"systemDiscountAmount\": 0,\n                \"term\": 0,\n                \"totalAmount\": 0,\n                \"totalPrice\": 0\n              }\n            ],\n            \"childrenAssets\": [\n              {}\n            ]\n          }\n        ]\n      },\n      \"previewRequest\": {}\n    }\n  ]\n}"
          },
          {
            "label": "initialOrderResponse",
            "code": "// Initial order invoice preview response\n{\n  \"previewInvoices\": [\n    {\n      \"amount\": 1800,\n      \"amountWithoutTax\": 1800,\n      \"taxAmount\": 0,\n      \"currencyIsoCode\": \"USD\",\n      \"invoiceDate\": \"2025-07-01\",\n      \"dueDate\": \"2025-07-31\",\n      \"startDate\": \"2025-07-01\",\n      \"endDate\": \"2026-06-30\",\n      \"items\": [\n        {\n          \"productName\": \"Platform License\",\n          \"amount\": 1800,\n          \"quantity\": 10,\n          \"unitPrice\": 15,\n          \"startDate\": \"2025-07-01\",\n          \"endDate\": \"2026-06-30\"\n        }\n      ]\n    }\n  ]\n}"
          },
          {
            "label": "changeOrderResponse",
            "code": "// Change order invoice preview response\n{\n  \"previews\": [\n    {\n      \"assetNumber\": \"SUB-00003725\",\n      \"priceSummary\": {\n        \"totalPrice\": 4500,\n        \"totalAmount\": 4500,\n        \"todayChargePrice\": 2062.5,\n        \"todayChargeAmount\": 2062.5,\n        \"nextBillingPeriodPrice\": 375,\n        \"nextBillingPeriodAmount\": 375,\n        \"nextBillingDate\": \"2025-08-01\"\n      },\n      \"previewResult\": {\n        \"assetNumber\": \"SUB-00003725\",\n        \"quantity\": 35,\n        \"term\": 12,\n        \"startDate\": \"2025-01-01\",\n        \"endDate\": \"2025-12-31\"\n      }\n    }\n  ]\n}"
          }
        ],
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "<p>Contains either previewInvoices (initial order) or previews (change order), never both.</p>",
            "schema": [
              {
                "name": "previewInvoices",
                "kind": "optional",
                "type": "array",
                "description": "<p>Invoice previews for initial order requests. Contains the first invoice the order will generate (not every invoice over the term), before tax: preview invoices never include tax.</p>",
                "example": "",
                "itemType": "object",
                "customType": "object[]",
                "schema": [
                  {
                    "name": "id",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Invoice ID (in-memory, not persisted).</p>"
                  },
                  {
                    "name": "invoiceNumber",
                    "kind": "optional",
                    "type": "string",
                    "description": "Generated invoice number."
                  },
                  {
                    "name": "amount",
                    "kind": "optional",
                    "type": "number",
                    "description": "Total invoice amount."
                  },
                  {
                    "name": "amountWithoutTax",
                    "kind": "optional",
                    "type": "number",
                    "description": "Invoice subtotal amount."
                  },
                  {
                    "name": "currencyIsoCode",
                    "kind": "optional",
                    "type": "string",
                    "description": "ISO currency code."
                  },
                  {
                    "name": "invoiceDate",
                    "kind": "optional",
                    "type": "string<date>",
                    "description": "Invoice date.",
                    "format": "date"
                  },
                  {
                    "name": "dueDate",
                    "kind": "optional",
                    "type": "string<date>",
                    "description": "Payment due date.",
                    "format": "date"
                  },
                  {
                    "name": "startDate",
                    "kind": "optional",
                    "type": "string<date>",
                    "description": "Billing period start date.",
                    "format": "date"
                  },
                  {
                    "name": "endDate",
                    "kind": "optional",
                    "type": "string<date>",
                    "description": "Billing period end date.",
                    "format": "date"
                  },
                  {
                    "name": "status",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Invoice status (preview invoices are not persisted).</p>"
                  },
                  {
                    "name": "items",
                    "kind": "optional",
                    "type": "array",
                    "description": "<p>Invoice line items with per-product billing detail.</p>",
                    "example": "",
                    "itemType": "object",
                    "customType": "object[]",
                    "schema": [
                      {
                        "name": "productName",
                        "kind": "optional",
                        "type": "string",
                        "description": "Product name."
                      },
                      {
                        "name": "amount",
                        "kind": "optional",
                        "type": "number",
                        "description": "Line item amount."
                      },
                      {
                        "name": "quantity",
                        "kind": "optional",
                        "type": "number",
                        "description": "Quantity billed."
                      },
                      {
                        "name": "unitPrice",
                        "kind": "optional",
                        "type": "number",
                        "description": "Unit price."
                      },
                      {
                        "name": "startDate",
                        "kind": "optional",
                        "type": "string<date>",
                        "description": "Line item billing period start.",
                        "format": "date"
                      },
                      {
                        "name": "endDate",
                        "kind": "optional",
                        "type": "string<date>",
                        "description": "Line item billing period end.",
                        "format": "date"
                      }
                    ]
                  }
                ]
              },
              {
                "name": "previews",
                "kind": "optional",
                "type": "array",
                "description": "<p>Per-asset invoice previews for change order requests.</p>",
                "example": "",
                "itemType": "object",
                "customType": "object[]",
                "schema": [
                  {
                    "name": "assetNumber",
                    "kind": "optional",
                    "type": "string",
                    "description": "The subscription asset number."
                  },
                  {
                    "name": "priceSummary",
                    "kind": "optional",
                    "type": "object",
                    "description": "<p>Billing impact of this change. See the Create Draft Change Orders guide, Reading the Billing Preview.</p>",
                    "example": "",
                    "schema": [
                      {
                        "name": "totalPrice",
                        "kind": "optional",
                        "type": "number",
                        "description": "<p>Value of the change over the rest of the subscription term, before tax. This is not a billing-period amount.</p>"
                      },
                      {
                        "name": "totalAmount",
                        "kind": "optional",
                        "type": "number",
                        "description": "<p>Same as totalPrice at the preview level. Order-level tax, when calculated, is returned on the order (order.tax and order.totalAmount).</p>"
                      },
                      {
                        "name": "todayChargePrice",
                        "kind": "optional",
                        "type": "number",
                        "description": "<p>Amount of the invoice generated for the change today, before tax: the prorated amount from the change date to the next bill date. Its size depends on the subscription's billing period, billing timing and bill cycle day. 0 when no invoice is generated today (for example, billed in arrears).</p>"
                      },
                      {
                        "name": "todayChargeAmount",
                        "kind": "optional",
                        "type": "number",
                        "description": "<p>The same invoice as todayChargePrice, including tax. Invoice previews do not call the tax engine, so this currently equals todayChargePrice. The amount charged at activation is this invoice plus the tax calculated when the invoice is generated.</p>"
                      },
                      {
                        "name": "nextBillingPeriodPrice",
                        "kind": "optional",
                        "type": "number",
                        "description": "<p>Price of the following billing period, before tax. Can currently be returned as 0; do not rely on it for display.</p>"
                      },
                      {
                        "name": "nextBillingPeriodAmount",
                        "kind": "optional",
                        "type": "number",
                        "description": "<p>Amount of the following billing period. Can currently be returned as 0; do not rely on it for display.</p>"
                      },
                      {
                        "name": "nextBillingDate",
                        "kind": "optional",
                        "type": "string<date>",
                        "description": "Date of the next regular invoice for the subscription.",
                        "format": "date"
                      }
                    ]
                  },
                  {
                    "name": "previewResult",
                    "kind": "optional",
                    "type": "object",
                    "description": "Updated asset state after the change.",
                    "example": "",
                    "schema": [
                      {
                        "name": "assetNumber",
                        "kind": "optional",
                        "type": "string",
                        "description": "Subscription asset number."
                      },
                      {
                        "name": "quantity",
                        "kind": "optional",
                        "type": "number",
                        "description": "Quantity after the change."
                      },
                      {
                        "name": "term",
                        "kind": "optional",
                        "type": "number",
                        "description": "Term after the change."
                      },
                      {
                        "name": "startDate",
                        "kind": "optional",
                        "type": "string<date>",
                        "description": "Subscription start date.",
                        "format": "date"
                      },
                      {
                        "name": "endDate",
                        "kind": "optional",
                        "type": "string<date>",
                        "description": "Subscription end date after the change.",
                        "format": "date"
                      },
                      {
                        "name": "cancellationDate",
                        "kind": "optional",
                        "type": "string<date>",
                        "description": "<p>Cancellation effective date (Cancel changes only).</p>",
                        "format": "date"
                      },
                      {
                        "name": "orderPrice",
                        "kind": "optional",
                        "type": "object",
                        "description": "<p>Order-level pricing detail.</p>",
                        "example": "",
                        "schema": []
                      },
                      {
                        "name": "billingPrice",
                        "kind": "optional",
                        "type": "object",
                        "description": "<p>Billing-level pricing detail.</p>",
                        "example": "",
                        "schema": []
                      },
                      {
                        "name": "changes",
                        "kind": "optional",
                        "type": "array",
                        "description": "Itemized list of changes applied.",
                        "example": "",
                        "itemType": "object",
                        "customType": "object[]",
                        "schema": [
                          {
                            "name": "changeType",
                            "kind": "optional",
                            "type": "string",
                            "description": "Type of change being made"
                          },
                          {
                            "name": "deltaACV",
                            "kind": "optional",
                            "type": "number",
                            "description": "Change in Annual Contract Value"
                          },
                          {
                            "name": "deltaARR",
                            "kind": "optional",
                            "type": "number",
                            "description": "Change in Annual Recurring Revenue"
                          },
                          {
                            "name": "deltaCMRR",
                            "kind": "optional",
                            "type": "number",
                            "description": "Change in Monthly Recurring Revenue"
                          },
                          {
                            "name": "deltaTCV",
                            "kind": "optional",
                            "type": "number",
                            "description": "Change in Total Contract Value"
                          },
                          {
                            "name": "discountAmount",
                            "kind": "optional",
                            "type": "number",
                            "description": "Amount of discount applied"
                          },
                          {
                            "name": "discountPercentage",
                            "kind": "optional",
                            "type": "number",
                            "description": "Percentage of discount applied"
                          },
                          {
                            "name": "endDate",
                            "kind": "optional",
                            "type": "string",
                            "description": "End date of the change"
                          },
                          {
                            "name": "lineType",
                            "kind": "optional",
                            "type": "string",
                            "description": "Type of line item"
                          },
                          {
                            "name": "listTotal",
                            "kind": "optional",
                            "type": "number",
                            "description": "Total list price"
                          },
                          {
                            "name": "netSalesPrice",
                            "kind": "optional",
                            "type": "number",
                            "description": "Net sales price after discounts"
                          },
                          {
                            "name": "quantity",
                            "kind": "optional",
                            "type": "number",
                            "description": "Quantity being changed"
                          },
                          {
                            "name": "refId",
                            "kind": "optional",
                            "type": "string",
                            "description": "Reference ID for the change"
                          },
                          {
                            "name": "salesPrice",
                            "kind": "optional",
                            "type": "number",
                            "description": "Sales price before discounts"
                          },
                          {
                            "name": "startDate",
                            "kind": "optional",
                            "type": "string",
                            "description": "Start date of the change"
                          },
                          {
                            "name": "subtotal",
                            "kind": "optional",
                            "type": "number",
                            "description": "Subtotal amount"
                          },
                          {
                            "name": "systemDiscount",
                            "kind": "optional",
                            "type": "number",
                            "description": "<p>System-applied discount percentage</p>"
                          },
                          {
                            "name": "systemDiscountAmount",
                            "kind": "optional",
                            "type": "number",
                            "description": "<p>System-applied discount amount</p>"
                          },
                          {
                            "name": "term",
                            "kind": "optional",
                            "type": "number",
                            "description": "Term length in months"
                          },
                          {
                            "name": "totalAmount",
                            "kind": "optional",
                            "type": "number",
                            "description": "Total amount after all discounts"
                          },
                          {
                            "name": "totalPrice",
                            "kind": "optional",
                            "type": "number",
                            "description": "Total price before discounts"
                          }
                        ]
                      },
                      {
                        "name": "childrenAssets",
                        "kind": "optional",
                        "type": "array",
                        "description": "Child asset previews for bundle subscriptions.",
                        "example": "",
                        "itemType": "object",
                        "customType": "object[]",
                        "schema": [
                          {
                            "name": "assetNumber",
                            "kind": "optional",
                            "type": "string",
                            "description": ""
                          },
                          {
                            "name": "quantity",
                            "kind": "optional",
                            "type": "number",
                            "description": ""
                          },
                          {
                            "name": "term",
                            "kind": "optional",
                            "type": "number",
                            "description": ""
                          },
                          {
                            "name": "startDate",
                            "kind": "optional",
                            "type": "string",
                            "description": ""
                          },
                          {
                            "name": "endDate",
                            "kind": "optional",
                            "type": "string",
                            "description": ""
                          },
                          {
                            "name": "cancellationDate",
                            "kind": "optional",
                            "type": "string",
                            "description": ""
                          },
                          {
                            "name": "reconfigureStartDate",
                            "kind": "optional",
                            "type": "string",
                            "description": ""
                          },
                          {
                            "name": "convertFreeTrialStartDate",
                            "kind": "optional",
                            "type": "string",
                            "description": ""
                          },
                          {
                            "name": "orderPrice",
                            "kind": "optional",
                            "type": "map",
                            "description": "Order price summary for this asset change.",
                            "example": "",
                            "customType": "map<string, string>",
                            "schema": []
                          },
                          {
                            "name": "billingPrice",
                            "kind": "optional",
                            "type": "map",
                            "description": "Billing price summary for this asset change.",
                            "example": "",
                            "customType": "map<string, string>",
                            "schema": []
                          },
                          {
                            "name": "changes",
                            "kind": "optional",
                            "type": "array",
                            "description": "",
                            "example": "",
                            "itemType": "object",
                            "customType": "object[]",
                            "schema": [
                              {
                                "name": "changeType",
                                "kind": "optional",
                                "type": "string",
                                "description": "Type of change being made"
                              },
                              {
                                "name": "deltaACV",
                                "kind": "optional",
                                "type": "number",
                                "description": "Change in Annual Contract Value"
                              },
                              {
                                "name": "deltaARR",
                                "kind": "optional",
                                "type": "number",
                                "description": "Change in Annual Recurring Revenue"
                              },
                              {
                                "name": "deltaCMRR",
                                "kind": "optional",
                                "type": "number",
                                "description": "Change in Monthly Recurring Revenue"
                              },
                              {
                                "name": "deltaTCV",
                                "kind": "optional",
                                "type": "number",
                                "description": "Change in Total Contract Value"
                              },
                              {
                                "name": "discountAmount",
                                "kind": "optional",
                                "type": "number",
                                "description": "Amount of discount applied"
                              },
                              {
                                "name": "discountPercentage",
                                "kind": "optional",
                                "type": "number",
                                "description": "Percentage of discount applied"
                              },
                              {
                                "name": "endDate",
                                "kind": "optional",
                                "type": "string",
                                "description": "End date of the change"
                              },
                              {
                                "name": "lineType",
                                "kind": "optional",
                                "type": "string",
                                "description": "Type of line item"
                              },
                              {
                                "name": "listTotal",
                                "kind": "optional",
                                "type": "number",
                                "description": "Total list price"
                              },
                              {
                                "name": "netSalesPrice",
                                "kind": "optional",
                                "type": "number",
                                "description": "Net sales price after discounts"
                              },
                              {
                                "name": "quantity",
                                "kind": "optional",
                                "type": "number",
                                "description": "Quantity being changed"
                              },
                              {
                                "name": "refId",
                                "kind": "optional",
                                "type": "string",
                                "description": "Reference ID for the change"
                              },
                              {
                                "name": "salesPrice",
                                "kind": "optional",
                                "type": "number",
                                "description": "Sales price before discounts"
                              },
                              {
                                "name": "startDate",
                                "kind": "optional",
                                "type": "string",
                                "description": "Start date of the change"
                              },
                              {
                                "name": "subtotal",
                                "kind": "optional",
                                "type": "number",
                                "description": "Subtotal amount"
                              },
                              {
                                "name": "systemDiscount",
                                "kind": "optional",
                                "type": "number",
                                "description": "<p>System-applied discount percentage</p>"
                              },
                              {
                                "name": "systemDiscountAmount",
                                "kind": "optional",
                                "type": "number",
                                "description": "<p>System-applied discount amount</p>"
                              },
                              {
                                "name": "term",
                                "kind": "optional",
                                "type": "number",
                                "description": "Term length in months"
                              },
                              {
                                "name": "totalAmount",
                                "kind": "optional",
                                "type": "number",
                                "description": "Total amount after all discounts"
                              },
                              {
                                "name": "totalPrice",
                                "kind": "optional",
                                "type": "number",
                                "description": "Total price before discounts"
                              }
                            ]
                          },
                          {
                            "name": "childrenAssets",
                            "kind": "optional",
                            "type": "array",
                            "description": "",
                            "example": "",
                            "itemType": "object",
                            "customType": "object[]",
                            "itemExample": "",
                            "itemDefault": ""
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "name": "previewRequest",
                    "kind": "optional",
                    "type": "object",
                    "description": "Echo of the original change request for this asset.",
                    "example": "",
                    "schema": []
                  }
                ]
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Validation error",
        "jsonExample": "",
        "isExpanded": true,
        "subExamples": [
          {
            "label": "GENERATED",
            "code": "// Validation error\n{\n  \"status\": \"\",\n  \"errorCode\": \"\",\n  \"message\": \"\"\n}"
          },
          {
            "label": "invalidPayload",
            "code": "// Both orderProducts and assetChanges provided\n{\n  \"status\": \"FAILURE\",\n  \"errorType\": \"VALIDATION_ERROR\",\n  \"errorCode\": \"INVOICE_PREVIEW_INVALID_PAYLOAD\",\n  \"message\": \"Request must contain either orderProducts or assetChanges, not both.\"\n}"
          },
          {
            "label": "missingBody",
            "code": "// Neither orderProducts nor assetChanges provided\n{\n  \"status\": \"FAILURE\",\n  \"errorType\": \"VALIDATION_ERROR\",\n  \"errorCode\": \"INVOICE_PREVIEW_MISSING_BODY\",\n  \"message\": \"Request must contain either orderProducts or assetChanges.\"\n}"
          }
        ],
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "ValidationError",
            "schema": [
              {
                "name": "status",
                "kind": "optional",
                "type": "string<FAILURE>",
                "description": "",
                "enum": [
                  "FAILURE"
                ]
              },
              {
                "name": "errorCode",
                "kind": "optional",
                "type": "string",
                "description": "Specific validation error code"
              },
              {
                "name": "message",
                "kind": "optional",
                "type": "string",
                "description": "Detailed validation error message"
              }
            ],
            "modelRef": "#/components/schemas/ValidationError",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "Unauthorized",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "<p>Authentication failed — returned with HTTP 401. Two variants occur: a missing key is rejected by the gateway with {status: \"FAILURE\", errorCode, errorType, message}; an invalid key is rejected by the service with {status: 401, error, message}.</p>",
            "customType": "UnauthorizedError",
            "schema": [
              {
                "name": "status",
                "kind": "optional",
                "type": "",
                "description": "<p>HTTP status code (e.g. 401) or the string \"FAILURE\" for gateway-level rejections.</p>"
              },
              {
                "name": "error",
                "kind": "optional",
                "type": "string",
                "description": "<p>Error reason phrase (invalid-key variant).</p>"
              },
              {
                "name": "errorCode",
                "kind": "optional",
                "type": "string",
                "description": "<p>Machine-readable error code, e.g. MISSING_AUTH_METHOD (missing-key variant).</p>"
              },
              {
                "name": "errorType",
                "kind": "optional",
                "type": "string",
                "description": "<p>Error category, e.g. AUTHENTICATION_ERROR (missing-key variant).</p>"
              },
              {
                "name": "message",
                "kind": "optional",
                "type": "string",
                "description": "<p>Human-readable error message.</p>"
              }
            ],
            "modelRef": "#/components/schemas/UnauthorizedError",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "SZS6VjE-GvL_9KJnTLDDj",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.nue.io/orders/invoice-preview \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"customer\": {\n     \"id\": \"\"\n     },\n     \"orderProducts\": [\n     {\n     \"priceBookEntryId\": \"\",\n     \"quantity\": \"\",\n     \"subscriptionStartDate\": \"\",\n     \"addOns\": [\n     {\n     \"productOptionId\": \"\"\n     }\n     ]\n     }\n     ],\n     \"assetChanges\": [\n     {\n     \"changeType\": \"\",\n     \"assetNumber\": \"\",\n     \"addOns\": [\n     {\n     \"productOptionId\": \"\",\n     \"reconfigureEffectiveDate\": \"\",\n     \"productOptionQuantity\": \"\"\n     }\n     ]\n     }\n     ],\n     \"products\": [\n     {\n     \"priceBookEntryId\": \"\",\n     \"quantity\": \"\",\n     \"subscriptionStartDate\": \"\"\n     }\n     ]\n     }'"
        },
        {
          "id": "P0dtueAIOii8n7JdbErH7",
          "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   \"customer\": {\n      \"id\": \"\"\n   },\n   \"orderProducts\": [\n      {\n         \"priceBookEntryId\": \"\",\n         \"quantity\": \"\",\n         \"subscriptionStartDate\": \"\",\n         \"addOns\": [\n            {\n               \"productOptionId\": \"\"\n            }\n         ]\n      }\n   ],\n   \"assetChanges\": [\n      {\n         \"changeType\": \"\",\n         \"assetNumber\": \"\",\n         \"addOns\": [\n            {\n               \"productOptionId\": \"\",\n               \"reconfigureEffectiveDate\": \"\",\n               \"productOptionQuantity\": \"\"\n            }\n         ]\n      }\n   ],\n   \"products\": [\n      {\n         \"priceBookEntryId\": \"\",\n         \"quantity\": \"\",\n         \"subscriptionStartDate\": \"\"\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/orders/invoice-preview\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "_NnqOXjcaF-I6Iil12Pn2",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.nue.io/orders/invoice-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   \"customer\": {\n      \"id\": \"\"\n   },\n   \"orderProducts\": [\n      {\n         \"priceBookEntryId\": \"\",\n         \"quantity\": \"\",\n         \"subscriptionStartDate\": \"\",\n         \"addOns\": [\n            {\n               \"productOptionId\": \"\"\n            }\n         ]\n      }\n   ],\n   \"assetChanges\": [\n      {\n         \"changeType\": \"\",\n         \"assetNumber\": \"\",\n         \"addOns\": [\n            {\n               \"productOptionId\": \"\",\n               \"reconfigureEffectiveDate\": \"\",\n               \"productOptionQuantity\": \"\"\n            }\n         ]\n      }\n   ],\n   \"products\": [\n      {\n         \"priceBookEntryId\": \"\",\n         \"quantity\": \"\",\n         \"subscriptionStartDate\": \"\"\n      }\n   ]\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "62yTsY2GL0TnY3WzzKRP4",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.nue.io/orders/invoice-preview\"\n\npayload = json.dumps({\n   \"customer\": {\n      \"id\": \"\"\n   },\n   \"orderProducts\": [\n      {\n         \"priceBookEntryId\": \"\",\n         \"quantity\": \"\",\n         \"subscriptionStartDate\": \"\",\n         \"addOns\": [\n            {\n               \"productOptionId\": \"\"\n            }\n         ]\n      }\n   ],\n   \"assetChanges\": [\n      {\n         \"changeType\": \"\",\n         \"assetNumber\": \"\",\n         \"addOns\": [\n            {\n               \"productOptionId\": \"\",\n               \"reconfigureEffectiveDate\": \"\",\n               \"productOptionQuantity\": \"\"\n            }\n         ]\n      }\n   ],\n   \"products\": [\n      {\n         \"priceBookEntryId\": \"\",\n         \"quantity\": \"\",\n         \"subscriptionStartDate\": \"\"\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": "SZS6VjE-GvL_9KJnTLDDj"
    },
    "results": {
      "languages": [
        {
          "id": "4DfXn4od0rcoKujFCMMIB",
          "language": "200",
          "code": "// Invoice preview computed successfully. The response shape depends on the request type.\n{\n  \"previewInvoices\": [\n    {\n      \"id\": \"\",\n      \"invoiceNumber\": \"\",\n      \"amount\": 0,\n      \"amountWithoutTax\": 0,\n      \"currencyIsoCode\": \"\",\n      \"invoiceDate\": \"\",\n      \"dueDate\": \"\",\n      \"startDate\": \"\",\n      \"endDate\": \"\",\n      \"status\": \"\",\n      \"items\": [\n        {\n          \"productName\": \"\",\n          \"amount\": 0,\n          \"quantity\": 0,\n          \"unitPrice\": 0,\n          \"startDate\": \"\",\n          \"endDate\": \"\"\n        }\n      ]\n    }\n  ],\n  \"previews\": [\n    {\n      \"assetNumber\": \"\",\n      \"priceSummary\": {\n        \"totalPrice\": 0,\n        \"totalAmount\": 0,\n        \"todayChargePrice\": 0,\n        \"todayChargeAmount\": 0,\n        \"nextBillingPeriodPrice\": 0,\n        \"nextBillingPeriodAmount\": 0,\n        \"nextBillingDate\": \"\"\n      },\n      \"previewResult\": {\n        \"assetNumber\": \"\",\n        \"quantity\": 0,\n        \"term\": 0,\n        \"startDate\": \"\",\n        \"endDate\": \"\",\n        \"cancellationDate\": \"\",\n        \"orderPrice\": {},\n        \"billingPrice\": {},\n        \"changes\": [\n          {\n            \"changeType\": \"\",\n            \"deltaACV\": 0,\n            \"deltaARR\": 0,\n            \"deltaCMRR\": 0,\n            \"deltaTCV\": 0,\n            \"discountAmount\": 0,\n            \"discountPercentage\": 0,\n            \"endDate\": \"\",\n            \"lineType\": \"\",\n            \"listTotal\": 0,\n            \"netSalesPrice\": 0,\n            \"quantity\": 0,\n            \"refId\": \"\",\n            \"salesPrice\": 0,\n            \"startDate\": \"\",\n            \"subtotal\": 0,\n            \"systemDiscount\": 0,\n            \"systemDiscountAmount\": 0,\n            \"term\": 0,\n            \"totalAmount\": 0,\n            \"totalPrice\": 0\n          }\n        ],\n        \"childrenAssets\": [\n          {\n            \"assetNumber\": \"\",\n            \"quantity\": 0,\n            \"term\": 0,\n            \"startDate\": \"\",\n            \"endDate\": \"\",\n            \"cancellationDate\": \"\",\n            \"reconfigureStartDate\": \"\",\n            \"convertFreeTrialStartDate\": \"\",\n            \"orderPrice\": \"\",\n            \"billingPrice\": \"\",\n            \"changes\": [\n              {\n                \"changeType\": \"\",\n                \"deltaACV\": 0,\n                \"deltaARR\": 0,\n                \"deltaCMRR\": 0,\n                \"deltaTCV\": 0,\n                \"discountAmount\": 0,\n                \"discountPercentage\": 0,\n                \"endDate\": \"\",\n                \"lineType\": \"\",\n                \"listTotal\": 0,\n                \"netSalesPrice\": 0,\n                \"quantity\": 0,\n                \"refId\": \"\",\n                \"salesPrice\": 0,\n                \"startDate\": \"\",\n                \"subtotal\": 0,\n                \"systemDiscount\": 0,\n                \"systemDiscountAmount\": 0,\n                \"term\": 0,\n                \"totalAmount\": 0,\n                \"totalPrice\": 0\n              }\n            ],\n            \"childrenAssets\": [\n              {}\n            ]\n          }\n        ]\n      },\n      \"previewRequest\": {}\n    }\n  ]\n}",
          "subExamples": [
            {
              "label": "GENERATED",
              "code": "// Invoice preview computed successfully. The response shape depends on the request type.\n{\n  \"previewInvoices\": [\n    {\n      \"id\": \"\",\n      \"invoiceNumber\": \"\",\n      \"amount\": 0,\n      \"amountWithoutTax\": 0,\n      \"currencyIsoCode\": \"\",\n      \"invoiceDate\": \"\",\n      \"dueDate\": \"\",\n      \"startDate\": \"\",\n      \"endDate\": \"\",\n      \"status\": \"\",\n      \"items\": [\n        {\n          \"productName\": \"\",\n          \"amount\": 0,\n          \"quantity\": 0,\n          \"unitPrice\": 0,\n          \"startDate\": \"\",\n          \"endDate\": \"\"\n        }\n      ]\n    }\n  ],\n  \"previews\": [\n    {\n      \"assetNumber\": \"\",\n      \"priceSummary\": {\n        \"totalPrice\": 0,\n        \"totalAmount\": 0,\n        \"todayChargePrice\": 0,\n        \"todayChargeAmount\": 0,\n        \"nextBillingPeriodPrice\": 0,\n        \"nextBillingPeriodAmount\": 0,\n        \"nextBillingDate\": \"\"\n      },\n      \"previewResult\": {\n        \"assetNumber\": \"\",\n        \"quantity\": 0,\n        \"term\": 0,\n        \"startDate\": \"\",\n        \"endDate\": \"\",\n        \"cancellationDate\": \"\",\n        \"orderPrice\": {},\n        \"billingPrice\": {},\n        \"changes\": [\n          {\n            \"changeType\": \"\",\n            \"deltaACV\": 0,\n            \"deltaARR\": 0,\n            \"deltaCMRR\": 0,\n            \"deltaTCV\": 0,\n            \"discountAmount\": 0,\n            \"discountPercentage\": 0,\n            \"endDate\": \"\",\n            \"lineType\": \"\",\n            \"listTotal\": 0,\n            \"netSalesPrice\": 0,\n            \"quantity\": 0,\n            \"refId\": \"\",\n            \"salesPrice\": 0,\n            \"startDate\": \"\",\n            \"subtotal\": 0,\n            \"systemDiscount\": 0,\n            \"systemDiscountAmount\": 0,\n            \"term\": 0,\n            \"totalAmount\": 0,\n            \"totalPrice\": 0\n          }\n        ],\n        \"childrenAssets\": [\n          {\n            \"assetNumber\": \"\",\n            \"quantity\": 0,\n            \"term\": 0,\n            \"startDate\": \"\",\n            \"endDate\": \"\",\n            \"cancellationDate\": \"\",\n            \"reconfigureStartDate\": \"\",\n            \"convertFreeTrialStartDate\": \"\",\n            \"orderPrice\": \"\",\n            \"billingPrice\": \"\",\n            \"changes\": [\n              {\n                \"changeType\": \"\",\n                \"deltaACV\": 0,\n                \"deltaARR\": 0,\n                \"deltaCMRR\": 0,\n                \"deltaTCV\": 0,\n                \"discountAmount\": 0,\n                \"discountPercentage\": 0,\n                \"endDate\": \"\",\n                \"lineType\": \"\",\n                \"listTotal\": 0,\n                \"netSalesPrice\": 0,\n                \"quantity\": 0,\n                \"refId\": \"\",\n                \"salesPrice\": 0,\n                \"startDate\": \"\",\n                \"subtotal\": 0,\n                \"systemDiscount\": 0,\n                \"systemDiscountAmount\": 0,\n                \"term\": 0,\n                \"totalAmount\": 0,\n                \"totalPrice\": 0\n              }\n            ],\n            \"childrenAssets\": [\n              {}\n            ]\n          }\n        ]\n      },\n      \"previewRequest\": {}\n    }\n  ]\n}"
            },
            {
              "label": "initialOrderResponse",
              "code": "// Initial order invoice preview response\n{\n  \"previewInvoices\": [\n    {\n      \"amount\": 1800,\n      \"amountWithoutTax\": 1800,\n      \"taxAmount\": 0,\n      \"currencyIsoCode\": \"USD\",\n      \"invoiceDate\": \"2025-07-01\",\n      \"dueDate\": \"2025-07-31\",\n      \"startDate\": \"2025-07-01\",\n      \"endDate\": \"2026-06-30\",\n      \"items\": [\n        {\n          \"productName\": \"Platform License\",\n          \"amount\": 1800,\n          \"quantity\": 10,\n          \"unitPrice\": 15,\n          \"startDate\": \"2025-07-01\",\n          \"endDate\": \"2026-06-30\"\n        }\n      ]\n    }\n  ]\n}"
            },
            {
              "label": "changeOrderResponse",
              "code": "// Change order invoice preview response\n{\n  \"previews\": [\n    {\n      \"assetNumber\": \"SUB-00003725\",\n      \"priceSummary\": {\n        \"totalPrice\": 4500,\n        \"totalAmount\": 4500,\n        \"todayChargePrice\": 2062.5,\n        \"todayChargeAmount\": 2062.5,\n        \"nextBillingPeriodPrice\": 375,\n        \"nextBillingPeriodAmount\": 375,\n        \"nextBillingDate\": \"2025-08-01\"\n      },\n      \"previewResult\": {\n        \"assetNumber\": \"SUB-00003725\",\n        \"quantity\": 35,\n        \"term\": 12,\n        \"startDate\": \"2025-01-01\",\n        \"endDate\": \"2025-12-31\"\n      }\n    }\n  ]\n}"
            }
          ]
        },
        {
          "id": "vW_bCIlwPi1mbrKtBJbH2",
          "language": "400",
          "code": "// Validation error\n{\n  \"status\": \"\",\n  \"errorCode\": \"\",\n  \"message\": \"\"\n}",
          "subExamples": [
            {
              "label": "GENERATED",
              "code": "// Validation error\n{\n  \"status\": \"\",\n  \"errorCode\": \"\",\n  \"message\": \"\"\n}"
            },
            {
              "label": "invalidPayload",
              "code": "// Both orderProducts and assetChanges provided\n{\n  \"status\": \"FAILURE\",\n  \"errorType\": \"VALIDATION_ERROR\",\n  \"errorCode\": \"INVOICE_PREVIEW_INVALID_PAYLOAD\",\n  \"message\": \"Request must contain either orderProducts or assetChanges, not both.\"\n}"
            },
            {
              "label": "missingBody",
              "code": "// Neither orderProducts nor assetChanges provided\n{\n  \"status\": \"FAILURE\",\n  \"errorType\": \"VALIDATION_ERROR\",\n  \"errorCode\": \"INVOICE_PREVIEW_MISSING_BODY\",\n  \"message\": \"Request must contain either orderProducts or assetChanges.\"\n}"
            }
          ]
        },
        {
          "id": "YA0h1H6SERhQGEo853Aie",
          "language": "401",
          "code": "// Unauthorized\n{\n  \"status\": \"\",\n  \"error\": \"\",\n  \"errorCode\": \"\",\n  \"errorType\": \"\",\n  \"message\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "4DfXn4od0rcoKujFCMMIB"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}