Load App APIs
Demands
Get demand by ID
1 min
code examples curl location globoff 'https //{tenantsubdomain}/tms/api/v1/demands/{demand id}' \\ \ 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 //{tenantsubdomain}/tms/api/v1/demands/{demand 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 //{tenantsubdomain}/tms/api/v1/demands/{demand id}") 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 //{tenantsubdomain}/tms/api/v1/demands/{demand id}" payload = {} headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("get", url, headers=headers, data=payload) print(response text) responses // demand retrieved successfully { "success" true, "data" { "allocationtype" "sow", "destinationclusters" \[ "" ], "expdispatchat" 1756626048521, "loadutilisationverified" false, "matchingcontracts" \[ { "transporterid" "twewjv", "transportername" "test", "contractid" "m5a49l 1", "ratemasterid" "s 23 ggn 10ft default m5a49l 1 flat", "freightcost" 1231 } ], "movementtype" "primary", "nearestodd" 1756626048521, "orderids" \[ "" ], "previouslyindented" false, "servicetype" "ftl", "source" "manual", "totalboxcount" 0, "totalfreightcost" 1231, "totalordercost" 0, "totalplannedweight" 0, "totalvolume" 0, "vehiclename" "10ft", "vehiclesize" "10ft default", "id" "loads 55cc5b84 84bb 5415 aecc a79b8edb1b99", "uniquecode" "dlv p3w99t", "entityid" "entity\ d352beb2 9f33 544f 8088 778ab8fce86d", "entityname" "loads", "owner" "os1devs", "tenantid" "os1devs", "appid" "app\ e7c0f6e5 e674 512e 8b8a 389cb15d94d1", "category" "ftl", "subcategory" "default", "templateid" "template\ cb8a606d 67fc 3313 a9a8 e3257c6b964a", "isactive" true, "state" "unallocated\ unallocated", "createdat" 1755330060218, "createdby" { "id" "3ca6d178 ce3b 4b5c 838a f5641ef085a1", "name" "reddi devi varaprasad", "appid" "null" }, "updatedat" 1755330060218, "updatedby" { "id" "3ca6d178 ce3b 4b5c 838a f5641ef085a1", "name" "reddi devi varaprasad", "appid" "null" }, "routedetails" { "originfacility" "s 23", "stops" \[ "" ], "destinationfacility" "ggn" }, "facilitypocdetails" "{\\"s 23\\" {\\"emailid\\" \\"secure 2eef16c8 68da 47a6 8be7 d9893494cc00\\",\\"name\\" \\"michael\\",\\"phoneno\\" \\"secure\ a60e0134 a764 4394 aed8 b1a25457fb19\\"},\\"ggn\\" {\\"emailid\\" \\"secure 9aab09a8 4adc 470a 97a7 96cfc0d93185\\",\\"name\\" \\"amit\\",\\"phoneno\\" \\"secure 2f6bf4ca c47e 4d61 b6f3 33a5a4767601\\"}}", "totaldistance" 2480 34 } }// demand not found { "success" false, "error" "", "error code" "" }// internal server error { "success" false, "error" "", "error code" "" }
