Kapture API
  • Welcome!
  • Reference
    • API Reference
      • Add Ticket API
      • Update Ticket API
      • Get Ticket API
      • Pull Ticket API by Date Range
      • Add Customer API
      • Update Customer API
      • Get Customer API
      • Pull Customer API by Date Range
      • Add Order API
      • Update Order API
      • Pull Order API
      • Get FAQ Content API
      • Get FAQ Category API
      • Search FAQ Content API
Powered by GitBook
On this page
  • UpdateTicket.
  • Authentication:
  • Request Body
  • Response Body
  • Error Codes
  • Example of a working curl

Was this helpful?

  1. Reference
  2. API Reference

Update Ticket API

The Update Ticket API section allows users to modify existing ticket information sourced from external systems. Through this API, users can seamlessly update ticket details accordingly.

PreviousAdd Ticket APINextGet Ticket API

Last updated 1 year ago

Was this helpful?

UpdateTicket.

POST

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 updated. Here are the list of parameters.

Name
Mandatory
Type
Description

ticket_id

Yes

string

Ticket id to be updated

sub_status

Yes

string

The key of sub status should be passed for example:- Pending - P Closed - CL

queue

No

string

The key of the queue name needs to be passed

[
    {
        "comment": "",
        "ticket_id": "",
        "callback_time": "",
        "sub_status": "",
        "queue": "",
        "disposition": ""
    }
]

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 updated ticket. If successful, the response will include the ticket ID and the other updated relevant information.

Response
Response Messages

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

Ticket updated successfully.

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

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

{ "message": "No Data found/ticket_id is missing", "status": "failed" }

ticket_id field is either missing or empty in request body.

{ "message": "Invalid Format.callback_date should be yyyy-MM-dd hh:mm:ss.", "status": "failed" }

Invalid Format.

{
    "ticket": {
        "id": 530348198,
        "type": "O",
        "email": "",
        "phone": "",
        "status": "P",
        "orderId": "",
        "queueKey": "",
        "ticketId": "713516551148",
        "folderId": 0,
        "detail": "",
        "isUnread": false,
        "isOutOfSLA": false,
        "priority": 0,
        "isCallBack": false,
        "creatorId": 209803,
        "enquiryId": 0,
        "contactId": 0,
        "substatus": "PS",
        "productId": 0,
        "erpOrderId": "",
        "referenceId": 0,
        "ticketEmail": "",
        "assignedToId": 209803,
        "pendingTaskId": 0,
        "agencyBriefId": 0,
        "twitterUserId": "",
        "facebookUserId": "",
        "associativefile": "",
        "statusName": "Pending",
        "customerFeedback": 0,
        "playStoreReviewId": "",
        "lastConversationId": 0,
        "lastConversationType": "O",
        "lastConversationTime": 1713516551152,
        "date": "2024-04-19 14:19:11",
        "totalConversationCount": 0,
        "taskTitle": "TEST 1",
        "typeName": "Mobile App",
        "taskEnddate": "2024-04-19 14:19:11",
        "lastFollowUp": "2024-04-22 14:31:33",
        "nextFollowUp": "2024-04-19 14:19:11",
        "substatusName": "Pending",
        "encryptedPhone": "",
        "encryptedEmail": "",
        "lastConversationTypeName": "Mobile App",
        "ticketURL": "/employee/all-tickets.html?detail=2/530348198/713516551148",
        "ticketCreatorURL": "/employee/all-tickets.html?detail=2/530348198/713516551148",
        "isEscalated": true,
        "folders": [
            "Inbox"
        ],
        "queueName": "",
        "creatorName": "Kapture Dev API's",
        "folderColor": "red",
        "assignedToName": "Kapture Dev API's",
        "assignedToEmail": "sashank.goenka@kapturecrm.com",
        "mergeTicketId": "",
        "skuCode": "",
        "productName": ""
    },
    "Additional_details": {},
    "message": "Status and Comment have been updated.\n",
    "status": "success"
}

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

curl --location 'https://devapi.kapturecrm.com/update-ticket-from-other-source.html/v.2.0' \
--header 'Authorization: Basic <Your Token>' \
--header 'Content-Type: application/json' \
--header 'Cookie: JSESSIONID=; _KAPTURECRM_SESSION=' \
--data '[
    {
        "comment": "",
        "ticket_id": "713516551148",
        "callback_time": "",
        "sub_status": "PS",
        "queue": "",
        "disposition": ""
    }
]'
import http.client
import json

conn = http.client.HTTPSConnection("devapi.kapturecrm.com")
payload = json.dumps([
  {
    "comment": "",
    "ticket_id": "713516551148",
    "callback_time": "",
    "sub_status": "PS",
    "queue": "",
    "disposition": ""
  }
])
headers = {
  'Authorization': 'Basic <Your Token>',
  'Content-Type': 'application/json',
  'Cookie': 'JSESSIONID=; _KAPTURECRM_SESSION='
}
conn.request("POST", "/update-ticket-from-other-source.html/v.2.0", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
var request = require('request');
var options = {
  'method': 'POST',
  'url': 'https://devapi.kapturecrm.com/update-ticket-from-other-source.html/v.2.0',
  'headers': {
    'Authorization': 'Basic <Your Token>',
    'Content-Type': 'application/json',
    'Cookie': 'JSESSIONID=; _KAPTURECRM_SESSION='
  },
  body: JSON.stringify([
    {
      "comment": "",
      "ticket_id": "713516551148",
      "callback_time": "",
      "sub_status": "PS",
      "queue": "",
      "disposition": ""
    }
  ])

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

https://
<sub domain>
.kapturecrm.com/update-ticket-from-other-source.html/v.2.0