feat(representation): update representation deactivation logic and enhance API documentation
This commit is contained in:
+21
-3
@@ -621,12 +621,30 @@ List all representations.
|
||||
| Param | Type | Required | Description |
|
||||
|-------|------|----------|-------------|
|
||||
| `page` | integer | ❌ | Default: 1 |
|
||||
| `limit` | integer | ❌ | Default: 20 |
|
||||
| `search` | string | ❌ | Search by name |
|
||||
| `limit` | integer | ❌ | Default: 15 |
|
||||
| `search` | string | ❌ | Search by name or mobile (representation's or linked user's) |
|
||||
| `city_id` | integer | ❌ | Filter by city |
|
||||
|
||||
### Response `200`
|
||||
Paginated representation list.
|
||||
Paginated representation list. Each item:
|
||||
```json
|
||||
{
|
||||
"id": 3,
|
||||
"uuid": "...",
|
||||
"full_name": "حامد حسینی",
|
||||
"mobile_number": "09120671756",
|
||||
"city_id": 132,
|
||||
"city": "یزد",
|
||||
"commission_percent": 10.0,
|
||||
"wallet_balance": 0,
|
||||
"is_active": true,
|
||||
"created_at": "2026-06-18T..."
|
||||
}
|
||||
```
|
||||
|
||||
> `mobile_number` falls back to the linked user's mobile when the representation's own `mobile_number` column is empty.
|
||||
|
||||
> **Deactivation, not deletion:** the admin panel deactivates a representation via `PATCH /api/v1/representation/{uuid}` with `{ "active": false }` rather than calling `DELETE`.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user