Introduction
This documentation aims to provide all the information you need to work with our API.
<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>
Authenticating requests
This API is not authenticated.
Auth
Création de compte
Créer un compte utilisateur
Example request:
curl --request POST \
"https://api-sandbox.ltbfinancecoop.com/api/auth/register" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"firstname\": \"architecto\",
\"lastname\": \"architecto\",
\"email\": \"zbailey@example.net\",
\"password\": \"|]|{+-\",
\"birthdate\": \"architecto\",
\"phone\": \"architecto\",
\"address\": \"architecto\"
}"
const url = new URL(
"https://api-sandbox.ltbfinancecoop.com/api/auth/register"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"firstname": "architecto",
"lastname": "architecto",
"email": "zbailey@example.net",
"password": "|]|{+-",
"birthdate": "architecto",
"phone": "architecto",
"address": "architecto"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Vérification de compte après création
Example request:
curl --request POST \
"https://api-sandbox.ltbfinancecoop.com/api/auth/register/verify" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"gbailey@example.net\",
\"verification_code\": \"architecto\"
}"
const url = new URL(
"https://api-sandbox.ltbfinancecoop.com/api/auth/register/verify"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "gbailey@example.net",
"verification_code": "architecto"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Soumission des documents KYC
Example request:
curl --request POST \
"https://api-sandbox.ltbfinancecoop.com/api/auth/register/kyc" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "email=gbailey@example.net"\
--form "idcard_front=@/tmp/phpab2hn10of0uh4N2v0JV" \
--form "idcard_back=@/tmp/phpsm6p5am8pod487KJdUU" \
--form "proof_of_address=@/tmp/php4ui6ikshkvb6dApPMng" \
--form "selfie=@/tmp/phpqkvthfkp9k6i8vSzxIP" const url = new URL(
"https://api-sandbox.ltbfinancecoop.com/api/auth/register/kyc"
);
const headers = {
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('email', 'gbailey@example.net');
body.append('idcard_front', document.querySelector('input[name="idcard_front"]').files[0]);
body.append('idcard_back', document.querySelector('input[name="idcard_back"]').files[0]);
body.append('proof_of_address', document.querySelector('input[name="proof_of_address"]').files[0]);
body.append('selfie', document.querySelector('input[name="selfie"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Activation du compte par l'administrateur
requires authentication
Example request:
curl --request POST \
"https://api-sandbox.ltbfinancecoop.com/api/auth/register/activate" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"temp_user_id\": 16,
\"activate\": false
}"
const url = new URL(
"https://api-sandbox.ltbfinancecoop.com/api/auth/register/activate"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"temp_user_id": 16,
"activate": false
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Connexion
Connexion Étape 1 - Vérification des identifiants et envoi de l'OTP
Example request:
curl --request POST \
"https://api-sandbox.ltbfinancecoop.com/api/auth/login" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"gbailey@example.net\",
\"password\": \"+-0pBNvYgxwmi\\/#iw\"
}"
const url = new URL(
"https://api-sandbox.ltbfinancecoop.com/api/auth/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "gbailey@example.net",
"password": "+-0pBNvYgxwmi\/#iw"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Connexion Étape 2 - Vérification de l'OTP pour valider la connexion au compte
Example request:
curl --request POST \
"https://api-sandbox.ltbfinancecoop.com/api/auth/login/verify" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"gbailey@example.net\",
\"verification_code\": \"architecto\"
}"
const url = new URL(
"https://api-sandbox.ltbfinancecoop.com/api/auth/login/verify"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "gbailey@example.net",
"verification_code": "architecto"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Déconnecter l'utilisateur authentifié
Example request:
curl --request POST \
"https://api-sandbox.ltbfinancecoop.com/api/auth/logout" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api-sandbox.ltbfinancecoop.com/api/auth/logout"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Reset Password
Initialiser un changement de mot de passe
Example request:
curl --request POST \
"https://api-sandbox.ltbfinancecoop.com/api/auth/password/request" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"gbailey@example.net\"
}"
const url = new URL(
"https://api-sandbox.ltbfinancecoop.com/api/auth/password/request"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "gbailey@example.net"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Vérifier le code et définir un nouveau mot de passe
Example request:
curl --request POST \
"https://api-sandbox.ltbfinancecoop.com/api/auth/password/reset" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"gbailey@example.net\",
\"password\": \"+-0pBNvYgxwmi\\/#iw\",
\"code\": \"architecto\"
}"
const url = new URL(
"https://api-sandbox.ltbfinancecoop.com/api/auth/password/reset"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "gbailey@example.net",
"password": "+-0pBNvYgxwmi\/#iw",
"code": "architecto"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Gestion des comptes bancaires
Afficher la liste des comptes
Example request:
curl --request GET \
--get "https://api-sandbox.ltbfinancecoop.com/api/accounts" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"filter_value\": \"architecto\",
\"type\": \"courant\",
\"status\": \"active\",
\"page\": 22,
\"per_page\": 67,
\"sort_by\": \"architecto\",
\"sort_direction\": \"asc\"
}"
const url = new URL(
"https://api-sandbox.ltbfinancecoop.com/api/accounts"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"filter_value": "architecto",
"type": "courant",
"status": "active",
"page": 22,
"per_page": 67,
"sort_by": "architecto",
"sort_direction": "asc"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Afficher les détails d'un utilisateur
Example request:
curl --request GET \
--get "https://api-sandbox.ltbfinancecoop.com/api/accounts/architecto" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api-sandbox.ltbfinancecoop.com/api/accounts/architecto"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Initier une demande pour un compte joint
Example request:
curl --request POST \
"https://api-sandbox.ltbfinancecoop.com/api/accounts/init-joint-ownership" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"account_id\": \"architecto\",
\"client_id\": \"architecto\"
}"
const url = new URL(
"https://api-sandbox.ltbfinancecoop.com/api/accounts/init-joint-ownership"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"account_id": "architecto",
"client_id": "architecto"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Accepter/Rejeter une demande de compte joint
Example request:
curl --request POST \
"https://api-sandbox.ltbfinancecoop.com/api/accounts/accept-joint-ownership" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"account_id\": \"architecto\",
\"decision\": true
}"
const url = new URL(
"https://api-sandbox.ltbfinancecoop.com/api/accounts/accept-joint-ownership"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"account_id": "architecto",
"decision": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Clôturer un compte bancaire
Example request:
curl --request POST \
"https://api-sandbox.ltbfinancecoop.com/api/accounts/close" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"account_id\": \"architecto\"
}"
const url = new URL(
"https://api-sandbox.ltbfinancecoop.com/api/accounts/close"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"account_id": "architecto"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Gestion des utilisateurs
Afficher les utilisateurs du système
Example request:
curl --request GET \
--get "https://api-sandbox.ltbfinancecoop.com/api/users" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"filter_value\": \"architecto\",
\"role\": \"caissier\",
\"status\": \"admin\",
\"page\": 22,
\"per_page\": 67,
\"gender\": \"femme\",
\"sort_by\": \"architecto\",
\"sort_direction\": \"asc\"
}"
const url = new URL(
"https://api-sandbox.ltbfinancecoop.com/api/users"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"filter_value": "architecto",
"role": "caissier",
"status": "admin",
"page": 22,
"per_page": 67,
"gender": "femme",
"sort_by": "architecto",
"sort_direction": "asc"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Afficher les détails d'un utilisateur
Example request:
curl --request GET \
--get "https://api-sandbox.ltbfinancecoop.com/api/users/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"filter_value\": \"architecto\",
\"role\": \"client\",
\"status\": \"comptable\",
\"page\": 22,
\"per_page\": 67,
\"gender\": \"homme\",
\"sort_by\": \"architecto\",
\"sort_direction\": \"desc\"
}"
const url = new URL(
"https://api-sandbox.ltbfinancecoop.com/api/users/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"filter_value": "architecto",
"role": "client",
"status": "comptable",
"page": 22,
"per_page": 67,
"gender": "homme",
"sort_by": "architecto",
"sort_direction": "desc"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Mettre à jour le compte d'un utilisateur
Example request:
curl --request PUT \
"https://api-sandbox.ltbfinancecoop.com/api/users/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"firstname\": \"b\",
\"lastname\": \"n\",
\"birthdate\": \"architecto\",
\"address\": \"architecto\",
\"phone\": \"architecto\",
\"role\": \"client\",
\"status\": \"inactif\"
}"
const url = new URL(
"https://api-sandbox.ltbfinancecoop.com/api/users/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"firstname": "b",
"lastname": "n",
"birthdate": "architecto",
"address": "architecto",
"phone": "architecto",
"role": "client",
"status": "inactif"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Profile Utilisateur
Afficher les informations du compte de l'utilisateur connecté
Example request:
curl --request GET \
--get "https://api-sandbox.ltbfinancecoop.com/api/profile" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://api-sandbox.ltbfinancecoop.com/api/profile"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Mettre à jour les informations du compte de l'utilisatuer connecté
Example request:
curl --request PUT \
"https://api-sandbox.ltbfinancecoop.com/api/profile" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"firstname\": \"b\",
\"lastname\": \"n\",
\"birthdate\": \"architecto\",
\"address\": \"architecto\",
\"phone\": \"architecto\"
}"
const url = new URL(
"https://api-sandbox.ltbfinancecoop.com/api/profile"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"firstname": "b",
"lastname": "n",
"birthdate": "architecto",
"address": "architecto",
"phone": "architecto"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.