Credit user institution with tokens
curl --request POST \
--url https://pria.praxislxp.com/api/user/userInstitutionCredit/{id} \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"credits": 1000
}
'import requests
url = "https://pria.praxislxp.com/api/user/userInstitutionCredit/{id}"
payload = { "credits": 1000 }
headers = {
"x-access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({credits: 1000})
};
fetch('https://pria.praxislxp.com/api/user/userInstitutionCredit/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pria.praxislxp.com/api/user/userInstitutionCredit/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'credits' => 1000
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-access-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://pria.praxislxp.com/api/user/userInstitutionCredit/{id}"
payload := strings.NewReader("{\n \"credits\": 1000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-access-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://pria.praxislxp.com/api/user/userInstitutionCredit/{id}")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"credits\": 1000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pria.praxislxp.com/api/user/userInstitutionCredit/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"credits\": 1000\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Transfer successfuly executed and recorded!"
}{
"success": false,
"error": "<string>",
"message": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}User Institutions
Credit user institution with tokens
Transfers credits from the parent account to the institution. Requires admin or super account type. Validates that the user institution exists, belongs to the authenticated user, matches the user’s current institution, the institution is linked to a parent account, and the account has sufficient credits. Creates an AccountTransfer record to log the transaction. Defaults to 1000 credits if not specified.
POST
/
api
/
user
/
userInstitutionCredit
/
{id}
Credit user institution with tokens
curl --request POST \
--url https://pria.praxislxp.com/api/user/userInstitutionCredit/{id} \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"credits": 1000
}
'import requests
url = "https://pria.praxislxp.com/api/user/userInstitutionCredit/{id}"
payload = { "credits": 1000 }
headers = {
"x-access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({credits: 1000})
};
fetch('https://pria.praxislxp.com/api/user/userInstitutionCredit/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pria.praxislxp.com/api/user/userInstitutionCredit/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'credits' => 1000
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-access-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://pria.praxislxp.com/api/user/userInstitutionCredit/{id}"
payload := strings.NewReader("{\n \"credits\": 1000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-access-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://pria.praxislxp.com/api/user/userInstitutionCredit/{id}")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"credits\": 1000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pria.praxislxp.com/api/user/userInstitutionCredit/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"credits\": 1000\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Transfer successfuly executed and recorded!"
}{
"success": false,
"error": "<string>",
"message": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}Authorizations
JWT token passed in x-access-token header
Path Parameters
The user institution ID to credit (must be a valid ObjectId)
Body
application/json
Number of credits to transfer (defaults to 1000 if omitted)
Example:
1000
Was this page helpful?
⌘I