Users
Main User Fields
Field | Value Example | Type | Description | How it Can Be Used | Constraints |
---|---|---|---|---|---|
id | "58952c58-fcc1-43d8-adbc-032fe48c0d68" | String (UUID) | Unique identifier for the user | Reference specific users | Auto-generated |
name | "Listenfield Support" | String | User's full name | Display and identification | Optional |
phone | "+811234456789" | String | null | Contact phone number | Communication | Optional, max 25 chars |
"support@listenfield.com" | String | null | Email address | Communication and account identification | Optional, max 255 chars, valid email format | |
lang | "en" | String | User's preferred language code | Internationalization and localization | Required, must be one of: "th", "en", "ja", "vi" |
area_unit | "ha" | String | Preferred unit for area measurements | Standardize area calculations | Optional, must be one of: "m2", "rai", "ha", "ac", "10a" |
weight_unit | "ton" | String | Preferred unit for weight measurements | Standardize weight calculations | Optional, must be one of: "ton", "kg" |
soil_units | See "Soil Units Object" below | Object | Soil measurement unit preferences | Soil analysis standardization | Optional |
line_id | "U4af4980629..." | String | null | LINE messenger user ID | Social integration | Optional |
fb_user_id | "10158889162..." | String | null | Facebook user ID | Social integration | Optional |
fcm_registration_id | "dKLO9...Xyz" | String | null | Firebase Cloud Messaging ID | Push notifications | Optional |
slug | "divine-breeze-66" | String | URL-friendly identifier | URL routing and friendly links | Auto-generated |
created_at | "2021-11-15T09:09:35Z" | String (ISO 8601) | Account creation timestamp | Audit trail | Auto-generated |
updated_at | "2025-01-17T07:01:55Z" | String (ISO 8601) | Last update timestamp | Track modifications | Auto-generated |
Soil Units Object
Field | Value Example | Type | Description | Allowed Values |
---|---|---|---|---|
A_P_M3 | "mg/kg" | String | Phosphorus measurement unit | "mg/kg", "ppm" |
A_K_CO | "ppm" | String | Potassium measurement unit | "mmol+/kg", "ppm" |
A_CA_CO | "ppm" | String | Calcium measurement unit | "mmol+/kg", "ppm" |
A_MG_CO | "ppm" | String | Magnesium measurement unit | "mmol+/kg", "ppm" |
A_CEC_CO | "mmol+/kg" | String | CEC measurement unit | "mmol+/kg", "cmol+/kg" |
A_AL_RT | "g/kg" | String | Aluminum measurement unit | "g/kg", "mg/kg" |
A_FE_RT | "g/kg" | String | Iron measurement unit | "g/kg", "mg/kg" |
📄️ Authenticate user login
Authenticates a user. You must have an API token with the `users:read` scope. You can also provide a firebase JWT token.
📄️ Update user info whose token is provided in the request
Update User info. You must have an API token with the `users:admin` or `users:write` scope in order to use this.
📄️ User info based on user token
Get user info