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.10.0
2026-08-01 01:24 UTC
Requires
- php: ^8.3
- illuminate/support: ^13.0
- misaf/vendra-affiliate: v1.10.0
- misaf/vendra-api: v1.10.0
- spatie/laravel-package-tools: ^1.93.1
Requires (Dev)
- fakerphp/faker: ^1.24.1
- larastan/larastan: ^3.10.0
- laravel/boost: ^2.4.12
- laravel/pint: ^1.29.3
- misaf/vendra-testing: v1.10.0
- mockery/mockery: ^1.6.12
- nunomaduro/collision: ^8.9.4
- orchestra/testbench: ^11.1
- pestphp/pest: ^5.0
- pestphp/pest-plugin-arch: ^5.0
- pestphp/pest-plugin-laravel: ^5.0
- pestphp/pest-plugin-profanity: ^5.0
- pestphp/pest-plugin-type-coverage: ^5.0
- phpstan/extension-installer: ^1.4.3
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.3+
- 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 package directory:
composer test
composer analyse
License
MIT. See LICENSE.