PhoneNumber
A phone number represents a single telephone number and location.
Example Request
curl https://api.planningcenteronline.com/people/v2/phone_numbers
Example Object
{
"type": "PhoneNumber",
"id": "1",
"attributes": {
"carrier": "string",
"country_code": "string",
"created_at": "2000-01-01T12:00:00Z",
"e164": "string",
"formatted_number": "string",
"international": "string",
"location": "string",
"national": "string",
"number": "string",
"primary": true,
"updated_at": "2000-01-01T12:00:00Z"
},
"relationships": {
"person": {
"data": {
"type": "Person",
"id": "1"
}
}
}
}
Attributes
| Name | Type | Description |
|---|---|---|
carrier |
string |
|
country_code |
string |
|
created_at |
date_time |
|
e164 |
string |
|
formatted_number |
string |
Only available when requested with the |
id |
primary_key |
|
international |
string |
|
location |
string |
|
national |
string |
|
number |
string |
|
primary |
boolean |
|
updated_at |
date_time |
Relationships
| Name | Type | Association Type | Note |
|---|---|---|---|
| person | Person | to_one |
Order By
| Parameter | Value | Type | Description |
|---|---|---|---|
| order | carrier | string | prefix with a hyphen (-carrier) to reverse the order |
| order | created_at | string | prefix with a hyphen (-created_at) to reverse the order |
| order | location | string | prefix with a hyphen (-location) to reverse the order |
| order | number | string | prefix with a hyphen (-number) to reverse the order |
| order | primary | string | prefix with a hyphen (-primary) to reverse the order |
| order | updated_at | string | prefix with a hyphen (-updated_at) to reverse the order |
Query By
| Name | Parameter | Type | Description | Example |
|---|---|---|---|---|
| carrier | where[carrier] |
string | Query on a specific carrier |
?where[carrier]=string |
| created_at | where[created_at] |
date_time | Query on a specific created_at |
?where[created_at]=2000-01-01T12:00:00Z |
| location | where[location] |
string | Query on a specific location |
?where[location]=string |
| number | where[number] |
string | Query on a specific number |
?where[number]=string |
| primary | where[primary] |
boolean | Query on a specific primary |
?where[primary]=true |
| updated_at | where[updated_at] |
date_time | Query on a specific updated_at |
?where[updated_at]=2000-01-01T12:00:00Z |
Pagination
| Name | Parameter | Type | Description |
|---|---|---|---|
| per_page | per_page | integer | how many records to return per page (min=1, max=100, default=25) |
| offset | offset | integer | get results from given offset |
Endpoints
Listing
| HTTP Method | Endpoint |
|---|---|
| GET | /people/v2/phone_numbers |
Reading
| HTTP Method | Endpoint |
|---|---|
| GET | /people/v2/phone_numbers/{id} |
Creating
| HTTP Method | Endpoint | Assignable Attributes |
|---|---|---|
| POST | /people/v2/people/{person_id}/phone_numbers |
|
Updating
| HTTP Method | Endpoint | Assignable Attributes |
|---|---|---|
| PATCH | /people/v2/phone_numbers/{id} |
|
Deleting
| HTTP Method | Endpoint |
|---|---|
| DELETE | /people/v2/phone_numbers/{id} |
Belongs To
| HTTP Method | Endpoint | Association | Details | Filter By |
|---|---|---|---|---|
| GET | https://api.planningcenteronline.com/people/v2/phone_numbers |
Organization | ||
| GET | https://api.planningcenteronline.com/people/v2/people/{person_id}/phone_numbers |
Person |