Registration
curl --request POST \
--url https://api.example.com/auth/registration \
--header 'Content-Type: application/json' \
--data '
{
"nik": "3170000000000005",
"fullname": "Pandu Doe",
"email": "pandu.septian18@xignature.co.id",
"phone": "0857784200000",
"birthdate": "1994-08-25",
"selfie": "b64 string",
"ktp": "b64 string"
}
'import requests
url = "https://api.example.com/auth/registration"
payload = {
"nik": "3170000000000005",
"fullname": "Pandu Doe",
"email": "pandu.septian18@xignature.co.id",
"phone": "0857784200000",
"birthdate": "1994-08-25",
"selfie": "b64 string",
"ktp": "b64 string"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
nik: '3170000000000005',
fullname: 'Pandu Doe',
email: 'pandu.septian18@xignature.co.id',
phone: '0857784200000',
birthdate: '1994-08-25',
selfie: 'b64 string',
ktp: 'b64 string'
})
};
fetch('https://api.example.com/auth/registration', 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.example.com/auth/registration",
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([
'nik' => '3170000000000005',
'fullname' => 'Pandu Doe',
'email' => 'pandu.septian18@xignature.co.id',
'phone' => '0857784200000',
'birthdate' => '1994-08-25',
'selfie' => 'b64 string',
'ktp' => 'b64 string'
]),
CURLOPT_HTTPHEADER => [
"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.example.com/auth/registration"
payload := strings.NewReader("{\n \"nik\": \"3170000000000005\",\n \"fullname\": \"Pandu Doe\",\n \"email\": \"pandu.septian18@xignature.co.id\",\n \"phone\": \"0857784200000\",\n \"birthdate\": \"1994-08-25\",\n \"selfie\": \"b64 string\",\n \"ktp\": \"b64 string\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.example.com/auth/registration")
.header("Content-Type", "application/json")
.body("{\n \"nik\": \"3170000000000005\",\n \"fullname\": \"Pandu Doe\",\n \"email\": \"pandu.septian18@xignature.co.id\",\n \"phone\": \"0857784200000\",\n \"birthdate\": \"1994-08-25\",\n \"selfie\": \"b64 string\",\n \"ktp\": \"b64 string\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/auth/registration")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"nik\": \"3170000000000005\",\n \"fullname\": \"Pandu Doe\",\n \"email\": \"pandu.septian18@xignature.co.id\",\n \"phone\": \"0857784200000\",\n \"birthdate\": \"1994-08-25\",\n \"selfie\": \"b64 string\",\n \"ktp\": \"b64 string\"\n}"
response = http.request(request)
puts response.read_body{
"statusCode": 200,
"message": "Registration successfully",
"data": {
"xignatureId": "pandus31L986",
"email": "pandu.septian1@xignature.co.id",
"phone": "62857786478081",
"user": {
"status": "waiting",
"description": "Waiting for validation and activation"
},
"certificate": {
"status": "waiting",
"description": "Certificate is in the process of being generated"
}
}
}Authentication
Registration
POST
/
auth
/
registration
Registration
curl --request POST \
--url https://api.example.com/auth/registration \
--header 'Content-Type: application/json' \
--data '
{
"nik": "3170000000000005",
"fullname": "Pandu Doe",
"email": "pandu.septian18@xignature.co.id",
"phone": "0857784200000",
"birthdate": "1994-08-25",
"selfie": "b64 string",
"ktp": "b64 string"
}
'import requests
url = "https://api.example.com/auth/registration"
payload = {
"nik": "3170000000000005",
"fullname": "Pandu Doe",
"email": "pandu.septian18@xignature.co.id",
"phone": "0857784200000",
"birthdate": "1994-08-25",
"selfie": "b64 string",
"ktp": "b64 string"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
nik: '3170000000000005',
fullname: 'Pandu Doe',
email: 'pandu.septian18@xignature.co.id',
phone: '0857784200000',
birthdate: '1994-08-25',
selfie: 'b64 string',
ktp: 'b64 string'
})
};
fetch('https://api.example.com/auth/registration', 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.example.com/auth/registration",
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([
'nik' => '3170000000000005',
'fullname' => 'Pandu Doe',
'email' => 'pandu.septian18@xignature.co.id',
'phone' => '0857784200000',
'birthdate' => '1994-08-25',
'selfie' => 'b64 string',
'ktp' => 'b64 string'
]),
CURLOPT_HTTPHEADER => [
"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.example.com/auth/registration"
payload := strings.NewReader("{\n \"nik\": \"3170000000000005\",\n \"fullname\": \"Pandu Doe\",\n \"email\": \"pandu.septian18@xignature.co.id\",\n \"phone\": \"0857784200000\",\n \"birthdate\": \"1994-08-25\",\n \"selfie\": \"b64 string\",\n \"ktp\": \"b64 string\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.example.com/auth/registration")
.header("Content-Type", "application/json")
.body("{\n \"nik\": \"3170000000000005\",\n \"fullname\": \"Pandu Doe\",\n \"email\": \"pandu.septian18@xignature.co.id\",\n \"phone\": \"0857784200000\",\n \"birthdate\": \"1994-08-25\",\n \"selfie\": \"b64 string\",\n \"ktp\": \"b64 string\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/auth/registration")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"nik\": \"3170000000000005\",\n \"fullname\": \"Pandu Doe\",\n \"email\": \"pandu.septian18@xignature.co.id\",\n \"phone\": \"0857784200000\",\n \"birthdate\": \"1994-08-25\",\n \"selfie\": \"b64 string\",\n \"ktp\": \"b64 string\"\n}"
response = http.request(request)
puts response.read_body{
"statusCode": 200,
"message": "Registration successfully",
"data": {
"xignatureId": "pandus31L986",
"email": "pandu.septian1@xignature.co.id",
"phone": "62857786478081",
"user": {
"status": "waiting",
"description": "Waiting for validation and activation"
},
"certificate": {
"status": "waiting",
"description": "Certificate is in the process of being generated"
}
}
}⌘I

