API docs and examples

List of methods

Get costs for delivery

<?php
    define
('SITE_URL''logistics.qwintry.com');
    
define('API_KEY''YOUR_API_KEY'); //don't forget to set your key!


    
$url =  'http://'SITE_URL .'/api/cost';

    
    
$data = array ( 
        
'params' => array(
            
'method' => 'qwair'// 'economy' for Eco Post / 'qwair' for Qwintry Air
            
'weight' => 5// in lb
            
'hub_code' => 'DE1',
            
'addr_country' => 'RU',
            
'addr_zip' => '443000',
            
'addr_line1' => 'Стара Загора, 37',
            
'addr_line2' => 'подъезд 3',
            
'addr_city' => 'Самара',
            
'addr_state' => 'Самарская область',
            
'insurance' => false,
            
'items_value' => 44// declaration items total cost in USD
            
'retail_pricing' => // retail / wholesale pricing?
        
),
    );
    
$data_string http_build_query($data);

    
var_dump($data_string);
    
    
$ch curl_init();
    
curl_setopt($chCURLOPT_URL$url);
    
curl_setopt($chCURLOPT_RETURNTRANSFER1);
    
curl_setopt($chCURLOPT_HTTPHEADER, array('Authorization: Bearer 'API_KEY));
    
curl_setopt($chCURLOPT_POSTtrue);
    
curl_setopt($chCURLOPT_POSTFIELDS,  $data_string);
    
curl_setopt($chCURLOPT_SSL_VERIFYHOST0);
    
curl_setopt($chCURLOPT_SSL_VERIFYPEER0);
    
//curl_setopt($ch, CURLOPT_HEADER, 1);
    
$response curl_exec($ch);
    
curl_close($ch);
    
var_dump($response);
↑ go to methods list

Get costs for delivery to pickup point

<?php
    define
('SITE_URL''logistics.qwintry.com');
    
define('API_KEY''YOUR_API_KEY'); //don't forget to set your key!

    
$url =  'http://'SITE_URL .'/api/cost';

    
    
$data = array ( 
        
'params' => array(
            
'weight' => 5// in lb
            
'delivery_pickup' => 'msk_1'// full list of pickup points can be retrieved from /api/locations-list
            
'insurance' => true,
            
'items_value' => 500// declaration items total cost in USD
            
'retail_pricing' => true // retail / wholesale pricing?
        
),
     );
    
$data_string http_build_query($data);
    
    
$ch curl_init();
    
curl_setopt($chCURLOPT_URL$url);
    
curl_setopt($chCURLOPT_RETURNTRANSFER1);
    
curl_setopt($chCURLOPT_HTTPHEADER, array('Authorization: Bearer 'API_KEY));
    
curl_setopt($chCURLOPT_POSTtrue);
    
curl_setopt($chCURLOPT_POSTFIELDS,  $data_string);
    
curl_setopt($chCURLOPT_SSL_VERIFYHOST0);
    
curl_setopt($chCURLOPT_SSL_VERIFYPEER0);
    
$response curl_exec($ch);
    
curl_close($ch);
    
var_dump($response);
↑ go to methods list

Get list of countries of delivery with customs rules

<?php
define
('SITE_URL''logistics.qwintry.com');
define('API_KEY''YOUR_API_KEY'); //don't forget to set your key!  
    

$url =  'http://'SITE_URL .'/api/countries-list'// append '?country=RU'  to download only info for specific country

$ch curl_init();
curl_setopt($chCURLOPT_URL$url);
curl_setopt($chCURLOPT_RETURNTRANSFER1);
curl_setopt($chCURLOPT_HTTPHEADER, array('Authorization: Bearer 'API_KEY));
curl_setopt($chCURLOPT_SSL_VERIFYHOST0);
curl_setopt($chCURLOPT_SSL_VERIFYPEER0);
$response curl_exec($ch);
curl_close($ch);
var_dump(json_decode($response));
↑ go to methods list

Get list of available delivery locations (cities and pickup points)

<?php
define
('SITE_URL''logistics.qwintry.com');
define('API_KEY''YOUR_API_KEY'); //don't forget to set your key!  
    

$url =  'http://'SITE_URL .'/api/locations-list';

