List Porfolios
Retrieves a list of all active portfolio with filtering, searching, and ordering capabilities.
HTTP Request
GET/api/shop/portfolios/
NOTE: NOT USING THE TRAILING SLASH AT THE END OF THE URL RESULTS TO AN EXTRA REDIRECT WITH 301 STATUS
Authorization
Authorization
- Required: No
- Permission: —
- Authentication: —
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 `title`, `excerpt`, `year`, `client__name` |
| ordering | string | order, -created_at | Order results by (`title`, `order`, `year`, `client__name`) |
| year_min | integer | - | Filter portfolios that their released/finished/published year is greater than the specified value |
| year_max | integer | - | Filter portfolios that their released/finished/published year is lower than the specified value |
Example Requests
- 🐍 Python
- 🌐 Curl
1import requests
2
3# List all portfolios
4response = requests.get('http://www.example.com/api/shop/portfolios/'
5)
6print(response.json())
7
8# Search for portfolios with filters
9response = requests.get('http://www.example.com/api/shop/portfolios', params={
10 'search': 'site',
11 'limit': 20
12})
13print(response.json())1# List all portfolios
2curl "http://www.example.com/api/shop/portfolios/"
3
4# Search with filters
5curl "http://www.example.com/api/shop/portfolios?search=site&limit=20" \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 Portfolio objects |
Portfolio Object Structure
| Field | Type | Description |
|---|---|---|
| id | Integer | Unique ID of the portfolio |
| title | String | portfolio title (unique) |
| slug | String | unique slug of the portfolio |
| excerpt | String | Short description of the portfolio |
| order | Integer | Display order of the portfolio |
| year | Integer | The year that the project has been finished/released/published |
| image_data | Object | portfolio image details (nullable) |
| client_data | Object | portfolio client details (nullable) |
| tags_data | List(object) | list of portfolio tags (nullable) |
| links_data | List(object) | list of portfolio related links (nullable) |
| created_at | String (ISO 8601) | Timestamp when portfolio was created |
| updated_at | String (ISO 8601) | Timestamp when portfolio 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) |
Client Data Structure
| Field | Type | Description |
|---|---|---|
| id | Integer | Unique ID of the client |
| name | String | client name (unique) |
| description | String | Description of the client (nullable) |
| image_data | Object | client image details |
Tag Data Structure
| Field | Type | Description |
|---|---|---|
| id | Integer | Unique ID of the tag |
| name | String | tag name (unique) |
| image_data | Object | tag image details |
Link Data Structure
| Field | Type | Description |
|---|---|---|
| id | Integer | Unique ID of the link |
| name | String | link name (not unique) |
| url | URLField | URL related to the link(nullable) |
| description | String | Description of the link (nullable) |
| image_data | Object | link image details |
Example Response
{
"count": 13,
"next": "http://localhost:8000/api/shop/portfolios/?limit=2&offset=2&ordering=-title",
"previous": null,
"results": [
{
"id": 76,
"title": "طراحتی وبلاگ وردپرسی",
"slug": "weblog-wordpress",
"excerpt": "توضیجات مختصر پروژه",
"order": 1,
"year": 2004,
"image_data": {
"id": 6,
"type": "image",
"name": "technology",
"size": 5123,
"human_readable_size": "5.00 KB",
"f": "http://localhost:8000/media/core_media/2025/12/02/technology.png",
"width": 225,
"height": 225,
"mode": "P",
"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
}
]
},
"client_data": {
"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": "توضیحات مربوط به کارفرما"
},
"tags_data": [
{
"id": 1,
"name": "django",
"image_data": null
},
{
"id": 2,
"name": "python",
"image_data": {
"id": 7,
"type": "image",
"name": "computers",
"size": 3284,
"human_readable_size": "3.21 KB",
"f": "http://localhost:8000/media/core_media/2025/12/02/computer.png",
"width": 235,
"height": 215,
"mode": "P",
"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
}
]
}
}
],
"links_data": [
{
"id": 1,
"name": "github",
"url": "https://github.com/somewhere",
"image_data": {
"id": 5,
"type": "image",
"name": "keyboard",
"size": 2131742,
"human_readable_size": "2.03 MB",
"f": "http://localhost:8000/media/core_media/2025/11/29/Fantasticheskie_kartinki_dlja_monitora_68_96.jpg",
"width": 2560,
"height": 1600,
"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": "این لینک پروژه است"
}
]
},
]
}