MOR API v2 me
From Kolmisoft Wiki
Jump to navigationJump to search
Account profile (/me)
Returns or updates the profile of the user identified by the Bearer JWT (self-service only — not for editing other users).
Authentication and permissions
- Bearer JWT (same as other MOR API v2 methods).
- All user types may call when permitted.
- Each call requires v2_me_show (GET) or v2_me_update (PATCH) on the user's API permission group.
Endpoints
Base path: {Web_Dir}/api/v2/me (for example /billing/api/v2/me).
| Method | Path | ACL name | Description |
|---|---|---|---|
| GET | /me |
v2_me_show |
Current user's profile (same fields as legacy MOR API user details get for the authenticated user). |
| PATCH | /me |
v2_me_update |
Update personal details (GUI Personal details parity; simple users allowed when settings permit). |
GET response (200)
{
"me": {
"id": 123,
"username": "user1",
"usertype": "user",
"first_name": "Jane",
"last_name": "Doe",
"balance_number": "10.0",
"balance_currency": "USD",
"details_editing_allowed": true,
"email_editing_allowed": true,
"address": { "email": "jane@example.com", "city": "..." },
"invoices": { ... },
"warning_balance": { ... }
}
}
Role-specific fields (tariff, PBX pool, accountant ID, etc.) appear only when the viewer's role allows (same rules as MOR API user details get).
PATCH body
Send application/json or form fields. Updatable fields match the GUI personal details:
- Names and company:
first_name,last_name,company_name - Address: nested
addressobject or flataddress,city,postcode,email, etc. password— must meet system password rules- Invoice delivery flags:
simplified_pdf,simplified_csv, and related invoice type toggles - Warning balance:
warning_email_active,warning_balance_email
Success: 200 with updated me object.
Errors
- 403 — Owner setting Disallow Details Editing blocks simple users:
{ "errors": "Details editing is disabled" } - 422 — Validation (password, address, email when email editing disabled, empty body, etc.)
See also
- MOR API user details get — legacy XML read (hash-based)
- Authentication — obtain Bearer token