Query logistics company information, Taobao erp, remark interface, billing interface and delivery interface

Keywords: api erp

Query logistics company information

Interface address:   http://api.vv-tool.com/tool/erps/companies

Interface introduction:   Batch query logistics orders and return the logistics information status details of orders   Click to view details

Request method:   POST

Return format:   JSON

Interface charges:   Deduction account balance

Frequency limit:   10 times / second

Request header parameters

parametertypeMandatory valueExample
AuthorizationstringyesAuthorize access_tokenBearer 1798c6aadec33d1bc2f5b707f1049aefexxxx

Request parameters

parametertypeMandatory describe
fieldsString[]yesList of fields to return. Optional values: all fields in the LogisticCompany structure; Multiple fields are separated by "," commas. For example: id,code,name,reg_mail_no description: id: logistics company ID code: logistics company code name: logistics company name reg_mail_no: the corresponding waybill rules of the logistics company
is_recommendedBooleannoWhether to query the recommended logistics company. Optional values: true,false. If this parameter is not provided, all logistics companies supporting telephone contact will be returned.
order_modestringnoRecommend the order placement method of the logistics company. Optional values: offline (telephone contact / self contact), online (online order), all (i.e. telephone contact and online order). This parameter is only used for is_ When recommended is true. In other words, it is only available for recommended logistics companies. If this parameter is not selected, the logistics company that supports telephone contact in the recommended logistics will be returned.
vvtypeintnoNormal version 1, default version 1 is not transmitted, enhanced version 2, and enhanced version 2 needs to be transmitted

Request example

fields:id,code,name,reg_mail_no

Request code example

cURL request code example

curl --location --request POST 'http://api.vv-tool.com/tool/erps/companies' \
--header 'Authorization: Bearer 1798c6aadec33d1bc2f5b707f1049aefexxxx' \
--header 'Cookie: __yjs_duid=1_dee3bfba5b90592372d209eda95c772a1616035269331; PHPSESSID=eg6rdq9svo8iisp0qdn8de28ds; _csrf=28d4b1b6a1a8187c94992e5c050d1d0c86b827c40735e28f2ae103584e094711a%3A2%3A%7Bi%3A0%3Bs%3A5%3A%22_csrf%22%3Bi%3A1%3Bs%3A32%3A%2252FhR6NNpbAyiE0zgVtqOXqPgIGWS7QY%22%3B%7D' \
--form 'fields="id,code,name,reg_mail_no"'

PHP request code example

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'http://api.vv-tool.com/tool/erps/companies',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => array('fields' => 'id,code,name,reg_mail_no'),
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer 1798c6aadec33d1bc2f5b707f1049aefexxxx',
    'Cookie: __yjs_duid=1_dee3bfba5b90592372d209eda95c772a1616035269331; PHPSESSID=eg6rdq9svo8iisp0qdn8de28ds; _csrf=28d4b1b6a1a8187c94992e5c050d1d0c86b827c40735e28f2ae103584e094711a%3A2%3A%7Bi%3A0%3Bs%3A5%3A%22_csrf%22%3Bi%3A1%3Bs%3A32%3A%2252FhR6NNpbAyiE0zgVtqOXqPgIGWS7QY%22%3B%7D'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;


JAVA request code example

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
  .addFormDataPart("fields","id,code,name,reg_mail_no")
  .build();
Request request = new Request.Builder()
  .url("http://api.vv-tool.com/tool/erps/companies")
  .method("POST", body)
  .addHeader("Authorization", "Bearer 1798c6aadec33d1bc2f5b707f1049aefexxxx")
  .addHeader("Cookie", "__yjs_duid=1_dee3bfba5b90592372d209eda95c772a1616035269331; PHPSESSID=eg6rdq9svo8iisp0qdn8de28ds; _csrf=28d4b1b6a1a8187c94992e5c050d1d0c86b827c40735e28f2ae103584e094711a%3A2%3A%7Bi%3A0%3Bs%3A5%3A%22_csrf%22%3Bi%3A1%3Bs%3A32%3A%2252FhR6NNpbAyiE0zgVtqOXqPgIGWS7QY%22%3B%7D")
  .build();
Response response = client.newCall(request).execute();

Response parameters

parametertypedescribe
codeintError code 0 is success
msgstringReturn code description
msecintInterface execution time
timeintInterface return time
idintIdentification of logistics company
codeStringIdentification of logistics company
nameStringAbbreviation of logistics company
reg_mail_noStringWaybill number validation regular expression
withholding_moneyintDeduction amount of this interface (counting coupons)

Return data

{
           "code": 0,
           "msg": "success",
           "msec": 1193,
           "time": 1612416107,
           "data":[
                {
								    "withholding_money": 1,
                    "id":44555,
                    "code":"AB15555",
                    "name":"pingpaiming",
                    "reg_mail_no":"^[0-9]{12}$"
                }
            ]
           
     
}

Response code

codeCode descriptionSolution
0success
100Request parameter errorCheck whether your request parameters are correct
101The request timed out. Please try againCheck your network or contact customer service for solutions
103Wangwang account does not existCheck whether the Wangwang number you entered is correct
200System error, please contact customer serviceCheck whether your interface address is filled in correctly, and contact customer service for other problems
202System error, please try again laterTry again later, or contact the docking group
203The current interface is not supported
204Request exception: no permission for this interface, please go to the official website to open an official interface.Go to the official website to open the interface permission
204Request exception: the number of API calls is insufficient. Please go to the website to redeem the number.Go to the official website to recharge the number of calls of the interface
401Invalid identity certificateAdd access to the request header_ Token, update the token again
404Request path or request mode errorPlease change the request mode or check whether the path is correct

Posted by Niccaman on Wed, 03 Nov 2021 19:39:55 -0700