Back to top

airchn API 接口文档

会员管理

会员列表

会员列表
POST/api/member/list{?page,ticket}

Example URI

POST /api/member/list?page=&ticket=
URI Parameters
HideShow
page
number1 (required) 

页码, 整型 第一页默认 1 必填

ticket
string (required) 

随机会话标识

Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "success": true,
  "err_code": "888888",
  "err_msg": "错误说明",
  "data": {
    "members": [
      {
        "memberAddress": "UA-{Random UUID}",
        "email": "demo@gmail.com"
      }
    ],
    "page": {
      "page": 1,
      "totalCount": 1
    }
  }
}
Schema
{
   "data": {
        "members": [
                           {
                               "memberAddress": "会员地址标识,字符串,UA-加上一个随机的UUID",
                               "email": "会员email,字符串"
                           }
                           ],
        "page": {
            "page": "当前页数,整数从1 开始,每页为10个会员",
            "totalCount": "会员总数,整数"
        }
}

发送验证码

发送验证码
POST/api/member/sendcode{?email,ticket}

Example URI

POST /api/member/sendcode?email=&ticket=
URI Parameters
HideShow
email
string (required) 

会员的email

ticket
string (required) 

随机会话标识

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
    "success": true,
    "err_code": "888888",
    "err_msg": "错误说明",
}

口令重置

口令重置
POST/api/member/restpwd{?email,ticket,code,password}

Example URI

POST /api/member/restpwd?email=&ticket=&code=&password=
URI Parameters
HideShow
email
string (required) 

会员时的email

ticket
string (required) 

随机会话标识

code
string (required) 

发送到email的code

password
string (required) 

注册时口令,数字,字母,其他可见ASIIC码

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
    "success": true,
    "err_code": "888888",
    "err_msg": "错误说明",
}

会员注册

会员注册
POST/api/member/register{?email,reffer,code,password,ticket}

Example URI

POST /api/member/register?email=&reffer=&code=&password=&ticket=
URI Parameters
HideShow
email
string (required) 

会员注册时需提供的email ,不能重复

reffer
string (optional) 

介绍人email,可选

code
string (required) 

发送到邮箱的验证码

password
string (required) 

注册时口令,数字,字母,其他可见ASIIC码

ticket
string (required) 

随机会话标识

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "success": true,
  "err_code": "888888",
  "err_msg": "错误说明",
  "data": {
    "member": [
      {
        "memberAddress": "UA-{Random UUID}",
        "email": "demo@gmail.com"
      }
    ]
  }
}

会员登陆

会员登陆
POST/api/member/login{?email,password,ticket}

Example URI

POST /api/member/login?email=&password=&ticket=
URI Parameters
HideShow
email
string (required) 

会员的email

password
string (required) 

注册时口令,数字,字母,其他可见ASIIC码

ticket
string (required) 

随机会话标识

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "success": true,
  "err_code": "888888",
  "err_msg": "错误说明",
  "data": {
    "ticket": "随机会话标识"
  }
}

会员退出

会员退出
POST/api/member/logout{?email,ticket}

Example URI

POST /api/member/logout?email=&ticket=
URI Parameters
HideShow
email
string (required) 

会员的email

ticket
string (required) 

随机会话标识

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "success": true,
  "err_code": "888888",
  "err_msg": "错误说明",
  "data": {
    "ticket": "随机会话标识"
  }
}

会员详情

会员详情
POST/api/member/detail{?email,ticket}

Example URI

POST /api/member/detail?email=&ticket=
URI Parameters
HideShow
email
string (required) 

会员的email

ticket
string (required) 

随机会话标识

Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "success": true,
  "err_code": "888888",
  "err_msg": "错误说明",
  "data": {
    "member": {
      "memberAddress": "UA-{Random UUID}",
      "email": "demo@gmail.com",
      "memberId": "1111-5555-6666-8888",
      "ewalletAddress": "0x1ae89a1a62edde3045b052fda6187dc3a1c579fd",
      "mobilePhoneCC": "1",
      "mobilePhone": "7783023692",
      "name": "Ping He",
      "mailAddress": "78 120 st Surrey BC",
      "mailZipCode": "V3W 2S8"
    }
  }
}

会员积分

积分信息

积分信息
POST/api/point/detail{?email,ticket}

Example URI

POST /api/point/detail?email=&ticket=
URI Parameters
HideShow
email
string (required) 

会员的email

ticket
string (required) 

随机会话标识

Response  201
HideShow
Headers
Content-Type: application/json
Body
{
    "success": true,
    "err_code": "888888",
    "err_msg": "错误说明"
    "data": {
        "point": {
          "memberAddress": "UA-{Random UUID}",
          "email": "demo@gmail.com",
          "balance": 38.98,
        }
    }
}

积分购买

