---
title: Finalize Quotes
slug: finalize-quotes
docTags: 
createdAt: 2026-09-19T04:28:50.328Z
---

{
  "id": "QraBOWSua5kdpT6-BPL0r",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.nue.io/cpq/quotes:finalize",
    "servers": [
      {
        "url": "https://api.nue.io/cpq/quotes:finalize",
        "description": "Nue Production API Endpoint"
      },
      {
        "url": "https://api.sandbox.nue.io/cpq/quotes:finalize",
        "description": "Nue Sandbox API Endpoint"
      }
    ],
    "name": "Finalize Quotes",
    "description": "<p>Converts one or more accepted quotes into orders — the quote-to-revenue step.</p>\n<p><strong>Two modes.</strong> With <code>activateOrders</code> false or omitted the quote becomes a <strong>Draft</strong> order and nothing is provisioned; a Draft order can still be corrected. With <code>activateOrders</code> true the order is also <strong>activated</strong>, which generates subscriptions, assets and entitlements by product category.</p>\n<p><strong>Key behaviors:</strong></p>\n<ul>\n<li>At most <strong>50</strong> quote ids per call. The batch is atomic: one unknown id finalizes nothing</li>\n<li>A repeated id is finalized once</li>\n<li>Activation is synchronous but <strong>provisioning is not</strong> — subscriptions appear shortly afterwards, so read them back rather than assuming they exist when the response returns</li>\n<li><strong>Not idempotent.</strong> Finalizing a quote that already has an order is not blocked: on a normal tenant it creates a SECOND order, and on a quote-split tenant it activates the existing draft instead. Check for an existing order first</li>\n<li>On a quote-split tenant one quote can produce several orders</li>\n<li>A tenant may additionally require the quote be primary, or its status be exactly <code>Approved</code></li>\n</ul>\n<p>Salesforce-integrated tenants only.</p>\n<p>Apex equivalent: <code>Ruby.GlobalQuoteService.generateOrders(List&#x3C;Id> quoteIds, Boolean activateOrders)</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",
          "description": "",
          "customType": "FinalizeQuotesRequest",
          "schema": [
            {
              "name": "quoteIds",
              "kind": "required",
              "type": "array",
              "description": "<p>Ids of the quotes to finalize. At most 50 per call; a larger batch is rejected before any work is done.</p>",
              "example": "",
              "itemType": "string",
              "customType": "string[]",
              "itemExample": "",
              "itemDefault": ""
            },
            {
              "name": "activateOrders",
              "kind": "optional",
              "type": "boolean",
              "description": "<p>When true the generated orders are activated, which provisions subscriptions, assets and entitlements. When false or omitted the orders are left in Draft.</p>",
              "default": false
            }
          ],
          "modelRef": "#/components/schemas/FinalizeQuotesRequest",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "ApiKeyAuth",
          "name": "nue-api-key",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "The quotes were finalized into orders.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "FinalizeQuotesResponse",
            "schema": [
              {
                "name": "orders",
                "kind": "optional",
                "type": "array",
                "description": "<p>Orders created from the finalized quotes. On a quote-split tenant one quote can produce several orders, so do not assume one entry per quote id.</p>",
                "modelRef": "#/components/schemas/OrderSummary",
                "customType": "OrderSummary[]",
                "schema": [
                  {
                    "name": "orderId",
                    "kind": "optional",
                    "type": "string",
                    "description": "Id of the created order."
                  },
                  {
                    "name": "orderNumber",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Human-readable order number.</p>"
                  },
                  {
                    "name": "status",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Order status at the time of the response — <code>Draft</code>, or <code>Activated</code> when activateOrders was true.</p>",
                    "example": "Draft"
                  },
                  {
                    "name": "quoteId",
                    "kind": "optional",
                    "type": "string",
                    "description": "Id of the quote this order was finalized from."
                  }
                ]
              },
              {
                "name": "warnings",
                "kind": "optional",
                "type": "array",
                "description": "<p>Non-fatal warnings raised during finalization. The orders were still created.</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/FinalizeQuotesResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "<p>Invalid request — more than 50 ids, an empty list, an unresolved change-order line, or a tax-calculation error on the quote. Nothing was finalized.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "Error response",
            "customType": "ErrorResponse",
            "schema": [
              {
                "name": "code",
                "kind": "optional",
                "type": "integer",
                "description": "HTTP status code",
                "example": 400
              },
              {
                "name": "message",
                "kind": "optional",
                "type": "string",
                "description": "Error message",
                "example": "Bad Request"
              },
              {
                "name": "details",
                "kind": "optional",
                "type": "string",
                "description": "Detailed error information",
                "example": "Required field 'name' is missing"
              }
            ],
            "modelRef": "#/components/schemas/ErrorResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "404",
        "description": "One or more quotes were not found. Nothing was finalized.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "Error response",
            "customType": "ErrorResponse",
            "schema": [
              {
                "name": "code",
                "kind": "optional",
                "type": "integer",
                "description": "HTTP status code",
                "example": 400
              },
              {
                "name": "message",
                "kind": "optional",
                "type": "string",
                "description": "Error message",
                "example": "Bad Request"
              },
              {
                "name": "details",
                "kind": "optional",
                "type": "string",
                "description": "Detailed error information",
                "example": "Required field 'name' is missing"
              }
            ],
            "modelRef": "#/components/schemas/ErrorResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "500",
        "description": "<p>Internal server error. The outcome is unknown — read the quote before retrying, or it may be finalized twice.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "Error response",
            "customType": "ErrorResponse",
            "schema": [
              {
                "name": "code",
                "kind": "optional",
                "type": "integer",
                "description": "HTTP status code",
                "example": 400
              },
              {
                "name": "message",
                "kind": "optional",
                "type": "string",
                "description": "Error message",
                "example": "Bad Request"
              },
              {
                "name": "details",
                "kind": "optional",
                "type": "string",
                "description": "Detailed error information",
                "example": "Required field 'name' is missing"
              }
            ],
            "modelRef": "#/components/schemas/ErrorResponse",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "Xuu_sAaJXGT9nCUIvqArs",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.nue.io/cpq/quotes:finalize \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"quoteIds\": []\n     }'"
        },
        {
          "id": "e_-DJiQlaRlcumsZwSx27",
          "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   \"quoteIds\": []\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:finalize\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "Ocbrq_Fc4o0j9pp1edw0J",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.nue.io/cpq/quotes:finalize\")\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   \"quoteIds\": []\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "8F-sbQ_gw3QuEMKuz2RJp",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.nue.io/cpq/quotes:finalize\"\n\npayload = json.dumps({\n   \"quoteIds\": []\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": "Xuu_sAaJXGT9nCUIvqArs"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// The quotes were finalized into orders.\n{\n  \"orders\": [\n    {\n      \"orderId\": \"\",\n      \"orderNumber\": \"\",\n      \"status\": \"Draft\",\n      \"quoteId\": \"\"\n    }\n  ],\n  \"warnings\": [\n    {\n      \"errorCode\": \"\",\n      \"errorType\": \"\",\n      \"message\": \"\"\n    }\n  ]\n}"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// Invalid request — more than 50 ids, an empty list, an unresolved change-order line, or a tax-calculation error on the quote. Nothing was finalized.\n{\n  \"code\": 400,\n  \"message\": \"Bad Request\",\n  \"details\": \"Required field 'name' is missing\"\n}"
        },
        {
          "id": "response-2-404",
          "language": "404",
          "code": "// One or more quotes were not found. Nothing was finalized.\n{\n  \"code\": 400,\n  \"message\": \"Bad Request\",\n  \"details\": \"Required field 'name' is missing\"\n}"
        },
        {
          "id": "response-3-500",
          "language": "500",
          "code": "// Internal server error. The outcome is unknown — read the quote before retrying, or it may be finalized twice.\n{\n  \"code\": 400,\n  \"message\": \"Bad Request\",\n  \"details\": \"Required field 'name' is missing\"\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}