Difference between revisions of "Retrieve the Specific Contact Phone Based on ContactId"

From docs
Jump to: navigation, search
(Created page with "== Get Specific Contact Phone == === Base URL === https://apimobile.callproof.com === Endpoint === /api/contacts/{id}/phone/{phone_id} === Purpose === Retrieves a single ph...")
 
(Successful Response (200))
 
Line 39: Line 39:
 
==== Request Body ====
 
==== Request Body ====
 
None.
 
None.
 +
 +
=== cURL Example for Android ===
 +
<pre>
 +
curl --location 'https://apimobile.callproof.com/api/contacts/{id}/phone/{phone_id}' \
 +
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN'
 +
</pre>
 +
=== cURL Example for iOS ===
 +
<pre>
 +
curl --location 'https://apimobile.callproof.com/api/contacts/{id}/phone/{phone_id}' \
 +
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN'
 +
</pre>
  
 
=== Successful Response (200) ===
 
=== Successful Response (200) ===

Latest revision as of 09:05, 17 July 2026

Get Specific Contact Phone

Base URL

https://apimobile.callproof.com

Endpoint

/api/contacts/{id}/phone/{phone_id}

Purpose

Retrieves a single phone number for a contact, including phone type, formatted number, country code, extension, and any people (personnel) linked to that phone.

HTTP Method

GET

Headers

Header Required Description
Authorization Yes Bearer access token

Security

  • Yes – Requires Bearer Token authentication.

Parameters

Path Parameters

Parameter Type Required Description
id integer Yes Unique identifier of the contact
phone_id integer Yes Unique identifier of the phone number to retrieve

Query Parameters

None.

Request Body

None.

cURL Example for Android

curl --location 'https://apimobile.callproof.com/api/contacts/{id}/phone/{phone_id}' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN'

cURL Example for iOS

curl --location 'https://apimobile.callproof.com/api/contacts/{id}/phone/{phone_id}' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN'

Successful Response (200)

Returns the phone details for the given contact and phone ID.

Field Type Description
clientStatusCode integer Status indicator for the client (for example, 200)
user_id integer Identifier of the authenticated user
company_id integer Identifier of the authenticated user’s company
data object Phone detail payload (see below)
uri string Requested resource URI

data.contact_phone_Detail

Field Type Description
contact_name string Company / contact name associated with the phone
phone_id integer Unique identifier of the phone record
phone_type_id integer Phone type identifier
phone_type_name string Phone type display name (for example, Cell, Work)
phone_number string Formatted phone number
phone_extension string Main extension for the phone number
phone_country_code string Country / dialing code for the phone number
contact_personnel array List of people linked to this phone (see below)

data.contact_phone_Detail.contact_personnel[]

Field Type Description
personnel_id integer Unique identifier of the linked person
personnel_name string Full name of the linked person
extension string Extension for that person on this phone (included when available)

Error Responses

Status Code Meaning
400 Bad Request – the phone could not be retrieved (for example, invalid contact/phone combination)
401 Unauthorized – missing, invalid, or expired Bearer token
  • 400 – The requested phone could not be loaded for the given contact.
  • 401 – Authentication failed or the access token is missing/expired.