跳到正文

证件照换装(有水印)

根据制作结果的 pic_id 更换服装,返回带水印结果,可继续获取无水印证件照。

接口地址:https://api.zjzapi.com/idcardv5/clothe

请求方式:POST(application/x-www-form-urlencoded)

返回格式:json

接口费用:调用免费,可使用接口返回的"pic_id"获取无水印证件照。

请求参数:

名称 必填 类型 说明
key 是 string 应用的key
pic_id 是 string 制作接口返回的“pic_id”
clothe 是 string 服装key,《查看服装列表》

返回参数:

名称 类型 说明
code int 状态码
msg string 返回说明
data array 数据集

JSON返回示例:


{
    "data": {
        "pic_id": "9244614",
        "list": {
             "blue": "http://demo.com/pic/20200511/913191c8906ce81a2107d6ff5157c014/white.jpg"
        }
    },
    "code": 0,
    "msg": "success"
}

请求示例代码:

请替换占位值后在服务端运行;凭据和应用 key 不要放入浏览器代码。HTTP 成功后仍需按接口文档检查业务 code。

# Bash / zsh,cURL 7.76+;Windows 可使用 Git Bash 或 WSL。
curl --fail-with-body --max-time 60 --request POST 'https://api.zjzapi.com/idcardv5/clothe' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'key=YOUR_APP_KEY' \
  --data-urlencode 'pic_id=YOUR_PIC_ID' \
  --data-urlencode 'clothe=YOUR_CLOTHE_KEY'