TrackingMore API

PHP Class Example 

  • Clase de API
    //www.trackingmore.com/api-class_php.html

    Instalación:
    1. descargar esta clase a la ubicación deseada
    2. llenar en Trackingmore-Api-Key de esta clase en línea "protegido $apiKey = 'YOUR API KEY';"
    3. requieren de esta clase en su proyecto. Al igual que:
    require('/Path/trackingmore/Class.php');


    Listar todos los transportistas
    $track = new Trackingmore;
    $track = $track->getCarrierList();
    
    Detect a carrier by tracking code
    $track = new Trackingmore;
    $trackingNumber = 'RM121546236CN';
    $track = $track->detectCarrier($trackingNumber);
    
    Listar todos los seguimientos
    $track = new Trackingmore;
    $numbers = 'RG848383345CN,RM121546236CN';
    $orders = '#123';
    $page = 1;
    $limit = 50;
    $createdAtMin = time() - 7*24*60*60;
    $createdAtMax = time();
    $update_time_min = time() - 7*24*60*60;
    $update_time_max = time();
    $order_created_time_min = time() - 7*24*60*60;
    $order_created_time_max = time();
    $lang = 'en';
    $track = $track->getTrackingsList($numbers,$orders,$page,$limit,$createdAtMin,$createdAtMax,$update_time_min,$update_time_max,$order_created_time_min,$order_created_time_max,$lang);
    
    Generar un rastreo de artículo
    $track = new Trackingmore;
    $extraInfo                         = array();
    $extraInfo['title']                = 'iphone6';
    $extraInfo['logistics_channel']   = '4PX挂号小包';
    $extraInfo['customer_name']        = 'charse chen';
    $extraInfo['customer_email']       = '[email protected]';
    $extraInfo['order_id']             = '8988787987';
    $extraInfo['customer_phone']       = '86 13873399982';
    $extraInfo['order_create_time']    = '2018-05-11 12:00';
    $extraInfo['destination_code']     = 'US';
    $extraInfo['tracking_ship_date']   = time();
    $extraInfo['tracking_postal_code'] = '13ES20';
    $extraInfo['lang']                 = 'en';
    $track = $track->createTracking('china-post','RM121516216CN',$extraInfo);
    
    Generar seguimientos múltiples.
    $track = new Trackingmore;
    $items = array(
        array(
            'tracking_number' => 'RM131516216CN',
            'carrier_code'    => 'china-post',
            'title'          => 'iphone6',
            'logistics_channel' => '4PX挂号小包',
            'customer_name'   => 'charse chen',
            'customer_email'  => '[email protected]',
            'order_id'      => '8988787987',
            'customer_phone'      => '+86 13873399982',
            'order_create_time'      => '2018-05-11 12:00',
            'destination_code'      => 'US',
            'tracking_ship_date'      => time(),
            'tracking_postal_code'      => '13ES20',
            'lang'      => 'en'
        ),
        array(
            'tracking_number' => 'RM111516216CN',
            'carrier_code'    => 'china-post',
            'title'          => 'iphone6s',
            'logistics_channel' => '4PX挂号小包',
            'customer_name'   => 'clooney chen',
            'customer_email'  => '[email protected]',
            'order_id'      => '898874587',
            'customer_phone'      => '+86 13873399982',
            'order_create_time'      => '2018-05-11 12:00',
            'destination_code'      => 'US',
            'tracking_ship_date'      => time(),
            'tracking_postal_code'      => '13ES20',
            'lang'      => 'en'
        ),
    );
    $track = $track->createMultipleTracking($items);
    
    Obtener resultados de seguimiento en un solo rastreo.
    $track = new Trackingmore;
    $track = $track->getSingleTrackingResult('china-post','RM131516216CN','en');
    
    Actualizar artículos rastreados
    $track = new Trackingmore;
    $extraInfo['title']          = 'iphone6';
    $extraInfo['logistics_channel'] = '4PX挂号小包';
    $extraInfo['customer_name']  = 'charse chen';
    $extraInfo['customer_email'] = '[email protected]';
    $extraInfo['order_id']       = '8988787987';
    $extraInfo['customer_phone'] = '+86 13873399982';
    $extraInfo['destination_code'] = 'US';
    $extraInfo['status']       = 7;
    $track = $track->updateTrackingItem('china-post','RM131516216CN',$extraInfo);
    
    Borrar el seguimiento de un artículo
    $track = new Trackingmore;
    $track = $track->deleteTrackingItem('china-post','RM131516216CN');
    
    Obtener resultados de seguimiento a tiempo real en un solo rastreo
    $track = new Trackingmore;
    $extraInfo['destination_code']          = 'US';
    $extraInfo['tracking_ship_date']  = '20180226';
    $extraInfo['tracking_postal_code'] = '13ES20';
    $extraInfo['specialNumberDestination']       = 'US';
    $extraInfo['order']       = '#123123';
    $extraInfo['order_create_time']       = '2017/8/27 16:51';
    $extraInfo['lang']       = 'cn';
    $track = $track->getRealtimeTrackingResults('china-ems','LW505109082CN',$extraInfo);
    
    Eliminar elemento de seguimiento de múltiples
    $track = new Trackingmore;
    $date = array();
    $data[] = array(
            "tracking_number"=>"RM131516216CN",
            "carrier_code"=>"china-post"
            );
    $data[] = array(
            "tracking_number"=>"RM111516216CN",
            "carrier_code"=>"china-post"
            );
    $track = $track->deleteMultipleTracking($data);
    
    Modificar código courier
    $track = new Trackingmore;
    $track = $track->updateCarrierCode("123206167205","china-post","gls");
    
    Obtén información de usuario
    $track = new Trackingmore;
    $track = $track->getUserInfoBalance();
    
    Obtener el número de estado
    $track = new Trackingmore;
    $track = $track->getStatusNumberCount();
    
    Lote no para actualizar el elemento de seguimiento
    $track = new Trackingmore;
    $date = array();
    $data[] = array(
            "tracking_number"=>"LS465041915CN",
            "carrier_code"=>"china-post"
            );
    $data[] = array(
            "tracking_number"=>"123206167205",
            "carrier_code"=>"gls"
            );
    $track = $track->setNumberNotUpdate($data);
    
    Compruebe si un envío se envía al área remota.
    $track = new Trackingmore;
    $date = array();
    $data[] = array(
            "country"=>"CN",
            "postcode"=>"400422"
            );
    $data[] = array(
            "country"=>"CN",
            "postcode"=>"412000"
            );
    $track = $track->searchDeliveryIsRemote($data);
    
    Obtener a correo resultados de envejecimiento
    $track = new Trackingmore;
    $data = array();
    $data[] = array(
            "original"=>"CN",
            "destination"=>"US",
            "carrier_code"=>"dhl"
            );
    $data[] = array(
            "original"=>"CN",
            "destination"=>"RU",
            "carrier_code"=>"dhl"
            );
    $track = $track->getCarrierCostTime($data);
    
    Actualizar el elemento de seguimiento más
    $track = new Trackingmore;
    $data = array();
    $data[] = array(
            "tracking_number"=>"RM111516216CN",
            "carrier_code"=>"china-post",
            "title"=>"ceshi",
            'logistics_channel' => '4PX挂号小包',
            "customer_name"=>"chase chen",
            "customer_email"=>"[email protected]",
            "order_id"=>"#123",
            "destination_code"=>"IL",
            "status"=>4
            );
    $data[] = array(
            "tracking_number"=>"61290983300030854514",
            "carrier_code"=>"fedex",
            "title"=>"ceshi",
            'logistics_channel' => '4PX挂号小包',
            "customer_name"=>"chase chen",
            "customer_email"=>"[email protected]",
            "order_id"=>"#123",
            "destination_code"=>"IL",
            "status"=>4
            );
    $track = $track->updateMultipleTrackItem($data);
    

Optimice su
Recorrido posterior a la compra del cliente

Ya sea que desee actualizar automáticamente el estado del envío o crear oportunidades de ventas, tenemos todas las herramientas que necesita.