The error:
Unable to allocate id for this basicServiceCode: 18
from country: XX
to country: XX
customer number: XXXXXXX
means PostNord does not support that service for the route you are trying.
1️⃣ What service code 18 means
18 = PostNord Parcel (B2B).
This service is mainly used for business shipments within supported PostNord countries (Nordics / Europe).
2️⃣ Why your request fails
Your shipment:
FROM: XX (Different country)
TO: XX (Europe)
SERVICE: 18
PostNord does not operate shipments from non Europe countries. Their API mainly supports:
- Nordic countries (DK, SE, NO, FI)
- Some EU countries for export agreements.
So the API cannot allocate an ID for that route → hence the error.
3️⃣ Correct service codes (common ones)
| Service | Code |
|---|---|
| PostNord Parcel (B2B) | 18 |
| MyPack Collect | 19 |
| MyPack Home | 17 |
| Return Drop Off | 24 |
| Parcel Locker | 92 |
But these only work when origin country is supported (DK/SE/NO/FI etc.).
4️⃣ What you should do
Check the sender country in your request:
- If you are shipping from Europe → anywhere
→18can work. - If you are shipping from Non-Eurpian → Europe
→ PostNord API cannot be used.
Instead you must use a different carrier:
- DHL
- FedEx
- UPS
✅ Most likely bug in your Account configuration in shipi