🧑🤝🧑
Users
get
https://configure-abierta-test.herokuapp.com
/user
Create a user for a lender organization
cURL
Go
NodeJS
curl --location --request POST 'http://localhost:6000/api/v1/user' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"firstname": "Daniel",
"lastname": "Osineye",
"email": "[email protected]",
"password": "password",
"phone": "+2348182791196",
"gender":"Male"
}'bas
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "http://evolvecredit.io/api/v1/user"
method := "POST"
payload := strings.NewReader(`{
"firstname": "Daniel",
"lastname": "Osineye",
"email": "[email protected]",
"password": "password",
"phone": "+2348182791196",
"gender":"Male"
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "Bearer YOUR_API_KEY")
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
var https = require('follow-redirects').https;
var fs = require('fs');
var options = {
'method': 'POST',
'hostname': 'localhost',
'port': 6000,
'path': '/api/v1/user',
'headers': {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
'maxRedirects': 20
};
var req = https.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
var postData = JSON.stringify({"firstname":"Daniel","lastname":"Osineye","email":"[email protected]","password":"password","phone":"+2348182791196","gender":"Male"});
req.write(postData);
req.end();
get
https://configure-abierta-test.herokuapp.com
/user/actions
Checks if a user exists in a lender organization
cURL
Go
NodeJS
curl --location --request GET 'http://localhost:6000/api/v1/user/actions?email=isongjosiah%2B2%40gmail.com&action=exists' \
--header 'Authorization: Bearer YOUR_API_KEY'
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "http://localhost:6000/api/v1/user/actions?email=isongjosiah%252B2%2540gmail.com&action=exists"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "Bearer YOUR_API_KEY")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
var request = require('request');
var options = {
'method': 'GET',
'url': 'http://localhost:6000/api/v1/user/actions?email=isongjosiah%2B2%40gmail.com&action=exists',
'headers': {
'Authorization': 'Bearer YOUR_API_KEY'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
get
https://configure-abierta-test.herokuapp.com
evolvecredit.io/api/v1/user
Fetch Lenders users with pagination
cURL
Go
NodeJS
curl --location --request GET 'http://localhost:6000/api/v1/user?start=2021-07-01&end=2022-05-30&pages=2' \
--header 'Authorization: Bearer YOUR_API_KEY'
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "http://localhost:6000/api/v1/user?start=2021-07-01&end=2022-05-30&pages=2"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "Bearer YOUR_API_KEY")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
var https = require('follow-redirects').https;
var fs = require('fs');
var options = {
'method': 'GET',
'hostname': 'localhost',
'port': 6000,
'path': '/api/v1/user?start=2021-07-01&end=2022-05-30&pages=2',
'headers': {
'Authorization': 'Bearer YOUR_API_KEY'
},
'maxRedirects': 20
};
var req = https.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
req.end();
Last modified 1yr ago