MwSpaceLLC / packlink-php

Packlink Pro Php Api Sdk (shipping automation) | Php Library Model (Unofficial)
Apache License 2.0
4 stars 2 forks source link

Nodejs Version

Go to use library packlink-js

Carrier Service

Small PHP library for use Packlink PRO.

PHP Version Status Require version
PHP >=7.0 @Beta Composer 2.7.1

Build Status Latest Stable Version Total Downloads Latest Unstable Version License

image

🐱‍🚀 Install Library:

composer require mwspace/packlink-php

💎 Register your account.

Compare prices and choose the services that best suit your needs, Manage all your orders at the same time and in one place! Start enjoying Packlink PRO completely for free!

🔐 Authenticating to Packlink

Go to the settings page and request your Api Key ( See Api Key)

🎉 See all examples.

You can see it works correctly in the code we wrote or if you want to test it you could include this file in your script. PLEASE, SEE ALSO PHP UNIT TEST FOR MORE USAGE

🐱‍🏍 Start Packlink Object:

\MwSpace\Packlink::setApiKey(env('YOUR_PACKLINK_API_KEY'));

🐱‍🏍 Get all Status Dashboard:

use MwSpace\Packlink\Models\Stat;

$states = Stat::all(); // get all shipments states

return json_encode($states); // decode Stat object class to json

The class will connect via api to your packlink account (pro.packlink.it)

🚚 All Carriers:

use MwSpace\Packlink\Models\Carrier;

private $packages = [[]];

$carriers = Carrier::ship($this->packages);

$carriers->from(array( // get prices for parcels by zip code from => to
    'country' => 'IT',
    'zip' => '20900'
));

$carriers->to(array(
    'country' => 'IT',
    'zip' => '06073'
));

return json_encode($carriers->all()); // decode Carrier object class to json

The system will search for the couriers with the best price for the shipment of all parcels attached. Create method insert many data to array. Please see all data needed at Parcels.

🚚 Find Carriers:

use MwSpace\Packlink\Models\Carrier;

private $packages = [[]];

$carriers = Carrier::ship($this->packages);

return json_encode($carriers->find('YOUR_CARRIER_ID')); // decode Carrier object class to json

Please see all data needed at Parcels.

🚚 Quote Carriers:

use MwSpace\Packlink\Models\Carrier;

$carriers = Carrier::quote(8.5);

$carriers->from(array( // get prices for parcels by zip code from => to
    'country' => 'IT',
    'zip' => '20900'
));

$carriers->to(array(
    'country' => 'IT',
    'zip' => '06073'
));

return json_encode($carriers->all()); // decode Carrier object class to json

The system will search for the couriers with the best price for the shipment of weight.

🗺 All Postal Zones:

use MwSpace\Packlink\Models\PostalZone;

$postalzones = PostalZone::all(); // get all postal zones with default filter [all]

return json_encode($postalzones); // decode PostalZone object class to json

The system will return all countries (iso code) available for shipment

🗺 All Postal Code:

use MwSpace\Packlink\Models\PostalCode;

$postalcodes = PostalCode::all(); // get all postal codes with default filter [all]

return json_encode($postalcodes); // decode PostalCode object class to json

The system will return all postal code (zip code) available for shipment

🗺 Get Postal Code:

use MwSpace\Packlink\Models\PostalCode;

$postalcode = PostalCode::get('YOUR_ZIP_CODE'); // get postal code by query filter [q]

return json_encode($postalcode); // decode PostalCode object class to json

The system will return postal code (zip code) available for shipment by query search. You can use this function also for validate your zip code.

🗺 Check Postal Code:

use MwSpace\Packlink\Models\PostalCode;

$postalcode = PostalCode::exists('YOUR_ZIP_CODE'); // get postal code by query filter [q]

return is_bool($postalcode); // check if exists postal code

The system will return postal code (zip code) available for shipment by query search. You can use this function also for validate your zip code.

📦 All Shipments:

use MwSpace\Packlink\Models\Shipment;

$shipments = Shipment::all(); // get all shipments with default filter [all]

return json_encode($shipments); // decode Shipment object class to json

The system checks the tax code by confirming the captcha through Api Vision. Filter available: ALL | PENDING | READY_TO_PURCHASE | DRAFT | PROCESSING | READY_FOR_SHIPPING | TRACKING | IN_TRANSIT | OUT_FOR_DELIVERY | DELIVERED | INCIDENT | RETURNED_TO_SENDER | ARCHIVED

📦 Find Shipment:

use MwSpace\Packlink\Models\Shipment;

$shipment = Shipment::find('YOUR_SHIPMENT_ID'); // find shipment by id

return json_encode($shipment); // decode Shipment object class to json

The system will check the status of your order, reporting useful information such as the various tracking and couriers with collection and exchange points.

📦 Where Shipment:

use MwSpace\Packlink\Models\Shipment;

$shipment = Shipment::where('status','READY_TO_PURCHASE');

return json_encode($shipment); // decode Shipment object class to json

This is only BETA. see limitation per page, try at yourself

📦 Create Shipment:

use MwSpace\Packlink\Models\Shipment;

private $shipment = [];

$shipment = Shipment::create($shipment); // create new Shipment by Model Class

return json_encode($shipment); // decode Shipment object class to json

Create method insert many data to array. Please see all data needed at Shipment Model.

📦 Update Shipment:

use MwSpace\Packlink\Shipment;

