Skip to main content

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
info
phone.json
{
"userID": 0,
"phoneNumber": "",
"phoneVerifiedAt": "",
"status": 0,
}
tip

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
info
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
info
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
info
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"