CIM

CIM

1. Overview

Customer interaction managent module’s API documentation

1.1. Version information

Version : 1.0.0

1.2. License information

License : EF
License URL : http://www.expertflow.com/
Terms of service : null

1.3. URI scheme

Host : localhost:3000
Schemes : HTTP, HTTPS

1.4. Tags

  • Contacts : API for contacts in the system

  • Schema : API to change Contact object attributes

  • Mapping : API to define search criteria for contact

  • Interactions : APIs to load or save interactions against a contact

1.5. Consumes

  • application/json

1.6. Produces

  • application/json

2. Resources

2.1. Contacts

API for contacts in the system

2.1.1. Get Contacts by Name

GET /contacts/getContactByName/{name}

Description

Get the searched contacts from database

Parameters

Type

Name

Description

Schema

Type

Name

Description

Schema

Path

name
required

name of user that we want to find

string

Responses

HTTP Code

Description

Schema

HTTP Code

Description

Schema

200

List retrieved successfully

contacts

Produces
  • application/json

Example HTTP request
Request path

/contacts/getContactByName/string

Example HTTP response
Response 200

{ }

2.1.2. Get contact by search term

POST /contacts/getContactsBySearchTerms

Description

Get list of contacts from database

Parameters

Type

Name

Description

Schema

Type

Name

Description

Schema

Body

search
optional

Search terms for the contact the we want to search. Any number of properties can be included here in search criteria

searchOptions

Responses

HTTP Code

Description

Schema

HTTP Code

Description

Schema

200

List retrieved successfully

contacts

Produces
  • application/json

Example HTTP request
Request path

/contacts/getContactsBySearchTerms

Request body

{ "phone" : "string", "first_name" : "string" }

Example HTTP response
Response 200

{ }

2.1.3. Load more contacts

GET /contacts/loadMore/{last_id}

Description

Get the searched contacts from database

Parameters

Type

Name

Description

Schema

Type

Name

Description

Schema

Path

last_id
required

Id of the last contact object received in the list

string

Responses

HTTP Code

Description

Schema

HTTP Code

Description

Schema

200

List retrieved successfully

contacts

Produces
  • application/json

Example HTTP request
Request path

/contacts/loadMore/string

Example HTTP response
Response 200

{ }

2.1.4. Get user with given ID

GET /contacts/{contact_id}

Parameters

Type

Name

Description

Schema

Type

Name

Description

Schema

Path

contact_id
required

ID of user that we want to find

string

Responses

HTTP Code

Description

Schema

HTTP Code

Description

Schema

200

User is found

contactObject

Example HTTP request
Request path

/contacts/string

Example HTTP response
Response 200

{ "phone1" : "string", "first_name" : "string", "last_name" : "string" }

2.1.5. Update user with give ID

PUT /contacts/{contact_id}

Parameters

Type

Name

Description

Schema

Type

Name

Description

Schema

Path

contact_id
required

ID of user that we want to find

string

Body

contact
optional

User with new values of properties

contactObject

Responses

HTTP Code

Description

Schema

HTTP Code

Description

Schema

200

User is updated

contactObject

Example HTTP request
Request path

/contacts/string

Request body

{ "phone1" : "string", "first_name" : "string", "last_name" : "string" }

Example HTTP response
Response 200

{ "phone1" : "string", "first_name" : "string", "last_name" : "string" }

2.1.6. Delete user with given ID

DELETE /contacts/{contact_id}

Parameters

Type

Name

Description

Schema

Type

Name

Description

Schema

Path

contact_id
required

ID of user that we want to find

string

Responses

HTTP Code

Description

Schema

HTTP Code

Description

Schema

200

User is deleted

contactObject

Example HTTP request
Request path

/contacts/string

Example HTTP response
Response 200

{ "phone1" : "string", "first_name" : "string", "last_name" : "string" }

2.1.7. Get list of Contacts

GET /getContactList

Description

Get list of contacts from database

Responses

HTTP Code

Description

Schema

HTTP Code

Description

Schema

200

List retrieved successfully

contacts

Produces
  • application/json

Example HTTP request
Request path

/getContactList

Example HTTP response
Response 200

{ }

2.1.8. Create a new contact

POST /saveContact

Description

Create new contact in system

Parameters

Type

Name

Description

Schema

Type

Name

Description

Schema

Body

contact
optional

User that we want to create

contactObject

Responses

HTTP Code

Description

Schema

HTTP Code

Description

Schema

200

New user is created

contactObject

Produces
  • application/json

Example HTTP request
Request path

/saveContact

Request body

{ "phone1" : "string", "first_name" : "string", "last_name" : "string" }

Example HTTP response
Response 200

{ "phone1" : "string", "first_name" : "string", "last_name" : "string" }

2.2. Schema

API to change Contact object attributes

2.2.1. List attributes of Contact Object

GET /getSchema

Description

List all the attributes of contact object

Responses

HTTP Code

Description

Schema

HTTP Code

Description

Schema

200

Ok

schema

Produces
  • application/json

Example HTTP request
Request path

/getSchema

Example HTTP response
Response 200

{ }

2.2.2. Add a new Attribute to Contact Object

POST /saveSchema

Description

Add new attribute to contact object

Parameters

Type

Name

Description

Schema

Type

Name

Description

Schema

Body

schema
optional

Attribute name that we want to create

schemaObject

Responses

HTTP Code

Description

Schema

HTTP Code

Description

Schema

200

New attribute has been added for contact object

schemaObject

Produces
  • application/json

Example HTTP request
Request path

/saveSchema

Request body

{ "label" : "string", "key" : "string", "type" : "string" }

Example HTTP response
Response 200

{ "label" : "string", "key" : "string", "type" : "string" }

2.2.3. Update attribute with give ID

PUT /schema/{schema_id}

Parameters

Type

Name

Description

Schema

Type

Name

Description

Schema

Path

schema_id
required

ID of attribute that we want to delete

string

Body

schema
optional

User with new values of properties

schemaObject

Responses

HTTP Code

Description

Schema

HTTP Code

Description

Schema

200

User is updated

schemaObject

Example HTTP request
Request path

/schema/string

Request body

{ "label" : "string", "key" : "string", "type" : "string" }

Example HTTP response
Response 200

{ "label" : "string", "key" : "string", "type" : "string" }

2.2.4. Delete attribute with given ID

DELETE /schema/{schema_id}

Parameters

Type

Name

Description

Schema

Type

Name

Description

Schema

Path

schema_id
required

ID of attribute that we want to delete

string

Responses

HTTP Code

Description

Schema

HTTP Code

Description

Schema

200

User is deleted

No Content

Example HTTP request
Request path

/schema/string

2.3. Mapping

API to define search criteria for contact

2.3.1. Add condition to search criteria

POST /mapping

Description

Add condition to search criteria

Parameters

Type

Name

Description

Schema

Type

Name

Description

Schema

Body

mapping
optional

Attribute name that we want to create