API and AuthenticationClient API
Get Profile
Retrieve the authenticated customer's profile
Get Profile
Returns the authenticated user's account information and linked customer profile.
Endpoint
GET /profileAuthentication
Requires a valid JWT access token.
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9...Example Request
curl -X GET "https://edge.tiquo.app/api/client/v1/profile" \
-H "Authorization: Bearer eyJhbGciOiJSUzI1NiJ9..."Response
{
"success": true,
"data": {
"user": {
"id": "user_abc123",
"email": "customer@example.com"
},
"customer": {
"id": "cust_456",
"firstName": "John",
"lastName": "Doe",
"displayName": "John Doe",
"customerNumber": "CUST-000001",
"email": "customer@example.com",
"phone": "+1234567890",
"profilePhoto": "https://example.com/photo.jpg",
"status": "active",
"totalOrders": 5,
"totalSpent": 150.00,
"lifetimeValue": 200.00
}
}
}User Object
| Field | Type | Description |
|---|---|---|
id | string | The user's unique ID |
email | string | The user's email address |
Customer Object
The customer field is included when the user has a linked customer profile in the organization. If no customer record exists, this field will be null.
| Field | Type | Description |
|---|---|---|
id | string | Customer document ID |
firstName | string or null | First name |
lastName | string or null | Last name |
displayName | string or null | Full display name |
customerNumber | string | Human-readable customer number (e.g. CUST-000001) |
email | string or null | Primary email address |
phone | string or null | Phone number |
profilePhoto | string or null | URL to profile photo |
status | string | One of: active, inactive, archived |
totalOrders | integer or null | Total number of orders |
totalSpent | number or null | Total amount spent |
lifetimeValue | number or null | Customer lifetime value |
Errors
| Status | Description |
|---|---|
400 | No customer profile is linked to this account |
401 | Invalid or expired access token |
500 | Internal server error |
Code Examples
JavaScript
const response = await fetch('https://edge.tiquo.app/api/client/v1/profile', {
headers: {
'Authorization': `Bearer ${accessToken}`,
},
});
const { success, data, error } = await response.json();
if (success) {
console.log(data.user.email);
console.log(data.customer?.displayName);
}Swift
var request = URLRequest(url: URL(string: "https://edge.tiquo.app/api/client/v1/profile")!)
request.setValue("Bearer \(accessToken)", forHTTPHeaderField: "Authorization")
let (data, _) = try await URLSession.shared.data(for: request)
let result = try JSONDecoder().decode(ProfileResponse.self, from: data)Kotlin
val client = OkHttpClient()
val request = Request.Builder()
.url("https://edge.tiquo.app/api/client/v1/profile")
.addHeader("Authorization", "Bearer $accessToken")
.build()
val response = client.newCall(request).execute()