PHPackages                             aadshalshihry/aramex - 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. aadshalshihry/aramex

ActiveLibrary[API Development](/categories/api)

aadshalshihry/aramex
====================

package to integrate with Aramex API's

0163PHP

Since Feb 16Pushed 2y ago1 watchersCompare

[ Source](https://github.com/aadshalshihry/aramex)[ Packagist](https://packagist.org/packages/aadshalshihry/aramex)[ RSS](/packages/aadshalshihry-aramex/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Aramex Me
=========

[](#aramex-me)

Installation
------------

[](#installation)

You can install the package via [Composer](https://getcomposer.org).

```
composer require aadshalshihry/aramex
```

Publish your aramex.php config file with

```
php artisan vendor:publish --provider="Aadshalshihry\Aramex\AramexServiceProvider" --tag="aramex"
```

then change your aramex config from config/aramex.php file

```
    'ENV'  => 'TEST', //TEST|LIVE
	'TEST' => [
		'AccountNumber'		 	=> '11111',
		'UserName'			 	=> 'username@aramex.com',
		'Password'			 	=> '123456',
		'AccountPin'		 	=> '122334',
		'AccountEntity'		 	=> 'EGY',
		'AccountCountryCode'	=> 'EG',
		'Version'			 	=> 'v1'
	],
```

Usage
-----

[](#usage)

Create Pickup
-------------

[](#create-pickup)

```
use Aadshalshihry\Aramex\Aramex;
    $data = Aramex::createPickup([
            'name' => 'name',
            'cell_phone' => '+123123123',
            'phone' => '+123123123',
            'email' => 'myEmail@gmail.com',
            'city' => 'Alexandria',
            'country_code' => 'EG',
            'zip_code'=> 21532,
            'line1' => 'The line1 Details',
            'line2' => 'The line2 Details',
            'line3' => 'The line2 Details',
            'pickup_date' => time() + 75000,
            'ready_time' => time()  + 80000,
            'last_pickup_time' => time() +  85000,
            'closing_time' => time()  + 90000,
            'status' => 'Ready',//Pending
            'pickup_location' => 'some location',
            'weight' => 123,
            'volume' => 1
        ]);
        // extracting GUID
       if (!$data->error)
          $guid = $data->pickupGUID;
```

- note save this 'guid' ,will use it in next services

cancel Pickup
-------------

[](#cancel-pickup)

```
use Aadshalshihry\Aramex\Aramex;
    //get $guid from createPickup function
    $response = Aramex::cancelPickup($guid,$cancel_reason = '');
```

Create Shipment
---------------

[](#create-shipment)

```
use Aadshalshihry\Aramex\Aramex;

        $callResponse = Aramex::createShipment([
            'shipper' => [
                'name' => 'name',
                'email' => 'myEmail@gmail.com',
                'phone'      => '+123123123',
                'cell_phone' => '+123123123',
                'country_code' => 'EG',
                'city' => 'Alexandria',
                // 'zip_code' => 21532,
                'line1' => 'Line1 Details',
                'line2' => 'Line2 Details',
                'line3' => 'Line3 Details',
            ],
            'consignee' => [
                'name' => 'Steve',
                'email' => 'email@users.companies',
                'phone'      => '+123456789982',
                'cell_phone' => '+321654987789',
                'country_code' => 'EG',
                'city' => 'Alexandria',
                // 'zip_code' => 11865,
                'line1' => 'Line1 Details',
                'line2' => 'Line2 Details',
                'line3' => 'Line3 Details',
            ],
            'shipping_date_time' => time() + 50000,
            'due_date' => time() + 60000,
            'comments' => 'No Comment',
            'pickup_location' => 'at reception',
            'pickup_guid' => $guid, //from createPickup function
            'weight' => 123, // KG
            'number_of_pieces' => 1,
            'product_group'    => 'EXP',
            'product_type' => 'PDX', // if u don't pass it, it will take the config default value
            'height' => 5.5, // CM
            'width' => 3,  // CM
            'length' => 2.3,  // CM
            'description' => 'Goods Description, like Boxes of flowers',
                                        // 'goods_origin_country'    => 'EG',
                                        // 'cash_on_delivery_amount'  => array(
                                        //     'value'                 => 1,
                                        //     'currency_code'         => 'USD'
                                        // ),

                                        // 'insurance_amount'       => array(
                                        //     'value'                 => 0,
                                        //     'currencyCode'          => ''
                                        // ),

                                        // 'CollectAmount'         => array(
                                        //     'Value'                 => 0,
                                        //     'CurrencyCode'          => ''
                                        // ),

                                        // 'cash_additional_amount'  => array(
                                        //     'Value'                 => 0,
                                        //     'CurrencyCode'          => ''
                                        // ),

                                        // 'cash_additional_amount_description' => '',

                                        // 'customs_value_amount' => array(
                                        //     'Value'                 => 0,
                                        //     'CurrencyCode'          => ''
                                        // ),

                                        // 'items'                 => array(
                                        //         'package_type'   => 'Box',
                                        //         'quantity'      => 1,
                                        //         'weight'        => array(
                                        //                 'Value'     => 1,
                                        //                 'Unit'      => 1,
                                        //         ),
                                        //         'comments'      => 'Docs',
                                        //         'reference'     => ''
                                        //     )
        ]);
        if (!empty($callResponse->error))
        {
            foreach ($callResponse->errors as $errorObject) {
              handleError($errorObject->Code, $errorObject->Message);
            }
        }
        else {
          // extract your data here, for example
          // $shipmentId = $response->Shipments->ProcessedShipment->ID;
          // $labelUrl = $response->Shipments->ProcessedShipment->ShipmentLabel->LabelURL;
        }
```

calculate rate
--------------

[](#calculate-rate)

```
use Aadshalshihry\Aramex\Aramex;
        $originAddress = [
            'line1' => 'Test string',
            'city' => 'Amman',
            'country_code' => 'JO'
        ];

        $destinationAddress = [
            'line1' => 'Test String',
            'city' => 'Dubai',
            'country_code' => 'AE'
        ];

        $shipmentDetails = [
            'weight' => 5, // KG
            'number_of_pieces' => 2,
            'payment_type' => 'P', // if u don't pass it, it will take the config default value
            'product_group' => 'EXP', // if u don't pass it, it will take the config default value
            'product_type' => 'PPX', // if u don't pass it, it will take the config default value
            'height' => 5.5, // CM
            'width' => 3,  // CM
            'length' => 2.3  // CM
        ];

        $shipmentDetails = [
            'weight' => 5, // KG
            'number_of_pieces' => 2,
        ];

        $currency = 'USD';
        $data = Aramex::calculateRate($originAddress, $destinationAddress , $shipmentDetails , 'USD');

        if(!$data->error){
        }
        else{
          // handle $data->errors
        }
```

Track Shipments
---------------

[](#track-shipments)

```
use Aadshalshihry\Aramex\Aramex;
        //find createShipmentResults , anotherCreateShipmentResults from 'createShipment' function
        $shipments = [
            $createShipmentResults->Shipments->ProcessedShipment->ID,
            $anotherCreateShipmentResults->Shipments->ProcessedShipment->ID,
        ];

        $data = Aramex::trackShipments($shipments);
        if (!$data->error){
          // Code Here
        }
        else {
        // handle error
        }
```

fetch Countries
---------------

[](#fetch-countries)

```
use Aadshalshihry\Aramex\Aramex;
        $data = Aramex::fetchCountries('EG');
        //Or
        $data = Aramex::fetchCountries();
```

fetch Cities
------------

[](#fetch-cities)

```
use Aadshalshihry\Aramex\Aramex;
    $data = Aramex::fetchCities('EG');
```

validate address
----------------

[](#validate-address)

```
use Aadshalshihry\Aramex\Aramex;
  $data = Aramex::validateAddress([
                'country_code' => 'EG',
                'city' => 'Cairo',
                'zip_code' => 11865,
                'line1' => 'Line1 Details',
                'line2' => 'Line2 Details',
                'line3' => 'Line3 Details',
  ]);
```

- Note that this package require SOAP extension on your server
- Use live account data because test data often does not work
- You can get doucmentation link:
- download aramex api src code from
- Package is build on package

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity19

Early-stage or recently created project

 Bus Factor1

Top contributor holds 53.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/692c9a6e9ae93794241c0b3402ac998417d674759f9aecb42405e47868a761a5?d=identicon)[aadshalshihry](/maintainers/aadshalshihry)

---

Top Contributors

[![aalshehri11](https://avatars.githubusercontent.com/u/79810965?v=4)](https://github.com/aalshehri11 "aalshehri11 (8 commits)")[![mohamedmaree](https://avatars.githubusercontent.com/u/12659069?v=4)](https://github.com/mohamedmaree "mohamedmaree (7 commits)")

### Embed Badge

![Health badge](/badges/aadshalshihry-aramex/health.svg)

```
[![Health](https://phpackages.com/badges/aadshalshihry-aramex/health.svg)](https://phpackages.com/packages/aadshalshihry-aramex)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
