Royal Mail Price API
Switch branches/tags
Nothing to show
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
docker Add support for Docker May 23, 2015
Dockerfile Add support for Docker May 23, 2015
LICENSE Initial commit Nov 16, 2014 Update README to add link to docker image Jun 1, 2015
composer.json Initial commit Nov 16, 2014
index.php Initial commit Nov 16, 2014

Royal Mail Price API

This repository allows you to host your own Royal Mail price API. It is a HTTP wrapper around the PHP library, that returns prices in JSON format.


You can either run the API with Docker using the prebuilt image at or you can serve the code in this repository with a web server.

1. Download

The easiest way to download the API is with git:

$ git clone

2. Install dependencies

We use composer to manage our dependencies. You can download it from

$ cd royal-mail-price-api
$ composer install

3. Finish

You should now be able to access the below URL in your browser.


The following JSON data should be returned.

        "service": "Signed For 2nd Class",
        "prices": [
                "price": "1.83",
                "compensation": 50
        "service": "2nd Class",
        "prices": [
                "price": "0.73",
                "compensation": 20


Required Parameters Description
length Length of package in centimeters
width Width of package in centimeters
depth Depth of package in centimeters
weight Weight of package in grams
services Comma separated list of services
Valid Services Description
firstclass First Class
secondclass Second Class
signedforfirstclass Signed for First Class
signedforsecondclass Signed for Second Class
guaranteedby9am Guaranteed By 9am
guaranteedby9amwithsaturday Guaranteed By 9am With Saturday
guaranteedby1pm Guaranteed By 1pm
guaranteedby1pmwithsaturday Guaranteed By 1pm With Saturday