İçeriğe geç
R-Service R-Service
Документация Р-Сервис

People - Addresses API

Bu içerik henüz dilinizde mevcut değil.

Tip : If you are looking for information on how to integrate Active Directory or another LDAP system with R-Service, please refer to the Directory Services page of the Import API .

List all addresses of a person with a specific ID:

GET /people/:id/addresses
Status: 200 OK
[
{
"address": "18 Kings Highway North",
"city": "Westport",
"label": "home",
"zip": "6880",
"country": "US",
"id": 34,
"state": "CT"
},
{
"address": "P.O. Box 15120",
"city": "Albany",
"label": "mailing",
"zip": "12212-5120",
"country": "US",
"id": 164,
"state": "NY"
}
]

The response contains these fields by default.

GET /people/:id/addresses/:id
Status: 200 OK
{
"address": "18 Kings Highway North",
"city": "Westport",
"label": "home",
"zip": "6880",
"country": "US",
"id": 34,
"state": "CT",
"integration": false
}

The response contains these fields .

Add an address to a person with a specific ID.

POST /people/:id/addresses

When creating a new address for a person these fields are available.

Status: 201 Created
{
"label": "home",
"...": "..."
}

The response contains all fields of the created address and is similar to the response in Get a single address of a person

Update an address of a person with a specific ID.

PATCH /people/:id/addresses/:address_id

When updating an existing address for a person these fields are available.

Status: 200 OK
{
"label": "home",
"...": "..."
}

The response contains all fields of the created address and is similar to the response in Get a single address of a person

Remove an address with a specific ID from a person with a specific ID.

DELETE /people/:id/addresses/:address_id
Status: 204 No Content

Remove all addresses from a person with a specific ID.

DELETE /people/:id/addresses/
Status: 204 No Content

address

Optional string (max 1024) — The address lines.

city

Optional string (max 128) — The city name.

country

Optional string (max 128) — The 2-letter country code.

id

Readonly integer — The unique ID of the address.

integration

Optional boolean , default: false — The Integration field is a hidden checkbox that can be set to true using this API or the Import functionality. When checked, the address is displayed as read-only in the user interface to prevent users from updating it.

label

Required enum — The Label of the address details. Valid values are:

  • home
  • mailing

state

Optional string (max 30) — The state name.

zip

Optional string (max 20) — The zip code.