PHPackages                             aftership/tracking-sdk - 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. [API Development](/categories/api)
4. /
5. aftership/tracking-sdk

ActiveLibrary[API Development](/categories/api)

aftership/tracking-sdk
======================

The official AfterShip Tracking PHP API library

15.0.0(4mo ago)1262.0k↓45.7%8MITPHPPHP &gt;=8.1.0

Since Jul 8Pushed 4mo ago11 watchersCompare

[ Source](https://github.com/AfterShip/tracking-sdk-php)[ Packagist](https://packagist.org/packages/aftership/tracking-sdk)[ RSS](/packages/aftership-tracking-sdk/feed)WikiDiscussions 2025-07 Synced 1mo ago

READMEChangelog (10)Dependencies (7)Versions (23)Used By (0)

AfterShip Tracking API library for PHP
======================================

[](#aftership-tracking-api-library-for-php)

This library allows you to quickly and easily use the AfterShip Tracking API via PHP.

For updates to this library, see our [GitHub release page](https://github.com/AfterShip/tracking-sdk-php/releases).

If you need support using AfterShip products, please contact .

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

[](#table-of-contents)

- [AfterShip Tracking API library for PHP](#aftership-tracking-api-library-for-php)
    - [Table of Contents](#table-of-contents)
    - [Before you begin](#before-you-begin)
        - [API and SDK Version](#api-and-sdk-version)
    - [Quick Start](#quick-start)
        - [Installation](#installation)
    - [Constructor](#constructor)
        - [Example](#example)
    - [Rate Limiter](#rate-limiter)
    - [Error Handling](#error-handling)
        - [Error List](#error-list)
    - [Endpoints](#endpoints)
        - [/couriers](#couriers)
        - [/courier-connections](#courier-connections)
        - [/estimated-delivery-date](#estimated-delivery-date)
        - [/trackings](#trackings)
    - [Help](#help)
    - [License](#license)

Before you begin
----------------

[](#before-you-begin)

Before you begin to integrate:

- [Create an AfterShip account](https://admin.aftership.com/).
- [Create an API key](https://organization.automizely.com/api-keys).
- [Install PHP](https://www.php.net/downloads.php) version 8.1 or later.

### API and SDK Version

[](#api-and-sdk-version)

- SDK Version: 14.0.0
- API Version: 2025-07

Quick Start
-----------

[](#quick-start)

### Installation

[](#installation)

```
composer require aftership/tracking-sdk
```

Constructor
-----------

[](#constructor)

Create AfterShip instance with options

NameTypeRequiredDescriptionapi\_keystring✔Your AfterShip API keyauth\_typeenumDefault value: `AuthType.API_KEY`
 AES authentication: `AuthType.AES`
 RSA authentication: `AuthType.RSA`api\_secretstringRequired if the authentication type is `AuthType.AES` or `AuthType.RSA`domainstringAfterShip API domain. Default value: user\_agentstringUser-defined user-agent string, please follow [RFC9110](https://www.rfc-editor.org/rfc/rfc9110#field.user-agent) format standard.proxystringHTTP proxy URL to use for requests.
 Default value: `null`
 Example: `http://192.168.0.100:8888`max\_retrynumberNumber of retries for each request. Default value: 2. Min is 0, Max is 10.timeoutnumberTimeout for each request in milliseconds.### Example

[](#example)

```
