Billing App APIs
Auto Approval Configuration
Get auto approval configuration
1 min
code examples curl location globoff 'https //{tenant id} {stack base domain}/tms/api/v1/billing/autoapproval configuration/?latest=boolean' \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ header 'x coreos request id string' \\ \ header 'x coreos tid string' \\ \ header 'x coreos userinfo string' \\ \ header 'x coreos access string'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); myheaders append("x coreos request id", "string"); myheaders append("x coreos tid", "string"); myheaders append("x coreos userinfo", "string"); myheaders append("x coreos access", "string"); var requestoptions = { method 'get', headers myheaders, redirect 'follow' }; fetch("https //{tenant id} {stack base domain}/tms/api/v1/billing/autoapproval configuration/?latest=boolean", 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/autoapproval configuration/?latest=boolean") https = net http new(url host, url port) https use ssl = true request = net http get new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" request\["x coreos request id"] = "string" request\["x coreos tid"] = "string" request\["x coreos userinfo"] = "string" request\["x coreos access"] = "string" response = https request(request) puts response read body import requests import json url = "https //{tenant id} {stack base domain}/tms/api/v1/billing/autoapproval configuration/?latest=boolean" payload = {} headers = { 'accept' 'application/json', 'content type' 'application/json', 'x coreos request id' 'string', 'x coreos tid' 'string', 'x coreos userinfo' 'string', 'x coreos access' 'string' } response = requests request("get", url, headers=headers, data=payload) print(response text) responses // auto approval configuration retrieved successfully { "data" { "isenabled" true, "rules" \[ { "ruleid" "rule001", "transporters" \[ "" ], "chargethreshold" 5, "amountthreshold" 10000, "deductioncharges" false, "additionalcharges" true, "rulestatus" "enabled", "createdby" { "id" "user123", "name" "john doe" }, "createdat" 1701388800000, "versionid" 1, "isdeleted" false } ] }, "message" "success", "status" "success" }// bad request invalid parameters { "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" }// configuration 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" }
