External shipping provider integrations in Picqer
To give external parties the same integration options as Picqer itself has, we now have a new service in Picqer. This way, as a shipping provider, you can get your own ‘block’ with logo and explanation on the integrations page of Picqer and customers can easily link the shipping provider to Picqer.
With this way of integration, after the test period, you can be included as a standard shipping provider without having to depend on our roadmap. The integration will be made and maintained by you, but for users it will feel just as integrated as our first-party integrations. With this way of integration you are responsible for the technical implementation yourself.
The procedure to achieve full integration is as follows:
- You can get a free developer account for Picqer with which you can test the integration. Contact us for a developer account.
- Provide us the configuration URL, shipment URL and way of authentication for your test implementation. With this data we will create an integration in test mode which will only be available in your developer account.
- Now you can start working on the integration.
As soon as the integration is operational:
- You can give us the URLs for the production environment so we can create a new integration and make it available in your developer account.
- The integration can now be tested with customers. If the customer asks us about the integration, either directly or through you, we will enable the integration for the customer.
- At this time we will also work together on the documentation so that it is clear to customers how to set up the integration and so that our Support team can provide good support.
As soon as at least five customers work successfully with the integration:
- We will go live for all customers. All Picqer users can then use the integration independently and it will be visible on the integrations page in Picqer to everyone.
- We will now work together with you to publish the integration on our blog, our newsletter and social media. We will also mention the integration on our website.
The general flow with which Picqer users can add a shipping provider in Picqer is as follows. They go to the integrations page and see all integrations there.
After clicking on ‘Connect’, the general data about the integration, like the credentials, can be filled in:
Per shipping provider one or more profiles can be created, in which a user can select a set of options that should be selected for that profile, like sender address, shipping product etcetera.
Everytime a customer creates a shipment, the customer chooses which shipping method should be used and Picqer then creates a shipment for the selected shipping provider.
From now on it is possible to build an integration which integrates in Picqer the same way. We defined two standard API calls which we can execute on the endpoints you deliver to us. With these API calls we can retrieve the profile options and create a shipment.
To configure the integration we need the following:
- Name of the shipping provider
- URL endpoint for the configuration options
- URL endpoint to create a label
- Authentication method via username and password or via API key
We currently only support HTTP Basic Auth for authentication. For the endpoints we currently only support HTTPS connections with TLS 1.1 or later.
An example of a PHP script regarding the two endpoints can be found here.
This is optional. if you're not using any special options, you don't need to give us this URL.
To retrieve the configuration options, we send a GET request with authentication from the user's credentials. We expect to receive all possible configurations for the chosen customer in return.
For each shipment, we will send along which configuration the customer has selected.
In this example you see 4 fields which we will show in the configuration of the profile.
- key: This is the key with which we send back the data to you when creating a shipment.
- label: This is what we show to the user for this configuration option.
- description: Optional, gives the user additional explanation about this option.
- type: "text" for a free text field or "list" for a list of options from which the user can choose.
- possible_values: If the type is "list", you can provide the options here.
- default_value: The standard value we will use if no other is chosen.
Once the user has created 1 or multiple profiles, they can use these to create a shipment.
When the user creates a shipment, we send a POST request to the URL you have provided. In this request you will receive the chosen options of the profile and details about the shipment. We expect a shipping label in PDF (mandatory) and optionally a ZPL file along with the tracking code and URL in return.
We ensure that the label is automatically printed and that the tracking data is sent to the customer.
POST to for example:
First you will receive the chosen configuration options of the profile in "profile".
After that, in the shipment, you will receive the required fields to create a shipment.
Fields that do not speak for themselves are:
- weight: Weight in grams.
- total_paid: Price the customer has paid for the products in this shipment.
- value_of_goods: The purchase value of the products in the shipments, often used for insurance.
- references: All optional, you can use references.reference to send the reference to the receiver.
- preferred_delivery_date: Can be used if the customer has submitted a preferred delivery date. Can be 'null' when unused.
- pickup_point_data: This is an array or object. When there is no pickup_point_data available this will be an empty array (Note: This differs from the "orders" endpoint in the Picqer API). The information in this key depends on the carrier. We strongly encourage you to read the examples page.
- language: Preferred language of communication with the customer, currently only available in "nl" or "en".
The processing of the request should take a maximum of 20 seconds, otherwise we will regard this shipment as failed.
- carrier_key: Not mandatory, but it makes it easier to map the selected shipping provider to the webshops and marketplaces such as Amazon and Bol.com. You can find the available carrier keys at the following page: https://picqer.com/en/api/custom-shippingmethod.
- carrier_name: The name of the shipping provider as it will be shown to the end customer.
- tracking_code: (optional, but desired) The tracking code of the shipment.
- tracking_url: (optional) The URL to the public status page of this shipment.
- label.format: The physical format of the label, currently we only support 'A6' and ‘A4’ size. Only use ‘A4’ if the label does not fit in ‘A6’ size, like with customs documents.
- label.documents.pdf: Base64 encoded version of the PDF with the shipping label.
- label.documents.zpl: (optional) Base64 encoded version of the ZPL of the shipping label.
We always need a PDF version of the label in Picqer. Therefore this is mandatory. Optionally you can also provide the ZPL, which we use when printing on printers that support ZPL.
When you send an HTTP Status Code within the 4xx range, we will pick up the error message and show it to the user. You can do this in the format as follows:
Responses with a status code in the 5xx range will trigger a generic response in Picqer, this should not be used in regular circumstances.
If the country of the recipient is outside the EU customs union, you will receive the field ‘customs_data’ in the shipment in which data about the products of the shipment can be found. You can send us an A4 document with the shipping label/CN23 form, commercial invoice and any other customs documents in return.
Example with customs information:
Send all customs documents as A4 label document in return and also mention you use the A4 format. Picqer will then automatically select the correct printer.
Example of your response:
You can only send 1 PDF document in return. If multiple documents need to be printed, like with customs information, all documents should be submitted to Picqer in 1 PDF document.
If no customs documents need to be included, you can also respond with an A6 format label.