Skip to main content

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​

ParameterTypeDefaultDescription
limitinteger10Number of results to return per page
offsetinteger0Number of results to skip before returning results
searchstring—Search term to lookup results by `id`, `name`
orderingstringorder, -created_atOrder results by (`id`, `name`, `created_at`, `updated_at`)
id_mininteger—Minimum ID filter
id_maxinteger—Maximum ID filter
created_datestring—Filter by creation date (e.g., 2023-01-01)
updated_datestring—Filter by last updated date (e.g., 2023-01-01)
created_fromstring—Filter by creation date range start
created_tostring—Filter by creation date range end
updated_fromstring—Filter by last updated date range start
updated_tostring—Filter by last updated date range end
has_imageboolean—Filter employers with/without image
has_descriptionboolean-Filter employers with/without description

Example Requests​

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())

Response Fields​

FieldTypeDescription
countIntegerTotal number of categories
nextStringURL for the next page of results
previousStringURL for the previous page of results
resultsArray[Object]Array of Portfolioemployer objects

Portfolioemployer Object Structure

FieldTypeDescription
idIntegerUnique ID of the portfolio employer
nameStringPortfolio employer name (unique)
image_dataObjectPortfolio employer image details (nullable)
descriptionStringThe description of the employer (nullable)
created_atString (ISO 8601)Timestamp when employer was created
updated_atString (ISO 8601)Timestamp when employer was last updated

Image Data Structure

FieldTypeDescription
idIntegerUnique ID of the image
typeStringFile type (e.g., image)
mime_typeStringMime type of the File (e.g., image/jpeg) (nullable)
nameStringOriginal file name
sizeIntegerFile size in bytes
human_readable_sizeStringHuman readable file size (e.g., 2.5 MB)
fStringURL to access the image file
widthIntegerImage width in pixels
heightIntegerImage height in pixels
modeStringColor mode (e.g., RGB, CMYK)
thumbnailsList of thumbnail objectsImgae thumbnails

Thumbnail Data Structure

FieldTypeDescription
idIntegerUnique ID of the thumbnail (unique)
fStringURL to access the thumbnail file
sizeIntegerFile 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",
"mime_type": "image/jpeg",
"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"
}
]
}