Snooplytics API DocsHome

Reference Data API

Countries, categories, and lookup values

1 min read

Static lookup data for building forms and filters. Retrieve lists of countries with codes and names, project categories and subcategories, industry classifications, and other enumerated values. Data is cached and rarely changes, suitable for client-side caching.

Available Endpoints

MethodEndpointDescription
GET/api/user/data/categoriesGet list of categories
GET/api/user/data/countriesGet list of countries

Endpoints

GET
/api/user/data/categories

Get list of categories

Retrieve the list of available project categories for form dropdowns.

None (public)

Request

curl -X GET "http://localhost:3030/api/user/data/categories" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json"

Response 200

Categories retrieved successfully

{
"success": true,
"status": 200,
"code": "OK",
"message": "Operation completed successfully",
"data": [
  {
    "id": "507f1f77bcf86cd799439011",
    "name": "Technology",
    "slug": "technology",
    "description": "Technology and software companies",
    "icon": "laptop",
    "parentId": null
  }
]
}

Error Responses

401Unauthorized - Invalid or missing authentication

{
"success": false,
"status": 401,
"code": "UNAUTHORIZED",
"message": "Authentication required"
}

403Forbidden - Insufficient permissions

{
"success": false,
"status": 403,
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action"
}
GET
/api/user/data/countries

Get list of countries

Retrieve the list of available countries for form dropdowns.

None (public)

Request

curl -X GET "http://localhost:3030/api/user/data/countries" -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json"

Response 200

Countries retrieved successfully

{
"success": true,
"status": 200,
"code": "OK",
"message": "Operation completed successfully",
"data": [
  {
    "id": "507f1f77bcf86cd799439011",
    "name": "United States",
    "code": "US",
    "slug": "united-states",
    "flag": "https://flags.example.com/us.svg"
  }
]
}

Error Responses

401Unauthorized - Invalid or missing authentication

{
"success": false,
"status": 401,
"code": "UNAUTHORIZED",
"message": "Authentication required"
}

403Forbidden - Insufficient permissions

{
"success": false,
"status": 403,
"code": "FORBIDDEN",
"message": "You do not have permission to perform this action"
}