delete https://secure.fusebill.com/v1/DraftPaymentSchedules/
This call is used to remove draft payments schedules from a draft invoice. This will remove all payment schedules on the invoice. The only requirement is that you provide the ID of the draft invoice in the request.
Property | Type | Description | Required |
---|---|---|---|
draftInvoiceId | Integer | The Fusebill generated unique ID of the draft invoice you want to delete the payment schedule for. | Yes |
Examples
curl -X DELETE "https://secure.fusebill.com/v1/DraftPaymentSchedules/{draftInvoiceId}" \
-H "Content-Type: application/json" \
-H "Authorization: Basic {APIKey}"
//query parameter
int pathParameter = {paymentMethodId};
//Setup API key
string apiKey = "{APIKey}";
//Configure URI
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/DraftPaymentSchedules/" + pathParameter );
//Add Content type
request.ContentLength = 0;
request.ContentType = "application/json";
//Add Api key authorization
request.Headers.Add(HttpRequestHeader.Authorization, "Basic " + apiKey);
//Set request method
request.Method = "DELETE";
//Perform the request
var httpResponse = (HttpWebResponse)request.GetResponse();
//Record the response from our request
var result = "";
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
result = streamReader.ReadToEnd();
}
#Import library Requests
import requests
#Pass in a dictionary to the Headers parameter
headers = {'Authorization' : 'Basic {APIKey}', 'Content-Type' : 'application/json'}
#Pass in a dictionary to the Payload parameter
#Pass in your URI, and Headers
r = requests.post('https://secure.fusebill.com/v1/Invoices?draftInvoiceId={id}&preview=true', headers=headers)
print(r.content)
Response
This call returns a 204 No Content response upon success
{
"ErrorId": 0,
"HttpStatusCode": 404,
"Errors": [
{
"Key": "Api Error",
"Value": "DraftInvoice with id 118 not found."
}
]
}