npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@openpets/royal-mail

v1.0.0

Published

Access Royal Mail developer APIs for tracking events and summaries, proof of delivery signatures, Local Collect locations, Delivery Office Finder, and API Shipping V2 operations.

Readme

Royal Mail

OpenPets plugin for Royal Mail developer APIs.

This pet is marked incomplete because Royal Mail publishes API product pages and technical PDF guides, but no public downloadable OpenAPI specification was available when this pet was created. Royal Mail's Local Collect V3 guide says the Swagger definition can be obtained via the developer portal or Royal Mail Team Customer Solutions.

Setup

Create a Royal Mail Developer Portal account, register an application, and subscribe it to the APIs you plan to use. Some APIs require approval from a Royal Mail account manager or Team Customer Solutions before credentials can call live endpoints.

cp .env.example .env

Required:

ROYAL_MAIL_CLIENT_ID=your-client-id

Optional:

ROYAL_MAIL_CLIENT_SECRET=your-client-secret
ROYAL_MAIL_ACCEPT_TERMS=yes
ROYAL_MAIL_READ_ONLY=true

Endpoint overrides are available if Royal Mail assigns a different base URL for your plan:

ROYAL_MAIL_TRACKING_BASE_URL=https://api.royalmail.net/mailpieces/v2
ROYAL_MAIL_LOCAL_COLLECT_BASE_URL=https://api.royalmail.net/localcollect/v3
ROYAL_MAIL_DELIVERY_OFFICE_BASE_URL=https://api.royalmail.net/deliveryofficefinder/v1
ROYAL_MAIL_SHIPPING_BASE_URL=https://api.royalmail.net/shipping/v2

Tools

  • royal-mail-test-connection
  • royal-mail-get-tracking-events
  • royal-mail-get-tracking-summary
  • royal-mail-get-tracking-signature
  • royal-mail-find-local-collect-locations
  • royal-mail-get-local-collect-reference
  • royal-mail-find-delivery-office
  • royal-mail-get-shipping-token
  • royal-mail-create-domestic-shipment
  • royal-mail-create-shipment
  • royal-mail-update-shipment
  • royal-mail-delete-shipment
  • royal-mail-create-shipment-documents
  • royal-mail-create-shipment-label
  • royal-mail-create-manifest
  • royal-mail-update-manifest

Shipment, label, document, and manifest tools are hidden when read-only mode is enabled.

Examples

opencode run "test royal-mail connection"
opencode run "get Royal Mail tracking summary for AB123456789GB"
opencode run "find Royal Mail Local Collect locations near SW1A 1AA"

For write operations, pass the Royal Mail request payload as a JSON string:

opencode run 'create a Royal Mail shipment with bodyJson {"...":"..."}'

Source Notes

  • API library and product discovery: https://developer.royalmail.net/api
  • Getting started and credential workflow: https://developer.royalmail.net/start
  • Local Collect V3 REST technical guide: https://developer.royalmail.net/system/files/2025-07/Royal%20Mail%20Local%20Collect%20V3%20%28REST%29%203.0.7_Final.pdf

Future work should replace the manual endpoint definitions with generated OpenAPI tools if Royal Mail provides the official Swagger/OpenAPI files for the subscribed plan.