积分购买
POST/api/point/buy{?email,ticket,pointNum}

Example URI

POST /api/point/buy?email=&ticket=&pointNum=
URI Parameters
HideShow
email
string (required) 

会员的email

ticket
string (required) 

随机会话标识

pointNum
number1 (required) 

要购买的积分数

Response  201
HideShow
Headers
Content-Type: application/json
Body
{
    "success": true,
    "err_code": "888888",
    "err_msg": "错误说明"
    "data": {
        "point": {
          "memberAddress": "UA-{Random UUID}",
          "email": "demo@gmail.com",
          "txBuy": "TX-BUY-{Random UUID}",
          "txInfo": "buy member point",
          "status": "PROCESSING"
        }
    }
}

会员积分交易记录

会员积分交易记录
POST/api/point/history{?email,ticket,page}

Example URI

POST /api/point/history?email=&ticket=&page=
URI Parameters
HideShow
page
number1 (required) 

页码, 整型 第一页默认 1 必填

ticket
string (required) 

随机会话标识

email
string (required) 

会员注册时需提供的email

Response  201
HideShow
Headers
Content-Type: application/json
Body
{
    "success": true,
    "err_code": "888888",
    "err_msg": "错误说明",
    "data": {
        "history": [
        {
          "fromMemberAddress": "UA-{Random UUID}",
          "fromEmail": "demo@gmail.com",
          "entryTX": "TX-ET-{Random UUID}",
          "tx": "TX-{Random UUID}",
          "toMemberAddress": "UA-{Random UUID}",
          "toEmail": "demo@gmail.com",
          "fromBalanceBegin": 38.98,
          "fromBalanceFinish": 32.98,
          "toBalanceBegin": 20.21,
          "toBalanceFinish": 26.21,
          "status": "FINISH",
          "type": "PAY"
        },
        {
          "fromMemberAddress": "UA-{Random UUID}",
          "fromEmail": "demo@gmail.com",
          "entryTX": "TX-ET-{Random UUID}",
          "tx": "TX-{Random UUID}",
          "toMemberAddress": "UA-{Random UUID}",
          "toEmail": "demo@gmail.com",
          "fromBalanceBegin": 26.21,
          "fromBalanceFinish": 16.00,
          "toBalanceBegin": 10.21,
          "toBalanceFinish": 20.42,
          "status": "FINISH",
          "type": "FEE",
        },
        ],
        "page": {
            "page": 1,
            "totalCount": 1
        }
    }
}

回馈积分

回馈积分
POST/api/point/feedback{?email,ticket,eventId}

Example URI

POST /api/point/feedback?email=&ticket=&eventId=
URI Parameters
HideShow
email
string (required) 

会员的email

ticket
string (required) 

随机会话标识

eventId
string (required) 

回馈积分的事件ID,相关记录有可回馈的积分值和相关限制的信息

Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "success": true,
  "err_code": "888888",
  "err_msg": "错误说明"
}

会员积分转移

会员积分转移
POST/api/point/transfer{?email,ticket,toEmail,pointNum}

Example URI

POST /api/point/transfer?email=&ticket=&toEmail=&pointNum=
URI Parameters
HideShow
email
string (required) 

会员的email

ticket
string (required) 

随机会话标识

toEmail
string (required) 

接收方email

pointNum
number1 (required) 

要转移的数量

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "success": true,
  "err_code": "888888",
  "err_msg": "错误说明",
  "data": {
    "transaction": {
      "entryTX": "TX-ET-{Random UUID}",
      "tx": "TX-{Random UUID}",
      "status": "FINISH"
    }
  }
}

积分交易详情

积分交易详情
POST/api/point/transaction{?email,ticket,tx}

Example URI

POST /api/point/transaction?email=&ticket=&tx=
URI Parameters
HideShow
email
string (required) 

会员的email

ticket
string (required) 

随机会话标识

tx
string (required) 

交易记录UUID

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "success": true,
  "err_code": "888888",
  "err_msg": "错误说明",
  "data": {
    "transaction": {
      "fromMemberAddress": "UA-{Random UUID}",
      "fromEmail": "demo@gmail.com",
      "entryTX": "TX-ET-{Random UUID}",
      "tx": "TX-{Random UUID}",
      "toMemberAddress": "UA-{Random UUID}",
      "toEmail": "demo@gmail.com",
      "fromBalanceBegin": 26.21,
      "fromBalanceFinish": 16.00,
      "toBalanceBegin": 10.21,
      "toBalanceFinish": 20.42,
      "status": "FINISH",
      "type": "PAY",
    }
  }
}

代币

代币转移

代币转移
POST/api/token/transfer{?email,ticket,tokenNum}

Example URI

POST /api/token/transfer?email=&ticket=&tokenNum=
URI Parameters
HideShow
email
string (required) 

会员的email

