aboutsummaryrefslogtreecommitdiffstats
path: root/apidoc/api_data.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2022-10-05 12:15:48 -0700
committerAdam Soltys <[email protected]>2022-10-05 12:15:48 -0700
commitfb91aa048617f0894e01c1e890ec957a3170539f (patch)
tree5630fbe3bb5eb67fc0fba2bba79b8b763609d93a /apidoc/api_data.js
parent160d95f693d7d8a17e864313b06790a841d4e160 (diff)
downloadcoinos-server-fb91aa048617f0894e01c1e890ec957a3170539f.tar.gz
coinos-server-fb91aa048617f0894e01c1e890ec957a3170539f.zip
prettier
Diffstat (limited to 'apidoc/api_data.js')
-rw-r--r--apidoc/api_data.js1302
1 files changed, 661 insertions, 641 deletions
diff --git a/apidoc/api_data.js b/apidoc/api_data.js
index 63c793fa..44a2a9c4 100644
--- a/apidoc/api_data.js
+++ b/apidoc/api_data.js
@@ -1,742 +1,762 @@
-define({ "api": [
- {
- "type": "get",
- "url": "/accounts",
- "title": "Retrieve list of accounts",
- "name": "accounts",
- "group": "Admin",
- "permission": [
- {
- "name": "admin"
- }
- ],
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "optional": false,
- "field": "returns",
- "description": "<p>list of accounts</p>"
- }
- ]
- },
- "examples": [
+define({
+ api: [
+ {
+ type: "get",
+ url: "/accounts",
+ title: "Retrieve list of accounts",
+ name: "accounts",
+ group: "Admin",
+ permission: [
{
- "title": "Success-Response:",
- "content": "HTTP/1.1 200 OK\n{\n \"accounts\" : [\n { \"user\": 'Adam', \"account_id\": '123', balance: 500 ... },\n ...\n ]\n}",
- "type": "json"
+ name: "admin"
}
- ]
- },
- "version": "0.0.0",
- "filename": "routes/admin.js",
- "groupTitle": "Admin"
- },
- {
- "type": "get",
- "url": "/deposits",
- "title": "Retrieve summary of deposits",
- "name": "deposits",
- "group": "Admin",
- "permission": [
- {
- "name": "admin"
- }
- ],
- "success": {
- "fields": {
- "Success 200": [
+ ],
+ success: {
+ fields: {
+ "Success 200": [
+ {
+ group: "Success 200",
+ optional: false,
+ field: "returns",
+ description: "<p>list of accounts</p>"
+ }
+ ]
+ },
+ examples: [
{
- "group": "Success 200",
- "optional": false,
- "field": "returns",
- "description": "<p>list of deposits</p>"
+ title: "Success-Response:",
+ content:
+ 'HTTP/1.1 200 OK\n{\n "accounts" : [\n { "user": \'Adam\', "account_id": \'123\', balance: 500 ... },\n ...\n ]\n}',
+ type: "json"
}
]
},
- "examples": [
+ version: "0.0.0",
+ filename: "routes/admin.js",
+ groupTitle: "Admin"
+ },
+ {
+ type: "get",
+ url: "/deposits",
+ title: "Retrieve summary of deposits",
+ name: "deposits",
+ group: "Admin",
+ permission: [
{
- "title": "Success-Response:",
- "content": "HTTP/1.1 200 OK\n{\n \"deposits\" : [\n { \"seller\": 'Adam', \"buyer\": 'bob' ... },\n ...\n ]\n}",
- "type": "json"
+ name: "admin"
}
- ]
- },
- "version": "0.0.0",
- "filename": "routes/admin.js",
- "groupTitle": "Admin"
- },
- {
- "type": "get",
- "url": "/users",
- "title": "Retrieve user list",
- "name": "getUsers",
- "group": "Admin",
- "permission": [
- {
- "name": "admin"
- }
- ],
- "success": {
- "fields": {
- "Success 200": [
+ ],
+ success: {
+ fields: {
+ "Success 200": [
+ {
+ group: "Success 200",
+ optional: false,
+ field: "returns",
+ description: "<p>list of deposits</p>"
+ }
+ ]
+ },
+ examples: [
{
- "group": "Success 200",
- "type": "Object",
- "optional": false,
- "field": "users",
- "description": "<p>List of users</p>"
+ title: "Success-Response:",
+ content:
+ 'HTTP/1.1 200 OK\n{\n "deposits" : [\n { "seller": \'Adam\', "buyer": \'bob\' ... },\n ...\n ]\n}',
+ type: "json"
}
]
},
- "examples": [
+ version: "0.0.0",
+ filename: "routes/admin.js",
+ groupTitle: "Admin"
+ },
+ {
+ type: "get",
+ url: "/users",
+ title: "Retrieve user list",
+ name: "getUsers",
+ group: "Admin",
+ permission: [
{
- "title": "Success-Response:",
- "content": "HTTP/1.1 200 OK\n{\n \"users\" : [\n { \"username\": 'John Doe', \"email\": '[email protected]', ...},\n { \"username\": 'Jane Doe', \"email\": '[email protected]', ...}\n ]\n}",
- "type": "json"
+ name: "admin"
}
- ]
- },
- "version": "0.0.0",
- "filename": "routes/admin.js",
- "groupTitle": "Admin"
- },
- {
- "type": "get",
- "url": "/invoices",
- "title": "Retrieve summary of invoices",
- "name": "invoices",
- "group": "Admin",
- "permission": [
- {
- "name": "admin"
- }
- ],
- "success": {
- "fields": {
- "Success 200": [
+ ],
+ success: {
+ fields: {
+ "Success 200": [
+ {
+ group: "Success 200",
+ type: "Object",
+ optional: false,
+ field: "users",
+ description: "<p>List of users</p>"
+ }
+ ]
+ },
+ examples: [
{
- "group": "Success 200",
- "optional": false,
- "field": "returns",
- "description": "<p>list of invoices</p>"
+ title: "Success-Response:",
+ content:
+ 'HTTP/1.1 200 OK\n{\n "users" : [\n { "username": \'John Doe\', "email": \'[email protected]\', ...},\n { "username": \'Jane Doe\', "email": \'[email protected]\', ...}\n ]\n}',
+ type: "json"
}
]
},
- "examples": [
+ version: "0.0.0",
+ filename: "routes/admin.js",
+ groupTitle: "Admin"
+ },
+ {
+ type: "get",
+ url: "/invoices",
+ title: "Retrieve summary of invoices",
+ name: "invoices",
+ group: "Admin",
+ permission: [
{
- "title": "Success-Response:",
- "content": "HTTP/1.1 200 OK\n{\n \"invoices\" : [\n { \"seller\": 'Adam', \"buyer\": 'bob' ... },\n ...\n ]\n}",
- "type": "json"
+ name: "admin"
}
- ]
- },
- "version": "0.0.0",
- "filename": "routes/admin.js",
- "groupTitle": "Admin"
- },
- {
- "type": "get",
- "url": "/orders",
- "title": "Retrieve summary of orders",
- "name": "orders",
- "group": "Admin",
- "permission": [
- {
- "name": "admin"
- }
- ],
- "success": {
- "fields": {
- "Success 200": [
+ ],
+ success: {
+ fields: {
+ "Success 200": [
+ {
+ group: "Success 200",
+ optional: false,
+ field: "returns",
+ description: "<p>list of invoices</p>"
+ }
+ ]
+ },
+ examples: [
{
- "group": "Success 200",
- "optional": false,
- "field": "returns",
- "description": "<p>list of orders</p>"
+ title: "Success-Response:",
+ content:
+ 'HTTP/1.1 200 OK\n{\n "invoices" : [\n { "seller": \'Adam\', "buyer": \'bob\' ... },\n ...\n ]\n}',
+ type: "json"
}
]
},
- "examples": [
+ version: "0.0.0",
+ filename: "routes/admin.js",
+ groupTitle: "Admin"
+ },
+ {
+ type: "get",
+ url: "/orders",
+ title: "Retrieve summary of orders",
+ name: "orders",
+ group: "Admin",
+ permission: [
{
- "title": "Success-Response:",
- "content": "HTTP/1.1 200 OK\n{\n \"orders\" : [\n { \"seller\": 'Adam', \"buyer\": 'bob' ... },\n ...\n ]\n}",
- "type": "json"
+ name: "admin"
}
- ]
- },
- "version": "0.0.0",
- "filename": "routes/admin.js",
- "groupTitle": "Admin"
- },
- {
- "type": "get",
- "url": "/payments",
- "title": "Retrieve summary of payments",
- "name": "payments",
- "group": "Admin",
- "permission": [
- {
- "name": "admin"
- }
- ],
- "success": {
- "fields": {
- "Success 200": [
+ ],
+ success: {
+ fields: {
+ "Success 200": [
+ {
+ group: "Success 200",
+ optional: false,
+ field: "returns",
+ description: "<p>list of orders</p>"
+ }
+ ]
+ },
+ examples: [
{
- "group": "Success 200",
- "optional": false,
- "field": "returns",
- "description": "<p>list of payments</p>"
+ title: "Success-Response:",
+ content:
+ 'HTTP/1.1 200 OK\n{\n "orders" : [\n { "seller": \'Adam\', "buyer": \'bob\' ... },\n ...\n ]\n}',
+ type: "json"
}
]
},
- "examples": [
+ version: "0.0.0",
+ filename: "routes/admin.js",
+ groupTitle: "Admin"
+ },
+ {
+ type: "get",
+ url: "/payments",
+ title: "Retrieve summary of payments",
+ name: "payments",
+ group: "Admin",
+ permission: [
{
- "title": "Success-Response:",
- "content": "HTTP/1.1 200 OK\n{\n \"payments\" : [\n { \"seller\": 'Adam', \"buyer\": 'bob' ... },\n ...\n ]\n}",
- "type": "json"
+ name: "admin"
}
- ]
- },
- "version": "0.0.0",
- "filename": "routes/admin.js",
- "groupTitle": "Admin"
- },
- {
- "type": "get",
- "url": "/referrals",
- "title": "Retrieve list of referral tokens",
- "name": "referrals",
- "group": "Admin",
- "permission": [
- {
- "name": "admin"
- }
- ],
- "success": {
- "fields": {
- "Success 200": [
+ ],
+ success: {
+ fields: {
+ "Success 200": [
+ {
+ group: "Success 200",
+ optional: false,
+ field: "returns",
+ description: "<p>list of payments</p>"
+ }
+ ]
+ },
+ examples: [
{
- "group": "Success 200",
- "optional": false,
- "field": "returns",
- "description": "<p>list of referral tokens</p>"
+ title: "Success-Response:",
+ content:
+ 'HTTP/1.1 200 OK\n{\n "payments" : [\n { "seller": \'Adam\', "buyer": \'bob\' ... },\n ...\n ]\n}',
+ type: "json"
}
]
},
- "examples": [
+ version: "0.0.0",
+ filename: "routes/admin.js",
+ groupTitle: "Admin"
+ },
+ {
+ type: "get",
+ url: "/referrals",
+ title: "Retrieve list of referral tokens",
+ name: "referrals",
+ group: "Admin",
+ permission: [
{
- "title": "Success-Response:",
- "content": "HTTP/1.1 200 OK\n{\n \"referrals\" : [\n { \"token\": '***', \"status\": 'pending', sponsor: 'Adam', user: 'newUsername1', expiry: null },\n { \"token\": '***', \"status\": 'pending', sponsor: 'Adam', user: 'newUsername2', expiry: null },\n ]\n}",
- "type": "json"
+ name: "admin"
}
- ]
- },
- "version": "0.0.0",
- "filename": "routes/admin.js",
- "groupTitle": "Admin"
- },
- {
- "type": "get",
- "url": "/referrals",
- "title": "Retrieve list of referral tokens",
- "name": "referrals",
- "group": "Admin",
- "permission": [
- {
- "name": "admin"
- }
- ],
- "success": {
- "fields": {
- "Success 200": [
+ ],
+ success: {
+ fields: {
+ "Success 200": [
+ {
+ group: "Success 200",
+ optional: false,
+ field: "returns",
+ description: "<p>list of referral tokens</p>"
+ }
+ ]
+ },
+ examples: [
{
- "group": "Success 200",
- "optional": false,
- "field": "returns",
- "description": "<p>list of referral tokens</p>"
+ title: "Success-Response:",
+ content:
+ "HTTP/1.1 200 OK\n{\n \"referrals\" : [\n { \"token\": '***', \"status\": 'pending', sponsor: 'Adam', user: 'newUsername1', expiry: null },\n { \"token\": '***', \"status\": 'pending', sponsor: 'Adam', user: 'newUsername2', expiry: null },\n ]\n}",
+ type: "json"
}
]
},
- "examples": [
+ version: "0.0.0",
+ filename: "routes/admin.js",
+ groupTitle: "Admin"
+ },
+ {
+ type: "get",
+ url: "/referrals",
+ title: "Retrieve list of referral tokens",
+ name: "referrals",
+ group: "Admin",
+ permission: [
{
- "title": "Success-Response:",
- "content": "HTTP/1.1 200 OK\n{\n \"referrals\" : [\n { \"token\": '***', \"status\": 'pending', sponsor: 'Adam', user: 'newUsername1', expiry: null },\n { \"token\": '***', \"status\": 'pending', sponsor: 'Adam', user: 'newUsername2', expiry: null },\n ]\n}",
- "type": "json"
+ name: "admin"
}
- ]
- },
- "version": "0.0.0",
- "filename": "routes/admin.js",
- "groupTitle": "Admin"
- },
- {
- "type": "get",
- "url": "/user_kyc",
- "title": "Retrieve user kyc details",
- "name": "user_kyc",
- "group": "Admin",
- "permission": [
- {
- "name": "admin"
- }
- ],
- "success": {
- "fields": {
- "Success 200": [
+ ],
+ success: {
+ fields: {
+ "Success 200": [
+ {
+ group: "Success 200",
+ optional: false,
+ field: "returns",
+ description: "<p>list of referral tokens</p>"
+ }
+ ]
+ },
+ examples: [
{
- "group": "Success 200",
- "optional": false,
- "field": "returns",
- "description": "<p>list of kyc details for each user</p>"
+ title: "Success-Response:",
+ content:
+ "HTTP/1.1 200 OK\n{\n \"referrals\" : [\n { \"token\": '***', \"status\": 'pending', sponsor: 'Adam', user: 'newUsername1', expiry: null },\n { \"token\": '***', \"status\": 'pending', sponsor: 'Adam', user: 'newUsername2', expiry: null },\n ]\n}",
+ type: "json"
}
]
},
- "examples": [
+ version: "0.0.0",
+ filename: "routes/admin.js",
+ groupTitle: "Admin"
+ },
+ {
+ type: "get",
+ url: "/user_kyc",
+ title: "Retrieve user kyc details",
+ name: "user_kyc",
+ group: "Admin",
+ permission: [
{
- "title": "Success-Response:",
- "content": "HTTP/1.1 200 OK\n{\n \"users\" : [\n { \"username\": 'Adam', \"email\": '[email protected]', ... kyc_data... },\n ...\n ]\n}",
- "type": "json"
+ name: "admin"
}
- ]
- },
- "version": "0.0.0",
- "filename": "routes/admin.js",
- "groupTitle": "Admin"
- },
- {
- "type": "get",
- "url": "/transactions",
- "title": "Retrieve summary of user transactions",
- "name": "user_transactions",
- "group": "Admin",
- "permission": [
- {
- "name": "admin"
- }
- ],
- "success": {
- "fields": {
- "Success 200": [
+ ],
+ success: {
+ fields: {
+ "Success 200": [
+ {
+ group: "Success 200",
+ optional: false,
+ field: "returns",
+ description: "<p>list of kyc details for each user</p>"
+ }
+ ]
+ },
+ examples: [
{
- "group": "Success 200",
- "optional": false,
- "field": "returns",
- "description": "<p>list of invoices, payments, orders for users</p>"
+ title: "Success-Response:",
+ content:
+ 'HTTP/1.1 200 OK\n{\n "users" : [\n { "username": \'Adam\', "email": \'[email protected]\', ... kyc_data... },\n ...\n ]\n}',
+ type: "json"
}
]
},
- "examples": [
+ version: "0.0.0",
+ filename: "routes/admin.js",
+ groupTitle: "Admin"
+ },
+ {
+ type: "get",
+ url: "/transactions",
+ title: "Retrieve summary of user transactions",
+ name: "user_transactions",
+ group: "Admin",
+ permission: [
{
- "title": "Success-Response:",
- "content": "HTTP/1.1 200 OK\n{\n \"transactions\" : [\n { \"username\": 'Adam', \"email\": '[email protected]', invoices: 1, orders: 0, payments: 2 },\n ...\n ]\n}",
- "type": "json"
+ name: "admin"
}
- ]
- },
- "version": "0.0.0",
- "filename": "routes/admin.js",
- "groupTitle": "Admin"
- },
- {
- "type": "get",
- "url": "/withdrawals",
- "title": "Retrieve summary of withdrawals",
- "name": "withdrawals",
- "group": "Admin",
- "permission": [
- {
- "name": "admin"
- }
- ],
- "success": {
- "fields": {
- "Success 200": [
+ ],
+ success: {
+ fields: {
+ "Success 200": [
+ {
+ group: "Success 200",
+ optional: false,
+ field: "returns",
+ description: "<p>list of invoices, payments, orders for users</p>"
+ }
+ ]
+ },
+ examples: [
{
- "group": "Success 200",
- "optional": false,
- "field": "returns",
- "description": "<p>list of withdrawals</p>"
+ title: "Success-Response:",
+ content:
+ 'HTTP/1.1 200 OK\n{\n "transactions" : [\n { "username": \'Adam\', "email": \'[email protected]\', invoices: 1, orders: 0, payments: 2 },\n ...\n ]\n}',
+ type: "json"
}
]
},
- "examples": [
+ version: "0.0.0",
+ filename: "routes/admin.js",
+ groupTitle: "Admin"
+ },
+ {
+ type: "get",
+ url: "/withdrawals",
+ title: "Retrieve summary of withdrawals",
+ name: "withdrawals",
+ group: "Admin",
+ permission: [
{
- "title": "Success-Response:",
- "content": "HTTP/1.1 200 OK\n{\n \"withdrawals\" : [\n { \"seller\": 'Adam', \"buyer\": 'bob' ... },\n ...\n ]\n}",
- "type": "json"
+ name: "admin"
}
- ]
- },
- "version": "0.0.0",
- "filename": "routes/admin.js",
- "groupTitle": "Admin"
- },
- {
- "type": "get",
- "url": "/info",
- "title": "Request server information",
- "name": "GetInfo",
- "group": "Info",
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "Object",
- "optional": false,
- "field": "fx",
- "description": "<p>Exchange rates relative to USD - fx.CUR is the value of one CUR in USD.</p>"
- },
- {
- "group": "Success 200",
- "type": "String[]",
- "optional": false,
- "field": "networks",
- "description": "<p>Array of supported networks; possible values are &quot;bitcoin&quot;, &quot;liquid&quot; and &quot;lightning&quot;.</p>"
- },
- {
- "group": "Success 200",
- "type": "String",
- "optional": false,
- "field": "clientVersion",
- "description": "<p>the current git commit of the ui</p>"
- }
- ]
- }
- },
- "version": "0.0.0",
- "filename": "routes/info.js",
- "groupTitle": "Info"
- },
- {
- "type": "post",
- "url": "/grant",
- "title": "Grant Referral code",
- "name": "Grant",
- "group": "Referrals",
- "permission": [
- {
- "name": "member"
- }
- ],
- "parameter": {
- "fields": {
- "Parameter": [
+ ],
+ success: {
+ fields: {
+ "Success 200": [
+ {
+ group: "Success 200",
+ optional: false,
+ field: "returns",
+ description: "<p>list of withdrawals</p>"
+ }
+ ]
+ },
+ examples: [
{
- "group": "Parameter",
- "type": "sponsor_id",
- "optional": false,
- "field": "user_id",
- "description": "<p>of member generating referral code.</p>"
- },
- {
- "group": "Parameter",
- "type": "expiry",
- "optional": false,
- "field": "optional",
- "description": "<p>expiry date for token.</p>"
+ title: "Success-Response:",
+ content:
+ 'HTTP/1.1 200 OK\n{\n "withdrawals" : [\n { "seller": \'Adam\', "buyer": \'bob\' ... },\n ...\n ]\n}',
+ type: "json"
}
]
- }
+ },
+ version: "0.0.0",
+ filename: "routes/admin.js",
+ groupTitle: "Admin"
},
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "String",
- "optional": false,
- "field": "token",
- "description": "<p>referral token</p>"
- },
- {
- "group": "Success 200",
- "type": "Date",
- "optional": false,
- "field": "expiry",
- "description": "<p>optional expiry</p>"
- }
- ]
+ {
+ type: "get",
+ url: "/info",
+ title: "Request server information",
+ name: "GetInfo",
+ group: "Info",
+ success: {
+ fields: {
+ "Success 200": [
+ {
+ group: "Success 200",
+ type: "Object",
+ optional: false,
+ field: "fx",
+ description:
+ "<p>Exchange rates relative to USD - fx.CUR is the value of one CUR in USD.</p>"
+ },
+ {
+ group: "Success 200",
+ type: "String[]",
+ optional: false,
+ field: "networks",
+ description:
+ "<p>Array of supported networks; possible values are &quot;bitcoin&quot;, &quot;liquid&quot; and &quot;lightning&quot;.</p>"
+ },
+ {
+ group: "Success 200",
+ type: "String",
+ optional: false,
+ field: "clientVersion",
+ description: "<p>the current git commit of the ui</p>"
+ }
+ ]
+ }
},
- "examples": [
+ version: "0.0.0",
+ filename: "routes/info.js",
+ groupTitle: "Info"
+ },
+ {
+ type: "post",
+ url: "/grant",
+ title: "Grant Referral code",
+ name: "Grant",
+ group: "Referrals",
+ permission: [
{
- "title": "Success-Response:",
- "content": "HTTP/1.1 200 OK\n{\n \"token\": \"*********\", \n \"status\": \"available\", \n \"expiry\": null\n}",
- "type": "json"
+ name: "member"
+ }
+ ],
+ parameter: {
+ fields: {
+ Parameter: [
+ {
+ group: "Parameter",
+ type: "sponsor_id",
+ optional: false,
+ field: "user_id",
+ description: "<p>of member generating referral code.</p>"
+ },
+ {
+ group: "Parameter",
+ type: "expiry",
+ optional: false,
+ field: "optional",
+ description: "<p>expiry date for token.</p>"
+ }
+ ]
}
- ]
- },
- "version": "0.0.0",
- "filename": "routes/referrals.js",
- "groupTitle": "Referrals"
- },
- {
- "type": "get",
- "url": "/grant",
- "title": "Grant Referral code (variation using get)",
- "name": "Grant",
- "group": "Referrals",
- "permission": [
- {
- "name": "member"
},
- {
- "name": "member"
- }
- ],
- "parameter": {
- "fields": {
- "Parameter": [
+ success: {
+ fields: {
+ "Success 200": [
+ {
+ group: "Success 200",
+ type: "String",
+ optional: false,
+ field: "token",
+ description: "<p>referral token</p>"
+ },
+ {
+ group: "Success 200",
+ type: "Date",
+ optional: false,
+ field: "expiry",
+ description: "<p>optional expiry</p>"
+ }
+ ]
+ },
+ examples: [
{
- "group": "Parameter",
- "type": "sponsor_id",
- "optional": false,
- "field": "user_id",
- "description": "<p>of member generating referral code.</p>"
- },
- {
- "group": "Parameter",
- "type": "expiry",
- "optional": false,
- "field": "optional",
- "description": "<p>expiry date for token.</p>"
- }
- ]
- }
- },
- "success": {
- "fields": {
- "Success 200": [
- {
- "group": "Success 200",
- "type": "String",
- "optional": false,
- "field": "token",
- "description": "<p>referral token</p>"
- },
- {
- "group": "Success 200",
- "type": "Status",
- "optional": false,
- "field": "status",
- "description": "<p>referral status</p>"
- },
- {
- "group": "Success 200",
- "type": "Date",
- "optional": false,
- "field": "expiry",
- "description": "<p>optional expiry</p>"
+ title: "Success-Response:",
+ content:
+ 'HTTP/1.1 200 OK\n{\n "token": "*********", \n "status": "available", \n "expiry": null\n}',
+ type: "json"
}
]
},
- "examples": [
+ version: "0.0.0",
+ filename: "routes/referrals.js",
+ groupTitle: "Referrals"
+ },
+ {
+ type: "get",
+ url: "/grant",
+ title: "Grant Referral code (variation using get)",
+ name: "Grant",
+ group: "Referrals",
+ permission: [
+ {
+ name: "member"
+ },
{
- "title": "Success-Response:",
- "content": "HTTP/1.1 200 OK\n{\n \"token\": \"*********\", \n \"status\": \"available\", \n \"expiry\": null\n}",
- "type": "json"
+ name: "member"
}
- ]
- },
- "version": "0.0.0",
- "filename": "routes/referrals.js",
- "groupTitle": "Referrals"
- },
- {
- "type": "get",
- "url": "/checkTokens/:sponsor_id",
- "title": "Retrieve list of referral tokens generated by this user",
- "name": "checkTokens",
- "group": "Referrals",
- "permission": [
- {
- "name": "member"
- }
- ],
- "parameter": {
- "fields": {
- "Parameter": [
- {
- "group": "Parameter",
- "type": "sponsor_id",
- "optional": false,
- "field": "user_id",
- "description": "<p>of member generating referral code.</p>"
- },
- {
- "group": "Parameter",
- "type": "status",
- "optional": false,
- "field": "optional",
- "description": "<p>token status.</p>"
- }
- ]
- }
- },
- "success": {
- "fields": {
- "Success 200": [
+ ],
+ parameter: {
+ fields: {
+ Parameter: [
+ {
+ group: "Parameter",
+ type: "sponsor_id",
+ optional: false,
+ field: "user_id",
+ description: "<p>of member generating referral code.</p>"
+ },
+ {
+ group: "Parameter",
+ type: "expiry",
+ optional: false,
+ field: "optional",
+ description: "<p>expiry date for token.</p>"
+ }
+ ]
+ }
+ },
+ success: {
+ fields: {
+ "Success 200": [
+ {
+ group: "Success 200",
+ type: "String",
+ optional: false,
+ field: "token",
+ description: "<p>referral token</p>"
+ },
+ {
+ group: "Success 200",
+ type: "Status",
+ optional: false,
+ field: "status",
+ description: "<p>referral status</p>"
+ },
+ {
+ group: "Success 200",
+ type: "Date",
+ optional: false,
+ field: "expiry",
+ description: "<p>optional expiry</p>"
+ }
+ ]
+ },
+ examples: [
{
- "group": "Success 200",
- "optional": false,
- "field": "tokens",
- "description": "<p>array of token objects</p>"
+ title: "Success-Response:",
+ content:
+ 'HTTP/1.1 200 OK\n{\n "token": "*********", \n "status": "available", \n "expiry": null\n}',
+ type: "json"
}
]
},
- "examples": [
+ version: "0.0.0",
+ filename: "routes/referrals.js",
+ groupTitle: "Referrals"
+ },
+ {
+ type: "get",
+ url: "/checkTokens/:sponsor_id",
+ title: "Retrieve list of referral tokens generated by this user",
+ name: "checkTokens",
+ group: "Referrals",
+ permission: [
{
- "title": "Success-Response:",
- "content": "HTTP/1.1 200 OK\n{\n \"tokens\": [\n {\"token\": \"*********\", \"status\": \"available\", \"expiry\": null}\n ]\n}",
- "type": "json"
+ name: "member"
}
- ]
- },
- "version": "0.0.0",
- "filename": "routes/referrals.js",
- "groupTitle": "Referrals"
- },
- {
- "type": "get",
- "url": "/isReferred/:user_id",
- "title": "Check if user is referred",
- "name": "isReferred",
- "group": "Referrals",
- "parameter": {
- "fields": {
- "Parameter": [
+ ],
+ parameter: {
+ fields: {
+ Parameter: [
+ {
+ group: "Parameter",
+ type: "sponsor_id",
+ optional: false,
+ field: "user_id",
+ description: "<p>of member generating referral code.</p>"
+ },
+ {
+ group: "Parameter",
+ type: "status",
+ optional: false,
+ field: "optional",
+ description: "<p>token status.</p>"
+ }
+ ]
+ }
+ },
+ success: {
+ fields: {
+ "Success 200": [
+ {
+ group: "Success 200",
+ optional: false,
+ field: "tokens",
+ description: "<p>array of token objects</p>"
+ }
+ ]
+ },
+ examples: [
{
- "group": "Parameter",
- "type": "user_id",
- "optional": false,
- "field": "user",
- "description": "<p>id</p>"
+ title: "Success-Response:",
+ content:
+ 'HTTP/1.1 200 OK\n{\n "tokens": [\n {"token": "*********", "status": "available", "expiry": null}\n ]\n}',
+ type: "json"
}
]
- }
+ },
+ version: "0.0.0",
+ filename: "routes/referrals.js",
+ groupTitle: "Referrals"
},
- "success": {
- "examples": [
- {
- "title": "Success-Response:",
- "content": "HTTP/1.1 200 OK\n{\n true\n}",
- "type": "json"
+ {
+ type: "get",
+ url: "/isReferred/:user_id",
+ title: "Check if user is referred",
+ name: "isReferred",
+ group: "Referrals",
+ parameter: {
+ fields: {
+ Parameter: [
+ {
+ group: "Parameter",
+ type: "user_id",
+ optional: false,
+ field: "user",
+ description: "<p>id</p>"
+ }
+ ]
}
- ]
- },
- "description": "<p>returns boolean indicating if user is referred or not</p>",
- "version": "0.0.0",
- "filename": "routes/referrals.js",
- "groupTitle": "Referrals"
- },
- {
- "type": "post",
- "url": "/joinQueue",
- "title": "Join waiting list (track email & phone)",
- "name": "joinQueue",
- "group": "Referrals",
- "parameter": {
- "fields": {
- "Parameter": [
- {
- "group": "Parameter",
- "type": "email",
- "optional": false,
- "field": "email",
- "description": "<p>address</p>"
- },
+ },
+ success: {
+ examples: [
{
- "group": "Parameter",
- "type": "phone",
- "optional": false,
- "field": "phone",
- "description": "<p>number</p>"
+ title: "Success-Response:",
+ content: "HTTP/1.1 200 OK\n{\n true\n}",
+ type: "json"
}
]
- }
+ },
+ description:
+ "<p>returns boolean indicating if user is referred or not</p>",
+ version: "0.0.0",
+ filename: "routes/referrals.js",
+ groupTitle: "Referrals"
},
- "success": {
- "fields": {
- "Success 200": [
+ {
+ type: "post",
+ url: "/joinQueue",
+ title: "Join waiting list (track email & phone)",
+ name: "joinQueue",
+ group: "Referrals",
+ parameter: {
+ fields: {
+ Parameter: [
+ {
+ group: "Parameter",
+ type: "email",
+ optional: false,
+ field: "email",
+ description: "<p>address</p>"
+ },
+ {
+ group: "Parameter",
+ type: "phone",
+ optional: false,
+ field: "phone",
+ description: "<p>number</p>"
+ }
+ ]
+ }
+ },
+ success: {
+ fields: {
+ "Success 200": [
+ {
+ group: "Success 200",
+ optional: false,
+ field: "verified",
+ defaultValue: "true",
+ description: ""
+ }
+ ]
+ },
+ examples: [
{
- "group": "Success 200",
- "optional": false,
- "field": "verified",
- "defaultValue": "true",
- "description": ""
+ title: "Success-Response:",
+ content:
+ 'HTTP/1.1 200 OK\n{\n "success": true\n "message": \'Added to waiting list\'\n}',
+ type: "json"
}
]
},
- "examples": [
+ description: "<p>referral token is updated with existing user_id</p>",
+ version: "0.0.0",
+ filename: "routes/referrals.js",
+ groupTitle: "Referrals"
+ },
+ {
+ type: "get",
+ url: "/verify/:user_id",
+ title: "Verify token and apply to existing user",
+ name: "verify",
+ group: "Referrals",
+ permission: [
{
- "title": "Success-Response:",
- "content": "HTTP/1.1 200 OK\n{\n \"success\": true\n \"message\": 'Added to waiting list'\n}",
- "type": "json"
+ name: "member"
}
- ]
- },
- "description": "<p>referral token is updated with existing user_id</p>",
- "version": "0.0.0",
- "filename": "routes/referrals.js",
- "groupTitle": "Referrals"
- },
- {
- "type": "get",
- "url": "/verify/:user_id",
- "title": "Verify token and apply to existing user",
- "name": "verify",
- "group": "Referrals",
- "permission": [
- {
- "name": "member"
- }
- ],
- "parameter": {
- "fields": {
- "Parameter": [
- {
- "group": "Parameter",
- "type": "user_id",
- "optional": false,
- "field": "Current",
- "description": "<p>user</p>"
- },
- {
- "group": "Parameter",
- "type": "token",
- "optional": false,
- "field": "Token",
- "description": "<p>to validate</p>"
- }
- ]
- }
- },
- "success": {
- "fields": {
- "Success 200": [
+ ],
+ parameter: {
+ fields: {
+ Parameter: [
+ {
+ group: "Parameter",
+ type: "user_id",
+ optional: false,
+ field: "Current",
+ description: "<p>user</p>"
+ },
+ {
+ group: "Parameter",
+ type: "token",
+ optional: false,
+ field: "Token",
+ description: "<p>to validate</p>"
+ }
+ ]
+ }
+ },
+ success: {
+ fields: {
+ "Success 200": [
+ {
+ group: "Success 200",
+ optional: false,
+ field: "verified",
+ defaultValue: "true",
+ description: ""
+ }
+ ]
+ },
+ examples: [
{
- "group": "Success 200",
- "optional": false,
- "field": "verified",
- "defaultValue": "true",
- "description": ""
+ title: "Success-Response:",
+ content: 'HTTP/1.1 200 OK\n{\n "verified": true\n}',
+ type: "json"
}
]
},
- "examples": [
- {
- "title": "Success-Response:",
- "content": "HTTP/1.1 200 OK\n{\n \"verified\": true\n}",
- "type": "json"
- }
- ]
- },
- "description": "<p>referral token is updated with existing user_id</p>",
- "version": "0.0.0",
- "filename": "routes/referrals.js",
- "groupTitle": "Referrals"
- }
-] });
+ description: "<p>referral token is updated with existing user_id</p>",
+ version: "0.0.0",
+ filename: "routes/referrals.js",
+ groupTitle: "Referrals"
+ }
+ ]
+});