مولَّد من مستند OpenAPI المنشور (الإصدار 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.
الردود
- 200 The key works.
-
default
An error.
error.codesays 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())
العودة إلى مرجع الواجهة البرمجية
جاهز للبدء؟
الوصول إلى الواجهة البرمجية ضمن باقات: الأعمال والمؤسسات. أنشئ مفتاحًا من الإعدادات ← مفاتيح API وأرسل أول طلب خلال دقائق.