Skip to content

Get Product By ID

Get a specific product by its ID for the authenticated store.

Endpoint

GET /v1/products/store/get-by/?id={product_id}

Authentication

Required (Store role)

Query Parameters

Parameter Type Required Description
id integer Yes Product ID

Response

Success (200 OK)

{
  "id": 1,
  "store_id": 5,
  "store": {
    "id": 5,
    "email": "store@example.com",
    "name": "My Store",
    "description": "Store description",
    "logo_url": "https://...",
    "business_address": "123 Main St",
    "preferred_language": "AZERBAIJANI",
    "contact_phone": "+994501234567",
    "percent": 10.5,
    "created": "2025-01-15T10:30:00Z"
  },
  "category_id": 3,
  "category": {
    "id": 3,
    "name": "Electronics",
    "image": "https://...",
    "parent_id": null
  },
  "brand_id": 2,
  "brand": {
    "id": 2,
    "name": "Brand Name",
    "image": "https://...",
    "created": "2025-01-15T10:30:00Z"
  },
  "currency_id": 1,
  "currency": {
    "id": 1,
    "name": "AZN",
    "value": 1.0
  },
  "created": "2025-01-15T10:30:00Z"
}

Error Responses

Product Not Found (404)

{
  "error": "Product not found"
}

Missing ID Parameter (400)

{
  "message": "Param not send!"
}

Example Request

curl -X GET "https://api.luxmart.site/v1/products/store/get-by/?id=1" \
  -H "Authorization: Token your_access_token"

Notes

  • Only returns products belonging to the authenticated store
  • Only returns non-deleted products
  • Product must not have any variants (base products only)