PTT Cargo Tracking Endpoint

Endpoint: https://pttws.ptt.gov.tr/cepptt/mssnvrPttaceaemaa/gonderitakipvepostakod/gonderisorguYurticiveYurtDisi

Request Method: GET

Query Strings

Headers

Warning

Although the returned data is JSON, server response Content-Type is text/plain for some reason.

Python Example

import requests
import json

trackingcode = "RXEXAMPLE00TR"

url = f"https://pttws.ptt.gov.tr/cepptt/mssnvrPttaceaemaa/gonderitakipvepostakod/gonderisorguYurticiveYurtDisi?barkod={trackingcode}&tokenIdBildirim=''&kaynak=ANDROID"

headers = {
  'User-Agent': 'ek.ptt',
  'Content-Type': 'application/json',
  'App-Version': 'unknown'
}

response = requests.request("GET", url, headers=headers)

data = json.loads(response.text)

print(response.text)