LeadSquared Developer Centre

ON THIS PAGE

Get a Ticket’s Details by Id


Lets you fetch the details of an existing ticket from LeadSquared’s Service CRM platform. This API returns the details of a single ticket (Associated Lead ID, Ticket Status, etc.) based on the “TicketId” you pass in the API URL.

To obtain the TicketId, navigate to the Ticket Details Page, and copy the Id from the URL.

 

Prerequisite

Before you pass this API, the API Configurations setting must be enabled on your account. To do this –

  1. On your LeadSquared account, navigate to My Profile>Settings>Service Cloud, and click API Configurations.
  2. Alongside Enable API, enable the slider LeadSquared Service CRM APIs.
    • Alongside Enable IP Whitelisting, enable the slider and add the IPs you want to whitelist. This is optional.
  3. Once you’re done, click Save.

LeadSquared Service CRM_API Configurations

Note: To obtain the host API URL, contact your account manager, or write to scsupport@leadsquared.com.

Pass the following mandatory API headers –

  • X-LSQ-ACCESS-KEY – <AccessKey>
  • X-LSQ-SECRET-KEY – <SecretKey>

API URL

URL
Icon
GET https://apigw.service-in.leadsquared.com/api/tenants/{{org ID}}/tickets

Response

200 OK
Content-Type: application/json
{
   "TypeId":"null",
   "Id":"143",
   "TicketId":"03913666-6ab8-4355-9a50-a63fe3204d0a",
   "LeadId":"330fba67-6795-46c2-9dad-077794077f70",
   "OpportunityId":null,
   "Association":0,
   "BulkUpdate":false,
   "Dispose":false,
   "Fields":[
      {
         "SchemaName":"Type",
         "Value":"General",
         "SubFields":null
      },
      {
         "SchemaName":"TicketKey",
         "Value":"#143",
         "SubFields":null
      },
      {
         "SchemaName":"Title",
         "Value":"Update Email Id",
         "SubFields":null
      },
      {
         "SchemaName":"Description",
         "Value":"Hi, Has my email Id been updated. Have raised this issue a while ago. Thanks, Wim",
         "SubFields":null
      },
      {
         "SchemaName":"Status",
         "Value":"Open",
         "SubFields":null
      },
      {
         "SchemaName":"Priority",
         "Value":"Medium",
         "SubFields":null
      },
      {
         "SchemaName":"Channel",
         "Value":"Email",
         "SubFields":null
      },
      {
         "SchemaName":"CcEmails",
         "Value":"",
         "SubFields":null
      },
      {
         "SchemaName":"Tags",
         "Value":"",
         "SubFields":null
      },
      {
         "SchemaName":"DueDate",
         "Value":"2024-08-29T10:36:23",
         "SubFields":null
      },
      {
         "SchemaName":"SubType",
         "Value":null,
         "SubFields":null
      },
      {
         "SchemaName":"CustomData.SRC_CS_2",
         "Value":"Online",
         "SubFields":null
      },
      {
         "SchemaName":"TicketCategoryId",
         "Value":null,
         "SubFields":null
      },
      {
         "SchemaName":"RelatedServiceGroupId",
         "Value":2,
         "SubFields":null
      },
      {
         "SchemaName":"RelatedAgentId",
         "Value":"c1826f52-ea88-11ee-9566-020f15161885",
         "SubFields":null
      },
      {
         "SchemaName":"RelatedStageId",
         "Value":1,
         "SubFields":null
      },
      {
         "SchemaName":"RelatedRequester",
         "Value":null,
         "SubFields":null
      }
   ],
   "UserPermissions":{
      "CreateTicket":{
         "Allowed":true,
         "ScopeFilters":[
            "ALL_TICKETS"
         ]
      },
      "AssignTicket":{
         "Allowed":true,
         "ScopeFilters":[
            "ALL_TICKETS"
         ]
      },
      "UpdateTicket":{
         "Allowed":true,
         "ScopeFilters":[
            "ALL_TICKETS"
         ]
      },
      "DeleteTicket":{
         "Allowed":true,
         "ScopeFilters":[
            "ALL_TICKETS"
         ]
      },
      "EditOwnInternalNote":{
         "Allowed":true,
         "ScopeFilters":[
            "ALL_TICKETS"
         ]
      },
      "MarkTicketSpam":{
         "Allowed":true,
         "ScopeFilters":[
            "ALL_TICKETS"
         ]
      },
      "CloseTicket":{
         "Allowed":true,
         "ScopeFilters":[
            "ALL_TICKETS"
         ]
      },
      "ExportTicket":{
         "Allowed":true,
         "ScopeFilters":[
            "ALL_TICKETS"
         ]
      },
      "PurgeTicket":{
         "Allowed":true,
         "ScopeFilters":[
            "ALL_TICKETS"
         ]
      },
      "ImportTicket":{
         "Allowed":true,
         "ScopeFilters":[
            "ALL_TICKETS"
         ]
      },
      "BulkUpdateTicket":{
         "Allowed":true,
         "ScopeFilters":[
            "ALL_TICKETS"
         ]
      },
      "ViewTicket":{
         "Allowed":true,
         "ScopeFilters":[
            "ALL_TICKETS"
         ]
      },
      "ResolveTicket":{
         "Allowed":true,
         "ScopeFilters":[
            "ALL_TICKETS"
         ]
      },
      "EditInternalNote":{
         "Allowed":true,
         "ScopeFilters":[
            "ALL_TICKETS"
         ]
      },
      "Reply":{
         "Allowed":true,
         "ScopeFilters":[
            "ALL_TICKETS"
         ]
      },
      "AddInternalNote":{
         "Allowed":true,
         "ScopeFilters":[
            "ALL_TICKETS"
         ]
      },
      "CreateChildTicket":{
         "Allowed":true,
         "ScopeFilters":[
            "ALL_TICKETS"
         ]
      },
      "MergeTicket":{
         "Allowed":true,
         "ScopeFilters":[
            "ALL_TICKETS"
         ]
      }
   },
   "TriggerSLA":true,
   "TriggerAssignmentRule":true,
   "TriggerAutomation":true,
   "TriggerTicketEvents":null,
   "TriggerNotification":true,
   "IsVisited":null,
   "IsMigrated":false,
   "IsUpdated":false,
   "TicketCreationType":"SYSTEM",
   "CallSessionId":null,
   "PrimaryTicket":true,
   "V2Api":false
}

HTTP Response Codes

Code Description
200 OK

This is the status code for successful API call.

401 Unauthorized

The API call was made with invalid access credentials. Check your AccessKey and SecretKey.

400 Bad Request

The message body on the request is not as per API specification. Make sure that content type is set to “application/json” and the JSON body has correct attribute names and structure.

404 Not Found

The API could not be found. Please check the API signature.

429 Too Many Requests

API calls exceeded the limit of 25 in 5 second(s)

500 Internal Server Error

The API called failed. There could be many reasons for it. Check the exception message to get more details.

On this page

© 2024 by MarketXpander Services Pvt Ltd. All Rights Reserved.