Billing App APIs
Memo Management
Update debit note
1 min
code examples curl location globoff request put 'https //{tenant id} {stack base domain}/tms/api/v1/billing/memos/type/debitnote/{memo id}' \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ data '{ "invoicenumber" "inv123456789" }'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); var raw = json stringify({ "invoicenumber" "inv123456789" }); var requestoptions = { method 'put', headers myheaders, body raw, redirect 'follow' }; fetch("https //{tenant id} {stack base domain}/tms/api/v1/billing/memos/type/debitnote/{memo id}", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));require "uri" require "json" require "net/http" url = uri("https //{tenant id} {stack base domain}/tms/api/v1/billing/memos/type/debitnote/{memo id}") https = net http new(url host, url port) https use ssl = true request = net http put new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" request body = json dump({ "invoicenumber" "inv123456789" }) response = https request(request) puts response read body import requests import json url = "https //{tenant id} {stack base domain}/tms/api/v1/billing/memos/type/debitnote/{memo id}" payload = json dumps({ "invoicenumber" "inv123456789" }) headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("put", url, headers=headers, data=payload) print(response text) responses // debit note updated successfully { "requestid" "req 123456789", "message" "success", "status" "success" }// bad request invalid update data { "message" "invalid charge id provided", "status" "error", "errorcode" "invalid charge id" }// unauthorized invalid authentication { "message" "invalid charge id provided", "status" "error", "errorcode" "invalid charge id" }// debit note not found { "message" "invalid charge id provided", "status" "error", "errorcode" "invalid charge id" }// internal server error { "message" "invalid charge id provided", "status" "error", "errorcode" "invalid charge id" }
