diff --git a/README.md b/README.md index 6a10281..9458220 100644 --- a/README.md +++ b/README.md @@ -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