PHP-SDK

The PHP-SDK can be used to easily communicate with the MyParcel.com API Features As the API is updated with new features, these features will be added to the SDK for easier access. Currently the following features are supported by the SDK: Authentication with our (OAuth 2.0) authentication server, using the client_credentials grant. -Shipment creation. -Resource retrieval of the following types: shops regions shipments files carriers pick-up/drop-off locations Support Do not hesitate to contact us if you have any further questions or feedback about our SDK. We would love to hear from you. You can get in touch here.

Installation
The recommended way to install the SDK is by using composer. Composer require myparcelcom/api-sdk Github If you do not use composer, you can downlo...
Fri, 6 Mar, 2020 at 9:31 AM
Connecting with the API
Connecting To start communicating with the MyParcel.com API, you need to create an instance of the MyParcelComApiclass. This class will facilitate all inte...
Fri, 6 Mar, 2020 at 9:33 AM
Retrieving Resources
Retrieving Resources Most of the resources available in the API can be accessed using the SDK. All resources will be mapped to classes implementing their s...
Fri, 6 Mar, 2020 at 9:43 AM
Price Calculator
When deciding on what service and contract to use, a big deciding factor is the price. The price of a shipment is usually composed of 3 parts: the weight o...
Fri, 6 Mar, 2020 at 9:45 AM
Common Use Case
The MyParcel.com API is used mainly for creating shipments and retrieving labels for the shipments. There are a couple of steps you will have to do for each...
Fri, 6 Mar, 2020 at 9:52 AM
Label Combining
The SDK provides a class for combining labels into 1 pdf. Using this you can create a pdf file with multiple labels for printing. The class takes an arra...
Fri, 6 Mar, 2020 at 9:53 AM
Advanced Usage
Caching By default the SDK uses the filesystem to cache both resources and access tokens. To use another type of caching, any cache instance implementing P...
Fri, 6 Mar, 2020 at 9:57 AM