$ch curl_init();
curl_setopt($chCURLOPT_URL$url);
curl_setopt($chCURLOPT_RETURNTRANSFER1);
curl_setopt($chCURLOPT_HTTPHEADER, array('Authorization: Bearer 'API_KEY));
curl_setopt($chCURLOPT_SSL_VERIFYHOST0);
curl_setopt($chCURLOPT_SSL_VERIFYPEER0);
$response curl_exec($ch);
curl_close($ch);
var_dump(json_decode($response));
↑ go to methods list

Get list of available hubs in origin country

A store needs to send its packages to one of Qwintry pickup hubs in destination country (so, US based store sends its packages to pickup hubs located in US) and packages are further dispatched by Qwintry. Right now Qwintry has pickup hubs in United States, China, and Germany. This methods returns a list of pickups hubs. Filtering by origin country is available. DE1 (Delaware, US) is a default hub in most of methods, like /cost.

<?php
define
('SITE_URL''logistics.qwintry.com');
define('API_KEY''YOUR_API_KEY'); //don't forget to set your key!

$url =  'http://'SITE_URL .'/api/hubs-list?country=cn';

$data = [];
$data_string http_build_query($data);

$ch curl_init();
curl_setopt($chCURLOPT_URL$url);
curl_setopt($chCURLOPT_RETURNTRANSFER1);
curl_setopt($chCURLOPT_HTTPHEADER, array('Authorization: Bearer 'API_KEY));
curl_setopt($chCURLOPT_POSTtrue);
curl_setopt($chCURLOPT_POSTFIELDS,  $data_string);
curl_setopt($chCURLOPT_SSL_VERIFYHOST0);
curl_setopt($chCURLOPT_SSL_VERIFYPEER0);
$response curl_exec($ch);

curl_close($ch);
var_dump($response);
↑ go to methods list

Create shipment

<?php
    define
('SITE_URL''logistics.qwintry.com');
    
define('API_KEY''YOUR_API_KEY'); //don't forget to set your key!

    
$url =  'http://'SITE_URL .'/api/package-create';

    
    
$data = array ( 
        
'Shipment' => array ( 
            
'test' => true// set to false when ready for production mode!
            
'delivery_type' => 'courier'// can also be 'pickup', than 'delivery_pickup' value is required to select pickup point
            //'delivery_pickup' => 'msk_1',
            
'addr_line1' => 'Стара Загора 27'
            
'addr_line2' => 'кв. 76, домофон 234'
            
'addr_zip' => '443000'
            
'addr_state' => 'Самарская область',
            
'addr_city' => 'Самара',
            
'addr_country' => 'RU'
            
'first_name' => 'Василий'
            
'last_name' => 'Пупкин'
            
'patronymic' => 'Евгеньевич'
            
'phone' => '+79176023899'
            
'email' => 'recipient-email@email.com'
            
'passport_number' => '44344444'
            
'passport_issue_date' => '14.12.2005',
            
'passport_issue_info' => 'выдан Заволжским УВД г.Самары'
            
'passport_address' => 'ул. Стара Загора, 27, кв.76'// address in passport
            
'customer_notes' => 'Примечания по доставке'
            
'weight' => '6.27'// weight of package in lb 
            
'dimensions' => '14x10x5'// shipment size in inches 
            
'insurance' => true,
            
'external_id' => 'your-internal-order-id' rand(0100000),
            
'hub_code' => 'DE1'// Qwintry pickup hub that receives the package (DE1 for Delaware/OR1 for Oregon)
            
'is_contains_batteries' => 1,
         ),
        
'items' => array(
            
=> array(
                
'descr' => 'jeans, shop:amazon.com, asin:AS324244',
                
'descr_ru' => 'джинсы мужские',
                
'count' => 2,
                
'line_value' => '70.8'// line value in USD
                
'line_weight' => 3// weight in lb 
                
'link' => 'http://www.amazon.com/product-page',                
            ), 
            
=> array(
                
'descr' => 'iphone 5s, black, 16GB, shop:apple.com',
                
'descr_ru' => 'телефон',
                
'count' => 1,
                
'line_value' => '620'// line value in USD
                
'line_weight' => 2// weight in lb
                
'link' => 'http://www.ebay.com/product-page',
            ),
        ),
        
'invoices' => array(
            
=> array(
                
'base64_data' => base64_encode(file_get_contents(__DIR__ '/example_invoice.png')),
                
'base64_extension' => 'png'// png,gif,jpg,pdf are allowed
            
),
            
=> array(
                
'base64_data' => base64_encode(file_get_contents(__DIR__ '/example_invoice2.pdf')),
                
'base64_extension' => 'pdf',
            ),
        ),
        
'passport_scans' => array(
            
=> array(
                
'base64_data' => base64_encode(file_get_contents(__DIR__ '/passport_scan1.png')),
                
'base64_extension' => 'png'// png,gif,jpg,pdf are allowed
            
)
        )
     );

    