ticket
string (required) 

随机会话标识

tokenNum
number1 (required) 

要转移的代币

Response  201
HideShow
Headers
Content-Type: application/json
Body
{
    "success": true,
    "err_code": "888888",
    "err_msg": "错误说明"
    "data": {
        "point": {
          "memberAddress": "UA-{Random UUID}",
          "email": "demo@gmail.com",
          "balance": 38.98,
          "ewalletAddress": "0x1ae89a1a62edde3045b052fda6187dc3a1c579fd",
          "tokenTransfered": 5.00,
          "gasCost": 0.02,
          "tokenTX": "TX-TOKEN-{Random UUID}",
        }
    }
}

代币转移交易记录

代币转移交易记录
POST/api/token/txlist{?email,ticket,page}

Example URI

POST /api/token/txlist?email=&ticket=&page=
URI Parameters
HideShow
page
number1 (required) 

页码, 整型 第一页默认 1 必填

ticket
string (required) 

随机会话标识

email
string (required) 

会员注册时需提供的email

Response  201
HideShow
Headers
Content-Type: application/json
Body
{
    "success": true,
    "err_code": "888888",
    "err_msg": "错误说明",
    "data": {
        "history": [
        {
          "memberAddress": "UA-{Random UUID}",
          "email": "demo@gmail.com",
          "tokenTX": "TX-TOKEN-{Random UUID}",
          "txHash": "0x3e4f5f8ecd7787e0194c1c7012f669fa2b40a30f8e8e50bfe550fee7a8c4b7a8",
          "fromEwalletAddress": "0x1aE89A1A62eDdE3045b052fDa6187dC3A1C579FD",
          "toEwalletAddress": "0xd271f97e6972c2fa9fcbd73420ec3040a284d52f",
          "tokenTransfered": 5.00,
          "txCost": 724740Gwei,
          "fromBalanceBegin": 200038.98,
          "fromBalanceFinish": 200033.98,
          "toBalanceBegin": 20.21,
          "toBalanceFinish": 25.21,
          "gasTokenCost": 0.02,
          "fromBalanceBegin": 35.27,
          "fromBalanceFinish": 30.25,
          "status": "FINISH",
          "type": "TRANSFER"
        }
        ],
        "page": {
            "page": 1,
            "totalCount": 1
        }
    }
}

代币转移交易记录详情

代币转移交易记录详情
POST/api/token/txdetail{?email,ticket,tokenTX}

Example URI

POST /api/token/txdetail?email=&ticket=&tokenTX=
URI Parameters
HideShow
ticket
string (required) 

随机会话标识

email
string (required) 

会员的email

tokenTX
string (required) 

代币转移的交易记录标识

Response  201
HideShow
Headers
Content-Type: application/json
Body
{
    "success": true,
    "err_code": "888888",
    "err_msg": "错误说明",
    "data": {
        "memberAddress": "UA-{Random UUID}",
        "email": "demo@gmail.com",
        "tokenTX": "TX-TOKEN-{Random UUID}",
        "txHash": "0x3e4f5f8ecd7787e0194c1c7012f669fa2b40a30f8e8e50bfe550fee7a8c4b7a8",
        "fromEwalletAddress": "0x1aE89A1A62eDdE3045b052fDa6187dC3A1C579FD",
        "toEwalletAddress": "0xd271f97e6972c2fa9fcbd73420ec3040a284d52f",
        "tokenTransfered": 5.00,
        "txCost": 724740Gwei,
        "fromBalanceBegin": 200038.98,
        "fromBalanceFinish": 200033.98,
        "toBalanceBegin": 20.21,
        "toBalanceFinish": 25.21,
        "gasTokenCost": 0.02,
        "fromBalanceBegin": 35.27,
        "fromBalanceFinish": 30.25,
        "status": "FINISH",
        "type": "TRANSFER"
    }
}

交易支付

stripe支付处理

stripe支付处理
POST/api/payment/stripe{?email,ticket,txBuy,stripeToken}

Example URI

POST /api/payment/stripe?email=&ticket=&txBuy=&stripeToken=
URI Parameters
HideShow
email
string (required) 

会员的email

ticket
string (required) 

随机会话标识

txBuy
string (required) 

积分购买事务号

stripeToken
string (required) 

stripe 服务器提供的token

Response  201
HideShow
Headers
Content-Type: application/json
Body
{
    "success": true,
    "err_code": "888888",
    "err_msg": "错误说明"
    "data": {
        "point": {
          "memberAddress": "UA-{Random UUID}",
          "email": "demo@gmail.com",
          "stripeId" "ch_1CmnvD2eZvKYlo2Co8bPzmg6"
          "amount": 20.00,
          "point": 10.00
          "balance": 38.98,
        }
    }
}

Generated by aglio on 13 Jul 2018