Skip to main content

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

ParameterTypeDescriptionValidation Rules
search_textstringSearch in email, full name, and unpaid amountOptional
filter[affiliated_sales_unpaid_amount]stringFilter by unpaid sales amountOptional
filter[affiliate_percentage]numberFilter by affiliate percentageOptional
filter[affiliate_active]booleanFilter by active statusOptional
filter[role_updated_at]datetimeFilter by role update dateOptional
per_pageintegerNumber of items per pageOptional, 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