$data_string http_build_query($data);
    
    
$ch curl_init();
    
curl_setopt($chCURLOPT_URL$url);
    
curl_setopt($chCURLOPT_RETURNTRANSFER1);
    
curl_setopt($chCURLOPT_HTTPHEADER, array('Authorization: Bearer 'API_KEY));
    
curl_setopt($chCURLOPT_POSTtrue);
    
curl_setopt($chCURLOPT_POSTFIELDS,  $data_string);
    
curl_setopt($chCURLOPT_SSL_VERIFYHOST0);
    
curl_setopt($chCURLOPT_SSL_VERIFYPEER0);
    
$response curl_exec($ch);

    
curl_close($ch);   
    
var_dump($response);

Example for Qwintry Ecopost method

Qwintry Ecopost is a method that is available only for Russia for now. The delivery is done to Russian Post offices. The differences with Qwintry Air data structure are:
  1. no invoice files are required;
  2. no passport fields ('passport_number', 'passport_issue_date', 'passport_issue_info', 'passport_address') or passport files are required;
  3. 'method' element needs to be set to 'ecopost'
  4. in 'items' array the 'descr_ru' (russian description of goods) is not required
<?php
    define
('SITE_URL''logistics.qwintry.com');
    
define('API_KEY''YOUR_API_KEY'); //don't forget to set your key!

    
$url =  'http://'SITE_URL .'/api/package-create';

    
    
$data = array ( 
        
'Shipment' => array (
            
'method' => 'ecopost',
            
'test' => true// set to false when ready for production mode!
            
'addr_line1' => 'Стара Загора 27'
            
'addr_line2' => 'кв. 76, домофон 234'
            
'addr_zip' => '05000'
            
'addr_state' => 'Самарская область',
            
'addr_city' => 'Самара',
            
'addr_country' => 'RU'
            
'first_name' => 'Василий'
            
'last_name' => 'Пупкин'
            
'patronymic' => 'Евгеньевич'
            
'phone' => '+79176023899'
            
'email' => 'recipient-email@email.com'
            
'customer_notes' => 'Примечания по доставке'
            
'weight' => '1.3'// weight of package in lb 
            
'dimensions' => '14x10x5'// shipment size in inches 
            
'insurance' => true,
            
'external_id' => 'fffd1er-id23441',
            
'hub_code' => 'DE1'// Qwintry pickup hub that receives the package (DE1 for Delaware) 
         
),
        
'items' => array(
            
=> array(
                
'descr' => 'men jeans',
                
'count' => 2,
                
'line_value' => 70.8// line value in USD
                
'line_weight' => 3.2 // weight in LB
            
), 
            
=> array(
                
'descr' => 'phone',
                
'count' => 1,
                
'line_value' => 620// line value in USD
                
'line_weight' => 2.2 // weight in LB
            
),
        ),
     );

    
$data_string http_build_query($data);
    
    
$ch curl_init();
    
curl_setopt($chCURLOPT_URL$url);
    
curl_setopt($chCURLOPT_RETURNTRANSFER1);
    
curl_setopt($chCURLOPT_HTTPHEADER, array('Authorization: Bearer 'API_KEY));
    
curl_setopt($chCURLOPT_POSTtrue);
    
curl_setopt($chCURLOPT_POSTFIELDS,  $data_string);
    
curl_setopt($chCURLOPT_SSL_VERIFYHOST0);
    
curl_setopt($chCURLOPT_SSL_VERIFYPEER0);
    
$response curl_exec($ch);

    
curl_close($ch);   
    
var_dump($response);
↑ go to methods list

Update shipment

