Ms.enquiries

Contain the details of all the queries which are asked by users of a particular site through contact us form.

Fields

name
Type: string

Required: No
Here client should to enter his/her name.
email
Type: string

Required: Yes
Here, client should to enter his/her mail-id
subject
Type: string

Required: No
In this field, client should to enter valid subject of his/her query.
message
Type: string

Required: No
In this field, you should enter the description of your Query.
phone
Type: string

Required: No
In this field you have to mention your contact number.
created_on
Type: datetime
replies
Type: array
List GET /api/1/entity/ms.enquiries

List the records saved in the entity.

Example

list
GET

Example Request Json

var request = {
  entity: 'ms.enquiries'
}

Example Response Json

{
  status: 200,
  data: [
    {
      _id: '584650cc9031c40d44e20ce0',
      email: 'try@test.com',
      message: 'ssss',
      name: 'test',
      phone: '9461094395',
      replies: [],
      subject: 'test:subject',
      created_on: '2016-12-06T05:46:52.440Z'
    }
  ],
  messages: [
    {
      level: 'success',
      key: 'ms.entity.enquiries.list',
      message: ''
    }
  ],
  paging: {
    limit: 50,
    start: 0,
    count: 1,
    total: 1
  }
}
Add POST /api/1/entity/ms.enquiries

Add the record in the entity.

Example

add
POST

Example Request Json

var request = {
  entity: 'ms.enquiries',
  data: {
    email: "try@test.com",
    message: "ssss",
    name: "test",
    phone: "9461094395",
    replies: [],
    subject: "test:subject"
  }
}

Example Response Json

{
  status: 200,
  data: {
    _id: '584650cc9031c40d44e20ce0'
  },
  messages: [
    {
      level: 'success',
      key: 'ms.entity.enquiries.add',
      message: ''
    }
  ]
}
Update PUT /api/1/entity/ms.enquiries/#{_id}

Update the record in the entity.

Example

update
PUT

Example Request Json

var request = {
  entity: 'ms.enquiries',
  recordId: response.data._id,
  data: {
    email: "update@update.com",
  }
}

Example Response Json

{
  status: 200,
  data: 'updated successfully',
  messages: [
    {
      level: 'success',
      key: 'ms.entity.enquiries.edit',
      message: ''
    }
  ]
}
Delete DELETE /api/1/entity/ms.enquiries/:id

Delete the record from the entity.

Example

delete
DELETE

Example Request Json

var request ={
  entity: 'ms.enquiries',
  recordId: response.data._id
}

Example Response Json

{
  status: 200,
  data: 'updated successfully',
  messages: [
    {
      level: 'success',
      key: 'ms.entity.enquiries.delete',
      message: ''
    }
  ]
}{
  status: 200,
  data: 'updated successfully',
  messages: [
    {
      level: 'success',
      key: 'ms.entity.enquiries.delete',
      message: ''
    }
  ]
}
ReplyEnquiry /api/1/entity/_/replyEnquiry

SendEnquiry /api/1/entity/_/sendEnquiry

Example

sendEnquiry

Example Request Json

var request = {
  entity: 'ms.enquiries',
  data: {
    email: "yash.jain@test.com",
    message: "ssss",
    name: "test",
    phone: "9461094395",
    replies: [],
    subject: "test:subject"
  }
}

Example Response Json

{
  status: 200,
  messages: [
    {
      level: 'success',
      key: 'ms.entity.enquiries.sendEnquiry',
      message: 'Thank you for contacting us. We will get back to you shortly.'
    }
  ]
}