Get Public Profile by Code
Retrieve a user's public CANSKAN profile using their unique profile code.
GET /public/profile/{code}
Retrieve a public CANSKAN profile using the user's unique profile code.
Base URL
https://api.canskan.comEndpoint
GET /public/profile/{code}Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
code |
string | Yes | The user's unique profile code (alphanumeric identifier) |
Example:
abc123xyzRequest
HTTP Request
GET https://api.canskan.com/public/profile/abc123xyz
Accept: application/jsonNo authentication is required for this endpoint.
Response
Successful Response (200 OK)
Returns the user's public profile data. Only fields that the user has enabled in their privacy settings will be included.
{
"data": {
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"phone": "+1234567890",
"birthday": "1990-05-15",
"address": {
"street": "123 Main St",
"city": "New York",
"state": "NY",
"postal_code": "10001",
"country": "United States"
},
"employment": {
"job_title": "Software Engineer",
"company": "Tech Corp"
}
}
}Response Fields
All fields are optional and only appear if the user has enabled them in their public profile settings.
| Field | Type | Description |
|---|---|---|
first_name |
string | User's first name |
last_name |
string | User's last name |
email |
string | User's email address |
phone |
string | User's phone number |
birthday |
string | User's birthday (YYYY-MM-DD format) |
address |
object | User's address information |
address.street |
string | Street address |
address.city |
string | City |
address.state |
string | State or province |
address.postal_code |
string | Postal/ZIP code |
address.country |
string | Country |
employment |
object | User's employment information |
employment.job_title |
string | Job title |
employment.company |
string | Company name |
Error Responses
403 Forbidden – Profile is Private
Returned when the user has disabled their public profile.
{
"message": "This profile is private."
}404 Not Found – Profile Not Found
Returned when no user exists with the given profile code.
{
"message": "Profile not found."
}429 Too Many Requests – Rate Limit Exceeded
{
"message": "Too many requests. Please wait before trying again."
}Rate Limiting
Public access to this endpoint is rate-limited.
- Limit: 60 requests per minute per IP
- The API returns the following headers with each response:
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 42
X-RateLimit-Reset: 1732099200X-RateLimit-Resetis a Unix timestamp indicating when the limit resets.
Usage Examples
Privacy & User Control
Users control which fields are visible on their public profile through their account settings. The API respects these privacy preferences:
- Public Profile Toggle: Users can completely disable their public profile, which returns a 403 error.
- Field-level Control: Users can choose which specific fields (name, email, phone, etc.) to display publicly.
If a field is not enabled by the user, it will not appear in the response.
Additional Notes
- The
codeparameter is case-sensitive. - Only public profile information is returned based on user privacy settings.
- The API supports CORS for client-side requests from any origin.
- Empty or null fields are omitted from the response.