Boxberry Logistics Services Integration into Mobile Apps
Boxberry is a logistics operator with 18,000+ pickup points in Russia. Their API is older and less RESTful than SDEK v2, but for key tasks—tariff calculation, PVZ list, order creation and tracking—everything needed is there.
Boxberry API Specifics
Boxberry API works on single endpoint with method parameter in query string: https://api.boxberry.ru/json.php?token={TOKEN}&method={METHOD}&.... This isn't typical REST, so Retrofit interface differs—single base URL, parameters in @Query.
Authentication—token in query parameter, not header. Token issued in personal account, no default expiry. Store in Keychain / Android Keystore, not in code constants.
No public test environment—development on production token with minimal real requests. Plan accordingly: don't make unnecessary requests, cache aggressively.
Main Methods
Pickup points list:
GET /json.php?token=...&method=ListPoints&CityCode=10&prepaid=1
CityCode—Boxberry internal city code (not KLADR, not FIAS). City code table via method=ListCities. Response—JSON array with points: Code, Name, Address, GPS (format "55.7558,37.6173"), WorkShedule, Phone.
Note: GPS field—string with comma inside, not separate lat/lon. Parse:
let coords = point.gps.split(separator: ",")
let lat = Double(coords[0]) ?? 0
let lon = Double(coords[1]) ?? 0
Tariff calculation:
GET /json.php?token=...&method=DeliveryCosts&zip=...&weight=500&ordersum=2000
zip—recipient postal code. Returns price and delivery_period (days).
Create order:
POST /json.php?token=...&method=ParselCreate
Body—JSON with sender, recipient, item list. Response contains track—tracking number.
Track:
GET /json.php?token=...&method=ListStatuses&ImId={track}
Returns statuses array with Date, Name, Comment.
Android Implementation
interface BoxberryApi {
@GET("json.php")
suspend fun listPoints(
@Query("token") token: String,
@Query("method") method: String = "ListPoints",
@Query("CityCode") cityCode: Int,
@Query("prepaid") prepaid: Int = 1
): List<BoxberryPoint>
@GET("json.php")
suspend fun getDeliveryCosts(
@Query("token") token: String,
@Query("method") method: String = "DeliveryCosts",
@Query("zip") zip: String,
@Query("weight") weight: Int
): BoxberryDeliveryCosts
}
Don't pass token in every call—OkHttp Interceptor adds it automatically. Cache PVZ list in Room for 24 hours.
Pickup Points Map with Filtering
After loading points, display on Google Maps. Filters: PVZ type (with fitting / without), weekend hours, card payment support—all in response fields. Implement BottomSheet with filters and MutableStateFlow<FilterState> for reactive re-filtering without re-API request.
Clustering at zoom < 12—ClusterManager on Android, GMUMarkerClusterer on iOS. Tap cluster—animated zoom to bounds.
Flutter
Common HTTP client with Dio, BoxberryRepository with cache on Hive. Map—google_maps_flutter or flutter_map. PVZ list for selection—ListView.builder with name/address search and FilterChip filters.
Integration timeline: three-four days—client, PVZ list with map, cost calculation, order creation and tracking.