<?php
define
('SITE_URL''logistics.qwintry.com');
define('API_KEY''YOUR_API_KEY'); //don't forget to set your key!

$url =  'http://'SITE_URL .'/api/package-update';


// Right now package-update method can only be used to add invoices and passport scans to existing shipment.
// All new files are appended to the shipment, old files that were attached to shipment prior to this api call 
// are not deleted! If you want to delete some file - please use browser ui.
$data = array ( 
  
'Shipment' => array (
    
'tracking' => 'QR13214985'
   
),
  
'invoices' => array(
        
=> array(
            
'base64_data' => base64_encode(file_get_contents(__DIR__ '/example_invoice.png')),
            
'base64_extension' => 'png'// png,gif,jpg,pdf are allowed
        
),
        
=> array(
            
'base64_data' => base64_encode(file_get_contents(__DIR__ '/example_invoice2.pdf')),
            
'base64_extension' => 'pdf',
        ),
    ),
    
'passport_scans' => array(
        
=> array(
            
'base64_data' => base64_encode(file_get_contents(__DIR__ '/passport_scan1.png')),
            
'base64_extension' => 'png'// png,gif,jpg,pdf are allowed
        
)
    )
);

$data_string http_build_query($data);

$ch curl_init();
curl_setopt($chCURLOPT_URL$url);
curl_setopt($chCURLOPT_RETURNTRANSFER1);
curl_setopt($chCURLOPT_HTTPHEADER, array('Authorization: Bearer 'API_KEY));
curl_setopt($chCURLOPT_POSTtrue);
curl_setopt($chCURLOPT_POSTFIELDS,  $data_string);
curl_setopt($chCURLOPT_SSL_VERIFYHOST0);
curl_setopt($chCURLOPT_SSL_VERIFYPEER0);
$response curl_exec($ch);

curl_close($ch);   
var_dump($response); // response is {"success":true}  that can be json_decoded to ['success' => true]
// or something like: {"errorCode":3,"errorMessage":"Passport scan #0 validation error:base64_extension:Base64 Extension is invalid.","success":false}
↑ go to methods list

Delete shipment

<?php

define
('SITE_URL''logistics.qwintry.com');
define('API_KEY''YOUR_API_KEY'); //don't forget to set your key!

$url =  'http://'SITE_URL .'/api/package-delete';


// only test or unpaid items can be deleted!
$data = array ( 
  
'Shipment' => array (
    
'tracking' => 'QR21350825'
   
)
);

$data_string http_build_query($data);

$ch curl_init();
curl_setopt($chCURLOPT_URL$url);
curl_setopt($chCURLOPT_RETURNTRANSFER1);
curl_setopt($chCURLOPT_HTTPHEADER, array('Authorization: Bearer 'API_KEY));
curl_setopt($chCURLOPT_POSTtrue);
curl_setopt($chCURLOPT_POSTFIELDS,  $data_string);
curl_setopt($chCURLOPT_SSL_VERIFYHOST0);
curl_setopt($chCURLOPT_SSL_VERIFYPEER0);
$response curl_exec($ch);

curl_close($ch);   
var_dump($response);
↑ go to methods list

Print shipment label

<?php
define
('SITE_URL''logistics.qwintry.com');
define('API_KEY''YOUR_API_KEY'); //don't forget to set your key!

$tracking 'QR15696052';

$url =  'http://'SITE_URL .'/api/package-label?tracking=' $tracking ;

$ch curl_init();
curl_setopt($chCURLOPT_URL$url);
curl_setopt($chCURLOPT_RETURNTRANSFER1);
curl_setopt($chCURLOPT_HTTPHEADER, array('Authorization: Bearer 'API_KEY));
curl_setopt($chCURLOPT_SSL_VERIFYHOST0);
curl_setopt($chCURLOPT_SSL_VERIFYPEER0);
//curl_setopt($ch, CURLOPT_HEADER, 1);
$response curl_exec($ch);

$http_status curl_getinfo($chCURLINFO_HTTP_CODE);

$content_type curl_getinfo($chCURLINFO_CONTENT_TYPE);

curl_close($ch);

