PBX API : DELETE /Phonebooks/:id/Contacts/

To delete contacts in phone book, make an HTTP DELETE request with basic authorization, resource URI:

http(s)://{PBX}/api/v1/Phonebooks/:id/Contacts/

DELETE Parameters

Required Parameters

NamePossible valuesRequiredDescription

Optional Parameters:

NameDefaultPossible valuesDescription

search

  Search words
If searchFields is not specify , searching by following fields:

name
email
extension
phone
fax
mobile
organization

searchFields

nameid
name
email
extension
phone
office
home
home_mobile
fax
mobile
organization
picture
shortcut
phonebook_id
type
note
address
vat_id
name_prefix
document_type
document_id
pin
credit
hash
country
date_birth
born_in
postal_code
city
province
license_plate
document_released
document_from
last_update

Field to be searched, there may be several.

Maybe using with comma "," for listing all required fields

filter[$key]empty

filter[id]
filter[name]
filter[email]
filter[extension]
filter[phone]
filter[office]
filter[home]
filter[home_mobile]
filter[fax]
filter[mobile]
filter[organization]
filter[picture]
filter[shortcut]
filter[phonebook_id]
filter[type]
filter[note]
filter[address]
filter[vat_id]
filter[name_prefix]
filter[document_type]
filter[document_id]
filter[pin]
filter[credit]
filter[hash]
filter[country]
filter[date_birth]
filter[born_in]
filter[postal_code]
filter[city]
filter[province]
filter[license_plate]
filter[document_released]
filter[document_from]
filter[last_update]

Filtering by any field also can use range [from][to] for filtering

Example: 

DELETE http://{PBX}/api/v1/Phonebooks/5/Contacts/
 {

    "type":"result",
    "result":{
        "contacts":17043
    }
}