Load App APIs
Demands
Create new demand
1 min
code examples curl location globoff 'https //{tenantsubdomain}/tms/api/v1/demands/' \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ header 'x coreos tid string' \\ \ header 'x coreos access string' \\ \ header 'x coreos userinfo string' \\ \ data '{ "servicetype" "ftl", "routedetails" { "originfacility" "s 23", "destinationfacility" "ggn" }, "vehiclename" "10ft", "expdispatchat" 1756626048521 }'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); myheaders append("x coreos tid", "string"); myheaders append("x coreos access", "string"); myheaders append("x coreos userinfo", "string"); var raw = json stringify({ "servicetype" "ftl", "routedetails" { "originfacility" "s 23", "destinationfacility" "ggn" }, "vehiclename" "10ft", "expdispatchat" 1756626048521 }); var requestoptions = { method 'post', headers myheaders, body raw, redirect 'follow' }; fetch("https //{tenantsubdomain}/tms/api/v1/demands/", 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/") https = net http new(url host, url port) https use ssl = true request = net http post new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" request\["x coreos tid"] = "string" request\["x coreos access"] = "string" request\["x coreos userinfo"] = "string" request body = json dump({ "servicetype" "ftl", "routedetails" { "originfacility" "s 23", "destinationfacility" "ggn" }, "vehiclename" "10ft", "expdispatchat" 1756626048521 }) response = https request(request) puts response read body import requests import json url = "https //{tenantsubdomain}/tms/api/v1/demands/" payload = json dumps({ "servicetype" "ftl", "routedetails" { "originfacility" "s 23", "destinationfacility" "ggn" }, "vehiclename" "10ft", "expdispatchat" 1756626048521 }) headers = { 'accept' 'application/json', 'content type' 'application/json', 'x coreos tid' 'string', 'x coreos access' 'string', 'x coreos userinfo' 'string' } response = requests request("post", url, headers=headers, data=payload) print(response text) responses // demand created successfully { "success" true, "data" { "data" { "id" "loads 55cc5b84 84bb 5415 aecc a79b8edb1b99" }, "request" { "uri" "/core/api/v2/entity/loads", "method" "post", "querystring" "{}", "body" { "category" "ftl", "subcategory" "default", "callback" { "url" "http //tms demandapp tms dev svc cluster local 80/tms/api/v1/demands/callback", "meta" { "event" "create", "callback url" "", "callback secret" "", "timestamp" 1755330060 077906, "uniquecode" "ee68eebf a2c6 406f 9090 2e27d6ef948c", "data" { "" "" }, "allocationstrategy" "sow" } }, "owner" "os1devs", "uniquecode" "dlv p3w99t", "properties" { "originfacility" "s 23", "destinationfacility" "ggn", "stops" \[ "" ], "vehiclesize" "10ft default", "vehiclename" "10ft", "expdispatchat" 1756626048521, "orderids" \[ "" ], "servicetype" "ftl", "movementtype" "primary", "totalboxcount" 0, "totalplannedweight" 0, "totalordercost" 0, "totalfreightcost" 1231, "allocationtype" "sow", "matchingcontracts" \[ { "transporterid" "twewjv", "transportername" "test", "contractid" "m5a49l 1", "ratemasterid" "s 23 ggn 10ft default m5a49l 1 flat", "freightcost" 1231 } ], "totalvolume" 0, "previouslyindented" false, "destinationclusters" \[ "" ], "nearestodd" 1756626048521 } } }, "autoindent" false, "requestid" "load indent dlv p3w99t" } }// bad request { "success" false, "error" "", "validation errors" \[ { "field" "", "message" "" } ] }// internal server error { "success" false, "error" "", "error code" "" }
