跳到主要内容

Phone

Definition

phone.json
{
"id": 0,
"userID": 0,
"phoneNumber": "",
"phoneVerifiedAt": "",
"status": 0,
"createdAt": "",
"updatedAt": "",
}

Get Phones

curl -X GET "${baseUrl}/phone/?filter=${filter}&orderBy=${orderBy}&page=${page}&pageSize=${pageSize}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"

Get Phone

curl -X GET "${baseUrl}/phone/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"

Apply Phone.ID

curl -X POST "${baseUrl}/apply/phone/id/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"

Create Phone

curl -X POST "${baseUrl}/phone/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @phone.json
信息
phone.json
{
"userID": 0,
"phoneNumber": "",
"phoneVerifiedAt": "",
"status": 0,
}
提示

success status: 201

Update Phone

#!/bin/bash
curl -X PUT "${baseUrl}/phone/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @phone.json
信息
phone.json
{
"userID": 0,
"phoneNumber": "",
"phoneVerifiedAt": "",
"status": 0,
}

Patch Phone

curl -X PATCH "${baseUrl}/phone/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Attrs: userID,phoneNumber,phoneVerifiedAt,status" \
-d @phone.json
信息
phone.json
{
"userID": 0,
"phoneNumber": "",
"phoneVerifiedAt": "",
"status": 0,
}

Update Phone Status

curl -X PATCH "${baseUrl}/phone/${id}/status/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @phone.json
信息
phone.json
{
"status": 0
}

Destroy Phone

curl -X DELETE "${baseUrl}/phone/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"