if (
$http_status == 200) {
    
// single labels are pdf, multiple labels are zip
    
if ($content_type == 'application/pdf') {
        
$ext 'pdf'
    } elseif (
$content_type == 'application/zip') {
        
$ext 'zip';
    } else {
        throw new \
Exception("Unknown file extension!");
    }

    
header("Content-type:$content_type");
    
header('Content-Disposition: attachment; filename="'$tracking .'.'$ext .'"');

    echo(
$response);
    exit();

} else {
    
// some errors happened
    
var_dump($response);
}
↑ go to methods list

Print CN23 and CP71 forms for shipment

This method is used only for Qwintry Eco Post shipments. If you want request pdf file pass "pdf=1" parameter (Its only works for Ecopost Small Packets now)

<?php
define
('SITE_URL''logistics.qwintry.com');
define('API_KEY''YOUR_API_KEY'); //don't forget to set your key!

 // all Qwintry Eco Post packages must have 3 copies of CN23 and 1 copy of CP71 printed and attached to the package.
$tracking 'CD008856575RU';

$url =  'http://'SITE_URL .'/api/package-cn23?tracking=' $tracking .'&pdf=0';

$ch curl_init();
curl_setopt($chCURLOPT_URL$url);
curl_setopt($chCURLOPT_RETURNTRANSFER1);
curl_setopt($chCURLOPT_HTTPHEADER, array('Authorization: Bearer 'API_KEY));
curl_setopt($chCURLOPT_SSL_VERIFYHOST0);
curl_setopt($chCURLOPT_SSL_VERIFYPEER0);

$response curl_exec($ch);

$http_status curl_getinfo($chCURLINFO_HTTP_CODE);

$content_type curl_getinfo($chCURLINFO_CONTENT_TYPE);

curl_close($ch);

// the excel file contains 3 copies of cn23 and 1 copy of cp71. 
if ($content_type == 'application/vnd.ms-excel' && $http_status == 200) {
  
// everything is perfect. we may save label somewhere, or just put it to output of browser
  
header('Content-type: application/vnd.ms-excel');
  
header('Content-Disposition: attachment; filename="cn23example.xls"');

  echo(
$response);
  exit();
} else {
  
//some errors happened
  
var_dump($response);
}
↑ go to methods list

Track shipment

<?php
define
('SITE_URL''logistics.qwintry.com');
define('API_KEY''YOUR_API_KEY'); //don't forget to set your key! 
    
$tracking 'QR22200153'// provide tracking number assigned to your shipment
$url =  'http://'SITE_URL .'/api/track?tracking=' $tracking;

