Up to 15%+20% OFF Valid Now to Power Up Your Arsenal during this Sales Season! Learn More


TrackingMore Webhooks


Webhook URL
Learn more about   format of inbound webhooks
If selecting "true", then there must return a "200" response!

Webhook ってなに?

     Webhook がコールバック関数のカスタマイズを通じて web アプリケーションを変更する方法です。Webhook、経由で通知され、指定された URL 経由で通知を取得するステータスを選択できます。完了するデータを要求すると、Webhook は、構成されている URL をあなたのデータを対応いたします。

 Webhook V2

     When the tracking is updated and it triggers an update of one of your trigger setting, we make a POST request to the callback URL that you defined in the webhook page. The post body contains a JSON string of the below data.

     We currently support either HTTP or HTTPS urls, so you can have security by using an SSL-enabled url. But keep in mind that your endpoint is going to be wide-open on the internet.

     Signature Verification:

     You can verify safely about the source of POST data to make sure it is from Trackingmore. You can also analyze the POST data directly without verification. Below are steps about safety verification.

     1. Analyze the two parameters ("timeStr" and "signature") in the POST data.

     2. Use your registered email address(secret key) on Trackingmore and the parameter "timeStr(proclaim in writing)" to generate "signature", and then verify the generated "signature" with the signature from POST data. Note: Signature Algorithm is PHP:SHA256、JAVA:HmacSHA256.

     PHP Example Code:
function verify($timeStr,$useremail,$signature){
    return strcmp($result,$signature)==0?1:0;

     How to use:

       Step 1:Go my.trackingmore.com/webhook_setting.php to set your webhook url and statuses that you want to be notified.

       Step 2:When the system detects that the statuses of tracking numbers change into the statuses you set, then your configured webhook url will receive the updated data. To achieve this function, you need to program this webhook url first.

       Step 3:To get data from webhook, you only need $inputJSON = file_get_contents("php://input") in php and $inputJSON is the data we pushed. Below are examples on how we get data and write it into a file. You can also store them into the database.

  •   Example Code  
  • Write response data into file
    $handle    = fopen('test.log','a+'); 
    $inputJSON = file_get_contents("php://input");
    	fwrite($handle, date("Y-m-d H:i:s").":  ".$inputJSON . "\r\n");
    	echo 200;
    	fwrite($handle, date("Y-m-d H:i:s").": can not get webhook data!\r\n");
  • Response  200
  • Headers
    Content-Type: application/json
    			"Date":"2016-11-15 08:23",
    			"Date":"2016-11-14 09:34",
    			"StatusDescription":"\u5230\u8fbe\u5904\u7406\u4e2d\u5fc3,\u6765\u81ea\u4e2d\u56fd \u5e7f\u5dde",
    			"Date":"2016-10-31 22:45",
    			"Date":"2016-10-31 22:35",
    			"Date":"2016-10-29 22:04",
    			"Date":"2016-10-29 20:20",
    			"StatusDescription":"\u79bb\u5f00\u4e2d\u5c71\u5e02 \u53d1\u5f80\u5e7f\u5dde\u5e02",
    			"Date":"2016-10-29 16:24",
    			"Date":"2016-11-15 15:04",
    			"StatusDescription":"Posten has not been able to reach the recipient for delivery before 10.00. New delivery attempt to be made no later than 18.00. The item will subsequently be treated as an ordinary letter",
    			"Details":"535031, Sweden"
    			"Date":"2016-11-15 14:00",
    			"StatusDescription":"The shipment item could not be delivered because the recipient was not possible to reach. A notice has been given and the shipment item is delivered to a service point.",
    			"Details":"535031, Sweden"
    			"Date":"2016-11-15 07:23",
    			"StatusDescription":"The item has arrived at the recipient\u00b4s delivery point. Express to be dispatched to the recipient, other items notified",
    			"Details":"535031, Sweden"
    			"Date":"2016-11-14 23:32",
    			"StatusDescription":"The item has been through the post terminal",
    			"Details":"149, Sweden"
    			"Date":"2016-11-14 09:34",
    			"StatusDescription":"The item has arrived from abroad to Posten\u00b4s international terminal for sorting",
    			"Details":"Stockholm utr"
    	"lastEvent":"\u672a\u59a5\u6295,\u745e\u5178,2016-11-15 08:23"