Закупка в Китае, доставка по всему миру, ваш путь к успеху в бизнесе

English \ العربية \ русский язык

Введение в сервис:
В этом документе описываются точки интеграции, доступные клиентам через API www.shopv.com, которые позволяют синхронизировать данные клиентской системы с системой www.shopv.com..
адрес интерфейса
https://api.shopv.com/orders-info
метод запроса:
GET
параметры запроса (заголовки):
Параметры запроса (urlParam)
Запросить дело:
                        
<?php
    $ch = curl_init();
    $url = 'https://api.shopv.com/orders-info?page=1&page_size=250&start=2019-01-01&end=2019-01-31';
    $header = array(
            'apikey: your apikey',
    );
    // Add apikey to header
    curl_setopt($ch, CURLOPT_HTTPHEADER  , $header);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    // HTTP request
    curl_setopt($ch , CURLOPT_URL , $url);
    $res = curl_exec($ch);

    var_dump(json_decode($res));
?>
                        
                    
Пример возврата JSON:
                        
{
    "code": 0,
    "msg": "success",
    "data": {
        "page": "1",
        "page_size": 250,
        "page_count": 12,
        "order_count": "2966",
        "order_infos": [{
            "order_id": "#1010",
            "first_name": "cn",
            "last_name": "lei",
            "ship_address1": "8888 Parkland",
            "ship_address2": "",
            "ship_city": "BEEVILLE",
            "ship_state": "TX",
            "ship_zip": "8888",
            "ship_country": "United States",
            "ship_phone": "8888888888",
            "ship_email": "[email protected]",
            "quantity": "2",
            "remark": "",
            "date_added": "2019-01-28 09:32:57",
            "info":[
                    {"sku":"sku-001","sku_code":"12345601","quantity":"1","tracking_number":"LN00001","shipping_method":"SF","package_number":"N10001","product_name":"shirt","product_url":"https:\/\/item.taobao.com\/item.htm?spm=a1z10.33-c.w4002-12426177414.14.bqhm4D&id=39906160111","color":"Pansy","size":"XS","category":"Fragile","supplier":"taobao"},
                    {"sku":"sku-002","sku_code":"12345602","quantity":"2","tracking_number":"LN00002","shipping_method":"SF","package_number":"N10002","product_name":"shirt","product_url":"https:\/\/item.taobao.com\/item.htm?spm=a1z10.33-c.w4002-12426177414.14.bqhm4D&id=39906160111","color":"Green Pansy","size":"XS","category":"Fragile","supplier":"taobao"}
                ]
            "freight": "10.00",
            "tracking_number": "dhl432564",
            "shipping_method": "DHL-EXPRESS",
            "order_status": "3"
            "carrier": "DHL"
        }, {
            "order_id": "#1011",
            "first_name": "Yumi",
            "last_name": "Lin",
            "ship_address1": "tiezailu",
            "ship_address2": "",
            "ship_city": "sz",
            "ship_state": "Guangdong",
            "ship_zip": "518000",
            "ship_country": "China",
            "ship_phone": "13631120555",
            "ship_email": "[email protected]",
            "quantity": "2",
            "remark": "",
            "date_added": "2019-01-29 15:17:17",
            "info":[
                    {"sku":"sku-001","sku_code":"12345601","quantity":"1","tracking_number":"LN00001","shipping_method":"SF","package_number":"N10001","product_name":"shirt","product_url":"https:\/\/item.taobao.com\/item.htm?spm=a1z10.33-c.w4002-12426177414.14.bqhm4D&id=39906160111","color":"Pansy","size":"XS","category":"Fragile","supplier":"taobao"},
                    {"sku":"sku-002","sku_code":"12345602","quantity":"2","tracking_number":"LN00002","shipping_method":"SF","package_number":"N10002","product_name":"shirt","product_url":"https:\/\/item.taobao.com\/item.htm?spm=a1z10.33-c.w4002-12426177414.14.bqhm4D&id=39906160111","color":"Green Pansy","size":"XS","category":"Fragile","supplier":"taobao"}
                ]
            "freight": "10.00",
            "tracking_number": "ems516546",
            "shipping_method": "EMS-EXPRESS",
            "order_status": "3"
                        "carrier": "EMS"
        }]
    }
}
                        
                    
Примечание:

order_status: current order's state

0: Processing, the parcel is being prepared.

1: Collected, the parcel has been collected by the courier company and the tracking number has been provided.

сообщение об ошибке: