API Endpoints
Air Tracking
Subscribe Air Waybill
2 min
{ "tab" "examples", "url" "https //tnt api rpalabs io/api/v1/track and trace/air/air waybills/subscribe", "name" "overview", "method" "post", "request" { "pathparameters" \[], "queryparameters" \[], "headerparameters" \[ { "kind" "required", "name" "authorization", "type" "string", "description" "bearer access token from login api" } ], "bodydataparameters" \[ { "kind" "required", "name" "carrier code", "type" "string", "description" "airline code of the specific cargo" }, { "kind" "required", "name" "awb number", "type" "string", "description" "awb number of the specific cargo" } ], "formdataparameters" \[] }, "results" { "languages" \[ { "id" "nuhpi6 umjaynnqtgh4cn", "code" "{\r\n \\"message\\" \\"air waybill was subscribed successfully\\"\r\n}", "language" "200", "customlabel" "" }, { "id" "qxvatesnjabd2e9n0gcml", "code" "{\r\n \\"message\\" \\"request validation error\\",\r\n \\"status\\" 400,\r\n \\"error code\\" 1,\r\n \\"error fields\\" {\r\n \\"carrier code\\" \[\r\n \\"carrier code not supported carrier code must be one of \['ua', 'ho', 'lh', 'fx', 'ka', 'la', 'af', 'ok', 'et', 'gf', 'kl', 'pr', 'lo', 'qf', 'sa', 'nz', '9c', 'ai', 'ay', 'bw', 'fi', 'ck', 'ly', 'sk', 'ba', 'ga', 'jl', 'av', 'am', 'uc', 'es', 'qr', 'cx', 'cv', 'ha', 'ek', 'ke', 'ta', '5j', 'nh', 'tg', 'f5', 'ku', 'cm', 'mh', 'mk', 'k4', 'ci', '6e', 'sc', 'c8', '5y', 'a3', 'po', '5x', 'zh', 'rj', 'w5', 'ad', 'ru', 'ul', 'hl', 'sq', 'bi', 'nx', 'br', 'kq', 'lx', 'mf', 'mu', 'cz', 'ae', 'cf', '4x', 'ak', 'm6', 'gs', 'rh', 'd7', 'hx', 'm7', 'y8', '6r', 'hu', 'fd', 'wy', 'o3', 'vs', 'kz', 'oz', 'ux', 'ca', '3v']\\"\r\n ]\r\n }\r\n}", "language" "400", "customlabel" "" } ], "selectedlanguageid" "qxvatesnjabd2e9n0gcml" }, "examples" { "languages" \[ { "id" "gbfa jlian9hq9v7rxwti", "code" "curl location request post 'https //tnt api rpalabs io/api/v1/track and trace/air/air waybills/subscribe' \\\\\n header 'accept application/json' \\\\\n header 'authorization string' \\\\\n data raw '{\\"carrier code\\" \\"string\\",\\"awb number\\" \\"string\\"}'", "language" "curl", "customlabel" "" }, { "id" "qhkm8xnsndsvxuwcnl8n6", "code" "var request = require('request');\nvar options = {\n 'method' 'post',\n 'url' 'https //tnt api rpalabs io/api/v1/track and trace/air/air waybills/subscribe',\n 'headers' {\n 'accept' 'application/json',\n 'authorization' 'string'\n },\n body '{\\"carrier code\\" \\"string\\",\\"awb number\\" \\"string\\"}'\n\n};\nrequest(options, function (error, response) {\n if (error) throw new error(error);\n console log(response body);\n});\n", "language" "nodejs", "customlabel" "" }, { "id" "gw jd9y8dqstm24kzfewm", "code" "var myheaders = new headers();\nmyheaders append(\\"accept\\", \\"application/json\\");\nmyheaders append(\\"authorization\\", \\"string\\");\n\nvar raw = \\"{\\\\\\"carrier code\\\\\\" \\\\\\"string\\\\\\",\\\\\\"awb number\\\\\\" \\\\\\"string\\\\\\"}\\";\n\nvar requestoptions = {\n method 'post',\n headers myheaders,\n body raw,\n redirect 'follow'\n};\n\nfetch(\\"https //tnt api rpalabs io/api/v1/track and trace/air/air waybills/subscribe\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "language" "javascript", "customlabel" "" }, { "id" "d1mk7hrem2xjvv5wau bg", "code" "import http client\n\nconn = http client httpsconnection(\\"tnt api rpalabs io\\")\npayload = \\"{\\\\\\"carrier code\\\\\\" \\\\\\"string\\\\\\",\\\\\\"awb number\\\\\\" \\\\\\"string\\\\\\"}\\"\nheaders = {\n 'accept' 'application/json',\n 'authorization' 'string'\n}\nconn request(\\"post\\", \\"/api/v1/track and trace/air/air waybills/subscribe\\", payload, headers)\nres = conn getresponse()\ndata = res read()\nprint(data decode(\\"utf 8\\"))", "language" "python", "customlabel" "" }, { "id" "hie3qylrcm8cp96e86zxq", "code" "require \\"uri\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //tnt api rpalabs io/api/v1/track and trace/air/air waybills/subscribe\\")\n\nhttps = net http new(url host, url port)\nhttps use ssl = true\n\nrequest = net http post new(url)\nrequest\[\\"accept\\"] = \\"application/json\\"\nrequest\[\\"authorization\\"] = \\"string\\"\nrequest body = \\"{\\\\\\"carrier code\\\\\\" \\\\\\"string\\\\\\",\\\\\\"awb number\\\\\\" \\\\\\"string\\\\\\"}\\"\n\nresponse = https request(request)\nputs response read body\n", "language" "ruby", "customlabel" "" } ], "selectedlanguageid" "qhkm8xnsndsvxuwcnl8n6" }, "description" "this endpoint lets users to subscribe air waybills and allows the air wabill information to be stored in the database ", "currentnewparameter" { "label" "header parameter", "value" "headerparameters" } } see the error handling page for troubleshooting any errors âī¸ need some help? if you encounter a problem or require assistance, please contact our support team with details regarding your request at support\@rippey ai a representative will connect with you soon đ

