Balíkobot API V2 Integration Manual - EN
Balikobot API Integration Manual
1. Introduction
This implementation guide serves as a practical manual for developers and integrators connecting their systems (such as ERP, WMS, or e-commerce platforms) to the Balikobot API. Balikobot helps automate dispatching, reduces error rates, and ensures direct data connections with selected carriers. This manual provides an overview of key methods, business logic, call sequences, and recommendations for working with carriers.
All communication is realized via resource-oriented URL addresses using the HTTPS protocol and standard Basic Access Authentication. The response time (timeout) of all methods is 30 seconds. Please note that detailed technical specifications, including exact JSON payloads and data types, are maintained in the Technical documentation. This guide focuses on the integration workflow and business logic.
2. Core Concepts
Test vs. Production Environments
Integrations begin with a Test API key and login. In the test environment, there are differences depending on the carrier and the state of implementation for the specific carrier the customer uses. Balikobot sets up credentials in the background. If the carrier has customer test credentials and the customer has already filled in the carrier configuration, the communication actually goes to the carrier API in test mode using the customer's credentials. While some responses are simulated, in most cases, the response actually goes through the carrier's test environment. Once testing is complete, the keys are swapped for Production keys, which create real shipments.
Labels
Printing labels from the API is supported across all carriers. Key information regarding label management includes:
Formats: Balikobot supports three primary formats: PDF A4 (positionable, typically containing 4 labels per page in portrait or landscape depending on the carrier), PDF for thermal printers (single labels, e.g., Zebra printers), and ZPL format.
Dimensions: Standard thermal labels are usually 100x125 mm or 100x148 mm. Specific sizes and orientations vary by carrier (e.g., Mail Order and InTime use 1/8 A4).
Configuration: Label formats are configured directly in the Balikobot Client Zone for production keys. For Test API keys, the format is managed by the Balikobot team and requires contacting support (balikobot@balikobot.cz).
Immutability: Labels cannot be edited once generated. If data needs to be changed, the shipment must be deleted (DROP) and recreated (ADD). Furthermore, the size and content of the labels are strictly approved by the carriers, meaning custom visual modifications are not permitted.
3. Integration Flow & Call Sequence
The lifecycle of a shipment in Balikobot generally follows a specific sequence of API calls:
Preparation (Optional): Before creating a shipment, you may need to fetch available services, branches, or validate data using helper methods like SERVICES, BRANCHES, or CHECK.
Creation: Call the ADD method to create the shipment. The API validates the data and immediately returns the tracking number and a link to the shipping label.
Modification (Optional): If a mistake was made, the shipment can be deleted using the DROP method, provided the data hasn't been finalized yet.
Finalization: Call the ORDER method to close the batch for the given carrier. This sends the remaining data to the carrier and initiates tracking. After calling ORDER, the shipment can no longer be dropped.
Tracking: Once ordered, the shipment's journey can be monitored using the TRACK or TRACKSTATUS methods.
4. Mandatory vs. Optional Functions
To successfully integrate Balikobot, certain methods are strictly required, while others provide enhanced functionality.
Category | Methods | Description
|
|---|---|---|
Mandatory | ADD, ORDER | Core methods required to generate labels and transmit final data to the carrier. |
Highly Recommended | DROP, TRACKSTATUS | Crucial for handling cancellations before finalizing data and displaying tracking statuses to end customers. |
Dynamic Code Lists (Optional) | SERVICES, BRANCHES, MANIPULATIONUNITS | Used to dynamically fetch available shipping methods, pickup points, or pallet types. Should be cached and updated daily. |
5. Endpoints Overview
Below is a comprehensive textual overview of the key endpoints and their business purposes.
Core Operational Methods
ADD: Creates specific packages for a given carrier. Each package requires a unique eid (e-shop identifier). For multi-piece shipments, packages are grouped using the order_number attribute. The method returns the label URL, tracking URL, carrier IDs, and internal package IDs.
DROP: Deletes a shipment. This is only possible before the ORDER method is called (before data is sent to the carrier). Shipments are deleted based on their package_id.
ORDER: Closes the batch/collection for a given carrier, transfers remaining data, and initiates tracking. Shipments cannot be deleted after this is called. Note that this does not necessarily order the physical pickup courier; that is done via ORDERPICKUP.
TRACK / TRACKSTATUS: Returns the tracking history or the last known status of a package. Only works for shipments closed via ORDER. TRACKSTATUS is recommended for API v2 integrations.
Helper and Validation Methods
CHECK: Validates package data without actually creating a shipment.
SERVICES: Returns a list of all supported services for specific carriers.
BRANCHES / FULLBRANCHES: Returns a list of available pickup points or branches for services that support them.
MANIPULATIONUNITS: Returns available handling units (e.g., pallets) for freight carriers.
ADDATTRIBUTES: Retrieves a list of available input attributes dynamically for a specific carrier's ADD method, including data types and length limits.
WHOAMI: Returns basic information about API keys, sender names on labels, and active carriers.
LABELS: Returns a bulk PDF containing labels for selected package IDs.
6. Important Considerations (What to Watch Out For)
To ensure a stable and reliable integration, please observe the following technical and operational guidelines:
Daily Code List Updates: Data obtained via the BRANCHES and SERVICES methods must be refreshed at least once a day. Using outdated branch lists or service codes may result in API errors or failed deliveries.
Monitoring API Changes: If a carrier updates their connection requirements (e.g., adding a new mandatory attribute), you must implement this change in your system. Programmatic monitoring can be achieved using the CHANGELOG method, or by reviewing the documentation.
Service Additions/Removals: When a carrier introduces a new service or removes an old one, these changes will be reflected in the SERVICES method. Your system should dynamically handle these changes.
7. Available Libraries
To speed up the implementation process, several open-source libraries are available. Please note that these libraries are maintained by external implementers and the community, not directly by Balikobot:
.NET: msigut/BalikoBotSharp (.NET Standard 2.0 library in C#)
Java: nuty456/BalikobotApi
Ruby: kuba108/balikobot_api
Magento 2: beecomprg/magento2-balikobot (Open-source module from Beecom)