Skip to content

Commit

Permalink
Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Zaptoss committed Jun 3, 2024
1 parent 3cc53b0 commit 965e0c3
Showing 1 changed file with 30 additions and 7 deletions.
37 changes: 30 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,37 @@ not allow it interactions with the system, although it is technically possible
to do other actions.

Path: `/integrations/rarime-points-svc/v1/private/referrals`
Query parameters:
- `did` - user DID to create or edit referrals for
- `count` - number of referrals to set

Example to set 200 referrals for user `did:example:123`:
```shell
curl -X POST "http://localhost/integrations/rarime-points-svc/v1/private/referrals?did=did:example:123&count=200"
Body:
```json
{
"nullifier": "0x0000000000000000000000000000000000000000000000000000000000000000",
"count": 2,
"genesis": true
}
```
Response variants:
```json
{
"added_ref": "kPRQYQUcWzW",
"usage_left": 2
}
```
or
```json
{
"added_referrals":[
"kPRQYQUcWzW",
"kPRQYQUcaaa",
"kPRQYQUcbbb",
"kPRQYQUcccc"
]
}
```
Parameters:
- `nullifier` - nullifier to create or edit referrals for
- `count` - number of referrals to set/number of referral usage for genesis
- `genesis` - specify add many referrals with one usage or one referral with many usage


Behavior:
a) User does not exist -> create a _System user_ with the specified number of
Expand Down

0 comments on commit 965e0c3

Please sign in to comment.