Showing posts with label Royal Mail. Show all posts
Showing posts with label Royal Mail. Show all posts

2026-07-14

Shipping to EU from UK

We are selling some stuff to EU, and all over the world now (see shop.revk.uk).

This is all a bit new to us, as we have traditionally only dealt with UK customers. This started with circuit boards stocked at Amazon, and Amazon just sorted the EU VAT (paying us the VAT exclusive amount as an export) for sales in EU - very slick.

Moving on (after Amazon screwed us over) we started selling on Tindie, and Tindie do not do anything special for EU at all. So all our parcels hit customs, and the recipient had to pay VAT (and admin fee). This is the default if you do nothing special when shipping to EU.

However, when Tindie screwed up badly (will they ever recover?) we started selling on Lectronz. I have to say that they have been great. This led us to start to understand how it should be done.

IOSS

The Import One Stop Shop system in EU means we could get an IOSS number for sending small packages (value up to €150) to EU with VAT paid - this means the customer has a much quicker and more seamless delivery with no hassle from customs. We would have to file returns for this, but pay in one go for all EU.

However, it is even easier when using an on-line marketplace like Lectronz, as they handle all the VAT - working out the right rate and charging the customer and paying the VAT. All we have to do is quote their IOSS number as part of shipping.

We integrated the Lectronz API and the Royal Mail Pro Shipping API so staff can just click "print postage" and out pops the postage label and customs label, simple.

The EU has gone to some effort to make this slick and easy for small parcels going in to the EU. Well done EU.

The new €3 duty

As of 1st of July the EU made things difficult - the exact opposite of the slick and easy IOSS process - adding a new €3 import duty on small parcels value up to €150. This is separate from IOSS, so even with IOSS and prepaid VAT, the recipient gets hassled by customs for €3 duty!

Lectronz moved quickly, and added the feature to their systems to work out the €3 duty, and add to the price, to pay us, so we can post "Duty Paid". I updated the API code and set to send duty paid via Royal Mail Pro Shipping API.

Yay, all sorted, all slick again, albeit €3 more expensive for the customer (thanks EU!).

Well no!

This started off OK, with a few parcels, but then we hit an error where Royal Mail will not do Duty Paid to Latvia. Arg, why not? Lectronz were very helpful sorting a refund of €3 so we send not duty paid and explained to customer.

So I decided to check the rate card from Royal Mail. The rates to EU are a mess anyway - they have a base price and per-kg price. The base price ranges from £4.45 to £7.70 which is not too mad, but the per-kg ranges from £0.80 to £10.85 which is mental.

The surprise is that duty paid is not available for Belgium, Bulgaria, Croatia, Czechia, Denmark, Estonia, Finland, Greece, Hungary, Italy, Latvia, Lithuania, Poland, Romania, Slovakia, Slovenia, and even Spain.

This is crazy - with all EU countries charging this new €3 duty - why the hell do Royal Mail not handle this.

The other oddity is that the extra cost for sending duty paid, where possible, varies wildly - from a more reasonable 50p to nearly £5 in one case. It is daft for a customer to pay an extra £5 to handle a €3 duty.

What have I done about it?

I have done a shipping rate for all Europe countries individually. Yes, tedious.

Where duty paid postage is available I have listed that (with the extra cost) so customers have a choice.

It would help if Lectronz allowed me to code a per-kg rate for some countries - I have asked.

We still do IOSS for EU where applicable.

So yes, sorted for now. And it means a sting of countries have the hassle of paying duty on receipt, and a few others make sense to do that anyway as the extra cost is daft.

Update

And today we have...

  • Shipment to Romania saying IOSS not allowed, but we have shipped to Romania with IOSS before, and it is on the rate card.
  • Shipment to Germany with no IOSS and no duty paid, a simple DDU but over €150 and they say NDX not allowed. Well NDX is simple "non document". We tried HV which is "Non documented high value" in case over €150 was the issue, but still says NDX not allowed (yes, I checked the JSON, we set HV).

Arrrrg!

Update

Now seems there is a PDDP with non PDDP service to do the €3 duty and IOSS at once somehow. Trying to make sense of what Royal Mail have sent. If so, it may be simple, but this is mental.

Update

Nope, they sent me a link to a document saying MP7 (DDU normally) with DDP and IOSS is available, but an email saying MPR (DDP but only to some EU countries), but then sent the original PDF again which says MP7 and DDP.

They clearly have no clue!!!

2025-12-23

Christmas hassle

