Fetch Single Ticket
Retrieve complete details of a single support ticket by CaseNumber.
POST
https://api-v3.sweeppea.com/tickets/fetchSingleTicket
Description
This endpoint retrieves complete details of a single support ticket by its CaseNumber. The ticket must belong to the authenticated user. Returns all ticket information including notes, files, collaborators, and statistics.
Authentication
This endpoint requires Bearer token authentication via the Authorization header.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
caseNumber |
string | Yes | The ticket case number (e.g., "HYXTNJV") |
Code Examples
curl -X POST "https://api-v3.sweeppea.com/tickets/fetchSingleTicket" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"caseNumber": "HYXTNJV"
}'
const response = await fetch('https://api-v3.sweeppea.com/tickets/fetchSingleTicket', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
caseNumber: 'HYXTNJV'
})
});
const data = await response.json();
console.log(data);
import requests
import json
url = "https://api-v3.sweeppea.com/tickets/fetchSingleTicket"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
payload = {
"caseNumber": "HYXTNJV"
}
response = requests.post(url, headers=headers, data=json.dumps(payload))
print(response.json())
Response
{
"Response": true,
"Data": {
"CaseNumber": "HYXTNJV",
"Date": "2025-01-26T10:00:00.000Z",
"AccountInfo": {
"UserToken": "",
"FullName": "John Doe",
"Email": "john.doe@example.com",
"MobileNumber": "5551234567",
"UserType": "Administrator",
"UserAgent": "Mozilla/5.0...",
"IpAddress": "192.168.1.1",
"Language": "en",
"GeoLat": 40.7128,
"GeoLon": -74.0060,
"SweepstakesName": "Summer Giveaway 2025"
},
"Subject": "Issue with sweepstakes configuration",
"Description": "Unable to configure the entry page settings...
",
"Priority": 2,
"NotifyUsers": ["support@example.com"],
"Collaborators": [],
"ClosedBy": null,
"CloseDate": null,
"Notes": [
{
"Id": "",
"Date": "2025-01-26T11:00:00.000Z",
"Note": "Investigating the issue..."
}
],
"Files": [],
"Survey": {},
"Pin": false,
"Views": 5,
"Completion": 50,
"ResourceAffected": "renaissance",
"Documentation": [],
"Statistics": [
{
"Id": "",
"Date": "2025-01-26T10:00:00.000Z",
"UserToken": "",
"Action": "create"
}
],
"Status": false,
"AttachmentInfo": {},
"GitHubIssue": {}
},
"Telemetry": {
"DataConsumed": 0,
"APICalls": 142,
"MaxAPICalls": 100000
}
}
Error Responses
{
"Response": false,
"Message": "Missing or invalid Bearer token. Send your API token in the Authorization header as: Authorization: Bearer YOUR_API_TOKEN",
"Code": 401
}
{
"Response": false,
"Message": "Invalid API token. It does not match any account.",
"Code": 403
}
{
"Response": false,
"Message": "Missing caseNumber",
"Help": {
"ExpectedBody": {
"CaseNumber": "string (required) \u2014 case number of the ticket"
}
},
"Code": 400
}
{
"Response": false,
"Message": "Ticket Not Found or Access Denied",
"Code": 404
}
{
"Response": false,
"Message": "Internal server error. Please try again; if it persists, contact support with the time of this request.",
"Code": 500
}