List Portfolio employers
Retrieves a list of all Portfolio employers with filtering, searching, and ordering capabilities.
HTTP Request
GET/api/portfolios/employers/
NOTE: NOT USING THE TRAILING SLASH AT THE END OF THE URL RESULTS TO AN EXTRA REDIRECT WITH 301 STATUS
Authorization
Authorization
- Required: Yes
- Permission: Staff with PorfolioEmployerPermission or Admin
- Permission Code: 4222
- Authentication: Token-based (Authorization: Token <your_api_key>)
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| limit | integer | 10 | Number of results to return per page |
| offset | integer | 0 | Number of results to skip before returning results |
| search | string | — | Search term to lookup results by `id`, `name` |
| ordering | string | order, -created_at | Order results by (`id`, `name`, `created_at`, `updated_at`) |
| id_min | integer | — | Minimum ID filter |
| id_max | integer | — | Maximum ID filter |
| created_date | string | — | Filter by creation date (e.g., 2023-01-01) |
| updated_date | string | — | Filter by last updated date (e.g., 2023-01-01) |
| created_from | string | — | Filter by creation date range start |
| created_to | string | — | Filter by creation date range end |
| updated_from | string | — | Filter by last updated date range start |
| updated_to | string | — | Filter by last updated date range end |
| has_image | boolean | — | Filter employers with/without image |
| has_description | boolean | - | Filter employers with/without description |
Example Requests
- 🐍 Python
- 🌐 Curl
1import requests
2
3# List all employers
4response = requests.get('http://www.example.com/api/portfolios/employers/',
5 headers={'Authorization': 'Token <your_api_key>'}
6)
7print(response.json())
8
9# Search for employers with filters
10response = requests.get('http://www.example.com/api/portfolios/employers', params={
11 'search': 'nike',
12 'has_image': True,
13 'limit': 20
14}, headers={'Authorization': 'Token <your_api_key>'})
15print(response.json())1# List all employers
2curl "http://www.example.com/api/portfolios/employers/" -H "Authorization: Token <your_api_key>"
3
4# Search with filters
5curl "http://www.example.com/api/portfolios/employers?search=nike&has_image=true&limit=20" \
6-H "Authorization: Token <your_api_key>"Response Fields
| Field | Type | Description |
|---|---|---|
| count | Integer | Total number of categories |
| next | String | URL for the next page of results |
| previous | String | URL for the previous page of results |
| results | Array[Object] | Array of Portfolioemployer objects |
Portfolioemployer Object Structure
| Field | Type | Description |
|---|---|---|
| id | Integer | Unique ID of the portfolio employer |
| name | String | Portfolio employer name (unique) |
| image_data | Object | Portfolio employer image details (nullable) |
| description | String | The description of the employer (nullable) |
| created_at | String (ISO 8601) | Timestamp when employer was created |
| updated_at | String (ISO 8601) | Timestamp when employer was last updated |
Image Data Structure
| Field | Type | Description |
|---|---|---|
| id | Integer | Unique ID of the image |
| type | String | File type (e.g., image/jpeg) |
| name | String | Original file name |
| size | Integer | File size in bytes |
| human_readable_size | String | Human readable file size (e.g., 2.5 MB) |
| f | String | URL to access the image file |
| width | Integer | Image width in pixels |
| height | Integer | Image height in pixels |
| mode | String | Color mode (e.g., RGB, CMYK) |
| thumbnails | List of thumbnail objects | Imgae thumbnails |
Thumbnail Data Structure
| Field | Type | Description |
|---|---|---|
| id | Integer | Unique ID of the thumbnail (unique) |
| f | String | URL to access the thumbnail file |
| size | Integer | File size in bytes (nullable) |
Example Response
{
"count": 2,
"next": null,
"previous": null,
"results": [
{
"id": 2,
"name": "شرکت شماره یک",
"image_data": null,
"description": "توضیحات مربوط به کارفرما",
"created_at": "2026-01-12T16:55:44.777275Z",
"updated_at": "2026-01-12T16:55:44.777282Z"
},
{
"id": 1,
"name": "شرکت معین",
"image_data": {
"id": 4,
"type": "image",
"name": "rams",
"size": 118805,
"human_readable_size": "116.02 KB",
"f": "http://localhost:8000/media/core_media/2025/11/29/RAMFeatured.jpg",
"width": 1280,
"height": 720,
"mode": "RGB",
"thumbnails": [
{
"id": 213,
"f": "http://127.0.0.1:8000/media/core_media/2026/02/02/thumbnails/test2_ecH0zVV_thumbnail_64x64.jpg",
"size": 64
},
{
"id": 214,
"f": "http://127.0.0.1:8000/media/core_media/2026/02/02/thumbnails/test2_ecH0zVV_thumbnail_128x128.jpg",
"size": 128
},
{
"id": 215,
"f": "http://127.0.0.1:8000/media/core_media/2026/02/02/thumbnails/test2_ecH0zVV_thumbnail_512x512.jpg",
"size": 512
},
{
"id": 216,
"f": "http://127.0.0.1:8000/media/core_media/2026/02/02/thumbnails/test2_ecH0zVV_thumbnail_1080x1080.jpg",
"size": 1080
}
]
},
"description": "توضیحات مربوط به کارفرما",
"created_at": "2026-01-12T15:07:49.249264Z",
"updated_at": "2026-01-12T17:01:55.336400Z"
}
]
}