Top

Contact Persons

List contact persons
GET /contacts/:contact_id/contactpersons
List contact persons of a contact with pagination.
Get contact person
GET /contacts/:contact_id/contactpersons/:contact_person_id
Get the contact person details.
Create a contact person
POST /contacts/contactpersons
Create a contact person for contact.
Update a contact person
PUT /contacts/contactpersons/:contact_person_id
Update an existing contact person.
Delete a contact person.
DELETE /contacts/contactpersons/:contact_person_id
Delete an existing contact person.
Mark as primary contact person
POST /contacts/contactpersons/:contact_person_id/primary
Mark a contact person as primary for the contact.

List contact persons

GET  /contacts/:contact_id/contactpersons

List contact persons of a contact with pagination.

Sample Response


Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "success",
  "contact_persons": [
    {
      "contact_person_id": "460000000026051",
      "salutation": "Mr.",
      "first_name": "Will",
      "last_name": "Smith",
      "email": "willsmith@bowmanfurniture.com",
      "phone": "+1-925-921-9201",
      "mobile": "+1-4054439562",
      "is_primary_contact": true
    },
    {
      "contact_person_id": "460000000031001",
      "salutation": "Mr.",
      "first_name": "Peter",
      "last_name": "Parker",
      "email": "peterparker@bowmanfurniture.com",
      "phone": "+1-925-929-7211",
      "mobile": "+1-4054439760",
      "is_primary_contact": false
    }
  ],
  "page_context": {
    "page": 1,
    "per_page": 200,
    "has_more_page": false,
    "sort_column": "contact_person_id",
    "sort_order": "A"
  }
}

Get contact person

GET  /contacts/:contact_id/contactpersons/:contact_person_id

Get the contact person details.

Sample Response


Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "success",
  "contact_person": {
    "contact_id": "460000000026049",
    "contact_person_id": "460000000026051",
    "salutation": "Mr.",
    "first_name": "Will",
    "last_name": "Smith",
    "email": "willsmith@bowmanfurniture.com",
    "phone": "+1-925-921-9201",
    "mobile": "+1-4054439562",
    "is_primary_contact": true
  }
}

Create a contact person

POST  /contacts/contactpersons

Create a contact person for contact.

Request attributes

contact_id* string ID of contact to which contact person has to be created.
first_name string
[100]
First name of the contact person.
last_name string
[100]
Last name of the contact person.
email string
[100]
Email address of the contact person.

Sample Request

{
      "contact_id": "460000000026049",
      "salutation": "Mr.",
      "first_name": "Will",
      "last_name": "Smith",
      "email": "willsmith@bowmanfurniture.com",
      "phone": "+1-925-921-9201",
      "mobile": "+1-4054439562"
    }

Sample Response


Status: 201 Created
Content Type: application/json;charset=UTF-8
{
      "code": 0,
      "message": "Contact person's information has been saved.",
      "contact_person": {
        "contact_id": "460000000026049",
        "contact_person_id": "460000000026051",
        "salutation": "Mr.",
        "first_name": "Will",
        "last_name": "Smith",
        "email": "willsmith@bowmanfurniture.com",
        "phone": "+1-925-921-9201",
        "mobile": "+1-4054439562",
        "is_primary_contact": true
      }
    }

Update a contact person

PUT  /contacts/contactpersons/:contact_person_id

Update an existing contact person.

Request attributes

contact_id* string ID of contact to which contact person has to be created.
first_name string
[100]
First name of the contact person.
last_name string
[100]
Last name of the contact person.
email string
[100]
Email address of the contact person.

Sample Request

{
      "contact_id": "460000000026049",
      "salutation": "Mr.",
      "first_name": "Will",
      "last_name": "Smith",
      "email": "willsmith@bowmanfurniture.com",
      "phone": "+1-925-921-9201",
      "mobile": "+1-4054439562"
    }

Sample Response


Status: 200 OK
Content Type: application/json;charset=UTF-8
{
      "code": 0,
      "message": "Contact person's information has been saved.",
      "contact_person": {
        "contact_id": "460000000026049",
        "contact_person_id": "460000000026051",
        "salutation": "Mr.",
        "first_name": "Will",
        "last_name": "Smith",
        "email": "willsmith@bowmanfurniture.com",
        "phone": "+1-925-921-9201",
        "mobile": "+1-4054439562",
        "is_primary_contact": true
      }
    }

Delete a contact person.

DELETE  /contacts/contactpersons/:contact_person_id

Delete an existing contact person.

Sample Response


Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "The contact person has been deleted."
}

Mark as primary contact person

POST  /contacts/contactpersons/:contact_person_id/primary

Mark a contact person as primary for the contact.

Sample Response


Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "This contact person has been marked as your primary contact person."
}