Skip to main content

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

ParameterTypeDefaultDescription
limitinteger10Number of results to return per page
offsetinteger0Number of results to skip before returning results
searchstringSearch term to lookup results by `title`, `excerpt`, `year`, `client__name`
orderingstringorder, -created_atOrder results by (`title`, `order`, `year`, `client__name`)
year_mininteger-Filter portfolios that their released/finished/published year is greater than the specified value
year_maxinteger-Filter portfolios that their released/finished/published year is lower than the specified value

Example Requests

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

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 Portfolio objects

Portfolio Object Structure

FieldTypeDescription
idIntegerUnique ID of the portfolio
titleStringportfolio title (unique)
slugStringunique slug of the portfolio
excerptStringShort description of the portfolio
orderIntegerDisplay order of the portfolio
yearIntegerThe year that the project has been finished/released/published
image_dataObjectportfolio image details (nullable)
client_dataObjectportfolio client details (nullable)
tags_dataList(object)list of portfolio tags (nullable)
links_dataList(object)list of portfolio related links (nullable)
created_atString (ISO 8601)Timestamp when portfolio was created
updated_atString (ISO 8601)Timestamp when portfolio was last updated

Image Data Structure

FieldTypeDescription
idIntegerUnique ID of the image
typeStringFile type (e.g., image/jpeg)
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)

Client Data Structure

FieldTypeDescription
idIntegerUnique ID of the client
nameStringclient name (unique)
descriptionStringDescription of the client (nullable)
image_dataObjectclient image details

Tag Data Structure

FieldTypeDescription
idIntegerUnique ID of the tag
nameStringtag name (unique)
image_dataObjecttag image details

Link Data Structure

FieldTypeDescription
idIntegerUnique ID of the link
nameStringlink name (not unique)
urlURLFieldURL related to the link(nullable)
descriptionStringDescription of the link (nullable)
image_dataObjectlink 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": "این لینک پروژه است"
}
]
},
]
}