User Profile
Get or update a user’s profile information.
Get Profile
Endpoint
GET ${baseUrl}/users
Response
interface UserProfileResponse {
success: boolean
data: {
email: string
firstname: string
lastname: string
address1?: string
address2?: string
city?: string
state?: string
country?: string
postalCode?: string
phoneNumber?: string
referralCode: string
paypalId?: string
secondaryEmail?: string
splInstructions?: string
industry?: string
}
}
Update Profile
Endpoint
PUT ${baseUrl}/users
Request Body
interface UpdateProfileRequest {
firstname?: string
lastname?: string
address1?: string
address2?: string
city?: string
state?: string
country?: string
postalCode?: string
phoneNumber?: string
}
Example Request
const response = await fetch('${baseUrl}/users', {
method: 'PUT',
headers: {
'Content-Type': 'application/json',
Authorization: 'Basic YOUR_API_KEY',
},
body: JSON.stringify({
firstname: 'John',
lastname: 'Doe',
address1: '123 Main St',
city: 'New York',
country: 'USA',
}),
})
const data = await response.json()
Error Codes
Status Code | Description |
---|---|
200 | Success |
400 | Invalid Request Body |
401 | Unauthorized |
403 | Forbidden |
500 | Server Error |