Create Card User
curl --request POST \
--url https://api.sandbox.saalal.com/v1/card-users/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"first_name": "your-firstname",
"last_name": "your-lastname",
"address": "your-address",
"phone": "774964996",
"email": "your@mail.com",
"id_no": "20119991010000621",
"selfie_image": "https://your-image.com",
"id_image": "https://your-image.com",
"back_id_image": "https://your-image.com"
}
'import requests
url = "https://api.sandbox.saalal.com/v1/card-users/create"
payload = {
"first_name": "your-firstname",
"last_name": "your-lastname",
"address": "your-address",
"phone": "774964996",
"email": "your@mail.com",
"id_no": "20119991010000621",
"selfie_image": "https://your-image.com",
"id_image": "https://your-image.com",
"back_id_image": "https://your-image.com"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
first_name: 'your-firstname',
last_name: 'your-lastname',
address: 'your-address',
phone: '774964996',
email: 'your@mail.com',
id_no: '20119991010000621',
selfie_image: 'https://your-image.com',
id_image: 'https://your-image.com',
back_id_image: 'https://your-image.com'
})
};
fetch('https://api.sandbox.saalal.com/v1/card-users/create', 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://api.sandbox.saalal.com/v1/card-users/create",
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([
'first_name' => 'your-firstname',
'last_name' => 'your-lastname',
'address' => 'your-address',
'phone' => '774964996',
'email' => 'your@mail.com',
'id_no' => '20119991010000621',
'selfie_image' => 'https://your-image.com',
'id_image' => 'https://your-image.com',
'back_id_image' => 'https://your-image.com'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.sandbox.saalal.com/v1/card-users/create"
payload := strings.NewReader("{\n \"first_name\": \"your-firstname\",\n \"last_name\": \"your-lastname\",\n \"address\": \"your-address\",\n \"phone\": \"774964996\",\n \"email\": \"your@mail.com\",\n \"id_no\": \"20119991010000621\",\n \"selfie_image\": \"https://your-image.com\",\n \"id_image\": \"https://your-image.com\",\n \"back_id_image\": \"https://your-image.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.sandbox.saalal.com/v1/card-users/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"first_name\": \"your-firstname\",\n \"last_name\": \"your-lastname\",\n \"address\": \"your-address\",\n \"phone\": \"774964996\",\n \"email\": \"your@mail.com\",\n \"id_no\": \"20119991010000621\",\n \"selfie_image\": \"https://your-image.com\",\n \"id_image\": \"https://your-image.com\",\n \"back_id_image\": \"https://your-image.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.saalal.com/v1/card-users/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"first_name\": \"your-firstname\",\n \"last_name\": \"your-lastname\",\n \"address\": \"your-address\",\n \"phone\": \"774964996\",\n \"email\": \"your@mail.com\",\n \"id_no\": \"20119991010000621\",\n \"selfie_image\": \"https://your-image.com\",\n \"id_image\": \"https://your-image.com\",\n \"back_id_image\": \"https://your-image.com\"\n}"
response = http.request(request)
puts response.read_body{
"message": "OK",
"statusCode": 200,
"data": {
"message": "Card User verification in progress",
"userCard": {
"reference": "88c2f29c-2fba-40f1-a303-b33008e42fe9",
"first_name": "Testeur",
"last_name": "glock",
"address": "Pikine Texaco 11",
"id_no": "17521999133211635",
"phone": "221776854872",
"email": "testingboy@gmail.com"
}
}
}{
"message": "La valeur du champ id no est déjà utilisée.",
"errors": {
"id_no": [
"La valeur du champ id no est déjà utilisée."
]
}
}CardUsers
Create Card User
POST
/
card-users
/
create
Create Card User
curl --request POST \
--url https://api.sandbox.saalal.com/v1/card-users/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"first_name": "your-firstname",
"last_name": "your-lastname",
"address": "your-address",
"phone": "774964996",
"email": "your@mail.com",
"id_no": "20119991010000621",
"selfie_image": "https://your-image.com",
"id_image": "https://your-image.com",
"back_id_image": "https://your-image.com"
}
'import requests
url = "https://api.sandbox.saalal.com/v1/card-users/create"
payload = {
"first_name": "your-firstname",
"last_name": "your-lastname",
"address": "your-address",
"phone": "774964996",
"email": "your@mail.com",
"id_no": "20119991010000621",
"selfie_image": "https://your-image.com",
"id_image": "https://your-image.com",
"back_id_image": "https://your-image.com"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
first_name: 'your-firstname',
last_name: 'your-lastname',
address: 'your-address',
phone: '774964996',
email: 'your@mail.com',
id_no: '20119991010000621',
selfie_image: 'https://your-image.com',
id_image: 'https://your-image.com',
back_id_image: 'https://your-image.com'
})
};
fetch('https://api.sandbox.saalal.com/v1/card-users/create', 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://api.sandbox.saalal.com/v1/card-users/create",
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([
'first_name' => 'your-firstname',
'last_name' => 'your-lastname',
'address' => 'your-address',
'phone' => '774964996',
'email' => 'your@mail.com',
'id_no' => '20119991010000621',
'selfie_image' => 'https://your-image.com',
'id_image' => 'https://your-image.com',
'back_id_image' => 'https://your-image.com'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.sandbox.saalal.com/v1/card-users/create"
payload := strings.NewReader("{\n \"first_name\": \"your-firstname\",\n \"last_name\": \"your-lastname\",\n \"address\": \"your-address\",\n \"phone\": \"774964996\",\n \"email\": \"your@mail.com\",\n \"id_no\": \"20119991010000621\",\n \"selfie_image\": \"https://your-image.com\",\n \"id_image\": \"https://your-image.com\",\n \"back_id_image\": \"https://your-image.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.sandbox.saalal.com/v1/card-users/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"first_name\": \"your-firstname\",\n \"last_name\": \"your-lastname\",\n \"address\": \"your-address\",\n \"phone\": \"774964996\",\n \"email\": \"your@mail.com\",\n \"id_no\": \"20119991010000621\",\n \"selfie_image\": \"https://your-image.com\",\n \"id_image\": \"https://your-image.com\",\n \"back_id_image\": \"https://your-image.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.saalal.com/v1/card-users/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"first_name\": \"your-firstname\",\n \"last_name\": \"your-lastname\",\n \"address\": \"your-address\",\n \"phone\": \"774964996\",\n \"email\": \"your@mail.com\",\n \"id_no\": \"20119991010000621\",\n \"selfie_image\": \"https://your-image.com\",\n \"id_image\": \"https://your-image.com\",\n \"back_id_image\": \"https://your-image.com\"\n}"
response = http.request(request)
puts response.read_body{
"message": "OK",
"statusCode": 200,
"data": {
"message": "Card User verification in progress",
"userCard": {
"reference": "88c2f29c-2fba-40f1-a303-b33008e42fe9",
"first_name": "Testeur",
"last_name": "glock",
"address": "Pikine Texaco 11",
"id_no": "17521999133211635",
"phone": "221776854872",
"email": "testingboy@gmail.com"
}
}
}{
"message": "La valeur du champ id no est déjà utilisée.",
"errors": {
"id_no": [
"La valeur du champ id no est déjà utilisée."
]
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Example:
"your-firstname"
Example:
"your-lastname"
Example:
"your-address"
Example:
"774964996"
Example:
"your@mail.com"
Example:
"20119991010000621"
Example:
"https://example.com/selfie.png"
Example:
"https://example.com/id.png"
Example:
"https://example.com/backid.png"
⌘I
