PHPackages                             omatech/gls-tracker - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. omatech/gls-tracker

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

omatech/gls-tracker
===================

Get GLS tracking data from asmred

020↓100%PHP

Since Aug 26Pushed 5y ago5 watchersCompare

[ Source](https://github.com/omatech/gls-tracker)[ Packagist](https://packagist.org/packages/omatech/gls-tracker)[ RSS](/packages/omatech-gls-tracker/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

GLS-tracker
===========

[](#gls-tracker)

Get information from the XML webservices of ASMRED to track parcels

Usage
-----

[](#usage)

### Get status information of an expedition

[](#get-status-information-of-an-expedition)

```
use Omatech\GLSTracker\GLSTracker;

...

$uid_cliente='6BAB7A53-3B6D-4D5A-9450-xxxxxxx';                   // Unique code of the customer, you must ask your GLS representative for that code
$webservice_url='https://wsclientes.asmred.com/b2b.asmx?wsdl';    // URL of the webservice of asmred (GLS in Spain)
$code='86387468743';                                              // Expedition code

$gls_tracker=new GLSTracker($uid_cliente, $webservice_url);       // Create a new gls_tracker object initialized with the UID of the client and the webservice url
$result=$gls_tracker->getClientExpedition($code);                 // Get the expedition info of that code
if (!$result) die('Error getting expedition');                    // If there's an error getClientExpedition returns false

$status=$gls_tracker->getExpeditionStatus();                      // Get expedition status, possible values are GRABADO, EN REPARTO, ENTREGADO

```

### Get all the information of an expedition

[](#get-all-the-information-of-an-expedition)

```
use Omatech\GLSTracker\GLSTracker;

...

$uid_cliente='6BAB7A53-3B6D-4D5A-9450-xxxxxxx';                   // Unique code of the customer, you must ask your GLS representative for that code
$webservice_url='https://wsclientes.asmred.com/b2b.asmx?wsdl';    // URL of the webservice of asmred (GLS in Spain)
$code='86387468743';                                              // Expedition code

$gls_tracker=new GLSTracker($uid_cliente, $webservice_url);       // Create a new gls_tracker object initialized with the UID of the client and the webservice url
$result=$gls_tracker->getClientExpedition($code);                 // Get the expedition info of that code
if (!$result) die('Error getting expedition');                    // If there's an error getClientExpedition returns false

$first_expedition=$gls_tracker->expediciones[0];                  // Get first expedition info
print_r($first_expedition);                                       // Show expedition info

```

Use it in a Laravel project
---------------------------

[](#use-it-in-a-laravel-project)

### Install a new Laravel project

[](#install-a-new-laravel-project)

```
laravel new laravel-gls-tracker-example

```

### Enter the project and add omatech/gls-tracker to it

[](#enter-the-project-and-add-omatechgls-tracker-to-it)

```
cd laravel-gls-tracker-example
composer require omatech/gls-tracker

```

### Add environment variables in your .env file

[](#add-environment-variables-in-your-env-file)

```
GLS_WEBSERVICE_URL=https://wsclientes.asmred.com/b2b.asmx?wsdl
GLS_UID_CLIENTE=6BAB7A53-3B6D-4D5A-9450-xxxxxx

```

### Edit routes/web.php:

[](#edit-routeswebphp)

### Add use at the top

[](#add-use-at-the-top)

```
use Omatech\GLSTracker\GLSTracker;

```

### Replace the default route:

[](#replace-the-default-route)

```
Route::get('/{code?}'
, function ($code='61771040949189') {                                 // Default expedition code
    $webservice_url=env('GLS_WEBSERVICE_URL');                        // URL of the webservice of asmred (GLS in Spain)
    $uid_cliente=env('GLS_UID_CLIENTE');                              // Unique code of the customer, you must ask your GLS representative for that code

    echo "url=$webservice_url uid=$uid_cliente code=$code";  // DEBUG info
    $gls_tracker=new GLSTracker($uid_cliente, $webservice_url);       // Create a new gls_tracker object initialized with the UID of the client and the webservice url
    $result=$gls_tracker->getClientExpedition($code);                 // Get the expedition info of that code
    if (!$result) die('Error getting expedition');                    // If there's an error getClientExpedition returns false

    $first_expedition=$gls_tracker->expediciones[0];                  // Get first expedition info
    dd($first_expedition);                                       // Show expedition info
});

```

### Now you can visit your home url to get the expedition info, in my case

[](#now-you-can-visit-your-home-url-to-get-the-expedition-info-in-my-case)

```
http://laravel-gls-tracker-example.test/

```

### or changing the default code

[](#or-changing-the-default-code)

```
http://laravel-gls-tracker.test/61771040888151

```

Testing
-------

[](#testing)

Run all tests using

```
vendor\bin\phpunit

```

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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/2a6b2440a7864015d71501a9cd77d28bed549c283afdd8d1af95f54b650dc833?d=identicon)[aponscat](/maintainers/aponscat)

---

Top Contributors

[![aponscat](https://avatars.githubusercontent.com/u/20087234?v=4)](https://github.com/aponscat "aponscat (10 commits)")

### Embed Badge

![Health badge](/badges/omatech-gls-tracker/health.svg)

```
[![Health](https://phpackages.com/badges/omatech-gls-tracker/health.svg)](https://phpackages.com/packages/omatech-gls-tracker)
```

###  Alternatives

[riipandi/laravel-optikey

Use UUID, Ulid, or nanoid as optional or primary key in Laravel.

429.1k](/packages/riipandi-laravel-optikey)

PHPackages © 2026

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