Skip to content

3. Contacts

lockys edited this page Mar 8, 2016 · 22 revisions

GET /api/v1/accounts/{user-uuid}/contacts

  • 用途: 取得聯絡人
  • header:
    • apiKey(必要的)- API 鑰匙
  • parameter:
  • response:
  [
   {
    "userName": "Henry",
    "phoneNumber": "+886975531859",
    "location": "新竹",
    "profile": "我是人",
    "company": "高速網路實驗室",
    "profilePhotoId": "fddc2777-968e-4d82-9eac-ce5996efb835",
    "nickName": "亨利",
    "chargeType": 1,
    "availableStartTime": "00:00",
    "availableEndTime": "00:00",
    "isEnable": true,
    "qrCodeUuid": "1f5745da-6c6c-4b3f-ac94-20f4fb7ff4e6",
    "customerIcon": null
  }
 ]

POST/api/v1/accounts/{user-uuid}/contacts/{qrCodeUuid}

  • 用途: 新增一筆聯絡人
  • header:
    • apiKey(required)
  • payload:
    {
      "nickName": "nf Haung",
      "chargeType": 0 | number greater than 0, // icon|free and charge
      "availableStartTime": "",
      "availableEndTime": "",
      "isEnable": true | false,
    }
  • parameter:
  • response:
    • status:
      • 201 Created
      • 304 Not Modified (以加 Provider 為聯絡人)
    {}

PUT /api/v1/accounts/{user-uuid}/contacts/{qrCodeUuid}

  • 用途: 修改某聯絡人資料(包含可通話時段)
  • header:
    • apiKey(required)
  • payload: All are required.
    {
      "nickName": "nf Haung",
      "chargeType": 0 | number greater than 0, // icon|free and charge
      "availableStartTime": "",
      "availableEndTime": "",
      "isEnable": true | false,
    }
  • parameter:
  • response:
    • status:
      • 200 OK
    {}

DELETE /api/v1/accounts/{user-uuid}/contacts/{qrCodeUuid}

  • 用途: 刪除某筆聯絡人
  • header:
    • apiKey(required)
  • payload:
    {}
  • parameter:
  • response:
    • status:
      • 200 OK
    {}

POST /api/v1/accounts/{user-uuid}/calls

  • 用途: 打電話給對方
  • header:
    • apiKey(required)
  • payload:
    {
      "phoneNumber": "0932456212"
    }
  • parameter:
  • response:
    {}

Clone this wiki locally