Contacts
Contacts#index
Retrieves all firm contacts
GET /contactsparameter
values
type
'Person' or 'Institution'
filter
'all'
Response:
Returns a 200 OK with an array of contacts:
[
{
"id": 1,
"first_name": "John",
"last_name": "Doe",
"middle_name": null,
"company_name": "",
"email": null,
"lead": false,
"lead_phone": null,
"created_at": "2020-04-02T23:49:19.738-05:00",
"updated_at": "2020-04-02T23:49:20.403-05:00",
"physical_address": {
"id": null,
"street_number_and_name": null,
"apartment_number": null,
"city": null,
"state": null,
"county": null,
"province": null,
"date_from": null,
"date_to": null,
"in_care_of": null,
"created_at": null,
"updated_at": null,
"country": null
}
}
]Contacts#show
Returns a single contact
Response:
Returns a 200 OK with a single contact:
Contacts#create
Creates a new contact. Keep in mind to send contact data inside a contact root key.
You should pass a JSON with the following parameters:
first_name stringmiddle_name stringlast_name stringemail stringtype 'Person' or 'Institution'lead booleanaddresses_attributes arraydata objectstreet_number_and_name stringapartment_number stringcity stringstate stringprovince stringzip_code stringphysical booleanmailing boolean
phone_numbers_attributesdatanumber stringdaytime boolean
Response:
Returns a 201 created.
Contacts#update
Updates an existing contact.
You should pass a JSON with the following parameters:
first_name stringmiddle_name stringlast_name stringcompany_name stringtype 'Person' or 'Institution'email stringlead booleanaddresses_attributes arraydata objectid integerstreet_number_and_name stringapartment_number stringcity stringstate stringprovince stringzip_code stringphysical boolean
phone_numbers_attributesdataid integernumber stringdaytime boolean
Response:
Returns 200 OK
Contacts#destroy
Destroys an existing contact
Response:
Returns 200 OK
Last updated
Was this helpful?