API v2.0 Zalecana

Nowoczesna dokumentacja API z JWT, Webhooks i GraphQL

Pełna funkcjonalność dla zarządzania zleceniami opieki nad grobami

Przegląd

Nowość! API v2.0 z JWT, webhooks, GraphQL i zaawansowanymi funkcjami

Adres API

https://zlecenie.grobnet.eu/includes/api/opieka/v2/

Nowości w v2.0

JWT Authentication

Bezpieczne tokeny uwierzytelniania z automatycznym odświeżaniem

Webhook Support

Real-time powiadomienia o zdarzeniach w systemie

GraphQL Endpoint

Zaawansowane zapytania do API z precyzyjnym kontrolowaniem danych

Bulk Operations

Operacje masowe na wielu zleceniach jednocześnie

Real-time Updates

Aktualizacje w czasie rzeczywistym przez WebSockets

Comprehensive Logging

Szczegółowe logowanie wszystkich żądań i odpowiedzi

Uwierzytelnianie

API v2.0 obsługuje trzy metody uwierzytelniania: API Key/Secret (zalecane dla modułu opieka_panel), JWT i Webhook.

Metoda 1: API Key + Secret (Zalecane dla opieka_panel)

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; }

Endpointy API v2.0

🔧 System

GET /api_status_v2.php

Status systemu i usług (v2.0)

GET /api_version_v2.php

Informacje o wersjach API

GET /api_konfiguracja_v2.php

Konfiguracja systemu (opcjonalne uwierzytelnianie)

💰 Płatności

GET /api_platnosci_opieka_v2.php

Konfiguracja płatności dla modułu opieka_panel (wymaga API Key/Secret)

GET /api_platnosci_v2.php

Konfiguracja płatności (ogólna)

POST /api_paypal_create_payment_v2.php

Utwórz płatność PayPal

POST /api_paypal_verify_payment_v2.php

Weryfikuj płatność PayPal

POST /api_aktualizuj_status_v2.php

Aktualizuj status płatności

📦 Pakiety

GET /api_pakiety_opieka_v2.php

Pobierz listę pakietów dla modułu opieka_panel (wymaga API Key/Secret)

GET /api_pakiety_v2.php

Pobierz listę pakietów (ogólna)

GET /api_packages_v2.php

Zarządzanie pakietami (GET/POST/PUT/DELETE)

📝 Zlecenia

POST /api_zamow_opieke_v2.php

Utwórz zamówienie opieki nad grobem

🔗 Webhooks

GET /api_webhooks_v2.php

Lista webhooków

POST /api_webhooks_v2.php

Utwórz webhook

PUT /api_webhooks_v2.php

Aktualizuj webhook

DELETE /api_webhooks_v2.php

Usuń webhook

POST /api_webhook_test_v2.php

Testuj webhook

🔍 GraphQL

POST /graphql_v2.php

GraphQL endpoint

Test API

Przetestuj API bezpośrednio z dokumentacji. Wybierz metodę uwierzytelniania, wersję API i endpoint.


API v2.0
Zalecana

API v1.0
Stabilna
API Key/Secret Dla modułu opieka_panel
JWT Token Token uwierzytelniania

Wysyłanie żądania...

Przykłady użycia

1. Pobierz konfigurację płatności (opieka_panel)

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; }

2. Utwórz zamówienie opieki

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 v2.0

Webhooks pozwalają na otrzymywanie powiadomień o zdarzeniach w systemie w czasie rzeczywistym.

Obsługiwane eventy

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 v2.0

GraphQL endpoint umożliwia zaawansowane zapytania do API.

Przykładowe zapytanie

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

Kody błędów v2.0

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
Format błędu v2.0:

{ "success": false, "error": { "code": 401, "message": "API configuration not found", "request_id": "req_1234567890", "timestamp": "2025-01-01T12:00:00+00:00" } }

Wsparcie

📧 Email: api-support@grobnet.eu

📱 Telefon: +48 693-877-150

🌐 Status Page: status.zlecenie.grobnet.eu

Powrót do wyboru wersji