# Get FAQ Content API

## Get FAQ Content.

<mark style="color:green;">`POST`</mark> [https://\<sub domain>.kapturecrm.com/get-faq-contents.html](https://hamilton.kapturecrm.com/get-faq-contents.html)[](https://devapi.kapturecrm.com/select-customer-between-start-and-end-dates.html)

{% hint style="info" %}

```
NOTE: Please replace with your sub domain name in the API.
```

{% endhint %}

### Authentication:

To access this API endpoint, you need to include your API key in the request headers. For authentication, use the following header:

```
Basic <Your Token>
```

### Request Body

The request body should be a JSON object containing the details of the FAQ Contents to be fetched. Here are the  list of parameters.\ <br>

<table><thead><tr><th>Name</th><th width="125">Mandatory</th><th width="150">Data Field</th><th>Description</th></tr></thead><tbody><tr><td>Category Id</td><td>Yes</td><td>category_id</td><td>FAQ Contents to be searched based on category id. To get the system category ids, we can use the FAQ Category API</td></tr><tr><td>Start Date &#x26; End Date</td><td>No</td><td>start_date, end_date</td><td>Date the FAQ content was created IN yyyy-mm-dd format</td></tr><tr><td>Employee Id</td><td>No</td><td>employee_id</td><td>FAQ Contents created by</td></tr><tr><td>Start Index, End Index</td><td>Yes</td><td>start_index, end_index</td><td>Since FAQ contents are huge data, so it is recommended to use start index and end index. By default start index will be 0 and end index will be 20</td></tr></tbody></table>

{% tabs %}
{% tab title="Body Request" %}

```json
[
    {
        "employee_id": "",
        "category_id": "5247",
        "start_index": "0",
        "end_index": "20"
    }
]
```

{% endtab %}
{% endtabs %}

### Response Body

The API responds with a JSON object containing the details of the all the contents inside that FAQ Category. If successful, the response will include the category ID and the other relevant information.

| Response                                           | Response Messages                                                                   |
| -------------------------------------------------- | ----------------------------------------------------------------------------------- |
| { ..., "status": "success"}                        | List of customers fetched successfully.                                             |
| {"message": "Invalid Auth Key","status": "failed"} | Authorization key is either not passed in header, or incorrect, or expired/disabled |

{% tabs %}
{% tab title="Response" %}

```json
{
    "message": {
        "contents": [
            {
                "id": 18909,
                "title": "Is any warranty on Pens?",
                "detail": "Ball Pen shelf life is 2 years & Gel Pen 1 year. Warranty applicable on – Skip writing, Ink leakage, If ink dry & Replacement against manufacturing defects (temperature also affect on dryness of ink )",
                "type": "FAQ",
                "categoryId": 5247,
                "categoryName": "FAQ - Claro",
                "categoryPath": "5213/5215/5247/",
                "enabled": "Yes",
                "createDate": "08 Dec, 2023 17:21",
                "displayIndex": 0,
                "tags": ""
            },
            {
                "id": 18910,
                "title": "How much Distributor/ Super Distributor/ Retailer Margin?",
                "detail": "For More details please connect with our customer service team. Our customer service team is available on 18002092151 between 10 AM – 5.30 PM. You may also write to us at info@hamiltonindia.in for any complaints and sales.enquiry@hamiltonindia.in for any product related query.",
                "type": "FAQ",
                "categoryId": 5247,
                "categoryName": "FAQ - Claro",
                "categoryPath": "5213/5215/5247/",
                "enabled": "Yes",
                "createDate": "08 Dec, 2023 17:21",
                "displayIndex": 0,
                "tags": ""
            },
            {
                "id": 18911,
                "title": "How many Super Distributors or Distributors available in our Region?",
                "detail": "Each market has a different structure, Please send your enquiry to our email Id also confirm your contact so our Sales Manager will contact you.",
                "type": "FAQ",
                "categoryId": 5247,
                "categoryName": "FAQ - Claro",
                "categoryPath": "5213/5215/5247/",
                "enabled": "Yes",
                "createDate": "08 Dec, 2023 17:21",
                "displayIndex": 0,
                "tags": ""
            },
            {
                "id": 18912,
                "title": "How much CD available?",
                "detail": "For More details please connect with our customer service team. Our customer service team is available on 18002092151 between 10 AM – 5.30 PM. You may also write to us at info@hamiltonindia.in for any complaints and sales.enquiry@hamiltonindia.in for any product related query.",
                "type": "FAQ",
                "categoryId": 5247,
                "categoryName": "FAQ - Claro",
                "categoryPath": "5213/5215/5247/",
                "enabled": "Yes",
                "createDate": "08 Dec, 2023 17:21",
                "displayIndex": 0,
                "tags": ""
            },
            {
                "id": 18913,
                "title": "What is Credit Policy?",
                "detail": "For More details please connect with our customer service team. Our customer service team is available on 18002092151 between 10 AM – 5.30 PM. You may also write to us at info@hamiltonindia.in for any complaints and sales.enquiry@hamiltonindia.in for any product related query.",
                "type": "FAQ",
                "categoryId": 5247,
                "categoryName": "FAQ - Claro",
                "categoryPath": "5213/5215/5247/",
                "enabled": "Yes",
                "createDate": "08 Dec, 2023 17:21",
                "displayIndex": 0,
                "tags": ""
            },
            {
                "id": 18914,
                "title": "Which are the Ink Colours available?",
                "detail": "We have Blue, Black, Red, Green are primary colours in fancy colours Yellow, Orange, Pink, Magenta, Purple, Beige, Turquoise, Lime, Brown, Mocha.",
                "type": "FAQ",
                "categoryId": 5247,
                "categoryName": "FAQ - Claro",
                "categoryPath": "5213/5215/5247/",
                "enabled": "Yes",
                "createDate": "08 Dec, 2023 17:21",
                "displayIndex": 0,
                "tags": ""
            },
            {
                "id": 18915,
                "title": "Master packing all colour are available are single colours?",
                "detail": "Yes , all color having individual packing.",
                "type": "FAQ",
                "categoryId": 5247,
                "categoryName": "FAQ - Claro",
                "categoryPath": "5213/5215/5247/",
                "enabled": "Yes",
                "createDate": "08 Dec, 2023 17:21",
                "displayIndex": 0,
                "tags": ""
            },
            {
                "id": 18916,
                "title": "How GST on Pen & Markers & Stationery.",
                "detail": "On Pen & Markers 12 % , Stationery 18%",
                "type": "FAQ",
                "categoryId": 5247,
                "categoryName": "FAQ - Claro",
                "categoryPath": "5213/5215/5247/",
                "enabled": "Yes",
                "createDate": "08 Dec, 2023 17:21",
                "displayIndex": 0,
                "tags": ""
            },
            {
                "id": 18917,
                "title": "Is your product are recyclable?",
                "detail": "All our plastic parts can be re-cycled, as per legal terms.Before re-cycling, components should be dismantled and segregate RM wise.",
                "type": "FAQ",
                "categoryId": 5247,
                "categoryName": "FAQ - Claro",
                "categoryPath": "5213/5215/5247/",
                "enabled": "Yes",
                "createDate": "08 Dec, 2023 17:21",
                "displayIndex": 0,
                "tags": ""
            },
            {
                "id": 18918,
                "title": "Do you have Markers & what are the colors available?",
                "detail": "We do have Whiteboard Marker & Permanent Marker In 4 Colours- Blue,Black,Red,Green.",
                "type": "FAQ",
                "categoryId": 5247,
                "categoryName": "FAQ - Claro",
                "categoryPath": "5213/5215/5247/",
                "enabled": "Yes",
                "createDate": "08 Dec, 2023 17:21",
                "displayIndex": 0,
                "tags": ""
            },
            {
                "id": 18919,
                "title": "Do you sale Whiteboard Marker Board?",
                "detail": "No ,we do not sell the Board.",
                "type": "FAQ",
                "categoryId": 5247,
                "categoryName": "FAQ - Claro",
                "categoryPath": "5213/5215/5247/",
                "enabled": "Yes",
                "createDate": "08 Dec, 2023 17:21",
                "displayIndex": 0,
                "tags": ""
            },
            {
                "id": 18920,
                "title": "Do you sale Ball Pen Refill, Gel Pen Refill Individually?",
                "detail": "Yes, we offer Refill also.",
                "type": "FAQ",
                "categoryId": 5247,
                "categoryName": "FAQ - Claro",
                "categoryPath": "5213/5215/5247/",
                "enabled": "Yes",
                "createDate": "08 Dec, 2023 17:21",
                "displayIndex": 0,
                "tags": ""
            },
            {
                "id": 18921,
                "title": "Markers are refillable?",
                "detail": "Yes, Markers are Refillable.",
                "type": "FAQ",
                "categoryId": 5247,
                "categoryName": "FAQ - Claro",
                "categoryPath": "5213/5215/5247/",
                "enabled": "Yes",
                "createDate": "08 Dec, 2023 17:21",
                "displayIndex": 0,
                "tags": ""
            },
            {
                "id": 18922,
                "title": "Do you have Marker Ink?",
                "detail": "No ,we don’t have Maker Ink.",
                "type": "FAQ",
                "categoryId": 5247,
                "categoryName": "FAQ - Claro",
                "categoryPath": "5213/5215/5247/",
                "enabled": "Yes",
                "createDate": "08 Dec, 2023 17:21",
                "displayIndex": 0,
                "tags": ""
            },
            {
                "id": 18923,
                "title": "Do you have Glitter Ink Pen?",
                "detail": "Yes, we do have glitter ink also.",
                "type": "FAQ",
                "categoryId": 5247,
                "categoryName": "FAQ - Claro",
                "categoryPath": "5213/5215/5247/",
                "enabled": "Yes",
                "createDate": "08 Dec, 2023 17:21",
                "displayIndex": 0,
                "tags": ""
            },
            {
                "id": 18924,
                "title": "Do you have fountain Pen?",
                "detail": "No we don’t have fountain pen.",
                "type": "FAQ",
                "categoryId": 5247,
                "categoryName": "FAQ - Claro",
                "categoryPath": "5213/5215/5247/",
                "enabled": "Yes",
                "createDate": "08 Dec, 2023 17:21",
                "displayIndex": 0,
                "tags": ""
            }
        ]
    },
    "status": "success"
}
```

{% endtab %}
{% endtabs %}

### Error Codes

| Error Codes | Description                                      |
| ----------- | ------------------------------------------------ |
| 400         | Bad Request - Invalid parameters or missing data |
| 401         | Unauthorized - Invalid or missing API key        |
| 403         | Forbidden - Insufficient permissions             |
| 404         | Not Found - Resource or endpoint not found       |
| 500         | Internal Server Error - Server-side issue        |

### Example of a working curl

{% tabs %}
{% tab title="cURL" %}

```json
curl --location 'hamilton.kapturecrm.com/get-faq-contents.html' \
--header 'Authorization: Basic <Your Token>' \
--header 'Content-Type: application/json' \
--header 'Cookie: JSESSIONID=; JSESSIONID=' \
--data '[
    {
        "employee_id": "",
        "category_id": "5247",
        "start_index": "0",
        "end_index": "20"
    }
]'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
import json

url = "https://devapi.kapturecrm.com/select-customer-between-start-and-end-dates.html"

payload = json.dumps([
  {
    "start_date": "2024-05-02",
    "end_date": "2024-05-02"
  }
])
headers = {
  'Authorization': 'Basic <Your Token>',
  'Content-Type': 'application/json',
  'Cookie': 'JSESSIONID=; _KAPTURECRM_SESSION='
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

```

{% endtab %}

{% tab title="Node.js" %}

```
var request = require('request');
var options = {
  'method': 'POST',
  'url': 'https://devapi.kapturecrm.com/select-customer-between-start-and-end-dates.html',
  'headers': {
    'Authorization': 'Basic <Your Token>',
    'Content-Type': 'application/json',
    'Cookie': 'JSESSIONID=; _KAPTURECRM_SESSION='
  },
  body: JSON.stringify([
    {
      "start_date": "2024-05-02",
      "end_date": "2024-05-02"
    }
  ])

};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});

```

{% endtab %}
{% endtabs %}
