Account Type

GET https://leads.qreq.com/api/account-types
curl --request GET \
--url 'https://leads.qreq.com/api/account-types' \
--header 'Authorization: Bearer {api_key}'
{ "status": "success", "message": "Account types retrieved successfully.", "data": { "current_page": 1, "data": [ { "id": 1, "name": "test account", "description": "test account description", "color": "#fff", "status": "active", "created_by": 33, "created_at": "2025-11-03T07:10:10.000000Z", "updated_at": "2025-11-03T07:10:10.000000Z" } ], "first_page_url": "https://leads.qreq.com/api/account-types?page=1", "from": 1, "last_page": 1, "last_page_url": "https://leads.qreq.com/api/account-types?page=1", "links": [ { "url": null, "label": "« Previous", "page": null, "active": false }, { "url": "https://leads.qreq.com/api/account-types?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/account-types", "per_page": 10, "prev_page_url": null, "to": 1, "total": 1 } }
POST https://leads.qreq.com/api/account-types
Parameter Einzelheiten Beschreibung
name Erforderlich Zeichenfolge Account type name
description Optional Zeichenfolge Optional description
color Optional Zeichenfolge Color in HEX format (e.g., #FF5733)
status Erforderlich Zeichenfolge Active or inactive
curl --request POST \
--url 'https://leads.qreq.com/api/account-types' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: application/json' \
--data-raw '{ "name": "Customer", "description": "Customer accounts", "color": "#3B82F6", "status": "active" }'
{ "status": "success", "message": "Account type created successfully.", "data": { "name": "test account", "description": "test account description", "color": "#fff", "status": "active", "created_by": 33, "updated_at": "2025-11-03T07:10:10.000000Z", "created_at": "2025-11-03T07:10:10.000000Z", "id": 1 } }
PUT https://leads.qreq.com/api/account-types/{account_type_id}
Parameter Einzelheiten Beschreibung
name ErforderlichZeichenfolge Account type name
description OptionalZeichenfolge Optional description
color OptionalZeichenfolge Color in HEX format (e.g., #FF5733)
status ErforderlichZeichenfolge Active or inactive
curl --request PUT \
--url 'https://leads.qreq.com/api/account-types/{account_type_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: application/json' \
--data-raw '{ "name": "Customer", "description": "Updated description", "color": "#10B981", "status": "active" }'
{ "status": "success", "message": "Account type updated successfully.", "data": { "id": 1, "name": "test account 1", "description": "test account description 1", "color": "#fff", "status": "active", "created_by": 33, "created_at": "2025-11-03T07:10:10.000000Z", "updated_at": "2025-11-03T07:12:02.000000Z" } }
DELETE https://leads.qreq.com/api/account-types/{account_type_id}
curl --request DELETE \
--url 'https://leads.qreq.com/api/account-types/{account_type_id}' \
--header 'Authorization: Bearer {api_key}'
{ "status": "success", "message": "Account type deleted successfully." }
PATCH https://leads.qreq.com/api/account-types/{account_type_id}/toggle-status
curl --request PATCH \
--url 'https://leads.qreq.com/api/account-types/{account_type_id}/toggle-status' \
--header 'Authorization: Bearer {api_key}'
{ "status": "success", "message": "Account type status updated successfully.", "data": { "id": 1, "name": "test account 1", "description": "test account description 1", "color": "#fff", "status": "inactive", "created_by": 33, "created_at": "2025-11-03T07:10:10.000000Z", "updated_at": "2025-11-03T07:14:31.000000Z" } }