Skip to content

digicode-kft/mygls-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

mygls-sdk

A simple wrapper for the GLS logistics SOAP API, it gives more flexibility then the original one. Our company, the DigiCode Kft. using this package in a custom system for printing the logistic labels with a Zebra printer. But its also usable with Honeywell, Intermec, TSC or any classic printers, like HP, Konica, etc..

Usage

First of all you must check the available methods for creating and printing labels.

If your company need any etiquette label feel free to contact with us.

require __DIR__ . '/GLS/API.php';

try {
	// Create instance
	$api = new GLS\API([
		'username'          => 'myglsapitest@test.mygls.hu',
		'password'          => '1pImY_gls.hu',
		'client_number'     => '100000001',
		'country_code'      => 'HU-TEST',
		'label_paper_size'  => 'A4_2x2'
	]);

	// Create parcel
	$parcels = []; 
	$parcel = new StdClass();
	$parcel->ClientNumber = $api->client_number;
	...
	// check in test.php
	$parcels[] = $parcel;

	// First method is PrintLabels, which simply crate a label
	$first_method = $api->PrintLabels($parcels);
	print_r($first_method);	
	
	...
	// check in test.php
}catch (Exception $e){
    print_r($e);
}

Label printers

If you need any device for testing the code feel free to contact us. You can choose any barcode label printer on our website.

About

A simple wrapper for the GLS logistics SOAP API.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages