---
title: Cancel Credit Memos Asynchronously
slug: cancel-credit-memos-asynchronously
docTags: 
createdAt: 2026-08-25T19:28:59.170Z
---

{
  "id": "mLmbpCePqSdrmCCIhqlDr",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.nue.io/billing/credit-memos:async-cancel",
    "servers": [
      {
        "url": "https://api.nue.io/billing/credit-memos:async-cancel",
        "description": "Nue Production API Endpoint"
      },
      {
        "url": "https://api.sandbox.nue.io/billing/credit-memos:async-cancel",
        "description": "Nue Sandbox API Endpoint"
      }
    ],
    "name": "Cancel Credit Memos Asynchronously",
    "description": "Cancel a list of credit memos asynchronously.",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "*/*",
            "application/json"
          ],
          "default": "*/*"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "The request to cancel a list of credit memos.",
          "customType": "CancelCreditMemosRequest",
          "schema": [
            {
              "name": "creditMemoIds",
              "kind": "optional",
              "type": "array",
              "description": "<p>A set of Credit Memo IDs, mutually exclusive with the 'graphqlFilter' parameter.</p>",
              "example": "",
              "itemType": "string",
              "customType": "string[]",
              "itemExample": "",
              "itemDefault": ""
            },
            {
              "name": "notifyCrm",
              "kind": "optional",
              "type": "boolean",
              "description": "<p>Indicates if the mapped credit memo 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",
              "description": "<p>Indicates if the mapped payment record in the connected CRM system (e.g., Salesforce) also needs to be updated.</p>"
            },
            {
              "name": "creditMemoComment",
              "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 of cancel credit memo"
            },
            {
              "name": "graphqlFilter",
              "kind": "optional",
              "type": "string",
              "description": "Filter for credit memos to be canceled",
              "example": "{status: {_eq: \"Active\"}}"
            }
          ],
          "modelRef": "#/components/schemas/CancelCreditMemosRequest",
          "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": "7TUCbWoEZ8WrVQUx0lPqu",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.nue.io/billing/credit-memos:async-cancel \\\n     --header 'accept: */*'"
        },
        {
          "id": "ygPLKWhwX5SzdwVY_2uhx",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"*/*\");\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/credit-memos:async-cancel\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "gdOW9qUJZINdW5vVAHAu9",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.nue.io/billing/credit-memos:async-cancel\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"*/*\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "nols1QH2d66ATy0_M74Gx",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.nue.io/billing/credit-memos:async-cancel\"\n\npayload = {}\nheaders = {\n   'accept': '*/*',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "7TUCbWoEZ8WrVQUx0lPqu"
    },
    "results": {
      "languages": [
        {
          "id": "fD6VRaH8-iW8XVwh8pINX",
          "language": "200",
          "code": "// OK\n"
        },
        {
          "id": "ZLuX-auf-fs5asa1jVAdc",
          "language": "400",
          "code": "// Bad Request\n{\n  \"title\": \"\",\n  \"message\": \"\",\n  \"errorCode\": \"\"\n}"
        },
        {
          "id": "Cee3VgfRhY3XiGqL2ye1W",
          "language": "404",
          "code": "// Not Found\n"
        }
      ],
      "selectedLanguageId": "fD6VRaH8-iW8XVwh8pINX"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}