Opportunity Source
GET https://leads.qreq.com/api/opportunity-sources
curl --request GET \
--url 'https://leads.qreq.com/api/opportunity-sources' \
--header 'Authorization: Bearer {api_key}'
--url 'https://leads.qreq.com/api/opportunity-sources' \
--header 'Authorization: Bearer {api_key}'
{
"status": "success",
"message": "Opportunity sources fetched successfully.",
"data": {
"current_page": 1,
"data": [
{
"id": 1,
"name": "test source",
"description": "test source description",
"status": "active",
"created_by": 33,
"created_at": "2025-11-03T06:17:26.000000Z",
"updated_at": "2025-11-03T06:17:26.000000Z"
}
],
"first_page_url": "https://leads.qreq.com/api/opportunity-sources?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "https://leads.qreq.com/api/opportunity-sources?page=1",
"links": [
{
"url": null,
"label": "« Previous",
"page": null,
"active": false
},
{
"url": "https://leads.qreq.com/api/opportunity-sources?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/opportunity-sources",
"per_page": 10,
"prev_page_url": null,
"to": 1,
"total": 1
}
}
POST https://leads.qreq.com/api/opportunity-sources
| Parameters | Details | Description |
|---|---|---|
| name | Required String | Opportunity source name |
| description | Optional String | Optional description |
| status | Optional String | Active or inactive. Defaults to active |
curl --request POST \
--url 'https://leads.qreq.com/api/opportunity-sources' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: application/json' \
--data-raw '{ "name": "Referral", "description": "Lead from referral", "status": "active" }'
--url 'https://leads.qreq.com/api/opportunity-sources' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: application/json' \
--data-raw '{ "name": "Referral", "description": "Lead from referral", "status": "active" }'
{
"message": "Opportunity source created successfully.",
"opportunitySource": {
"name": "test source 2",
"description": "test description 2",
"status": "active",
"created_by": 33,
"updated_at": "2025-11-03T06:18:55.000000Z",
"created_at": "2025-11-03T06:18:55.000000Z",
"id": 2
}
}
PUT https://leads.qreq.com/api/opportunity-sources/{source_id}
| Parameters | Details | Description |
|---|---|---|
| name | Optional String | Opportunity source name |
| description | Optional String | Optional description |
| status | Optional String | Active or inactive |
curl --request PUT \
--url 'https://leads.qreq.com/api/opportunity-sources/{source_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: application/json' \
--data-raw '{ "name": "Website", "description": "Lead from website", "status": "inactive" }'
--url 'https://leads.qreq.com/api/opportunity-sources/{source_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: application/json' \
--data-raw '{ "name": "Website", "description": "Lead from website", "status": "inactive" }'
{
"message": "Opportunity source updated successfully.",
"opportunitySource": {
"id": 2,
"name": "test source 3",
"description": "test description 3",
"status": "active",
"created_by": 33,
"created_at": "2025-11-03T06:18:55.000000Z",
"updated_at": "2025-11-03T06:20:09.000000Z"
}
}
DELETE https://leads.qreq.com/api/opportunity-sources/{source_id}
curl --request DELETE \
--url 'https://leads.qreq.com/api/opportunity-sources/{source_id}' \
--header 'Authorization: Bearer {api_key}'
--url 'https://leads.qreq.com/api/opportunity-sources/{source_id}' \
--header 'Authorization: Bearer {api_key}'
{
"message": "Opportunity source deleted successfully."
}
PATCH https://leads.qreq.com/api/opportunity-sources/{source_id}/toggle-status
curl --request PATCH \
--url 'https://leads.qreq.com/api/opportunity-sources/{source_id}/toggle-status' \
--header 'Authorization: Bearer {api_key}'
--url 'https://leads.qreq.com/api/opportunity-sources/{source_id}/toggle-status' \
--header 'Authorization: Bearer {api_key}'
{
"message": "Opportunity source status updated successfully.",
"opportunitySource": {
"id": 2,
"name": "test source 3",
"description": "test description 3",
"status": "inactive",
"created_by": 33,
"created_at": "2025-11-03T06:18:55.000000Z",
"updated_at": "2025-11-03T06:21:07.000000Z"
}
}