PHPackages                             mannysoft/auspost-api-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. mannysoft/auspost-api-php

ActiveLibrary

mannysoft/auspost-api-php
=========================

Auspost API Client Library for PHP

2.0.0(7y ago)23OSL-3.0PHPPHP ^7.1

Since May 28Pushed 4y agoCompare

[ Source](https://github.com/mannysoft/auspost-api-php)[ Packagist](https://packagist.org/packages/mannysoft/auspost-api-php)[ RSS](/packages/mannysoft-auspost-api-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (8)Versions (8)Used By (0)

Auspost API Client Library for PHP
==================================

[](#auspost-api-client-library-for-php)

This library is a Guzzle-based client for integrating PHP applications with Australia Post's web services.

Documentation on how to use this library can be found in the [Postage Assessment Calculation and Postcode Search](http://auspost.com.au/devcentre/assets/pdfs/pac-pcs-technical-specification.pdf) and the [Delivery Choices](http://auspost.com.au/devcentre/assets/pdfs/delivery-choice-technical-specificationsv3-4.pdf) specifications.

Table of Contents
-----------------

[](#table-of-contents)

- [Getting Started](#getting-started)
    - [Register to use Australia Post services](#register-to-use-australia-post-services)
    - [Minimum requirements](#minimum-requirements)
    - [Install using Composer](#install-using-composer)
    - [Install using Git](#install-using-git)
- [Quick Example](#quick-example)
    - [Calculate domestic parcel postage cost](#calculate-domestic-parcel-postage-cost)
- [Contributions](#contributions)
    - [Guidelines](#guidelines)
    - [Contributors](#contributors)

Getting Started
---------------

[](#getting-started)

### Register to use Australia Post services

[](#register-to-use-australia-post-services)

You will need to apply for an API key if you want to use the [Postage Assessment Calculator and Postcode Search](https://auspost.com.au/forms/pacpcs-registration.html) services. Similarly, you will also need to apply for permission to use the \[Delivery Choices\] [dce-registration](https://auspost.com.au/forms/dce-registration.html) service.

### Minimum requirements

[](#minimum-requirements)

1. PHP 5.3.10 compiled with the cURL extension
2. cURL 7.22.0

**Note:** The library is likely to work with earlier versions of PHP and cURL, but they have not been tested.

### Install using Composer

[](#install-using-composer)

1. Add `fontis/auspost-api-php` as a Composer dependency in your project's `composer.json` file:

    ```
    {
        "require": {
            "fontis/auspost-api-php": "*"
        }
    }
    ```
2. Download and install Composer into the repo:

    ```
    $ curl -sS https://getcomposer.org/installer | php
    ```
3. Install the library dependencies:

    ```
    $ php composer.phar install
    ```
4. Add the library to your PHP application:

    ```
    require_once 'vendor/autoload.php';
    ```

### Install using Git

[](#install-using-git)

1. Clone this repo to an appropriate location:

    ```
    $ git clone https://github.com/fontis/auspost-api-php
    ```
2. Download and install Composer into the repo:

    ```
    $ cd auspost-api-php
    $ curl -sS https://getcomposer.org/installer | php
    ```
3. Install the library dependencies:

    ```
    $ php composer.phar install
    ```
4. Add the library to your PHP application:

    ```
    require_once 'vendor/autoload.php';
    ```

Quick Example
-------------

[](#quick-example)

### Calculate domestic parcel postage cost

[](#calculate-domestic-parcel-postage-cost)

```
