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)



Copyright 2018-2024, linuxgemini (İlteriş Yağıztegin Eroğlu). Any and all opinions listed here are my own and not representative of my employers; future, past and present.