Skip to content

Commit 01ec31e

Browse files
committed
add referral.rst
1 parent 73da231 commit 01ec31e

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Welcome to django-referral-system's documentation!
1313
installation
1414
getting_started
1515
promoter
16+
referral
1617

1718

1819
Key Features

docs/referral.rst

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Referrals Logic
2+
===============
3+
4+
Referral Creation
5+
--------------------
6+
7+
Referrals are created when a promoter shares their referral link, and a new user signs up through that link. This process can be managed through the API.
8+
9+
.. code-block:: bash
10+
11+
POST http://localhost:8000/referrals/
12+
Content-Type: application/json
13+
Authorization: Bearer your_token
14+
15+
{
16+
"email": "[email protected]",
17+
"referral_token": "6B86B273FF",
18+
"referral_source": "email"
19+
}
20+
21+
# Optional field referral_source: 'email' or 'link' (by default: link)
22+
23+
Example response:
24+
25+
.. code-block:: json
26+
27+
{
28+
"userId": 2,
29+
"email": "[email protected]",
30+
"status": "signup",
31+
"invitationMethod": "email",
32+
"commissionRate": "15.00",
33+
"commissionAmount": 0,
34+
"commissionStatus": null
35+
}

0 commit comments

Comments
 (0)