Skip to content

Support API

This document outlines the API endpoints for support token management and its relevant operations like creating support tickets, responding to them, and performing related operations.

Base URL

  • Base path /api2/support/tickets

Authorization

  • Requires Cookie: JSESSIONID=session_id

Data Schema

Support Ticket

Field Type Default Value Description
category enum - Category of the support ticket (payment, login, dashboard, app, tracking, report, alert, data, general, technical, fraud, navigation, other)
userId string - ID of the user creating the ticket
status enum open Current status of the ticket (open, closed, pending, etc.)
title string - Title of the support ticket
description string - Detailed description of the issue
fileIds string[] - Array of file IDs attached to the ticket
ticket_no integer - Unique ticket number
user_info string - Additional information about the user
device_info string - Information about the user's device

Ticket Response

Field Type Default Value Description
sender_info string - Information about the sender of the response
ticket_id string - ID of the support ticket being responded to
message string - Content of the support response
fileIds string[] - Array of file IDs attached to the response

Support Ticket

List Tickets

GET /

Returns a paginated list of tickets belonging to the logged-in user.

cURL Example:

curl -X GET "https://api.trackongps.com/api2/support/tickets?search=term&page=1&limit=10" \
    -H "Cookie: JSESSIONID=your_session_id"

Query Parameters:

Parameter Type Required Description
search string No Search term applied to title, user, or device info
page number No Page number (default: 1)
limit number No Number of items per page (default: 10)

Response:

OK
    {
      "page": 1,
      "limit": 10,
      "total": 42,
      "data": [
        /* list of tickets */
      ]
    }

Create Ticket

POST /

Creates a new support ticket.

Body Data:

Field Type Required Description
title string Yes Title of the support ticket
description string No Detailed description of the issue
category string No Category of the support ticket
fileIds string[] No Array of file IDs to attach to the ticket
device object No Device information object containing value and name fields
device.value string No Device identifier
device.name string No Display name of the device

cURL Example:

curl -X POST "https://api.trackongps.com/api2/support/tickets" \
    -H "Content-Type: application/json" \
    -H "Cookie: JSESSIONID=your_session_id" \
    -d '{
        "title": "Issue Title",
        "description": "Detailed issue description",
        "category": "app",
        "fileIds": ["file1", "file2"],
        "device": {
            "value": "deviceId123",
            "name": "My Device"
        }
    }'

Request Body:

{
  "title": "Issue Title",
  "description": "Detailed issue description",
  "category": "app",
  "fileIds": ["file1", "file2"],
  "device": {
    "value": "deviceId123",
    "name": "My Device"
  }
}

Response:

OK
    {
      "success": true,
      "data": {
        "ticket_no": 123,
        "title": "Issue Title"
      }
    }

Delete Ticket

DELETE /:ticketId

Deletes a support ticket created by the user.

cURL Example:

curl -X DELETE "https://api.trackongps.com/api2/support/tickets/123" \
    -H "Cookie: JSESSIONID=your_session_id"

Response:

OK
{
  "success": true,
  "message": "Ticket deleted successfully!"
}

Get Ticket By ID

GET /:ticketId

Fetch a specific support ticket by ID.

cURL Example:

curl -X GET "https://api.trackongps.com/api2/support/tickets/123" \
    -H "Cookie: JSESSIONID=your_session_id"

Response:

OK
{
  "ticket_no": 123,
  "title": "Issue Title"
}

Ticket Responses

List Responses

GET /:ticketId/responses

Fetch all responses for a specific ticket.

cURL Example:

curl -X GET "https://api.trackongps.com/api2/support/tickets/ticketId/responses" \
    -H "Cookie: JSESSIONID=your_session_id"

Response:

OK
{
  "total": 3,
  "data": [
    {
      "ticket_id": "abc123",
      "message": "Thanks for reporting.",
      "senderInfo": { "name": "Admin", "id": "xyz" }
    }
  ]
}

Create Response

POST /respond

Adds a response to a specific ticket.

Body Data:

Field Type Required Description
ticketId string Yes ID of the ticket to respond to
content string No Content of the response message

cURL Example:

curl -X POST "https://api.trackongps.com/api2/support/tickets/respond" \
    -H "Content-Type: application/json" \
    -H "Cookie: JSESSIONID=your_session_id" \
    -d '{
        "ticketId": "abc123",
        "content": "Here is more info on the issue."
    }'

Request Body:

{
  "ticketId": "abc123",
  "content": "Here is more info on the issue."
}

Response:

OK
{
  "ticket_id": "abc123",
  "message": "Here is more info on the issue.",
  "senderInfo": { "name": "User", "id": "uid456" }
}

Update Response

PUT /responses/:responseId

Update a previously added response.

cURL Example:

curl -X PUT "https://api.trackongps.com/api2/support/tickets/responses/responseId" \
    -H "Content-Type: application/json" \
    -H "Cookie: JSESSIONID=your_session_id" \
    -d '{
        "message": "Updated response content."
    }'

Request Body:

{
  "message": "Updated response content."
}

Response:

OK
{
  "ticket_id": "abc123",
  "message": "Updated response content."
}

Delete Response

DELETE /responses/:responseId

Deletes a response by its ID.

cURL Example:

curl -X DELETE "https://api.trackongps.com/api2/support/tickets/responses/responseId" \
    -H "Cookie: JSESSIONID=your_session_id"

Response:

OK
{
  "message": "Response deleted successfully!"
}