From 965e0c394168928a431db407ef3b3393ebf027ad Mon Sep 17 00:00:00 2001 From: Zaptoss Date: Mon, 3 Jun 2024 19:34:22 +0300 Subject: [PATCH] Docs --- README.md | 37 ++++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) 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