DHL eCommerce Turkey
APIDomestic shipping API of DHL eCommerce Turkey, formerly MNG Kargo
- Erişim
- Client ID/secret plus customer JWT
Hakkında
DHL eCommerce Turkey, the carrier formerly called MNG Kargo, has REST APIs to create orders, print barcode labels, ship cash-on-delivery and return parcels, track shipments, calculate prices and look up address codes. Calls need app keys from its API portal and a corporate customer account.
Neler yapabilirsin
- Create shipment orders from your store and print their barcode labels
- Track shipments and their movements by order reference or shipment ID
- Calculate the shipping price and look up city and district codes
Başlarken
- Become a DHL eCommerce corporate customer to get a customer number
- Register on the API portal, create an app and subscribe it to a plan
- Get a JWT from /token and send it with the app's client ID and secret
Örnek kod
# 1. Get a JWT with your customer number and password
curl -X POST https://testapi.mngkargo.com.tr/mngapi/api/token \
-H "X-IBM-Client-Id: $CLIENT_ID" -H "X-IBM-Client-Secret: $CLIENT_SECRET" \
-H "Content-Type: application/json" \
-d '{"customerNumber": "312947702", "password": "ABCD1234", "identityType": 1}'
# 2. Create a shipment order
curl -X POST https://testapi.mngkargo.com.tr/mngapi/api/standardcmdapi/createOrder \
-H "X-IBM-Client-Id: $CLIENT_ID" -H "X-IBM-Client-Secret: $CLIENT_SECRET" \
-H "Authorization: Bearer $JWT" -H "Content-Type: application/json" \
-d '{"order": {"referenceId": "SIPARIS34567", "barcode": "SIPARIS34567", "isCOD": 0,
"codAmount": 0, "shipmentServiceType": 1, "packagingType": 1, "content": "İçerik 1",
"paymentType": 1, "deliveryType": 1},
"orderPieceList": [{"barcode": "SIPARIS34567_PARCA1", "desi": 2, "kg": 1, "content": "Parça açıklama 1"}],
"recipient": {"customerId": 58513278}}'Ayrıntılar
- Barındırma
- Hazır hizmet (bulut)
- Kullanılabildiği yerler
- Türkiye
- MCP sunucusu
- Yok