Skip to main content
GET
/
tickets
/
check-user-tickets
/
{userId}
Check user tickets
curl --request GET \
  --url https://api.series.hr/tickets/check-user-tickets/{userId} \
  --header 'apikey: <api-key>'
Requires Premium or Enterprise subscription

Overview

Check how many open tickets a user has in a specific category. Useful for enforcing ticket limits before allowing new ticket creation. Use this endpoint before calling POST /tickets/create to check if the user has reached their category’s maximum open tickets limit. If CanCreateTicket is false, inform the user they need to close existing tickets first.

Path Parameters

userId
string
required
UserId to check

Query Parameters

category
string
Category ID to check (optional). If provided, returns category-specific limits.

Response

success
boolean
Whether the request was successful
data
object

Example

# Check all open tickets for user
curl -X GET "https://api.series.hr/tickets/check-user-tickets/123456789" \
  -H "apikey: YOUR_API_KEY"

# Check open tickets in specific category
curl -X GET "https://api.series.hr/tickets/check-user-tickets/123456789?category=support" \
  -H "apikey: YOUR_API_KEY"

Response Example

{
  "success": true,
  "data": {
    "UserId": 123456789,
    "OpenTicketsCount": 2,
    "CategoryLimit": 5,
    "CanCreateTicket": true,
    "TicketsEnabled": true
  }
}

Error Responses

{
  "success": false,
  "error": {
    "code": 400,
    "message": "Invalid userId"
  }
}
{
  "success": false,
  "error": {
    "code": 401,
    "message": "API key is required"
  }
}

Rate Limit

25 requests per second per API key

Authorizations

apikey
string
header
required

Pass your API key in the apikey header. Alternatively, the x-api-key header is also accepted.

Path Parameters

userId
string
required

UserId to check

Query Parameters

category
string

Category ID to check

Response

Ticket count returned successfully