Skip to content

Latest commit

 

History

History
51 lines (46 loc) · 771 Bytes

details.md

File metadata and controls

51 lines (46 loc) · 771 Bytes



Category Details



GET /api/categories/{id}



Calling this endpoint will return the details of a specified category. A category ID can be retrieved from listing all categories.



Expected response:

{
  "status": 200,
  "success": true,
  "error": null,
  "data": {
    "id": 1,
    "parent_id": null,
    "name": "Category A",
    "description": null,
    "subcategories": [
      {
        "id": 2,
        "parent_id": 1,
        "name": "Subcategory B"
      }
    ]
  },
  "meta": null
}

Note: Not all categories will have subcategories.