Skip to main content

Phone

Definition

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

Get Phones

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

Get Phone

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

Apply Phone.ID

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

Create Phone

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

success status: 201

Update Phone

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

Update Phone Partial

curl -X PATCH "https://${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
info
phone.json
{
"userID": 0,
"phoneNumber": "",
"phoneVerifiedAt": "",
"status": 0,
}

Update Phone Status

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

Destroy Phone

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