curl --request GET \
--url http://localhost:8080/api/v1/meimport requests
url = "http://localhost:8080/api/v1/me"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://localhost:8080/api/v1/me', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/api/v1/me",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:8080/api/v1/me"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:8080/api/v1/me")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/api/v1/me")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"created_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"status": "PENDING",
"updated_at": "2023-11-07T05:31:56Z",
"approved_at": "2023-11-07T05:31:56Z",
"permissions": "<unknown>"
}Get My Business
Return the business identified by the API key.
curl --request GET \
--url http://localhost:8080/api/v1/meimport requests
url = "http://localhost:8080/api/v1/me"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://localhost:8080/api/v1/me', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/api/v1/me",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:8080/api/v1/me"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:8080/api/v1/me")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/api/v1/me")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"created_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"status": "PENDING",
"updated_at": "2023-11-07T05:31:56Z",
"approved_at": "2023-11-07T05:31:56Z",
"permissions": "<unknown>"
}Response
The authenticated business
A business row.
Carries no credential of its own: keys live in business_api_keys, one row
per named key, so a business can hold several and revoke them individually.
Whether a business may authenticate and transact.
Pending is the state a self-onboarded business is created in and stays in
until an operator approves it. It exists so a half-finished application has
somewhere to live: the alternative — creating the business only on approval —
means an applicant who closes the tab has nothing to come back to.
Only Active authenticates. Pending and Rejected are both refused by
[AuthenticatedBusiness], and the distinction between them is for the
operator reading the list, not for the API.
PENDING, ACTIVE, DISABLED, REJECTED When the onboarding application was approved. None for a business an
operator created directly, which never had an application.
Which platform capabilities DINARI granted this business, as a JSON
array of permission strings. NULL = the default preset — the same
convention admins.permissions uses.