接口地址:https://way.jd.com/LeQiTechnology/ID_photo_quality_verification_and_production |
---|
返回格式:json |
请求方式:get/post |
请求示例:https://way.jd.com/LeQiTechnology/ID_photo_quality_verification_and_production?appkey=ak |
名称 | 类型 | 必填 | 说明 |
---|---|---|---|
appkey | string | 必填 | 平台申请的appkey 扫码关注公众号 |
body | json | 必填 | body |
名称 | 类型 | 说明 |
---|---|---|
file_name_print_wm | array | 带水印排版照url列表 |
check_result | object | 检测结果 |
clothes_similar | number | 服装相似检测 |
face_noise | number | 脸部噪点检测 |
headpose_pitch | number | 头部姿态检测 |
headpose_yaw | number | 头部姿态检测 |
sight_line | number | 视线自然检测 |
face_blur | number | 脸部模糊检测 |
shoulder_equal | number | 肩膀等宽检测 |
photo_format | number | 照片格式检测 |
eyes_close | number | 闭眼检测 |
file_size | number | 文件大小检测 |
px_and_mm | number | 像素和毫米尺寸检测 |
face_center | number | 脸部居中检测 |
spec_id | number | 规格id |
facial_pose | number | 脸部姿态 |
name | string | 规格名称 |
headpose_roll | number | 头部姿态 |
file_name_wm | array | 带水印单张照url列表 |
size | array | 像素尺寸 |
file_name | array | 单张照名称列表 |
check | number | 脸颊 |
is_print | number | 是否有排版照 |
size_print | array | 排版照像素尺寸 |
{
"code": "10000",
"charge": false,
"msg": "查询成功",
"result": {
"result": {
"file_name_print_wm": [
"https://testleqi.oss-cn-shanghai.aliyuncs.com/result_wm/a7ee0c3a70a611e9a37e00163e0070b6red3_print_wm.jpg?Expires=1557219971&Signature=Is0BjAE5JApbs+dWUHK19t+i9R8=&OSSAccessKeyId=LTAIQ8Lif1HHVkXd"
],
"check_result": {
"clothes_similar": 1,
"face_noise": 1,
"headpose_pitch": 1,
"headpose_yaw": 1,
"sight_line": 1,
"face_blur": 1,
"shoulder_equal": 1,
"photo_format": 1,
"eyes_close": 1,
"file_size": 1,
"px_and_mm": 1,
"face_center": 1,
"spec_id": 360,
"facial_pose": 1,
"name": "公共英语考试(二寸)",
"headpose_roll": 1
},
"file_name_wm": [
"https://testleqi.oss-cn-shanghai.aliyuncs.com/result_wm/a7ee0c3a70a611e9a37e00163e0070b6red3_wm.jpg?Expires=1557219971&Signature=BkjWPKcBnLlB+c+IukVTw+GzYtg=&OSSAccessKeyId=LTAIQ8Lif1HHVkXd"
],
"size": [
413,
531
],
"file_name": [
"a7ee0c3a70a611e9a37e00163e0070b651504red3"
],
"check": 1,
"is_print": 1,
"size_print": [
1795,
1205
]
},
"code": 200
}
}
错误码 | 说明 |
---|---|
10001 | 错误的请求appkey |
11010 | 商家接口调用异常,请稍后再试 |
11030 | 商家接口返回格式有误 |
10003 | 不存在相应的数据信息 |
10004 | URL上appkey参数不能为空 |
10010 | 接口需要付费,请充值 |
10020 | 万象系统繁忙,请稍后再试 |
10030 | 调用万象网关失败, 请与万象联系 |
10040 | 超过每天限量,请明天继续 |
10050 | 用户已被禁用 |
10060 | 提供方设置调用权限,请联系提供方 |
10070 | 该数据只允许企业用户调用 |
10090 | 文件大小超限,请上传小于1M的文件 |
<?php
/**
* Created by PhpStorm.
* User: FZS
* Time: 2021/01/01 21:26
*/
class freeApi
{
private $apiUrl;
public function __construct()
{
$this->apiUrl = 'https://way.jd.com/LeQiTechnology/ID_photo_quality_verification_and_production?appkey=ak';
}
/**
* 获取结果
* @return array
*/
public function getResult()
{
return file_get_contents($this->apiUrl);
}
}
package main
import (
"fmt"
"io/ioutil"
"log"
"net/http"
)
const (
APIURL = "https://way.jd.com/LeQiTechnology/ID_photo_quality_verification_and_production?appkey=ak"
)
func main() {
queryUrl := fmt.Sprintf("%s",APIURL)
resp, err := http.Get(queryUrl)
if err != nil {
log.Println(err)
return
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}