Billing App APIs
Shipper Charge Management
Get shipper charges
1 min
code examples curl location globoff 'https //{tenant id} {stack base domain}/tms/api/v1/billing/shipper/charge?page=1\&size=100\&sortby=desc' \\ \ header 'accept application/json' \\ \ header 'content type application/json'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); var requestoptions = { method 'get', headers myheaders, redirect 'follow' }; fetch("https //{tenant id} {stack base domain}/tms/api/v1/billing/shipper/charge?page=1\&size=100\&sortby=desc", 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/shipper/charge?page=1\&size=100\&sortby=desc") 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" response = https request(request) puts response read body import requests import json url = "https //{tenant id} {stack base domain}/tms/api/v1/billing/shipper/charge?page=1\&size=100\&sortby=desc" payload = {} headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("get", url, headers=headers, data=payload) print(response text) responses // shipper charges retrieved successfully { "data" { "charges" \[ { "uniquecode" "chg 20241201 001", "chargehead" "freight charges", "chargetype" "expense", "status" "billable", "amount" 1500, "systemamount" 1500, "indentid" "ind 20241201 001", "transporterid" "trp 001", "invoiceid" "inv 20241201 001", "invoicenumber" "inv 2024 001", "invoicestatus" "draft", "supportingdocs" \[ "" ], "transporterremarks" "additional handling charges applied", "shipperrejectionreason" "invalid charge amount", "amountupdatedby" "user\@example com", "amountupdatedat" 1701388800000, "versionid" "v1 0 0", "createdat" 1701388800000, "updatedat" 1701388800000, "isdeleted" false } ], "totalcount" 0, "page" 0, "size" 0, "hasnext" 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" }// internal server error { "message" "invalid charge id provided", "status" "error", "errorcode" "invalid charge id" }
