misaf / vendra-affiliate-api
API services for the vendra-affiliate module
Package info
github.com/misaf/vendra-affiliate-api
Type:vendra-module
pkg:composer/misaf/vendra-affiliate-api
v1.12.3
2026-08-22 21:15 UTC
Requires
- php: ^8.4
- illuminate/support: ^13.0
- misaf/vendra-affiliate: v1.12.3
- misaf/vendra-api: v1.12.3
- spatie/laravel-package-tools: ^1.93.1
README
API Platform resources for public referral lookup and visit recording.
The server intentionally exposes only what referral landing pages need: an
affiliate's code and created_at. Suspended affiliates are invisible, and
no user, commission, or payout data is ever serialized.
Features
- Read-only referral-code collection and detail operations
- Active-affiliate filtering with code lookup
- Validated referral-visit writes delegated to the domain action
- Deliberately restricted serialization with no user or financial data
Requirements
- PHP 8.4+
- Laravel 13
misaf/vendra-affiliatemisaf/vendra-api
Installation
composer require misaf/vendra-affiliate-api
The service provider registers its resources, provider, and processor automatically.
Endpoints
| Method | URI | Description |
|---|---|---|
| GET | /api/marketing/affiliates |
List active referral codes (code, pagination). |
| GET | /api/marketing/affiliates/{id} |
Show one active referral code. |
| POST | /api/marketing/affiliate-clicks |
Record a validated referral visit. |
Testing
Run the package checks from the project root:
php artisan test --compact --testsuite=vendra-affiliate-api
composer stan
License
MIT. See LICENSE.