A new rant, again as a video...

It seems Companies House are more of a pain in the arse than I realised. Not just new ID crap on "confirmation statement" but also for anyone that is a PSC and not a director on anything company it is 14 days from start of month of birthday. Worse, it is not a deadline, it is a 14 day window - you cannot confirm ID now, you have to wait for the right moment, FFS. Why?

But also hassle with Wex and Royal Mail and Amazon (again).

2023-07-25

Royal Mail API (RMAPI v4)

We have used Royal Mail for postage for some time. They had an XML API which we have used, and it works.

What is interesting is how all of these APIs are moving from XML to JSON now. One of the big benefits of JSON is none of the FUCKING XML NAMESPACES (sorry, did I say that out loud?).

Even so JSON has its issues, but nothing like XML with namespaces.

Manuals

They have a web site with a login and loads of interactive stuff, and that includes the API and API manuals. They also have a "V4 Shipping API Consolidated Guide" PDF they sent. So how hard could it be. I had two manuals!

To put this in context, I am someone that has used (and written) many APIs that are JSON/http based over the years. I practically invented the concept (I even have a patent on form posting from over 30 years ago). I have some clue, honest.

I actually quite like the latest "web" based stuff with JSON sent and received. Even OAUTH crap. I have some experience with this, honest.

Update: Before logging in there are some extra links, and another set of manuals, which is yet again different and contradictory - arrrg!

Authentication

First challenge is authentication, and to some extent the manuals were not that bad. The one critical thing they could have done is include, in any of the manuals, one simple example.

They use OAUTH2 but in a way I have not seen anyone else use. I needed a POST to a URL with a URL encoding post of grant_type=client_credentials (and it had to be a POST not a GET) using Basic authentication of the client ID and key they allocated. This is an unusual way to OAUTH2, but valid, to my huge delay of some hours getting the hang of it was really down to me. I get back a Bearer key with expiry (1 hour).

API URL

One issue is the URL, well, the hostname. The documents state that the hostname to use is for their TEST system. This is good, they have a test system, but the other manual suggests it is the hostname for the LIVE system. Why?

I eventually worked it out, there is one hostname for authentication, and whether it is test or live depends on your account. Your account can be in "sandbox". I mean that is great, a good system, but why the fuck not state that in either of the manuals?

What adds to the fun is that hostname is actually only to authenticate. The actual hostname for the service is different, and searching both manuals I do not see the actual hostname for actual API calls listed anywhere.

Why? WTAF?

JSON blob

The big clue was some swagger.json file you can download. Loads of JSON, some "OpenAPI" thing. That has been way more helpful than either of the manuals!

It explains the actual hostname to use for the API, and each of the schemas for each API.

The manual, well one of them, lists fields you need, but omits that these may or may not be in sub objects. The JSON blob explains in way more detail.

And, of course, this JSON file, whilst really good, is missing a load of things, like creating manifests!

Errors

For example, the error "Could not find member 'ContactName' on object of type 'Destination'. Path 'Destination.ContactName'" fooled me for a while as I was supplying Destination.ContactName. What it meant is I should not be supplying that. I read "Count not find" as I was missing something, but no, it meant I had supplied something it "could not find" a use for. That is shit UI. (FYI I should have provided Destination.Address.ContactName)

Tracking

There is, of course, tracking. There is an API to get tracking and an option to have tracking posted to a web hook - yay!

But the documentation for the tracking API just says the response is a tracking number? Which, err, makes no sense, what of the status of the shipment. Hmmm.

And apparently the tracking web hook is not supported, so why the hell is it in the API documentation? Arrrg!

Working

I have it working now - but this is literally one of the worst documented APIs ever.

The raw JSON file was more documentation than either if the manuals, but even that is missing bits.

Icing on the cake

Royal Mail have What3Words embedded. I kid you not.

This is so mental! RM have PAF which has detailed (like, to 10cm) delivery point details on all UK addresses. They are the one organisation that has ZERO use for W3W.

I don't know what they do with it - I will ask?

  • If a W3W supplied is way off, like hundreds of miles, do you use it?
  • If a W3W is next door to postal address provided, do you use it?
  • If a W3W is within target address, e.g. a shed in garden, do you use it?

If all are "no", I have to ask WHY THE FUCK it exists in their API!

[Update: Answer is they don't use the W3W filed.... So WTF have it?!?!]

Time for something new...

Latest project is a time server. So why? Well, they exist - you can buy a really nice LeoNTP server, with impressive specs. We see response ...