// We use the method $ .ajax const config = {"prod": {"url": "https://uss.poczta-polska.pl", "version": "2.0" "" token ": "GNDMSTGP3YR81 ... 0ja42DTC4MRHQ = .od1ot ... 4njq5mje1rq ==. AD5BF522C ... 197A3944"}} JQUERY.AJAX ({URL: Config ['prod']. URL+"/USS/V"+config ['prod'] TRUE, "Number": Parcel.val (), // We put here a variable with the shipping number "Language": "PL"}, Type: "Get", Contenttype: "Application/Json", Success: Callback, Error: Callback})
$ curl = curl_init (); $ apikey = "gndmstgp3yr81 ... 0ja42dtc4mrhq = .od1ot ... 4njq5mje1rq ==. Ad5bf522c ... 197a3944"; $ number = 123456; // Add Your Parcel Number $ Params = Array ('Language' => 'PL', 'Number' => $ number, 'Addpostofficeinfo' => TRUE, // only when the USS user has an additional 'States' => True) attribute; curl_etopt_array ($ curl, array (curlopt_url => 'https://uss.poczta-polska.pl/uss/v2.0/tracking/checkmailex?''.http_build_Query(Params), curlopt_returntransfer => True, curlopt_encoding =>>>> '', Curlopt_maxredirs => 10, curlopt_timeout => 0, curlopt_followlocation => true, curlopt_http_version => curl_http_version_1_1, curlopt_customrequest => 'get', curlopt_httpheader => array (array (array ( 'Accept: Application/Json', 'API_KEY:'. $ Apikey),)); $ response = curl_exec ($ curl); curl_close ($ curl); echo $ response;
Answer from USS for the Checkmailex
{"Mailinfo": {"number": "123456789", "Typeofmailcode": "PX2", "Typeofmailname": "Pocztex", "States": [{"Code": "Prz", "Name": "prepared", "time": "2024-06-06t11: 59: 01" "Finnished": False, "Events": [{"code": "P_rej_kn1", "Name": "Electronic data of shipments", "Time": "2024-06-06t11: 59: 01", "postoffice": "Name": "Electronic Sender"}, "Finnished": "CANCEled": "CANCEled": "CANCEled": " false, "state": {"code": "PRZ", "Name": "prepared"}}]}, "number": "123456789", "MailStatus": 1}
// We use the method $ .ajax const config = {"prod": {"url": "https://uss.poczta-polska.pl", "version": "2.0" "" token ": "gndmstgp3yr81 ... 0ja42dtc4mrhq = .od1ot ... 4njq5mje1rq ==. AD5BF522C ... 197A3944"}} const parcels = ["123456789", "px6761595367", "px1234102917"] jquery.ajax ({url: config ['prod']. URL+"/USS/V"+config ['prod'] xhrobj.setrequestheader ("api_key", config ['prod']. Token), date: {"states": True, "Addpostofficeinfo": False, "Number": Parcels, // We put here shipping boards with shipping numbers "Language": "Post" Contenttype: "Application/Json", Success: Callback, Error: Callback})
$ curl = curl_init (); $ apikey = "gndmstgp3yr81 ... 0ja42dtc4mrhq = .od1ot ... 4njq5mje1rq ==. Ad5bf522c ... 197a3944"; $ numbers = ["123456789", "px6761595367", "px1234102917"]; // Add Your Parcels Array $ Params = Array ('Language' => 'PL', 'Number' => $ numbers, 'Addpostofficeinfo' => false, 'states' => TRUE); curl_etopt_array ($ curl, array (curlopt_url => 'https://uss.poczta-polska.pl/uss/v2.0/tracking/checkmailcollectionex?'.http_build_Query( Decution), curlopt_returntransfer => True, Curlopt_encoding => '', curlopt_maxredirs => 10, curlopt_timeout => 0, curlopt_followlocation => true, curlopt_http_version => curl_http_verseon_1_1, curlopt_customrequest => 'post', Curlopt_httpheader => array ('Accept: Application/Json', 'Api_key:'. $ Apikey),)); $ response = curl_exec ($ curl); curl_close ($ curl); echo $ response;
Answer from USS for the checkmailcollectionex
The above method is used to ask the tracking system by many shipments in two cases:
- When we know a collection of shipments to ask (shipping board)
- When in the
Checkmailex
we get the key with the Components
, then use this method to download data on shipping in this collection.
{"Status": 0, "Magitems": [{"Mailinfo": {"number": "123456789", "Typeofmailcode": "PX2", "Typeofmailname": "Pocztex", "States": [{"Code": "Prz", "Name": "prepared", "Time", "Time", "Time", "TIME" "2024-06-06t11: 59: 01"}], "Finished": false, "Events": [{"code": "P_rej_kn1", "Name": "Electronic shipments were received", "Time": "2024-06-06t11: 59: 01", "Postoffice": "Name": "Name" }, "finished": false, "Canceled": false, "state": {"code": "Prz", "name": "prepared"}}}, "number": "123456789", "MailStatus": 1}, {"Mailinfo": {"number": "px6761595367," "Typeofmailcode": "PX2", "Typeofmailname": "Pocztex", "States": [{"Code": "Prz", "Name": "prepared", "time": "2024-06-19t11: 09: 06"}, {"Code": "na", "name": "Time", "Time", " "2024-06-24T17: 27: 58"}, {"code": "Tr", "Name": "In transport", "time": "2024-06-26t10: 29: 44"}, {"Code": "Dor", "Name": "In delivery", "Time": "2024-06-26t10: 55: 17" {"code": "to", "name": "delivered", "time": "2024-06-26t16: 07: 42"}], "finished": True, "Events": [{"Code": "P_rej_kn1", "Name": "Electronic data was received", "Time": "TIME" "2024-06-19T11: 09: 06", "postoffice": {"name": "electronic sender"}, "finished": false, "castled": false, "state": {"code": "PRZ", "Name": "prepared"}}, {"code": "name": "Name": " Shipments "," Time ":" 2024-06-24t17: 27: 58 "," postoffice ": {" code ":" 258468 "," name ":" up Pabianice 1 "," OfficeType ":" up "}," finished ": false," canced ": False," Code ":" na ":" na ":" "Name": "broadcast"}, {"code": "p_wieil", "name": "Email notification", "Time": "2024-06-24t17: 45: 35", "Postoffice": {"name": "Central database ZST"}, "Finnished": False} {"code": "p_wzl", "name": "sending a parcel", "time": "2024-06-25t06: 05: 32", "postoffice": {"code": "258468", "Name": "Up Pabianice 1", "OfficeType": "Up": "Up", "Finish "Canceled": false, "state": {"code": "tr", "name": "in transport"}}, {"code": "p_pzl", "name": "arrival", "time": "2024-06-25t09: 28: 49", "postoffice": {"name" "OfficeType": "CP Wer"}, "Finished": false, "Canceled": false}, {"code": "p_wzl", "name": "sending a shipment", "time": "2024-06-25t21: 58: 31", "postoffice": "Name": "Terripe", " "Officetype": "CP Wer"}, "Finished": false, "Canceled": false, "state": {"code": "tr", "name": "in transport"}}, {"code": "p_pzl", "name": "arrival", "Time": "2024-06-26t02: 12: 20", "postoffice": {"name": "reloading terminal", "officytype": "cp wer"}, "finished": false, "canceled": false}, {"code": "p_z", "name": "trip from office", "Time": "Time" "2024-06-26t09: 00: 42", "postoffice": {"code": "433373", "name": "Wer Wrocław", "OfficeType": "CP Wer"}, "Finnished": false, "Canceled": false}, {"code": "Sending": "Sending Shipments "," Time ":" 2024-06-26t09: 15: 01 "," postoffice ": {" name ":" transhipment terminal "," officytype ":" cp wer "}," finished ": false," CANCEled ": false," state ": {" code ":" TR ":" }, {"code": "p_kod", "name": "prepared for delivery", "time": "2024-06-26t10: 29: 44", "postoffice": {"code": "269232", "Name": "Up Świdnica Śląska 1", "OfficeType": "Up", "FINISHED" "Canceled": false, "state": {"code": "tr", "name": "in transport"}}, {"code": "p_pzl", "name": "arrival", "time": "2024-06-26t10: 45: 17", "postoffice": "269232", "269232", "Name": "Up Świdnica Śląska 1", "OfficeType": "Up"}, "Finished": false, "Canceled": false}, {"code": "p_wd", "name": "prepared for service", "Time": "2024-06-26t10: 53: 22", "Postoffice": "Code": "269232", "Name": "Up Świdnica Śląska 1", "OfficeType": "up"}, "finished": false, "CANCEled": false, "state": {"code": "Dor", "name": "In delivery"}}, {"code": "p_wdml", "p_wdml", "p_wdml" "Name": "Mested for delivery", "Time": "2024-06-26t10: 55: 17", "postoffice": {"code": "269232", "name": "Up Świdnica Śląska 1", "OfficeType": "Up"}, "Finnished": False, "Canceled": False, "State": "State": "Code": "Dor", "Name": "In delivery"}}, {"code": "P_WSMS", "Name": "SMS notification", "Time": "2024-06-26t11: 05: 25", "Postoffice": {"name": "Central ZST database" "CANCEled": false}, {"code": "p_wieil", "name": "Email notification", "Time": "2024-06-26t11: 06: 04", "Postoffice": {"name": "Central database ZST"}, "Finnished": false, "CANCEled": False} {"Code": "P_D", "Name": "Delived", "Time": "2024-06-26t14: 21: 38", "postoffice": {"code": "269232", "Name": "Up Świdnica Śląska 1", "Officetype": "up": True, "Finnished": True, "finished": True, "finished": True, "finished": True, "finished" "Canceled": false, "state": {"code": "to", "name": "delivered"}}, {"code": "p_ukepo", "name": "providing the recipient's signature", "Time": "2024-06-26t14: 21: 42", "Code": {"Code": "119479", "Name": "Central control system for a mobile postman", "OfficeType": "css"}, "finished": false, "castled": false}, {"code": "p_wieil", "name": "E-mail notification", "Time": "Time": "2024-06-26t14: 36: 47", "postoffice": {"name": "Central database ZSTS"}, "finished": false, "Canceled": false}, {"code": "p_rdml", "name": "Settlement of KD by a postman", "Time": "Time": " "2024-06-26t15: 57: 34", "postoffice": {"code": "269232", "Name": "Up Świdnica Śląska 1", "OfficeType": "Up"}, "Finished": false, "Canceled": false}, {"code": "p_ol", " Cracking books after delivery "," Time ":" 2024-06-26t16: 07: 42 "," postoffice ": {" code ":" 269232 "," name ":" Up Świdnica Śląska 1 "," OfficeType ":" Up "}," Finnished ": False," Canceled ": False," State, "State," State, "State," State ": False," State "Code": "to", "name": "delivered"}}]}, "number": "PX6761595367", "MailStatus": 0}, {"number": "PX1234102917", "MailStatus": -1}}}}}}}}
Note 1! It should be noted that for the checkmailcollectionex
, information about Mailinfo
in the Magitems
.
Note 2! The other two parcels have two different mailstatus
, which clearly define the status of a given parcel.