$ch curl_init();
curl_setopt($chCURLOPT_URL$url);
curl_setopt($chCURLOPT_RETURNTRANSFER1);
curl_setopt($chCURLOPT_HTTPHEADER, array('Authorization: Bearer 'API_KEY));
curl_setopt($chCURLOPT_SSL_VERIFYHOST0);
curl_setopt($chCURLOPT_SSL_VERIFYPEER0);
$response curl_exec($ch);
curl_close($ch);
print_r($response);
{
   "success": true,
   "current": {
      "create_time": "1435824910",
      "status": "arrival_scan",
      "status_ru": "груз прибыл",
      "message": "Planned delivery date - 2015-07-07. Arrival scan: Алматы [ALA]",
      "message_ru": "Planned delivery date - 2015-07-07. Arrival scan: Алматы [ALA]"
   },
   "history": [
      {
         "status": "info_received",
         "create_time": "1435250227",
         "message": "Electronic info received",
         "status_ru": "информация получена",
         "message_ru": "Данные о посылке получены"
      },
      {
         "status": "departure_scan",
         "create_time": "1435265647",
         "message": "Departure scan: Newark, Delaware, US",
         "status_ru": "груз выехал",
         "message_ru": "Груз выехал из Ньюарка, Делавэр"
      },
      {
         "status": "arrival_scan",
         "create_time": "1435338714",
         "message": "Arrival scan: JFK airport",
         "status_ru": "груз прибыл",
         "message_ru": "Груз прибыл в аэропорт Нью-Йорка (JFK)"
      },
      {
         "status": "departure_scan",
         "create_time": "1435428743",
         "message": "Departure scan: JFK airport",
         "status_ru": "груз выехал",
         "message_ru": "Груз вылетел из аэропорта Нью-Йорка (JFK)"
      },
      {
         "status": "notification_sent",
         "create_time": "1435478847",
         "message": "Delivery notification sent to recipient",
         "status_ru": "сообщение отправлено",
         "message_ru": "Сообщение о доставке отправлено получателю"
      },
      {
         "status": "arrival_scan",
         "create_time": "1435480222",
         "message": "Arrival scan: VKO airport, Moscow",
         "status_ru": "груз прибыл",
         "message_ru": "Груз прибыл в аэропорт Внуково (Москва)"
      },
      {
         "status": "departure_scan",
         "create_time": "1435514467",
         "message": "Departure scan: VKO airport, Moscow",
         "status_ru": "груз выехал",
         "message_ru": "Груз выехал из аэропорта Внуково (Москва)"
      },
      {
         "status": "arrival_scan",
         "create_time": "1435695980",
         "message": "Planned delivery date - 2015-07-07. Arrival scan: Москва [MON]",
         "status_ru": "груз прибыл",
         "message_ru": "Planned delivery date - 2015-07-07. Arrival scan: Москва [MON]"
      },
      {
         "status": "departure_scan",
         "create_time": "1435714429",
         "message": "Planned delivery date - 2015-07-07. Departure scan: Москва [MON]",
         "status_ru": "груз выехал",
         "message_ru": "Planned delivery date - 2015-07-07. Departure scan: Москва [MON]"
      },
      {
         "status": "arrival_scan",
         "create_time": "1435740036",
         "message": "Planned delivery date - 2015-07-07. Arrival scan: Москва [SVO]",
         "status_ru": "груз прибыл",
         "message_ru": "Planned delivery date - 2015-07-07. Arrival scan: Москва [SVO]"
      },
      {
         "status": "departure_scan",
         "create_time": "1435740204",
         "message": "Planned delivery date - 2015-07-07. Departure scan: Москва [SVO]",
         "status_ru": "груз выехал",
         "message_ru": "Planned delivery date - 2015-07-07. Departure scan: Москва [SVO]"
      },
      {
         "status": "arrival_scan",
         "create_time": "1435824910",
         "message": "Planned delivery date - 2015-07-07. Arrival scan: Алматы [ALA]",
         "status_ru": "груз прибыл",
         "message_ru": "Planned delivery date - 2015-07-07. Arrival scan: Алматы [ALA]"
      }
   ]
}
{
   "success": false,
   "errorMessage": "shipment not found"
}
↑ go to methods list

Track multiple shipments

<?php
define
('SITE_URL''logistics.qwintry.com');
define('API_KEY''YOUR_API_KEY'); //don't forget to set your key! 

// tracking numbers assigned to your shipment
// incorrect tracking will be silently ignored and would not appear in resulting array    
$trackings = ['QR22635319''QR12421080''inexistent-tracking']; 


$url =  'http://'SITE_URL .'/api/track-multiple?';
foreach (
$trackings as $tracking) {
    
$url .= 'tracking[]=' $tracking '&';
}


$ch curl_init();
curl_setopt($chCURLOPT_URL$url);
curl_setopt($chCURLOPT_RETURNTRANSFER1);
curl_setopt($chCURLOPT_HTTPHEADER, array('Authorization: Bearer 'API_KEY));
curl_setopt($chCURLOPT_SSL_VERIFYHOST0);
curl_setopt($chCURLOPT_SSL_VERIFYPEER0);
$response curl_exec($ch);

print_r($response);

curl_close($ch);
print_r(json_decode($response));

