Category

GET https://leads.qreq.com/api/categories
curl --request GET \
--url 'https://leads.qreq.com/api/categories' \
--header 'Authorization: Bearer {api_key}'
{ "status": "success", "message": "Categories retrieved successfully.", "data": { "current_page": 1, "data": [ { "id": 2, "name": "Home Appliances", "slug": "home-appliances", "description": "Appliances and electronic devices used for household purposes.", "status": "active", "created_by": 9, "created_at": "2025-11-06T05:17:44.000000Z", "updated_at": "2025-11-06T05:17:44.000000Z" } ], "first_page_url": "https://leads.qreq.com/api/categories?page=1", "from": 1, "last_page": 1, "last_page_url": "https://leads.qreq.com/api/categories?page=1", "links": [ { "url": null, "label": "« Previous", "page": null, "active": false }, { "url": "https://leads.qreq.com/api/categories?page=1", "label": "1", "page": 1, "active": true }, { "url": null, "label": "Next »", "page": null, "active": false } ], "next_page_url": null, "path": "https://leads.qreq.com/api/categories", "per_page": 10, "prev_page_url": null, "to": 1, "total": 1 } }
POST https://leads.qreq.com/api/categories
Parameters Details Description
name Required String Category name
slug Optional String Optional slug for category
description Optional String Category description
status Optional String Active or inactive
curl --request POST \
--url 'https://leads.qreq.com/api/categories' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: application/json' \
--data-raw '{ "name": "Electronics", "slug": "electronics", "description": "All electronic products", "status": "active" }'
{ "status": "success", "message": "Category created successfully.", "data": { "name": "Home Appliances", "slug": "home-appliances", "description": "Appliances and electronic devices used for household purposes.", "status": "active", "created_by": 9, "updated_at": "2025-11-06T05:33:26.000000Z", "created_at": "2025-11-06T05:33:26.000000Z", "id": 3 } }
PUT https://leads.qreq.com/api/categories/{category_id}
curl --request PUT \
--url 'https://leads.qreq.com/api/categories/{category_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: application/json' \
--data-raw '{ "name": "Updated Electronics", "slug": "electronics-updated", "description": "Updated description", "status": "active" }'
{ "status": "success", "message": "Category updated successfully.", "data": { "id": 2, "name": "Home Appliances", "slug": "home-appliances", "description": "Appliances and electronic devices used for household purposes.", "status": "active", "created_by": 9, "created_at": "2025-11-06T05:17:44.000000Z", "updated_at": "2025-11-06T05:17:44.000000Z" } }
DELETE https://leads.qreq.com/api/categories/{category_id}
curl --request DELETE \
--url 'https://leads.qreq.com/api/categories/{category_id}' \
--header 'Authorization: Bearer {api_key}'
{ "status": "success", "message": "Category deleted successfully." }
PATCH https://leads.qreq.com/api/categories/{category_id}/toggle-status
curl --request PATCH \
--url 'https://leads.qreq.com/api/categories/{category_id}/toggle-status' \
--header 'Authorization: Bearer {api_key}'
{ "status": "success", "message": "Category status updated successfully.", "data": { "id": 2, "name": "Home Appliances", "slug": "home-appliances", "description": "Appliances and electronic devices used for household purposes.", "status": "inactive", "created_by": 9, "created_at": "2025-11-06T05:17:44.000000Z", "updated_at": "2025-11-06T05:34:37.000000Z" } }