Affiliated Customer
This section covers the API endpoints for managing affiliated customers (affiliate marketers) in the admin panel.
List Affiliate Marketers
GET /v1/admin/affiliate-marketers
Returns a paginated list of all affiliate marketers.
Query Parameters
| Parameter | Type | Description | Validation Rules |
|---|---|---|---|
search_text | string | Search in email, full name, and unpaid amount | Optional |
filter[affiliated_sales_unpaid_amount] | string | Filter by unpaid sales amount | Optional |
filter[affiliate_percentage] | number | Filter by affiliate percentage | Optional |
filter[affiliate_active] | boolean | Filter by active status | Optional |
filter[role_updated_at] | datetime | Filter by role update date | Optional |
per_page | integer | Number of items per page | Optional, defaults to 10 |
Response
{
"success": true,
"message": "تم جلب البيانات بنجاح.",
"data": {
"current_page": 1,
"first_page_url": "http://testing-api.sumaya369.net/v1/admin/affiliate-marketers?page=1",
"from": 1,
"last_page": 2,
"last_page_url": "http://testing-api.sumaya369.net/v1/admin/affiliate-marketers?page=2",
"links": [
{
"url": null,
"label": "« السابق",
"active": false
},
{
"url": "http://testing-api.sumaya369.net/v1/admin/affiliate-marketers?page=1",
"label": "1",
"active": true
},
{
"url": "http://testing-api.sumaya369.net/v1/admin/affiliate-marketers?page=2",
"label": "التالي »",
"active": false
}
],
"next_page_url": "http://testing-api.sumaya369.net/v1/admin/affiliate-marketers?page=2",
"path": "http://testing-api.sumaya369.net/v1/admin/affiliate-marketers",
"per_page": 10,
"prev_page_url": null,
"to": 10,
"total": 14,
"affiliate_marketers": [
{
"id": "1ab51340-e46e-11ef-a1af-35574e915cad",
"full_name": "تست",
"email": "test99@test.com",
"affiliate_active": true,
"affiliate_percentage": "%20",
"affiliated_sales_unpaid_amount": 125.22,
"affiliate_link": "https://testing-storefront.sumaya369.net/?ref=test99"
},
{
"id": "bc30de80-8c7e-11ef-9596-e144fb18491c",
"full_name": "test11 test",
"email": "test11@test.com",
"affiliate_active": true,
"affiliate_percentage": "%20",
"affiliated_sales_unpaid_amount": 0,
"affiliate_link": "https://testing-storefront.sumaya369.net/?ref=test11"
},
]
},
"status_code": 200
}
Export Affiliate Marketers
GET /v1/admin/export-marketers
Exports affiliate marketers data to a downloadable file.
Response
Downloads a file containing affiliate marketers data in the specified format.
Notes
- The list endpoint supports pagination and various filtering options
- Search functionality covers email, full name, and unpaid amount fields
- Results are sorted by role update date in descending order by default
- The export functionality provides a convenient way to download affiliate marketer data for offline analysis