{
   "success": true,
   "results": {
      "QR12421080": {
         "tracking": "QR12421080",
         "current": {
            "create_time": "1419685203",
            "status": "delivered",
            "status_ru": "доставлено",
            "message": "Shipment delivered",
            "message_ru": "Отправление доставлено"
         },
         "history": [
            {
               "status": "info_received",
               "create_time": "1418228493",
               "message": "Electronic info received",
               "status_ru": "информация получена",
               "message_ru": "Данные о посылке получены"
            },
            {
               "status": "departure_scan",
               "create_time": "1418331597",
               "message": "Departure scan: Tualatin, Oregon, US",
               "status_ru": "груз выехал",
               "message_ru": "Departure scan: Tualatin, Oregon, US"
            },
            {
               "status": "arrival_scan",
               "create_time": "1418823772",
               "message": "Arrival scan: JFK airport",
               "status_ru": "груз прибыл",
               "message_ru": "Груз прибыл в аэропорт Нью-Йорка (JFK)"
            },
            {
               "status": "departure_scan",
               "create_time": "1418921847",
               "message": "Departure scan: JFK airport",
               "status_ru": "груз выехал",
               "message_ru": "Груз вылетел из аэропорта Нью-Йорка (JFK)"
            },
            {
               "status": "arrival_scan",
               "create_time": "1418967991",
               "message": "Arrival scan: SVO airport, Moscow",
               "status_ru": "груз прибыл",
               "message_ru": "Груз прибыл в аэропорт Шереметьево (Москва)"
            },
            {
               "status": "notification_sent",
               "create_time": "1419420017",
               "message": "Closest delivery on 26.12.2014, notification sent to recipient",
               "status_ru": "сообщение отправлено",
               "message_ru": "Closest delivery on 26.12.2014, notification sent to recipient"
            },
            {
               "status": "departure_scan",
               "create_time": "1419451959",
               "message": "Departure scan: SVO airport, Moscow",
               "status_ru": "груз выехал",
               "message_ru": "Груз выехал из аэропорта Шереметьево (Москва)"
            },
            {
               "status": "delivery",
               "create_time": "1419577203",
               "message": "Shipment passed to delivery",
               "status_ru": "передано в доставку",
               "message_ru": "Отправление передано в доставку в курьерскую службу"
            },
            {
               "status": "delivered",
               "create_time": "1419685203",
               "message": "Shipment delivered",
               "status_ru": "доставлено",
               "message_ru": "Отправление доставлено"
            }
         ]
      },
      "QR22635319": {
         "tracking": "QR22635319",
         "current": {
            "create_time": "1418217300",
            "status": "delivered",
            "status_ru": "доставлено",
            "message": "Planned delivery date - 2014-12-11. Delivered: Брест [BQT]",
            "message_ru": "Planned delivery date - 2014-12-11. Delivered: Брест [BQT]"
         },
         "history": [
            {
               "status": "departure_scan",
               "create_time": "1417079049",
               "message": "Departure scan: Newark, Delaware, US",
               "status_ru": "груз выехал",
               "message_ru": "Груз выехал из Ньюарка, Делавэр"
            },
            {
               "status": "info_received",
               "create_time": "1417451382",
               "message": "Electronic info received",
               "status_ru": "информация получена",
               "message_ru": "Данные о посылке получены"
            },
            {
               "status": "arrival_scan",
               "create_time": "1417646905",
               "message": "Arrival scan: JFK airport",
               "status_ru": "груз прибыл",
               "message_ru": "Груз прибыл в аэропорт Нью-Йорка (JFK)"
            },
            {
               "status": "departure_scan",
               "create_time": "1417689553",
               "message": "Departure scan: JFK airport",
               "status_ru": "груз выехал",
               "message_ru": "Груз вылетел из аэропорта Нью-Йорка (JFK)"
            },
            {
               "status": "arrival_scan",
               "create_time": "1417736485",
               "message": "Arrival scan: SVO airport, Moscow",
               "status_ru": "груз прибыл",
               "message_ru": "Груз прибыл в аэропорт Шереметьево (Москва)"
            },
            {
               "status": "departure_scan",
               "create_time": "1417775104",
               "message": "Departure scan: SVO airport, Moscow",
               "status_ru": "груз выехал",
               "message_ru": "Груз выехал из аэропорта Шереметьево (Москва)"
            },
            {
               "status": "notification_sent",
               "create_time": "1417785857",
               "message": "Delivery notification sent to recipient",
               "status_ru": "сообщение отправлено",
               "message_ru": "Сообщение о доставке отправлено получателю"
            },
            {
               "status": "arrival_scan",
               "create_time": "1417885054",
               "message": "Planned delivery date - 2014-12-11. Arrival scan: Москва [M14]",
               "status_ru": "груз прибыл",
               "message_ru": "Planned delivery date - 2014-12-11. Arrival scan: Москва [M14]"
            },
            {
               "status": "departure_scan",
               "create_time": "1417965422",
               "message": "Planned delivery date - 2014-12-11. Departure scan: Москва [M14]",
               "status_ru": "груз выехал",
               "message_ru": "Planned delivery date - 2014-12-11. Departure scan: Москва [M14]"
            },
            {
               "status": "arrival_scan",
               "create_time": "1417976614",
               "message": "Planned delivery date - 2014-12-11. Arrival scan: Москва [MOS]",
               "status_ru": "груз прибыл",
               "message_ru": "Planned delivery date - 2014-12-11. Arrival scan: Москва [MOS]"
            },
            {
               "status": "departure_scan",
               "create_time": "1418068962",
               "message": "Planned delivery date - 2014-12-11. Departure scan: Москва [MOS]",
               "status_ru": "груз выехал",
               "message_ru": "Planned delivery date - 2014-12-11. Departure scan: Москва [MOS]"
            },
            {
               "status": "arrival_scan",
               "create_time": "1418114536",
               "message": "Planned delivery date - 2014-12-11. Arrival scan: Минск [MSQ]",
               "status_ru": "груз прибыл",
               "message_ru": "Planned delivery date - 2014-12-11. Arrival scan: Минск [MSQ]"
            },
            {
               "status": "departure_scan",
               "create_time": "1418179728",
               "message": "Planned delivery date - 2014-12-11. Departure scan: Минск [MSQ]",
               "status_ru": "груз выехал",
               "message_ru": "Planned delivery date - 2014-12-11. Departure scan: Минск [MSQ]"
            },
            {
               "status": "arrival_scan",
               "create_time": "1418202477",
               "message": "Planned delivery date - 2014-12-11. Arrival scan: Брест [BQT]",
               "status_ru": "груз прибыл",
               "message_ru": "Planned delivery date - 2014-12-11. Arrival scan: Брест [BQT]"
            },
            {
               "status": "delivering",
               "create_time": "1418207667",
               "message": "Planned delivery date - 2014-12-11. Delivering: Брест [BQT]",
               "status_ru": "доставка",
               "message_ru": "Planned delivery date - 2014-12-11. Delivering: Брест [BQT]"
            },
            {
               "status": "delivered",
               "create_time": "1418217300",
               "message": "Planned delivery date - 2014-12-11. Delivered: Брест [BQT]",
               "status_ru": "доставлено",
               "message_ru": "Planned delivery date - 2014-12-11. Delivered: Брест [BQT]"
            }
         ]
      }
   }
}
↑ go to methods list

