Search by

smart-dato / afs-logistic-sdk

smart-dato

AFS Logistic shipment tracking SDK for Laravel

Package info

github.com/smart-dato/afs-logistic-sdk

pkg:composer/smart-dato/afs-logistic-sdk

Fund package maintenance!

SmartDato

Statistics

Installs: 5 560

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

0.0.6 2026-09-23 14:31 UTC

This package is auto-updated.

Last update: 2026-09-23 14:35:34 UTC


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

A Laravel package for looking up shipment tracking through the AFS Logistic public data service API.

Requirements

  • PHP 8.2+
  • Laravel 10 – 13

Installation

composer require smart-dato/afs-logistic-sdk

Publish the config file:

php artisan vendor:publish --tag="afs-logistic-sdk-config"

Configuration

AFS_LOGISTIC_CLIENT_ID=your-client-id
AFS_LOGISTIC_ORGUNIT_ID=your-orgunit-id
AFS_LOGISTIC_AUTH_TOKEN=your-auth-token

Requests go to {AFS_LOGISTIC_URI}/afs/dataservice/publicapi/v1/shipment/retrieve, with AFS_LOGISTIC_URI defaulting to https://shippingnet01.ondot.at. Set AFS_LOGISTIC_TRACKING to override the full endpoint URL.

Usage

use SmartDato\AfsLogistic\Facades\AfsLogistic;

$shipment = AfsLogistic::tracking('your-shipment-number');

Or pass the credentials explicitly; any you leave out fall back to the config:

use SmartDato\AfsLogistic\AfsLogistic;

$afs = new AfsLogistic(
    clientId: 'your-client-id',
    orgunitId: 'your-orgunit-id',
    authToken: 'your-auth-token',
);

$shipment = $afs->tracking('your-shipment-number');

tracking() looks the shipment up by its matching number and returns the decoded JSON response. It requests the shipment's codes, status, number and pickup/delivery carrier IDs, plus each collo's codes, status, number, tracking number and tracking link.

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.