Developers

API reference: General

Generated from the published OpenAPI document (version 1.4.0). https://fatoora.tw.sa/api/v1

GET /ping

Check that a key works

Any valid key may call it, whatever its scopes.

Responses

  • 200 The key works.
  • default An error. error.code says which.
curl https://fatoora.tw.sa/api/v1/ping \
  -H "Authorization: Bearer wbk_test_xxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Accept: application/json"
<?php
// composer require guzzlehttp/guzzle
$client = new GuzzleHttp\Client([
    'base_uri' => 'https://fatoora.tw.sa/api/v1/',
    'headers'  => [
        'Authorization' => 'Bearer ' . getenv('WONDERFATOORA_API_KEY'),
        'Accept'        => 'application/json',
    ],
    'timeout'  => 30,
]);

$response = $client->get('ping');
$body = json_decode((string) $response->getBody(), true);
echo $body['data']['tenant'];
// Node.js 18+ (built-in fetch)
const res = await fetch("https://fatoora.tw.sa/api/v1/ping", {
  headers: {
    Authorization: `Bearer ${process.env.WONDERFATOORA_API_KEY}`,
    Accept: "application/json",
  },
});
const body = await res.json();
console.log(body.ok, body.data?.tenant);
# pip install requests
import os
import requests

res = requests.get(
    "https://fatoora.tw.sa/api/v1/ping",
    headers={
        "Authorization": f"Bearer {os.environ['WONDERFATOORA_API_KEY']}",
        "Accept": "application/json",
    },
    timeout=30,
)
print(res.status_code, res.json())

Back to the API reference

Ready to build?

API access is part of the Business and Enterprise plans. Create a key in Settings → API keys and make your first call in minutes.