Pakkelabels.dk RESTful API v2
Følgende side er på engelsk, for at give mulighed for at alle programmører (uanset sprog), kan integrere op imod vores system.
This is the Getting Started guide for our RESTful API v2.
Getting started with the API – obtaining API access
Getting started with our RESTful API is easy. You’ll need an user at pakkelabels.dk, as well as an API username and an API key.
A free user can be created here, and once the user is created and you’re logged in, the API username/key can be generated from the user settings (Indstillinger > API) page.
Authenticaiton
Before calling any other API methods you need to obtain a token. This is done by making a POST request to https://app.shipmondo.com/api/public/v2/users/login, and specify the API username and password from the previous step in the parameters api_user and api_key (see https://api.pakkelabels.dk/#users-login)
If the authentication succeeds, a token will be returned to you, as well as a expiration time (see below). All the subsequent calls to the API must include this token.
{ "token":"d9A5jPNiNhdxyPSi5tsiGyQnzpC0b-IMWwIGNpc4", "expires_at":"2016-08-02T18:36:27.096+02:00"; }
Once you have obtained a valid token you’re ready to make calls to the API. The complete technical documentation including all API methods can be found here: https://api.pakkelabels.dk/.
Testing the API
The API is completely free to use, but buying a label using the API of course costs money. The price of the label is automatically withdrawn from your Pakkelabels-balance. Thus, it is not possible to buy labels without having sufficient money on your account.
It is, however, still possible to test the API without using any money, and without having any money on your account. The create shipment method contains a paramater called test. If you set the string to “true”, it will create a test label. This label is free of charge, and it can be created without any money on your account.
Note that you have to use our web interface at https://app.shipmondo.com to refill your balance.
Official PHP library
If you’re developing your application in PHP, we’ve made the development even easier by providing an official library in PHP.
The library (including source and examples) can be found here.
Libraries for other languages
Below is a list of third party modules which, to some extend, have been tested and verified by Pakkelabels.dk.
Any questions regarding the modules below should be addressed to the author of the library: