---
title: Update Invoice Number Configuration
slug: update-invoice-number-configuration
docTags: 
createdAt: 2026-08-25T19:28:59.170Z
---

{
  "id": "aNt3J8ujC9v61fm9NMes8",
  "type": "api-oas-v2",
  "data": {
    "method": "PUT",
    "url": "https://api.nue.io/v1/stripe/integration/invoice/default/number/type",
    "servers": [
      {
        "url": "https://api.nue.io/v1/stripe/integration/invoice/default/number/type",
        "description": "Nue API Production URL"
      },
      {
        "url": "https://api.sandbox.nue.io/v1/stripe/integration/invoice/default/number/type",
        "description": "Nue Sandbox API Server"
      }
    ],
    "name": "Update Invoice Number Configuration",
    "description": "Configure how invoice numbers are assigned when transferring invoices from Nue to Stripe. You can choose to use either Stripe's default numbering format or preserve the original Nue invoice numbers.",
    "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": [
        {
          "kind": "required",
          "name": "defaultNumberType",
          "type": "string",
          "example": "Nue",
          "description": "The invoice numbering strategy to use when creating Stripe invoices",
          "enum": [
            "Nue",
            "Stripe"
          ]
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "apiKeyAuth",
          "name": "nue-api-key",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Invoice number configuration updated successfully",
        "jsonExample": "",
        "isExpanded": true,
        "subExamples": [
          {
            "label": "GENERATED",
            "code": "// Invoice number configuration updated successfully\n{\n  \"status\": \"\",\n  \"data\": {\n    \"defaultNumberType\": \"\",\n    \"message\": \"\"\n  },\n  \"warnings\": [\n    \"\"\n  ]\n}"
          },
          {
            "label": "Nue Number Type",
            "code": "{\n  \"status\": \"SUCCESS\",\n  \"data\": {\n    \"defaultNumberType\": \"Nue\",\n    \"message\": \"Invoice number type updated successfully\"\n  }\n}"
          }
        ],
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "UpdateDefaultNumberTypeResponse",
            "schema": [
              {
                "name": "status",
                "kind": "optional",
                "type": "string<SUCCESS | PARTIAL_SUCCESS | FAILURE>",
                "description": "",
                "enum": [
                  "SUCCESS",
                  "PARTIAL_SUCCESS",
                  "FAILURE"
                ]
              },
              {
                "name": "data",
                "kind": "optional",
                "type": "object",
                "description": "",
                "modelRef": "#/components/schemas/UpdateDefaultNumberTypeResp",
                "customType": "UpdateDefaultNumberTypeResp",
                "schema": [
                  {
                    "name": "defaultNumberType",
                    "kind": "optional",
                    "type": "string<Nue | Stripe>",
                    "description": "",
                    "enum": [
                      "Nue",
                      "Stripe"
                    ]
                  },
                  {
                    "name": "message",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  }
                ]
              },
              {
                "name": "warnings",
                "kind": "optional",
                "type": "array",
                "description": "",
                "example": "",
                "itemType": "string",
                "customType": "string[]",
                "itemExample": "",
                "itemDefault": ""
              }
            ],
            "modelRef": "#/components/schemas/UpdateDefaultNumberTypeResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "<p>Bad Request - Invalid number type</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "ErrorResponse",
            "schema": [
              {
                "name": "error",
                "kind": "optional",
                "type": "object",
                "description": "",
                "example": "",
                "schema": [
                  {
                    "name": "code",
                    "kind": "optional",
                    "type": "string",
                    "description": "Error code",
                    "example": "VALIDATION_ERROR"
                  },
                  {
                    "name": "message",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Human-readable error message</p>",
                    "example": "Invalid mapping configuration"
                  },
                  {
                    "name": "details",
                    "kind": "optional",
                    "type": "array",
                    "description": "Additional error details",
                    "example": "[\"Target field 'oid' is read-only\"]",
                    "itemType": "string",
                    "customType": "string[]",
                    "itemExample": "",
                    "itemDefault": ""
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/ErrorResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "<p>Unauthorized - Invalid or missing API key</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "ErrorResponse",
            "schema": [
              {
                "name": "error",
                "kind": "optional",
                "type": "object",
                "description": "",
                "example": "",
                "schema": [
                  {
                    "name": "code",
                    "kind": "optional",
                    "type": "string",
                    "description": "Error code",
                    "example": "VALIDATION_ERROR"
                  },
                  {
                    "name": "message",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Human-readable error message</p>",
                    "example": "Invalid mapping configuration"
                  },
                  {
                    "name": "details",
                    "kind": "optional",
                    "type": "array",
                    "description": "Additional error details",
                    "example": "[\"Target field 'oid' is read-only\"]",
                    "itemType": "string",
                    "customType": "string[]",
                    "itemExample": "",
                    "itemDefault": ""
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/ErrorResponse",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "6GtBw4ZBu_UALqV2BtyJ1",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request PUT \\\n     --url 'https://api.nue.io/v1/stripe/integration/invoice/default/number/type?defaultNumberType=Nue' \\\n     --header 'accept: application/json'"
        },
        {
          "id": "qpWHmK9mwmXcyif_SYR6Z",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'PUT',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.nue.io/v1/stripe/integration/invoice/default/number/type?defaultNumberType=Nue\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "hyjgu0jCcTiIbhCuCbnNp",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.nue.io/v1/stripe/integration/invoice/default/number/type?defaultNumberType=Nue\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "hALQWehtAnvksZTZCxUMZ",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.nue.io/v1/stripe/integration/invoice/default/number/type?defaultNumberType=Nue\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"PUT\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "6GtBw4ZBu_UALqV2BtyJ1"
    },
    "results": {
      "languages": [
        {
          "id": "IjCUPaj6sHsPJnulFe9i5",
          "language": "200",
          "code": "// Invoice number configuration updated successfully\n{\n  \"status\": \"\",\n  \"data\": {\n    \"defaultNumberType\": \"\",\n    \"message\": \"\"\n  },\n  \"warnings\": [\n    \"\"\n  ]\n}",
          "subExamples": [
            {
              "label": "GENERATED",
              "code": "// Invoice number configuration updated successfully\n{\n  \"status\": \"\",\n  \"data\": {\n    \"defaultNumberType\": \"\",\n    \"message\": \"\"\n  },\n  \"warnings\": [\n    \"\"\n  ]\n}"
            },
            {
              "label": "Nue Number Type",
              "code": "{\n  \"status\": \"SUCCESS\",\n  \"data\": {\n    \"defaultNumberType\": \"Nue\",\n    \"message\": \"Invoice number type updated successfully\"\n  }\n}"
            }
          ]
        },
        {
          "id": "NwfVA_-bUUK33nhi1vik9",
          "language": "400",
          "code": "// Bad Request - Invalid number type\n{\n  \"error\": {\n    \"code\": \"VALIDATION_ERROR\",\n    \"message\": \"Invalid mapping configuration\",\n    \"details\": [\n      \"\"\n    ]\n  }\n}"
        },
        {
          "id": "1MKW31IaTAdGvxBj3tjKW",
          "language": "401",
          "code": "// Unauthorized - Invalid or missing API key\n{\n  \"error\": {\n    \"code\": \"VALIDATION_ERROR\",\n    \"message\": \"Invalid mapping configuration\",\n    \"details\": [\n      \"\"\n    ]\n  }\n}"
        }
      ],
      "selectedLanguageId": "IjCUPaj6sHsPJnulFe9i5"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}