$shipment = Shipment::find('YOUR_SHIPMENT_ID'); // find shipment by id

$update = $shipment->update([
    "content" => "New awesome t-shirt" // update shipping data
]);

return json_encode($update); // decode Shipment object class to json

📦 Delete Shipment:

use MwSpace\Packlink\Models\Shipment;

$shipment = Shipment::find('YOUR_SHIPMENT_ID'); // find shipment by id

$shipment->delete(); // delete shipping record by id if draft

🎯 All Warehouses:

use MwSpace\Packlink\Warehouse;

$warehouses = Warehouse::all(); // get all warehouses

return json_encode($warehouses); // decode Warehouse object class to json

🎯 Find Warehouses:

use MwSpace\Packlink\Warehouse;

$warehouse = Warehouse::find('YOUR_WAREHOUSE_ID'); // find warehouse by id

return json_encode($warehouse); // decode Warehouse object class to json

🎯 Create Warehouses:

use MwSpace\Packlink\Warehouse;

private $warehouse = [];

$warehouse = Warehouse::create($warehouse); // create new Warehouse by Model Class

return json_encode($warehouse); // decode Warehouse object class to json

Create method insert many data to array. Please see all data needed at Warehouse Model.

🎯 Update Warehouses:

use MwSpace\Packlink\Warehouse;

$warehouse = Warehouse::find('YOUR_WAREHOUSE_ID'); // find warehouse by id

$update = $warehouse->update([
    "alias" => "New awesome t-shirt" // update warehouse data
]);

return json_encode($update); // decode Warehouse object class to json

🎯 Default Warehouses:

use MwSpace\Packlink\Warehouse;

$warehouse = Warehouse::find('YOUR_WAREHOUSE_ID'); // find warehouse by id

$warehouse->setDefault(); // set default warehouse record

🎯 Delete Warehouses:

use MwSpace\Packlink\Warehouse;

$warehouse = Warehouse::find('YOUR_WAREHOUSE_ID'); // find warehouse by id

$warehouse->delete(); // delete warehouse record by id if > 1

Why use?

It matters Automatically import or manually create your national and international shipments.

Professionalism Choose from a wide variety of transport services at the best prices.

Fast and flexible Fast and flexible Save time with the massive management of your shipments: print several labels at the same time, or modify and pay for several shipments in one go.

Insurance Insurance Insurance coverage on products shipped, available for new and second hand items.

Tracking Tracking Tracking of all shipments from a single platform.

Customer service Customer service Help from our sales and customer service staff.

Good packaging protects the shipment and is one of the requirements for insurance.

Read the 5 rules for proper packaging.

List Italy Shipping Carrier

ITALIAN POST

Poste Italiane shipments with Crono Express and Crono Internazionale services. Express deliveries throughout Italy and the safety of sending with Poste Italiane. Compare rates and services on Packlink and send with Poste Italiane online starting from € 5.59 all inclusive.

BRT

To ship with BRT, you can choose between national (such as Express and Priority 12.00) or international (such as DPD and Euroexpress) shipping services. The cost of shipping with BRT will be discounted up to 70% with prices starting from € 10.96 all included.

TNT

Ship abroad with TNT courier starting from € 23.36 with services such as Economy Express and Express. You can send parcels to Europe and abroad with delivery in 224/48 hours or 4/5 days.

UPS

Send by UPS courier in Italy and abroad. The UPS rates you will find on Packlink start at € 18.59 for national shipments and € 15.61 for international shipments. You can choose between the Standard, Express or Express Saver service.

SDA

The SDA courier allows you to send small and medium-sized parcels throughout Italy with express delivery starting from 24 hours and from € 9.57. On Packlink you can send by choosing between Extra Large and Extra Large 12.00 services.

DHL

The deliveries that DHL Express offers are naturally both on the Italian territory and across the border. In both cases, however, the service remains fundamentally the same, in terms of assistance, traceability and timing. DHL collects and delivers in guaranteed times, and clearly specifies what the conditions are.

NEXIVE

With Nexive you can choose between the Complete, Espresso Drop Off and Espresso services. By choosing the Drop off service, you can deliver the package to a Nexive collection point by selecting it at the time of shipment from our map.

STARPACK

For your shipments abroad, you can rely on Starpack services that allow you to send packages at affordable prices without sacrificing quality. With Starpack, you can choose between Road Express and Air Courier services.

SKYNET

Send by Skynet courier in Italy and abroad. The Skynet rates that you will find on Packlink start at € 6.59 for national shipments and € 13.30 for international shipments. The cost of shipping with Skynet will be discounted up to 70%.

See complete shipping carriers at Shipping couriers.

Search

Got to page for informational purposes only for browsers looking for keywords for this library included: Packlink php api,Packlink php sdk,Laravel packlink api,Laravel shipping api,Codeigniter packlink api ,Codeigniter shipping api,Symfony packlink api,Symfony shipping api,Yii Framework packlink api,Yii Framework shipping api,CakePHP packlink api,CakePHP shipping api,Zend Framework packlink api,Zend Framework shipping api. see more for packlink php api .

Contributing

Thank you for considering contributing to the MwSpace Company! The contribution can be found in the MwSpace Website.

Security Vulnerabilities

If you discover a security vulnerability within mwspace/packlink-php, please send an e-mail to Dev team via dev@mwspace.com. All security vulnerabilities will be promptly addressed.

License

The mwspace/packlink-php is application programming interface licensed under the Apache License 2.0.