# JPro Bind API
# Step 8.4 (call api from backend)
- endpoint: https://2823.api.gosu.bar/customize/hcp-binded
- method: POST
- headers:
- content-type: application/json
- body:
```json=
{
// LINE user id (from LINE LOGIN)
line_id: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
// HCP's mobile #
mobile: "0912345678",
// HCP's SFDC ID
sfdc_id: "001",
// The current time is used to ensure that there is no man-in-the-middle attack during data transmission
// Is the number of milliseconds since 1970/01/01 00:00:00 UTC
timestamp: 1625538793075,
// Sort all field names (ASCII), and then concatenate their values & secret
// Finally, use md5 to hash the string.
// The data format is HEX with a total of 32 characters
checksum: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}
```
### Generate checksum simple code(PHP):
https://www.tehplayground.com/eYoWlq76DLV62Vuj
### Response detail:
```json=
{
"statusCode": 200,
"code": "SUCCESS",
"message": "成功儲存使用者資料"
}
```
```json=
{
"statusCode": 400,
"code": "PROFILE_NOT_EXIST",
"message": "指定使用者不存在"
}
```
```json=
{
"statusCode": 401,
"code": "TIMESTAMP_OVER_TIME",
"message": "Timestamp 欄位超過時間限制(5分鐘)"
}
```
```json=
{
"statusCode": 401,
"code": "CHECKSUM_VERIFY_FAILED",
"message": "檢查碼驗證錯誤"
}
```
# Step 8.4 (front end redirect)
dev success redirect endpoint: https://2823.api.gosu.bar/customize/binded-success
type: GET