Skip to content

New Arrival APIs


1. New Arrival List

Endpoint

  • URL: /api/v1/catalog/new-arrival/list/
  • Method: GET
  • Permission Required: AllowAny

Description

This endpoint returns a list of new arrival products. You can filter, sort, and search the products using query parameters. The products are returned with pagination, and the results include detailed product information.

Request Parameter

You can use various query parameters to filter, sort, and search products.

Query Parameter

Parameter Type Description
size string Filter products by size (e.g., "M", "L", "XL").
color array Filter products by color. You can pass multiple values (e.g., ?color=red&color=blue).
brand array Filter products by brand (e.g., ?brand=Nike&brand=Adidas).
fabric array Filter products by fabric type (e.g., ?fabric=cotton&fabric=polyester).
min_price integer Filter products with a minimum price (e.g., ?min_price=100).
max_price integer Filter products with a maximum price (e.g., ?max_price=500).
subcategory array Filter by subcategories (e.g., ?subcategory=shirts&subcategory=jackets).
category array Filter by categories (e.g., ?category=clothing&category=accessories).
discount_range integer Filter products by discount range (e.g., ?discount_range=10 for products with a discount between 10%-19%).
rating float Filter products by minimum average rating (e.g., ?rating=4.0).
product_promotion integer Filter products by promotion discount percentage (e.g., ?product_promotion=20 for products with up to 20% discount).

Response Examples

Success

{
  "count": 25,
  "next": "/api/v1/catalog/new-arrival/list/?page=2",
  "previous": null,
  "results": [
    {
      "id": 1,
      "name": "Red Cotton Shirt",
      "description": "A comfortable red cotton shirt for casual wear.",
      "price": 199.99,
      "discount_percent": 15,
      "avg_rating": 4.5,
      "category": {
        "name": "Shirts",
        "slug": "shirts"
      },
      "product_image": [
        "https://example.com/media/images/red_cotton_shirt.jpg"
      ],
      "product_variant": [
        {
          "size": "M",
          "color": "red",
          "is_active": true
        },
        {
          "size": "L",
          "color": "red",
          "is_active": true
        }
      ]
    },
    {
      "id": 2,
      "name": "Blue Denim Jeans",
      "description": "Stylish blue denim jeans for casual wear.",
      "price": 299.99,
      "discount_percent": 10,
      "avg_rating": 4.2,
      "category": {
        "name": "Jeans",
        "slug": "jeans"
      },
      "product_image": [
        "https://example.com/media/images/blue_denim_jeans.jpg"
      ],
      "product_variant": [
        {
          "size": "M",
          "color": "blue",
          "is_active": true
        },
        {
          "size": "L",
          "color": "blue",
          "is_active": true
        }
      ]
    }
  ]
}


Error Handling

The API will return standard HTTP status codes for different scenarios:

  • 200 OK: The request was successful, and the response contains the requested data.
  • 400 Bad Request: Invalid query parameters were provided (e.g., invalid min_price or rating).
  • 404 Not Found: The requested resource does not exist.
  • 500 Internal Server Error: An unexpected error occurred on the server.

Error

{
  "detail": "Invalid query parameter: rating must be a float value."
}