Skip to content
This repository was archived by the owner on Nov 6, 2025. It is now read-only.

Commit 97ff6ae

Browse files
authored
1.2.3 - 2019-12-7 (#19)
### Fixed - Change endpoint for token retrievement - Change User Agent and Api Version
1 parent 59ebea9 commit 97ff6ae

4 files changed

Lines changed: 18 additions & 12 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](http://semver.org/).
66

7+
## 1.2.3 - 2019-12-7
8+
### Fixed
9+
- Change endpoint for token retrievement
10+
- Change User Agent and Api Version
11+
712
## 1.2.2 - 2019-11-13
813
### Fixed
914
- Request by adding User-Agent since PostNL seems to require that now

README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# python-postnl-api
2-
(Unofficial) Python wrapper for the PostNL API (Dutch Postal Services), which can be used to track packages and letter deliveries. You can use your [jouw.postnl.nl](http://jouw.postnl.nl) credentials to use the API.
2+
(Unofficial) Python wrapper for the PostNL API (Dutch Postal Services), which can be used to track packages and letter deliveries. You can use your [jouw.postnl.nl](http://jouw.postnl.nl) credentials to use the API.
33

44
## Quick test
55
When installed:
@@ -19,29 +19,29 @@ from postnl_api import PostNL_API
1919
# Login using your jouw.postnl.nl credentials
2020
postnl = PostNL_API('email@domain.com', 'password')
2121

22-
# Get relevant deliveries
22+
# Retrieve relevant incoming packages
2323
print("Getting relevant deliveries")
2424
rel_deliveries = postnl.get_relevant_deliveries()
2525
for delivery in rel_deliveries:
26-
print(delivery.debug_string)
26+
print(delivery)
2727

28-
# Get relevant deliveries
28+
# Retrieve all incoming packages
2929
print("Getting all deliveries")
3030
all_deliveries = postnl.get_deliveries()
3131
for delivery in all_deliveries:
32-
print(delivery.debug_string)
32+
print(delivery)
3333

34-
# Get relevant deliveries
34+
# Retrieve sent packages
3535
print("Getting all distributions (sent packages)")
3636
distributions = postnl.get_distributions()
3737
for distribution in distributions:
38-
print(distribution.debug_string)
38+
print(distribution)
3939

40-
# Get letters
40+
# Retrieve incoming letters
4141
print("Getting all letters, if that function is turned on")
4242
letters = postnl.get_letters()
4343
for letter in letters:
44-
print(letter.debug_string)
44+
print(letter)
4545
```
4646

4747
## Miscellaneous
@@ -54,6 +54,7 @@ See the [CHANGELOG](./CHANGELOG.md) file.
5454
- [@eavanvalkenburg](https://github.com/eavanvalkenburg)
5555
- [@peternijssen](https://github.com/peternijssen)
5656
- [@IcyPalm](https://github.com/IcyPalm)
57+
- [@0x00-0xFF](https://github.com/0x00-0xFF)
5758

5859
## License
5960
MIT

postnl_api/postnl_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
BASE_URL = "https://jouw.postnl.nl"
1414

15-
AUTHENTICATE_URL = BASE_URL + "/mobile/token"
15+
AUTHENTICATE_URL = BASE_URL + "/web/token"
1616
SHIPMENTS_URL = BASE_URL + "/mobile/api/shipments"
1717
PROFILE_URL = BASE_URL + "/mobile/api/profile"
1818
LETTERS_URL = BASE_URL + "/mobile/api/letters"
@@ -34,7 +34,7 @@
3434
## DELETE LETTER
3535
## DELETE /mobile/api/letters/{letter-barcode}
3636

37-
DEFAULT_HEADER = {"api-version": "4.16", "X-Client-Library": "python-postnl-api", "User-Agent": "PostNL/Android/6.5.1"}
37+
DEFAULT_HEADER = {"Api-Version":"4.18", "User-Agent": "PostNL/iOS/4.32.0"}
3838

3939
REFRESH_RATE = 120
4040

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setup(
77
name="postnl_api",
8-
version="1.2.2",
8+
version="1.2.3",
99
description="Python wrapper for the PostNL API, a way to track packages and letters.",
1010
long_description=long_description,
1111
long_description_content_type="text/markdown",

0 commit comments

Comments
 (0)