> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.monite.com/v2024-01-31/api/credit-notes/post-payable-credit-notes-id-cancel/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.monite.com/_mcp/server. # Cancel a credit note POST https://api.sandbox.monite.com/v1/payable_credit_notes/{credit_note_id}/cancel Cancel the credit note that was not confirmed during the review. Reference: https://docs.monite.com/api/credit-notes/post-payable-credit-notes-id-cancel ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. ## Servers - `https://api.sandbox.monite.com/v1` (sandbox, default) - `https://api.monite.com/v1` (eu_production) - `https://us.api.monite.com/v1` (na_production) ## Request ### Path parameters - `credit_note_id` (string, required) ### Headers - `x-monite-version` (string, required) - `x-monite-entity-id` (string, required) — The ID of the entity that owns the requested resource. ## Response ### 200 Successful Response - `id` (string, required) — The unique identifier of the credit note - `created_at` (datetime, required) — Date and time when the credit note was created in the system - `updated_at` (datetime, required) — Date and time of the last update to the credit note - `entity_id` (string, required) — The ID of the entity to which the credit note belongs - `origin` (string, required) — The origin or source system of the credit note - `source_of_data` (string, required) — How the data was input (ocr/user_specified) - `status` (string, required) — The current status of the credit note in its lifecycle - `based_on` (string, optional) — ID of the payable this credit note is based on - `based_on_document_id` (string, optional) — The document ID of the original payable that this credit note refers to - `counterpart` (CounterpartRawData, optional) — Object representing de-normalized counterpart data - `counterpart_address_id` (string, optional) — ID of the counterpart's address - `counterpart_bank_account_id` (string, optional) — ID of the counterpart's bank account - `counterpart_id` (string, optional) — ID of the counterpart - `counterpart_raw` (CounterpartRawData, optional) — Object representing counterpart data which was extracted by OCR. Used for informational purposes. - `counterpart_vat_id_id` (string, optional) — ID of the counterpart's VAT registration - `created_by_external_user_id` (string, optional) — External system's user ID for the creator - `created_by_external_user_name` (string, optional) — Name of the external user who created the credit note - `created_by_user_id` (string, optional) — ID of the user who created the credit note - `currency` (string, optional) — The currency code - `currency_exchange` (CurrencyExchangeSchema, optional) - `description` (string, optional) — Description of the credit note - `document_id` (string, optional) — The credit note's unique document number - `file_id` (string, optional) — The id of the credit note file stored in the file saver. - `file_url` (string, optional) — The URL of the credit note file stored in the file saver. - `issued_at` (string, optional) — Date when the credit note was issued - `ocr_request_id` (string, optional) — ID of the OCR processing request - `ocr_status` (string, optional) — Status of OCR processing - `project_id` (string, optional) — ID of the associated project - `sender` (string, optional) — Email address of the sender - `subtotal` (integer, optional) — The subtotal amount before taxes - `tags` (list of TagReadSchema, optional) — List of tags associated with this credit note - `tax` (integer, optional) — The tax percentage - `tax_amount` (integer, optional) — The calculated tax amount - `total_amount` (integer, optional) — The total amount including taxes ## Errors ### 401 Post Payable Credit Notes ID Cancel Request Unauthorized Error Unauthorized - `error` (ErrorSchema2, required) ### 403 Post Payable Credit Notes ID Cancel Request Forbidden Error Forbidden - `error` (ErrorSchema2, required) ### 404 Post Payable Credit Notes ID Cancel Request Not Found Error Not found - `error` (ErrorSchema2, required) ### 409 Post Payable Credit Notes ID Cancel Request Conflict Error Business logic error - `error` (ErrorSchema2, required) ### 422 Post Payable Credit Notes ID Cancel Request Unprocessable Entity Error Validation Error - `detail` (list of ValidationError, optional) ### 500 Post Payable Credit Notes ID Cancel Request Internal Server Error Internal Server Error - `error` (ErrorSchema2, required) ## Types ### CounterpartRawData - `address` (CounterpartRawAddress, optional) — The address of the vendor or supplier. - `bank_account` (CounterpartRawBankAccount, optional) — Object representing counterpart bank account. - `email` (string, optional) — The email address of the organization - `name` (string, optional) — Vendor or supplier name. - `phone` (string, optional) — The phone number of the organization - `tax_id` (string, optional) — The tax id of the counterpart. - `vat_id` (CounterpartRawVatId, optional) — VAT ID of the vendor or supplier which was used in the invoice. ### CurrencyExchangeSchema - `default_currency_code` (string, required) - `rate` (double, required) - `total` (double, required) ### TagReadSchema Represents a user-defined tag that can be assigned to resources to filter them. - `id` (string, required) — A unique ID of this tag. - `created_at` (datetime, required) — Date and time when the tag was created. Timestamps follow the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) standard. - `updated_at` (datetime, required) — Date and time when the tag was last updated. Timestamps follow the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) standard. - `name` (string, required) — The tag name. - `category` (enum, optional) — The tag category. - Allowed values: `document_type`, `department`, `project`, `cost_center`, `vendor_type`, `payment_method`, `approval_status` - `created_by_entity_user_id` (string, optional) — ID of the user who created the tag. - `description` (string, optional) — The tag description. ### ErrorSchema2 - `message` (string, required) ### ValidationError - `loc` (list of ValidationErrorLocItem, required) - `msg` (string, required) - `type` (string, required) ### CounterpartRawAddress Address information. - `city` (string, optional) — City name. - `country` (enum, optional) — Two-letter ISO country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - Allowed values: `AF`, `AX`, `AL`, `DZ`, `AS`, `AD`, `AO`, `AI`, `AQ`, `AG`, `AR`, `AM`, `AW`, `AU`, `AT`, `AZ`, `BS`, `BH`, `BD`, `BB`, `BY`, `BE`, `BZ`, `BJ`, `BM`, `BT`, `BO`, `BA`, `BW`, `BV`, `BR`, `IO`, `BN`, `BG`, `BF`, `BI`, `KH`, `CM`, `CA`, `IC`, `CV`, `KY`, `CF`, `EA`, `TD`, `CL`, `CN`, `CX`, `CC`, `CO`, `KM`, `CG`, `CD`, `CK`, `CR`, `CI`, `HR`, `CU`, `CY`, `CZ`, `DK`, `DJ`, `DM`, `DO`, `EC`, `EG`, `SV`, `GQ`, `ER`, `EE`, `SZ`, `ET`, `FK`, `FO`, `FJ`, `FI`, `FR`, `GF`, `PF`, `TF`, `GA`, `GM`, `GE`, `DE`, `GH`, `GI`, `GR`, `GL`, `GD`, `GP`, `GU`, `GT`, `GG`, `GN`, `GW`, `GY`, `HT`, `HM`, `VA`, `HN`, `HK`, `HU`, `IS`, `IN`, `ID`, `IR`, `IQ`, `IE`, `IM`, `IL`, `IT`, `JM`, `JP`, `JE`, `JO`, `KZ`, `KE`, `KI`, `KP`, `KR`, `KW`, `KG`, `LA`, `LV`, `LB`, `LS`, `LR`, `LY`, `LI`, `LT`, `LU`, `MO`, `MG`, `MW`, `MY`, `MV`, `ML`, `MT`, `MH`, `MQ`, `MR`, `MU`, `YT`, `MX`, `FM`, `MD`, `MC`, `MN`, `ME`, `MS`, `MA`, `MZ`, `MM`, `NA`, `NR`, `NP`, `NL`, `AN`, `NC`, `NZ`, `NI`, `NE`, `NG`, `NU`, `NF`, `MP`, `MK`, `NO`, `OM`, `PK`, `PW`, `PS`, `PA`, `PG`, `PY`, `PE`, `PH`, `PN`, `PL`, `PT`, `PR`, `QA`, `RE`, `RO`, `RU`, `RW`, `SH`, `KN`, `LC`, `PM`, `VC`, `WS`, `SM`, `ST`, `SA`, `SN`, `RS`, `SC`, `SL`, `SG`, `SK`, `SI`, `SB`, `SO`, `ZA`, `SS`, `GS`, `ES`, `LK`, `SD`, `SR`, `SJ`, `SE`, `CH`, `SY`, `TW`, `TJ`, `TZ`, `TH`, `TL`, `TG`, `TK`, `TO`, `TT`, `TN`, `TR`, `TM`, `TC`, `TV`, `UG`, `UA`, `AE`, `GB`, `US`, `UM`, `UY`, `UZ`, `VU`, `VE`, `VN`, `VG`, `VI`, `WF`, `EH`, `YE`, `ZM`, `ZW`, `BL`, `BQ`, `CW`, `MF`, `SX` - `line1` (string, optional) — Street address. - `line2` (string, optional) — Additional address information (if any). - `postal_code` (string, optional) — ZIP or postal code. - `state` (string, optional) — State, region, province, or county. ### CounterpartRawBankAccount - `account_holder_name` (string, optional) — Vendor's bank account name. - `account_number` (string, optional) — Vendor's bank account number, IBAN, or similar (if specified in the payable document). - `bic` (string, optional) — SWIFT code (BIC) of the vendor's bank. - `iban` (string, optional) — required for non-GB bank accounts - `routing_number` (string, optional) — required for US bank accounts - `sort_code` (string, optional) — required for GB bank accounts ### CounterpartRawVatId - `country` (enum, optional) - Allowed values: `AF`, `AX`, `AL`, `DZ`, `AS`, `AD`, `AO`, `AI`, `AQ`, `AG`, `AR`, `AM`, `AW`, `AU`, `AT`, `AZ`, `BS`, `BH`, `BD`, `BB`, `BY`, `BE`, `BZ`, `BJ`, `BM`, `BT`, `BO`, `BA`, `BW`, `BV`, `BR`, `IO`, `BN`, `BG`, `BF`, `BI`, `KH`, `CM`, `CA`, `IC`, `CV`, `KY`, `CF`, `EA`, `TD`, `CL`, `CN`, `CX`, `CC`, `CO`, `KM`, `CG`, `CD`, `CK`, `CR`, `CI`, `HR`, `CU`, `CY`, `CZ`, `DK`, `DJ`, `DM`, `DO`, `EC`, `EG`, `SV`, `GQ`, `ER`, `EE`, `SZ`, `ET`, `FK`, `FO`, `FJ`, `FI`, `FR`, `GF`, `PF`, `TF`, `GA`, `GM`, `GE`, `DE`, `GH`, `GI`, `GR`, `GL`, `GD`, `GP`, `GU`, `GT`, `GG`, `GN`, `GW`, `GY`, `HT`, `HM`, `VA`, `HN`, `HK`, `HU`, `IS`, `IN`, `ID`, `IR`, `IQ`, `IE`, `IM`, `IL`, `IT`, `JM`, `JP`, `JE`, `JO`, `KZ`, `KE`, `KI`, `KP`, `KR`, `KW`, `KG`, `LA`, `LV`, `LB`, `LS`, `LR`, `LY`, `LI`, `LT`, `LU`, `MO`, `MG`, `MW`, `MY`, `MV`, `ML`, `MT`, `MH`, `MQ`, `MR`, `MU`, `YT`, `MX`, `FM`, `MD`, `MC`, `MN`, `ME`, `MS`, `MA`, `MZ`, `MM`, `NA`, `NR`, `NP`, `NL`, `AN`, `NC`, `NZ`, `NI`, `NE`, `NG`, `NU`, `NF`, `MP`, `MK`, `NO`, `OM`, `PK`, `PW`, `PS`, `PA`, `PG`, `PY`, `PE`, `PH`, `PN`, `PL`, `PT`, `PR`, `QA`, `RE`, `RO`, `RU`, `RW`, `SH`, `KN`, `LC`, `PM`, `VC`, `WS`, `SM`, `ST`, `SA`, `SN`, `RS`, `SC`, `SL`, `SG`, `SK`, `SI`, `SB`, `SO`, `ZA`, `SS`, `GS`, `ES`, `LK`, `SD`, `SR`, `SJ`, `SE`, `CH`, `SY`, `TW`, `TJ`, `TZ`, `TH`, `TL`, `TG`, `TK`, `TO`, `TT`, `TN`, `TR`, `TM`, `TC`, `TV`, `UG`, `UA`, `AE`, `GB`, `US`, `UM`, `UY`, `UZ`, `VU`, `VE`, `VN`, `VG`, `VI`, `WF`, `EH`, `YE`, `ZM`, `ZW`, `BL`, `BQ`, `CW`, `MF`, `SX` - `type` (string, optional) - `value` (string, optional) ### ValidationErrorLocItem ## Examples **Response** ```json { "id": "123e4567-e89b-12d3-a456-426614174000", "created_at": "2024-01-15T14:30:00Z", "updated_at": "2024-01-15T14:30:00Z", "entity_id": "123e4567-e89b-12d3-a456-426614174000", "origin": "SAP", "source_of_data": "user_specified", "status": "submitted_for_approval", "based_on": "123e4567-e89b-12d3-a456-426614174000", "based_on_document_id": "INV-2287", "counterpart": { "address": { "city": "Berlin", "country": "AF", "line1": "Flughafenstrasse 52", "line2": "line2", "postal_code": "10115", "state": "state" }, "bank_account": { "account_holder_name": "account_holder_name", "account_number": "123456789012", "bic": "DEUTDE2HXXX", "iban": "iban", "routing_number": "routing_number", "sort_code": "sort_code" }, "email": "acme@example.com", "name": "Acme Inc.", "phone": "5551231234", "tax_id": "DE12345678", "vat_id": { "country": "AF", "type": "type", "value": "value" } }, "counterpart_address_id": "123e4567-e89b-12d3-a456-426614174000", "counterpart_bank_account_id": "123e4567-e89b-12d3-a456-426614174000", "counterpart_id": "123e4567-e89b-12d3-a456-426614174000", "counterpart_raw": { "address": { "city": "Berlin", "country": "AF", "line1": "Flughafenstrasse 52", "line2": "line2", "postal_code": "10115", "state": "state" }, "bank_account": { "account_holder_name": "account_holder_name", "account_number": "123456789012", "bic": "DEUTDE2HXXX", "iban": "iban", "routing_number": "routing_number", "sort_code": "sort_code" }, "email": "acme@example.com", "name": "Acme Inc.", "phone": "5551231234", "tax_id": "DE12345678", "vat_id": { "country": "AF", "type": "type", "value": "value" } }, "counterpart_vat_id_id": "123e4567-e89b-12d3-a456-426614174000", "created_by_external_user_id": "ext_user_123", "created_by_external_user_name": "John Doe", "created_by_user_id": "123e4567-e89b-12d3-a456-426614174000", "currency": "EUR", "currency_exchange": { "default_currency_code": "default_currency_code", "rate": 1.1, "total": 1.1 }, "description": "Credit note for returned items from invoice INV-2287", "document_id": "CN-2287", "file_id": "123e4567-e89b-12d3-a456-426614174000", "file_url": "file_url", "issued_at": "2024-01-15", "ocr_request_id": "123e4567-e89b-12d3-a456-426614174000", "ocr_status": "completed", "project_id": "123e4567-e89b-12d3-a456-426614174000", "sender": "supplier@example.com", "subtotal": 1000, "tags": [ { "id": "123e4567-e89b-12d3-a456-426614174000", "created_at": "2022-09-07T16:35:18Z", "updated_at": "2022-09-07T16:35:18Z", "name": "Department A", "category": "department", "created_by_entity_user_id": "ea837e28-509b-4b6a-a600-d54b6aa0b1f5", "description": "Tag for the Marketing Department" } ], "tax": 20, "tax_amount": 200, "total_amount": 1200 } ``` **SDK Code** ```python import requests url = "https://api.sandbox.monite.com/v1/payable_credit_notes/credit_note_id/cancel" headers = { "x-monite-version": "2024-01-31", "x-monite-entity-id": "9d2b4c8f-2087-4738-ba91-7359683c49a4", "Authorization": "Bearer " } response = requests.post(url, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.sandbox.monite.com/v1/payable_credit_notes/credit_note_id/cancel'; const options = { method: 'POST', headers: { 'x-monite-version': '2024-01-31', 'x-monite-entity-id': '9d2b4c8f-2087-4738-ba91-7359683c49a4', Authorization: 'Bearer ' } }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.sandbox.monite.com/v1/payable_credit_notes/credit_note_id/cancel" req, _ := http.NewRequest("POST", url, nil) req.Header.Add("x-monite-version", "2024-01-31") req.Header.Add("x-monite-entity-id", "9d2b4c8f-2087-4738-ba91-7359683c49a4") req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.sandbox.monite.com/v1/payable_credit_notes/credit_note_id/cancel") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["x-monite-version"] = '2024-01-31' request["x-monite-entity-id"] = '9d2b4c8f-2087-4738-ba91-7359683c49a4' request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.sandbox.monite.com/v1/payable_credit_notes/credit_note_id/cancel") .header("x-monite-version", "2024-01-31") .header("x-monite-entity-id", "9d2b4c8f-2087-4738-ba91-7359683c49a4") .header("Authorization", "Bearer ") .asString(); ``` ```php request('POST', 'https://api.sandbox.monite.com/v1/payable_credit_notes/credit_note_id/cancel', [ 'headers' => [ 'Authorization' => 'Bearer ', 'x-monite-entity-id' => '9d2b4c8f-2087-4738-ba91-7359683c49a4', 'x-monite-version' => '2024-01-31', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.sandbox.monite.com/v1/payable_credit_notes/credit_note_id/cancel"); var request = new RestRequest(Method.POST); request.AddHeader("x-monite-version", "2024-01-31"); request.AddHeader("x-monite-entity-id", "9d2b4c8f-2087-4738-ba91-7359683c49a4"); request.AddHeader("Authorization", "Bearer "); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = [ "x-monite-version": "2024-01-31", "x-monite-entity-id": "9d2b4c8f-2087-4738-ba91-7359683c49a4", "Authorization": "Bearer " ] let request = NSMutableURLRequest(url: NSURL(string: "https://api.sandbox.monite.com/v1/payable_credit_notes/credit_note_id/cancel")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```