Get your balance

<?php
define
('SITE_URL''logistics.qwintry.com');
define('API_KEY''YOUR_API_KEY'); //don't forget to set your key!  
    

$url =  'http://'SITE_URL .'/api/balance';

$ch curl_init();
curl_setopt($chCURLOPT_URL$url);
curl_setopt($chCURLOPT_RETURNTRANSFER1);
curl_setopt($chCURLOPT_HTTPHEADER, array('Authorization: Bearer 'API_KEY));
curl_setopt($chCURLOPT_SSL_VERIFYHOST0);
curl_setopt($chCURLOPT_SSL_VERIFYPEER0);
$response curl_exec($ch);
curl_close($ch);
var_dump($response);
↑ go to methods list

Get your profile data

<?php
define
('SITE_URL''logistics.qwintry.com');
define('API_KEY''YOUR_API_KEY'); //don't forget to set your key!  
    

$url =  'http://'SITE_URL .'/api/profile';

$ch curl_init();
curl_setopt($chCURLOPT_URL$url);
curl_setopt($chCURLOPT_RETURNTRANSFER1);
curl_setopt($chCURLOPT_HTTPHEADER, array('Authorization: Bearer 'API_KEY));
curl_setopt($chCURLOPT_SSL_VERIFYHOST0);
curl_setopt($chCURLOPT_SSL_VERIFYPEER0);
$response curl_exec($ch);
curl_close($ch);
var_dump($response);
{
  "status": "success",
  "data": {
    "username": "Ivan Ivanov #1",
    "email": "iiva@example.com",
    "website_domain": null,
    "phone": "",
    "company_name": "Microsoft",
    "weight_measurement": "lb",
    "shipping_country": "USA"
  },
  "message": ""
}
↑ go to methods list

Strategic
partner

Strategic
partner

TSA Approved Known Shipper

Partner

Partner

Qwintry staff certification and training