Nowoczesna dokumentacja API z JWT, Webhooks i GraphQL
Pełna funkcjonalność dla zarządzania zleceniami opieki nad grobami
https://zlecenie.grobnet.eu/includes/api/opieka/v2/
Bezpieczne tokeny uwierzytelniania z automatycznym odświeżaniem
Real-time powiadomienia o zdarzeniach w systemie
Zaawansowane zapytania do API z precyzyjnym kontrolowaniem danych
Operacje masowe na wielu zleceniach jednocześnie
Aktualizacje w czasie rzeczywistym przez WebSockets
Szczegółowe logowanie wszystkich żądań i odpowiedzi
API v2.0 obsługuje trzy metody uwierzytelniania: API Key/Secret (zalecane dla modułu opieka_panel), JWT i Webhook.
Użyj klucza API i sekretu z ustawień modułu opieka_panel.
curl -H "X-API-Key: YOUR_API_KEY" \
-H "X-API-Secret: YOUR_API_SECRET" \
https://zlecenie.grobnet.eu/includes/api/opieka/v2/api_platnosci_opieka_v2.php
<?php
$apiKey = 'YOUR_API_KEY';
$apiSecret = 'YOUR_API_SECRET';
$url = 'https://zlecenie.grobnet.eu/includes/api/opieka/v2/api_platnosci_opieka_v2.php';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url . '?api_key=' . urlencode($apiKey) . '&api_secret=' . urlencode($apiSecret));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'X-API-Key: ' . $apiKey,
'X-API-Secret: ' . $apiSecret,
'Content-Type: application/json'
]);
$response = curl_exec($ch);
$data = json_decode($response, true);
curl_close($ch);
print_r($data);
?>
import requests
api_key = 'YOUR_API_KEY'
api_secret = 'YOUR_API_SECRET'
url = 'https://zlecenie.grobnet.eu/includes/api/opieka/v2/api_platnosci_opieka_v2.php'
headers = {
'X-API-Key': api_key,
'X-API-Secret': api_secret,
'Content-Type': 'application/json'
}
params = {
'api_key': api_key,
'api_secret': api_secret
}
response = requests.get(url, headers=headers, params=params)
data = response.json()
print(data)
#include <curl/curl.h>
#include <string>
#include <iostream>
std::string apiKey = "YOUR_API_KEY";
std::string apiSecret = "YOUR_API_SECRET";
std::string url = "https://zlecenie.grobnet.eu/includes/api/opieka/v2/api_platnosci_opieka_v2.php";
CURL *curl = curl_easy_init();
if(curl) {
std::string fullUrl = url + "?api_key=" + apiKey + "&api_secret=" + apiSecret;
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, ("X-API-Key: " + apiKey).c_str());
headers = curl_slist_append(headers, ("X-API-Secret: " + apiSecret).c_str());
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(curl, CURLOPT_URL, fullUrl.c_str());
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
std::string response;
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);
CURLcode res = curl_easy_perform(curl);
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
std::cout << response << std::endl;
}
Status systemu i usług (v2.0)
Informacje o wersjach API
Konfiguracja systemu (opcjonalne uwierzytelnianie)
Konfiguracja płatności dla modułu opieka_panel (wymaga API Key/Secret)
Konfiguracja płatności (ogólna)
Utwórz płatność PayPal
Weryfikuj płatność PayPal
Aktualizuj status płatności
Pobierz listę pakietów dla modułu opieka_panel (wymaga API Key/Secret)
Pobierz listę pakietów (ogólna)
Zarządzanie pakietami (GET/POST/PUT/DELETE)
Utwórz zamówienie opieki nad grobem
Lista webhooków
Utwórz webhook
Aktualizuj webhook
Usuń webhook
Testuj webhook
GraphQL endpoint
Przetestuj API bezpośrednio z dokumentacji. Wybierz metodę uwierzytelniania, wersję API i endpoint.
Wysyłanie żądania...
curl -X GET \
-H "X-API-Key: YOUR_API_KEY" \
-H "X-API-Secret: YOUR_API_SECRET" \
"https://zlecenie.grobnet.eu/includes/api/opieka/v2/api_platnosci_opieka_v2.php?api_key=YOUR_API_KEY&api_secret=YOUR_API_SECRET"
<?php
$apiKey = 'YOUR_API_KEY';
$apiSecret = 'YOUR_API_SECRET';
$url = 'https://zlecenie.grobnet.eu/includes/api/opieka/v2/api_platnosci_opieka_v2.php';
// Metoda 1: Przez URL params
$urlWithParams = $url . '?api_key=' . urlencode($apiKey) . '&api_secret=' . urlencode($apiSecret);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $urlWithParams);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'X-API-Key: ' . $apiKey,
'X-API-Secret: ' . $apiSecret,
'Content-Type: application/json'
]);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($httpCode === 200) {
$data = json_decode($response, true);
print_r($data);
} else {
echo "Błąd: " . $httpCode;
}
?>
import requests
import json
api_key = 'YOUR_API_KEY'
api_secret = 'YOUR_API_SECRET'
url = 'https://zlecenie.grobnet.eu/includes/api/opieka/v2/api_platnosci_opieka_v2.php'
headers = {
'X-API-Key': api_key,
'X-API-Secret': api_secret,
'Content-Type': 'application/json'
}
params = {
'api_key': api_key,
'api_secret': api_secret
}
try:
response = requests.get(url, headers=headers, params=params)
response.raise_for_status()
data = response.json()
print(json.dumps(data, indent=2, ensure_ascii=False))
except requests.exceptions.RequestException as e:
print(f"Błąd: {e}")
#include <curl/curl.h>
#include <string>
#include <iostream>
#include <sstream>
static size_t WriteCallback(void *contents, size_t size, size_t nmemb, void *userp) {
((std::string*)userp)->append((char*)contents, size * nmemb);
return size * nmemb;
}
int main() {
std::string apiKey = "YOUR_API_KEY";
std::string apiSecret = "YOUR_API_SECRET";
std::string url = "https://zlecenie.grobnet.eu/includes/api/opieka/v2/api_platnosci_opieka_v2.php";
std::ostringstream fullUrl;
fullUrl << url << "?api_key=" << apiKey << "&api_secret=" << apiSecret;
CURL *curl = curl_easy_init();
if(curl) {
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, ("X-API-Key: " + apiKey).c_str());
headers = curl_slist_append(headers, ("X-API-Secret: " + apiSecret).c_str());
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(curl, CURLOPT_URL, fullUrl.str().c_str());
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
std::string response;
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);
CURLcode res = curl_easy_perform(curl);
if(res == CURLE_OK) {
long httpCode;
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &httpCode);
if(httpCode == 200) {
std::cout << response << std::endl;
} else {
std::cout << "Błąd HTTP: " << httpCode << std::endl;
}
}
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
return 0;
}
curl -X POST \
-H "X-API-Key: YOUR_API_KEY" \
-H "X-API-Secret: YOUR_API_SECRET" \
-H "Content-Type: application/json" \
-d '{
"pakiet": 1,
"sprzatanie": 2,
"mycie": 1,
"kwiaty": 1,
"maly_znicz": 1,
"maly_znicz_ile": 5,
"email": "klient@example.com",
"imie": "Jan",
"telefon": "123456789",
"adres": "ul. Testowa 1",
"suma_vata": "150.00"
}' \
"https://zlecenie.grobnet.eu/includes/api/opieka/v2/api_zamow_opieke_v2.php"
<?php
$apiKey = 'YOUR_API_KEY';
$apiSecret = 'YOUR_API_SECRET';
$url = 'https://zlecenie.grobnet.eu/includes/api/opieka/v2/api_zamow_opieke_v2.php';
$data = [
'pakiet' => 1,
'sprzatanie' => 2,
'mycie' => 1,
'kwiaty' => 1,
'maly_znicz' => 1,
'maly_znicz_ile' => 5,
'email' => 'klient@example.com',
'imie' => 'Jan',
'telefon' => '123456789',
'adres' => 'ul. Testowa 1',
'suma_vata' => '150.00'
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'X-API-Key: ' . $apiKey,
'X-API-Secret: ' . $apiSecret,
'Content-Type: application/json'
]);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($httpCode === 200) {
$result = json_decode($response, true);
echo "Zamówienie utworzone: " . $result['data']['request_id'] . "\n";
} else {
echo "Błąd: " . $httpCode . "\n";
}
?>
import requests
import json
api_key = 'YOUR_API_KEY'
api_secret = 'YOUR_API_SECRET'
url = 'https://zlecenie.grobnet.eu/includes/api/opieka/v2/api_zamow_opieke_v2.php'
headers = {
'X-API-Key': api_key,
'X-API-Secret': api_secret,
'Content-Type': 'application/json'
}
data = {
'pakiet': 1,
'sprzatanie': 2,
'mycie': 1,
'kwiaty': 1,
'maly_znicz': 1,
'maly_znicz_ile': 5,
'email': 'klient@example.com',
'imie': 'Jan',
'telefon': '123456789',
'adres': 'ul. Testowa 1',
'suma_vata': '150.00'
}
try:
response = requests.post(url, headers=headers, json=data)
response.raise_for_status()
result = response.json()
print(f"Zamówienie utworzone: {result['data']['request_id']}")
except requests.exceptions.RequestException as e:
print(f"Błąd: {e}")
#include <curl/curl.h>
#include <string>
#include <iostream>
#include <sstream>
#include <nlohmann/json.hpp>
static size_t WriteCallback(void *contents, size_t size, size_t nmemb, void *userp) {
((std::string*)userp)->append((char*)contents, size * nmemb);
return size * nmemb;
}
int main() {
std::string apiKey = "YOUR_API_KEY";
std::string apiSecret = "YOUR_API_SECRET";
std::string url = "https://zlecenie.grobnet.eu/includes/api/opieka/v2/api_zamow_opieke_v2.php";
nlohmann::json data = {
{"pakiet", 1},
{"sprzatanie", 2},
{"mycie", 1},
{"kwiaty", 1},
{"maly_znicz", 1},
{"maly_znicz_ile", 5},
{"email", "klient@example.com"},
{"imie", "Jan"},
{"telefon", "123456789"},
{"adres", "ul. Testowa 1"},
{"suma_vata", "150.00"}
};
std::string jsonData = data.dump();
CURL *curl = curl_easy_init();
if(curl) {
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, ("X-API-Key: " + apiKey).c_str());
headers = curl_slist_append(headers, ("X-API-Secret: " + apiSecret).c_str());
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, jsonData.c_str());
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
std::string response;
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);
CURLcode res = curl_easy_perform(curl);
if(res == CURLE_OK) {
long httpCode;
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &httpCode);
if(httpCode == 200) {
auto result = nlohmann::json::parse(response);
std::cout << "Zamówienie utworzone: " << result["data"]["request_id"] << std::endl;
}
}
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
return 0;
}
Webhooks pozwalają na otrzymywanie powiadomień o zdarzeniach w systemie w czasie rzeczywistym.
request.created - Nowe zlecenie
request.updated - Zaktualizowane zlecenie
payment.completed - Zakończona płatność
payment.failed - Błąd płatności
worker.assigned - Przypisany pracownik
status.changed - Zmiana statusu
GraphQL endpoint umożliwia zaawansowane zapytania do API.
curl -X POST \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"query": "query { requests { id title status created_at } }"
}' \
https://zlecenie.grobnet.eu/includes/api/opieka/v2/graphql_v2.php
| Kod | Nazwa | Opis |
|---|---|---|
| 200 | OK | Żądanie zakończone sukcesem |
| 401 | Unauthorized | Brak uwierzytelnienia lub nieprawidłowy token/klucz API |
| 403 | Forbidden | Brak uprawnień do wykonania operacji |
| 404 | Not Found | Zasób nie został znaleziony |
| 429 | Too Many Requests | Przekroczono limit żądań |
| 500 | Internal Server Error | Błąd serwera |
{
"success": false,
"error": {
"code": 401,
"message": "API configuration not found",
"request_id": "req_1234567890",
"timestamp": "2025-01-01T12:00:00+00:00"
}
}
📧 Email: api-support@grobnet.eu
📱 Telefon: +48 693-877-150
🌐 Status Page: status.zlecenie.grobnet.eu