Skip to content

Instantly share code, notes, and snippets.

@bowin
Last active March 6, 2017 23:41
Show Gist options
  • Save bowin/06460e90bbfc266514041ce338deb730 to your computer and use it in GitHub Desktop.
Save bowin/06460e90bbfc266514041ce338deb730 to your computer and use it in GitHub Desktop.
试戴第三方接口文档.md

试戴第三方接口文档

具有开发能力的试戴客户,可以将自有商品通过本文档提供的接口接入eglass试戴系统

保存试戴图片接口

  • url
    'https://epeijing.cn/api/save-try-images'
  • method
    'POST'
  • body为application/json,格式如下
{
 id: 231,                                          // 必填, 自有商品的id
 owner: '15652813691'                            //  必填 客户在试戴分配的账号(手机号)
 brand: '雷朋',                                    //  必填 眼镜的品牌
 category: '防蓝光'                                //  必填 眼镜系列
 sn: '型号'                                      //  必填 型号
 color: '色号',                                    //  必填 必填
 img_face: 'data:image/png;base64,iVBORw0KG...',  //  必填 镜面透明图 图片的base64编码字符串, <500k
 img_leg: 'data:image/png;base64,iVBORw0KG...',   //  必填 镜腿透明图 图片的base64编码字符串  <500k
 img_thumb: 'data:image/png;base64,iVBORw0KG...', //  必填 详情透明图 图片的base64编码字符串  <500k
 img_detail_0: 'data:image/png;base64,iVB...',    //  选填 详情透明图第1个 <500k
 img_detail_1: 'data:image/png;base64,iVB...',    //  选填 详情透明图第2个 <500k
 img_detail_2: 'data:image/png;base64,iVB...',    //  选填 详情透明图第3个 <500k
 img_detail_3: 'data:image/png;base64,iVB...',    //  选填 详情透明图第4个 <500k
}

返回json

{
 id: 11244                                      // 此商品在试戴系统的id
 qr_url: 'https://epeijing.cn/api/TTzRB'        // 试戴二维码短链接
}

试戴上线/下线

  • url 'https://epeijing.cn/api/toggle-try'
  • method
    'POST'
  • body为application/json,格式如下
 {
  owner: '15652813691'                          //  必填 客户在试戴分配的账号(手机号)
  id: 231,                                      // 必填, 自有商品的id
  on_line: true                                 // 必填,设置上线状态,true为上线
 }

必须在调用过【保存试戴图片接口】的商品上使用。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment