Pull Ticket API by Date Range

The Pull Ticket API section allows users to get the existing ticket information sourced from external systems which were created particularly on the specific dates

Pull Ticket.

POST https://<sub domain>.kapturecrm.com/select-ticket-between-start-and-end-dates.html/v.2.0

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

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 ticket to be pulled for a specific date range. Here are the list of parameters.

NameMandatoryTypeDescription

start_date

Yes

date

Date should be in YYYY-MM-DD format. Also at one hit we can pull a data of max 24 hours.

end_date

Yes

date

Date should be in YYYY-MM-DD format. Also at one hit we can pull a data of max 24 hours.

[
    {
        “limit” : 1, // Required field ,if PaginationEnabled
        "start_date": "2024-04-22",
        "end_date": "2024-04-22"
    }
]

Please map in the request body if there's any extra associate body according to your use case.

Response Body

The API responds with a JSON object containing the details of the list of tickets. If successful, the response will include the list of ticket ID's and the other updated relevant information.

ResponseResponse Messages

{ ..., "status": "success"}

Ticket fetched successfully.

{"message": "Invalid Auth Key","status": "failed"}

Authorization key is either not passed in header, or incorrect, or expired/disabled

{ "message": "Invalid Json.", "status": "failed" }

Most probably, data may in array format. It should be in object format.

{ "message": "ticket_ids are missing.", "status": "failed" }

Either ticket_ids field is missing or empty.

{
    "totalCount": null,
    "message": [
        {
            "tat": "",
            "sla": "",
            "date": "19-04-2024 14:19",
            "status": "Pending",
            "nextFollowUp": "19-04-2024 14:19",
            "lastFollowUp": "22-04-2024 14:31",
            "taskId": 530348198,
            "lastSource": "Mobile App",
            "orderId": "",
            "lastConvesationTime": "19-04-2024 14:19",
            "ticketId": "713516551148",
            "folderId": 0,
            "primarySource": "Mobile App",
            "detail": "",
            "mergedTicketId": "",
            "contactId": 0,
            "productId": 0,
            "creatorId": 209803,
            "substatusKey": "PS",
            "customerId": 0,
            "assignedId": 209803,
            "referenceId": 0,
            "creatorName": "Kapture Dev API&apos;s",
            "priority": "low",
            "pendingTaskId": 0,
            "assignedToName": "Kapture Dev API&apos;s",
            "callBack": "",
            "customer_rating": 0,
            "queueKey": "",
            "lastConversationId": 0,
            "slaStatus": "out of sla",
            "queueName": "",
            "total_conversations": 0,
            "disposition": "Inbox",
            "taskTitle": "TEST 1",
            "taskEnddate": "",
            "url": "https://devapi.kapturecrm.com/employee/view-task-detail.html?detail=5/530348198/713516551148",
            "substatus": "Pending",
            "assigneeCode": "",
            "ftr": "no",
            "email": "",
            "phone": "",
            "attachments": [],
            "additional_info": {}
        }
    ],
    "status": "success"
}

Error Codes

Error CodesDescription

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

curl --location 'https://devapi.kapturecrm.com/select-ticket-between-start-and-end-dates.html/v.2.0' \
--header 'Authorization: Basic <Your Token>' \
--header 'Content-Type: application/json' \
--header 'Cookie: JSESSIONID=; _KAPTURECRM_SESSION=' \
--data '[
    {
        "start_date": "2024-04-19",
        "end_date": "2024-04-20"
    }
]'

Last updated