Skip to main content

Cancel an invoice

Cancels an invoice.

Endpoint

PUT /integration/invoice/{id}/cancel

HTTP Request

PUT /integration/invoice/{id}/cancel

Request body

{ }

Successful response

{
}

Erroneous response

{
"code": "409",
"reason": "Invoice already canceled."
}

Responses

CodeDescription
202Accepted, successful operation
400Invalid request
401Unauthorized
404Not found
500Unexpected error

Examples

curl https://api.bluetape.com/genericBthubService/integration/invoice/<invoiceId>/cancel \
-X PUT \
-H "X-BlueTape-Key: <your-key>" \
-H "X-Integration-AccountId: <your-account-id>" \
-H "Content-Type: application/json"
import fetch from 'node-fetch';

const url = 'https://api.bluetape.com/genericBthubService/integration/invoice/<invoiceId>/cancel';
const options = {
method: 'PUT',
headers: {
'X-BlueTape-Key': '<your-key>',
'X-Integration-AccountId': '<your-account-id>',
'Content-Type': 'application/json'
}
};

fetch(url, options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
using Flurl.Http;

var result = await "https://api.bluetape.com/genericBthubService/integration/invoice/<invoiceId>"
.WithHeader("X-BlueTape-Key", "<your-key>")
.WithHeader("X-Integration-AccountId", "<your-account-id>")
.WithHeader("Content-Type", "application/json")
.PutJsonAsync(null)
.ReceiveJson<BlueTapeIntegrationResult>();
import requests

url = "https://api.bluetape.com/genericBthubService/integration/invoice/<invoiceId>/cancel"

headers = {
"X-BlueTape-Key": "<your-key>",
"X-Integration-AccountId": "<your-account-id>",
"Content-Type": "application/json"
}

response = requests.put(url, headers=headers)

print(response.text)