---
title: Reverse Invoices
slug: reverse-invoices
docTags: 
createdAt: 2026-08-25T19:28:59.170Z
---

{
  "id": "uEIif6QlqkX-il8ElNGNT",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.nue.io/billing/invoices:reverse",
    "servers": [
      {
        "url": "https://api.nue.io/billing/invoices:reverse",
        "description": "Nue Production API Endpoint"
      },
      {
        "url": "https://api.sandbox.nue.io/billing/invoices:reverse",
        "description": "Nue Sandbox API Endpoint"
      }
    ],
    "name": "Reverse Invoices",
    "description": "<p>Reverse a list of active invoices. Use this endpoint when cancellation of an active invoice is not permitted (e.g., in certain European regions). Reversed invoices remain historically visible with a terminal 'Reversed' status.</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": "The request to reverse a list of invoices.",
          "customType": "ReverseInvoicesRequest",
          "schema": [
            {
              "name": "invoiceIds",
              "kind": "optional",
              "type": "array",
              "description": "<p>A set of Invoice IDs to reverse, mutually exclusive with the 'graphqlFilter' parameter. Only invoices in 'Active' status can be reversed.</p>",
              "example": "",
              "itemType": "string",
              "customType": "string[]",
              "itemExample": "",
              "itemDefault": ""
            },
            {
              "name": "notifyCrm",
              "kind": "optional",
              "type": "boolean",
              "description": "<p>Indicates if the mapped invoice record in the connected CRM system (e.g., Salesforce) also needs to be updated.</p>"
            },
            {
              "name": "notifyDebitMemoChangedToCrm",
              "kind": "optional",
              "type": "boolean",
              "description": "<p>Indicates if the mapped debit memo record in the connected CRM system (e.g., Salesforce) also needs to be updated.</p>"
            },
            {
              "name": "notifyPaymentChangedToCrm",
              "kind": "optional",
              "type": "boolean",
              "deprecated": true,
              "description": "Warning: Deprecated\n<p>Indicates if the mapped payment record in the connected CRM system (e.g., Salesforce) also needs to be updated.</p>"
            },
            {
              "name": "invoiceComment",
              "kind": "optional",
              "type": "object",
              "description": "<p>Activate credit memo may add a comment)</p>",
              "example": "{\"comment\":\"example comment\"}",
              "modelRef": "#/components/schemas/InvoiceComment",
              "customType": "InvoiceComment",
              "schema": [
                {
                  "name": "comment",
                  "kind": "optional",
                  "type": "string",
                  "description": ""
                },
                {
                  "name": "createTime",
                  "kind": "optional",
                  "type": "string",
                  "description": ""
                },
                {
                  "name": "createUserName",
                  "kind": "optional",
                  "type": "string",
                  "description": ""
                }
              ]
            },
            {
              "name": "paymentDetail",
              "kind": "optional",
              "type": "string",
              "description": "Payment detail for the reverse invoice action."
            },
            {
              "name": "graphqlFilter",
              "kind": "optional",
              "type": "string",
              "description": "Filter for invoices to be reversed. Only invoices in 'Active' status will be processed.",
              "example": "{status: {_eq: \"Active\"}}"
            }
          ],
          "modelRef": "#/components/schemas/ReverseInvoicesRequest",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "apiKeyAuth",
          "name": "nue-api-key",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "400",
        "description": "Bad Request",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "title",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "message",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "errorCode",
                "kind": "optional",
                "type": "string",
                "description": ""
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "404",
        "description": "Not Found",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "hjdSI_7Ab0IIz4AuQIeJj",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.nue.io/billing/invoices:reverse \\\n     --header 'accept: application/json'"
        },
        {
          "id": "aibshbtBgLoE6JII-lO5P",
          "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: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.nue.io/billing/invoices:reverse\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "z3cMT62d1uosKJ3_7H3LN",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.nue.io/billing/invoices:reverse\")\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\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "Ja16iKp0c60waHVX-TziU",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.nue.io/billing/invoices:reverse\"\n\npayload = {}\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": "hjdSI_7Ab0IIz4AuQIeJj"
    },
    "results": {
      "languages": [
        {
          "id": "f6glWN2iLLaen9B2FQL0W",
          "language": "200",
          "code": "// OK\n"
        },
        {
          "id": "afgVyshZ0XxZ6fuF6UJFE",
          "language": "400",
          "code": "// Bad Request\n{\n  \"title\": \"\",\n  \"message\": \"\",\n  \"errorCode\": \"\"\n}"
        },
        {
          "id": "25PqhN_1eHE_TppP-GgDy",
          "language": "404",
          "code": "// Not Found\n"
        }
      ],
      "selectedLanguageId": "f6glWN2iLLaen9B2FQL0W"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}