Rychlý start
1. Získání API klíče
Pro použití API potřebujete API klíč. Ten získáte po registraci v administračním rozhraní.
1
2
|
# Autentizace pomocí API klíče v hlavičce
Authorization: Bearer YOUR_API_KEY
|
2. Testování dostupnosti
Před odesláním faktury ověřte, zda příjemce používá PEPPOL.
Práce s účtem
Health check
Ověřte dostupnost API a stav služby.
1
|
curl -X GET "https://api.czpeppol.cz/api/health"
|
1
2
|
const response = await fetch('https://api.czpeppol.cz/api/health');
const data = await response.json();
|
1
2
3
4
|
const axios = require('axios');
const response = await axios.get('https://api.czpeppol.cz/api/health');
console.log(response.data);
|
1
2
3
4
|
import requests
response = requests.get('https://api.czpeppol.cz/api/health')
data = response.json()
|
1
2
3
4
5
6
7
|
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.czpeppol.cz/api/health"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
|
1
2
3
4
|
using var client = new HttpClient();
var response = await client.GetAsync("https://api.czpeppol.cz/api/health");
var content = await response.Content.ReadAsStringAsync();
|
Odpověď:
1
2
3
4
5
|
{
"status": "ok",
"version": "1.0.0",
"timestamp": "2025-11-30T10:30:00Z"
}
|
Vyhledávání příjemců
Zjistěte, zda firma používá PEPPOL síť pro příjem dokumentů.
Ověření podle IČO
1
|
GET /api/lookup/cz/:ICO?type=invoices
|
1
2
|
curl -X GET "https://api.czpeppol.cz/api/lookup/cz/12345678?type=invoices" \
-H "Authorization: Bearer YOUR_API_KEY"
|
1
2
3
4
5
6
|
const response = await fetch('https://api.czpeppol.cz/api/lookup/cz/12345678?type=invoices', {
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const data = await response.json();
|
1
2
3
4
5
6
7
8
9
|
const axios = require('axios');
const response = await axios.get('https://api.czpeppol.cz/api/lookup/cz/12345678', {
params: { type: 'invoices' },
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
console.log(response.data);
|
1
2
3
4
5
6
7
8
|
import requests
response = requests.get(
'https://api.czpeppol.cz/api/lookup/cz/12345678',
params={'type': 'invoices'},
headers={'Authorization': 'Bearer YOUR_API_KEY'}
)
data = response.json()
|
1
2
3
4
5
6
7
8
|
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.czpeppol.cz/api/lookup/cz/12345678?type=invoices"))
.header("Authorization", "Bearer YOUR_API_KEY")
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
|
1
2
3
4
5
6
7
|
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer YOUR_API_KEY");
var response = await client.GetAsync(
"https://api.czpeppol.cz/api/lookup/cz/12345678?type=invoices"
);
var content = await response.Content.ReadAsStringAsync();
|
Odpověď:
1
2
3
4
5
6
7
8
9
|
{
"found": true,
"participant": {
"scheme": "CZ:ICO",
"value": "12345678",
"documentTypes": ["invoices"],
"endpoints": [...]
}
}
|
Ověření podle DIČ
1
|
GET /api/lookup/:DIC?type=invoices
|
1
2
|
curl -X GET "https://api.czpeppol.cz/api/lookup/CZ12345678?type=invoices" \
-H "Authorization: Bearer YOUR_API_KEY"
|
1
2
3
4
5
6
|
const response = await fetch('https://api.czpeppol.cz/api/lookup/CZ12345678?type=invoices', {
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const data = await response.json();
|
1
2
3
4
5
6
7
8
9
|
const axios = require('axios');
const response = await axios.get('https://api.czpeppol.cz/api/lookup/CZ12345678', {
params: { type: 'invoices' },
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
console.log(response.data);
|
1
2
3
4
5
6
7
8
|
import requests
response = requests.get(
'https://api.czpeppol.cz/api/lookup/CZ12345678',
params={'type': 'invoices'},
headers={'Authorization': 'Bearer YOUR_API_KEY'}
)
data = response.json()
|
1
2
3
4
5
6
7
8
|
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.czpeppol.cz/api/lookup/CZ12345678?type=invoices"))
.header("Authorization", "Bearer YOUR_API_KEY")
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
|
1
2
3
4
5
6
7
|
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer YOUR_API_KEY");
var response = await client.GetAsync(
"https://api.czpeppol.cz/api/lookup/CZ12345678?type=invoices"
);
var content = await response.Content.ReadAsStringAsync();
|
Hromadné ověření
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
curl -X POST "https://api.czpeppol.cz/api/lookup/batch" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '[
{
"country": "CZ",
"in": "12345678",
"vatId": "CZ12345678",
"type": ["invoices"]
},
{
"country": "CZ",
"in": "87654321",
"type": ["invoices", "orders"]
}
]'
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
const response = await fetch('https://api.czpeppol.cz/api/lookup/batch', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify([
{
country: 'CZ',
in: '12345678',
vatId: 'CZ12345678',
type: ['invoices']
},
{
country: 'CZ',
in: '87654321',
type: ['invoices', 'orders']
}
])
});
const data = await response.json();
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
const axios = require('axios');
const response = await axios.post(
'https://api.czpeppol.cz/api/lookup/batch',
[
{
country: 'CZ',
in: '12345678',
vatId: 'CZ12345678',
type: ['invoices']
},
{
country: 'CZ',
in: '87654321',
type: ['invoices', 'orders']
}
],
{
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
}
);
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
import requests
data = [
{
'country': 'CZ',
'in': '12345678',
'vatId': 'CZ12345678',
'type': ['invoices']
},
{
'country': 'CZ',
'in': '87654321',
'type': ['invoices', 'orders']
}
]
response = requests.post(
'https://api.czpeppol.cz/api/lookup/batch',
json=data,
headers={'Authorization': 'Bearer YOUR_API_KEY'}
)
|
1
2
3
4
5
6
7
8
9
10
|
String jsonBody = "[{\"country\":\"CZ\",\"in\":\"12345678\",\"vatId\":\"CZ12345678\",\"type\":[\"invoices\"]},{\"country\":\"CZ\",\"in\":\"87654321\",\"type\":[\"invoices\",\"orders\"]}]";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.czpeppol.cz/api/lookup/batch"))
.header("Authorization", "Bearer YOUR_API_KEY")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(jsonBody))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer YOUR_API_KEY");
var data = new[]
{
new { country = "CZ", @in = "12345678", vatId = "CZ12345678", type = new[] { "invoices" } },
new { country = "CZ", @in = "87654321", type = new[] { "invoices", "orders" } }
};
var json = JsonSerializer.Serialize(data);
var content = new StringContent(json, Encoding.UTF8, "application/json");
var response = await client.PostAsync(
"https://api.czpeppol.cz/api/lookup/batch",
content
);
|
Odpověď:
1
2
3
4
5
6
7
8
9
10
11
|
[
{
"in": "12345678",
"found": true,
"documentTypes": ["invoices"]
},
{
"in": "87654321",
"found": false
}
]
|
Odesílání dokumentů
Odešlete fakturu nebo jiný dokument přes PEPPOL síť.
1
2
|
POST /api/peppol/{companyId}/send
Content-Type: application/xml
|
1
2
3
4
|
curl -X POST "https://api.czpeppol.cz/api/peppol/12345678/send" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/xml" \
--data-binary @invoice.xml
|
1
2
3
4
5
6
7
8
9
10
11
|
const xmlContent = await fs.readFile('invoice.xml', 'utf-8');
const response = await fetch('https://api.czpeppol.cz/api/peppol/12345678/send', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/xml'
},
body: xmlContent
});
const result = await response.json();
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
const axios = require('axios');
const fs = require('fs').promises;
const xmlContent = await fs.readFile('invoice.xml', 'utf-8');
const response = await axios.post(
'https://api.czpeppol.cz/api/peppol/12345678/send',
xmlContent,
{
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/xml'
}
}
);
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
import requests
with open('invoice.xml', 'r') as f:
xml_content = f.read()
response = requests.post(
'https://api.czpeppol.cz/api/peppol/12345678/send',
data=xml_content,
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/xml'
}
)
|
1
2
3
4
5
6
7
8
9
10
11
|
String xmlContent = Files.readString(Path.of("invoice.xml"));
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.czpeppol.cz/api/peppol/12345678/send"))
.header("Authorization", "Bearer YOUR_API_KEY")
.header("Content-Type", "application/xml")
.POST(HttpRequest.BodyPublishers.ofString(xmlContent))
.build();
HttpResponse<String> response = client.send(request,
HttpResponse.BodyHandlers.ofString());
|
1
2
3
4
5
6
7
8
9
10
|
var xmlContent = await File.ReadAllTextAsync("invoice.xml");
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer YOUR_API_KEY");
var content = new StringContent(xmlContent, Encoding.UTF8, "application/xml");
var response = await client.PostAsync(
"https://api.czpeppol.cz/api/peppol/12345678/send",
content
);
|
1
2
|
POST /api/peppol/{companyId}/send/isdoc
Content-Type: application/xml
|
1
2
3
4
|
curl -X POST "https://api.czpeppol.cz/api/peppol/12345678/send/isdoc" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/xml" \
--data-binary @faktura.isdoc
|
1
2
3
4
5
6
7
8
9
10
11
|
const xmlContent = await fs.readFile('faktura.isdoc', 'utf-8');
const response = await fetch('https://api.czpeppol.cz/api/peppol/12345678/send/isdoc', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/xml'
},
body: xmlContent
});
const result = await response.json();
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
const axios = require('axios');
const fs = require('fs').promises;
const xmlContent = await fs.readFile('faktura.isdoc', 'utf-8');
const response = await axios.post(
'https://api.czpeppol.cz/api/peppol/12345678/send/isdoc',
xmlContent,
{
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/xml'
}
}
);
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
import requests
with open('faktura.isdoc', 'r') as f:
xml_content = f.read()
response = requests.post(
'https://api.czpeppol.cz/api/peppol/12345678/send/isdoc',
data=xml_content,
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/xml'
}
)
|
1
2
3
4
5
6
7
8
9
10
11
|
String xmlContent = Files.readString(Path.of("faktura.isdoc"));
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.czpeppol.cz/api/peppol/12345678/send/isdoc"))
.header("Authorization", "Bearer YOUR_API_KEY")
.header("Content-Type", "application/xml")
.POST(HttpRequest.BodyPublishers.ofString(xmlContent))
.build();
HttpResponse<String> response = client.send(request,
HttpResponse.BodyHandlers.ofString());
|
1
2
3
4
5
6
7
8
9
10
|
var xmlContent = await File.ReadAllTextAsync("faktura.isdoc");
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer YOUR_API_KEY");
var content = new StringContent(xmlContent, Encoding.UTF8, "application/xml");
var response = await client.PostAsync(
"https://api.czpeppol.cz/api/peppol/12345678/send/isdoc",
content
);
|
1
2
|
POST /api/peppol/{companyId}/send/pohoda
Content-Type: application/xml
|
1
2
3
4
|
curl -X POST "https://api.czpeppol.cz/api/peppol/12345678/send/pohoda" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/xml" \
--data-binary @faktura.xml
|
1
2
3
4
5
6
7
8
9
10
11
|
const xmlContent = await fs.readFile('faktura.xml', 'utf-8');
const response = await fetch('https://api.czpeppol.cz/api/peppol/12345678/send/pohoda', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/xml'
},
body: xmlContent
});
const result = await response.json();
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
const axios = require('axios');
const fs = require('fs').promises;
const xmlContent = await fs.readFile('faktura.xml', 'utf-8');
const response = await axios.post(
'https://api.czpeppol.cz/api/peppol/12345678/send/pohoda',
xmlContent,
{
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/xml'
}
}
);
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
import requests
with open('faktura.xml', 'r') as f:
xml_content = f.read()
response = requests.post(
'https://api.czpeppol.cz/api/peppol/12345678/send/pohoda',
data=xml_content,
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/xml'
}
)
|
1
2
3
4
5
6
7
8
9
10
11
|
String xmlContent = Files.readString(Path.of("faktura.xml"));
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.czpeppol.cz/api/peppol/12345678/send/pohoda"))
.header("Authorization", "Bearer YOUR_API_KEY")
.header("Content-Type", "application/xml")
.POST(HttpRequest.BodyPublishers.ofString(xmlContent))
.build();
HttpResponse<String> response = client.send(request,
HttpResponse.BodyHandlers.ofString());
|
1
2
3
4
5
6
7
8
9
10
|
var xmlContent = await File.ReadAllTextAsync("faktura.xml");
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer YOUR_API_KEY");
var content = new StringContent(xmlContent, Encoding.UTF8, "application/xml");
var response = await client.PostAsync(
"https://api.czpeppol.cz/api/peppol/12345678/send/pohoda",
content
);
|
Odpověď při úspěchu:
1
2
3
4
5
6
7
|
{
"success": true,
"documentId": "doc_abc123xyz",
"messageId": "msg_xyz789abc",
"status": "sent",
"timestamp": "2025-11-30T10:30:00Z"
}
|
Ověření PEPPOL účtu
Ověřte, zda je váš PEPPOL účet aktivní a správně nakonfigurovaný.
1
|
GET /api/peppol/{companyId}/verify
|
1
2
|
curl -X GET "https://api.czpeppol.cz/api/peppol/12345678/verify" \
-H "Authorization: Bearer YOUR_API_KEY"
|
1
2
3
4
5
6
|
const response = await fetch('https://api.czpeppol.cz/api/peppol/12345678/verify', {
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const data = await response.json();
|
1
2
3
4
5
6
7
8
9
10
|
const axios = require('axios');
const response = await axios.get(
'https://api.czpeppol.cz/api/peppol/12345678/verify',
{
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
}
);
|
1
2
3
4
5
6
7
|
import requests
response = requests.get(
'https://api.czpeppol.cz/api/peppol/12345678/verify',
headers={'Authorization': 'Bearer YOUR_API_KEY'}
)
data = response.json()
|
1
2
3
4
5
6
7
8
|
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.czpeppol.cz/api/peppol/12345678/verify"))
.header("Authorization", "Bearer YOUR_API_KEY")
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
|
1
2
3
4
5
6
7
|
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer YOUR_API_KEY");
var response = await client.GetAsync(
"https://api.czpeppol.cz/api/peppol/12345678/verify"
);
var content = await response.Content.ReadAsStringAsync();
|
Odpověď:
1
2
3
4
5
6
7
8
9
|
{
"valid": true,
"participant": {
"scheme": "CZ:ICO",
"value": "12345678"
},
"documentTypes": ["invoices", "orders"],
"certificateExpiry": "2026-12-31T23:59:59Z"
}
|
Příjem dokumentů
Seznam všech dokumentů
1
|
GET /api/peppol/documents
|
Query parametry:
status - filtr podle stavu (received, read, processed)
from - datum od (ISO 8601)
to - datum do (ISO 8601)
limit - počet záznamů (default: 50)
offset - offset pro stránkování
1
2
|
curl -X GET "https://api.czpeppol.cz/api/peppol/documents?status=received&limit=20" \
-H "Authorization: Bearer YOUR_API_KEY"
|
1
2
3
4
5
6
|
const response = await fetch('https://api.czpeppol.cz/api/peppol/documents?status=received&limit=20', {
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const data = await response.json();
|
1
2
3
4
5
6
7
8
9
|
const axios = require('axios');
const response = await axios.get('https://api.czpeppol.cz/api/peppol/documents', {
params: { status: 'received', limit: 20 },
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
console.log(response.data);
|
1
2
3
4
5
6
7
8
|
import requests
response = requests.get(
'https://api.czpeppol.cz/api/peppol/documents',
params={'status': 'received', 'limit': 20},
headers={'Authorization': 'Bearer YOUR_API_KEY'}
)
data = response.json()
|
1
2
3
4
5
6
7
8
|
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.czpeppol.cz/api/peppol/documents?status=received&limit=20"))
.header("Authorization", "Bearer YOUR_API_KEY")
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
|
1
2
3
4
5
6
7
|
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer YOUR_API_KEY");
var response = await client.GetAsync(
"https://api.czpeppol.cz/api/peppol/documents?status=received&limit=20"
);
var content = await response.Content.ReadAsStringAsync();
|
Odpověď:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{
"total": 45,
"limit": 20,
"offset": 0,
"documents": [
{
"documentId": "doc_abc123",
"type": "invoice",
"sender": {
"scheme": "CZ:ICO",
"value": "87654321",
"name": "Dodavatel s.r.o."
},
"receivedAt": "2025-11-30T08:15:00Z",
"status": "received",
"format": "UBL"
}
]
}
|
Nepřečtené příchozí dokumenty
1
2
|
curl -X GET "https://api.czpeppol.cz/api/peppol/inbox" \
-H "Authorization: Bearer YOUR_API_KEY"
|
1
2
3
4
5
6
|
const response = await fetch('https://api.czpeppol.cz/api/peppol/inbox', {
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const data = await response.json();
|
1
2
3
4
5
6
7
|
const axios = require('axios');
const response = await axios.get('https://api.czpeppol.cz/api/peppol/inbox', {
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
|
1
2
3
4
5
6
7
|
import requests
response = requests.get(
'https://api.czpeppol.cz/api/peppol/inbox',
headers={'Authorization': 'Bearer YOUR_API_KEY'}
)
data = response.json()
|
1
2
3
4
5
6
7
8
|
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.czpeppol.cz/api/peppol/inbox"))
.header("Authorization", "Bearer YOUR_API_KEY")
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
|
1
2
3
4
5
6
7
|
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer YOUR_API_KEY");
var response = await client.GetAsync(
"https://api.czpeppol.cz/api/peppol/inbox"
);
var content = await response.Content.ReadAsStringAsync();
|
Odpověď:**
1
2
3
4
|
{
"unreadCount": 3,
"documents": [...]
}
|
Práce s dokumenty
Stažení dokumentu
1
|
GET /api/peppol/documents/{documentId}/download-package
|
Stáhne originální balíček dokumentu ve formátu, v jakém byl odeslán.
1
2
3
|
curl -X GET "https://api.czpeppol.cz/api/peppol/documents/doc_abc123/download-package" \
-H "Authorization: Bearer YOUR_API_KEY" \
-o document.zip
|
1
2
3
4
5
6
7
8
|
const response = await fetch('https://api.czpeppol.cz/api/peppol/documents/doc_abc123/download-package', {
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const blob = await response.blob();
const buffer = await blob.arrayBuffer();
await fs.writeFile('document.zip', Buffer.from(buffer));
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
const axios = require('axios');
const fs = require('fs').promises;
const response = await axios.get(
'https://api.czpeppol.cz/api/peppol/documents/doc_abc123/download-package',
{
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
},
responseType: 'arraybuffer'
}
);
await fs.writeFile('document.zip', response.data);
|
1
2
3
4
5
6
7
8
9
10
11
|
import requests
response = requests.get(
'https://api.czpeppol.cz/api/peppol/documents/doc_abc123/download-package',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
stream=True
)
with open('document.zip', 'wb') as f:
for chunk in response.iter_content(chunk_size=8192):
f.write(chunk)
|
1
2
3
4
5
6
7
8
9
10
|
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.czpeppol.cz/api/peppol/documents/doc_abc123/download-package"))
.header("Authorization", "Bearer YOUR_API_KEY")
.GET()
.build();
HttpResponse<byte[]> response = client.send(request,
HttpResponse.BodyHandlers.ofByteArray());
Files.write(Path.of("document.zip"), response.body());
|
1
2
3
4
5
6
7
8
|
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer YOUR_API_KEY");
var response = await client.GetAsync(
"https://api.czpeppol.cz/api/peppol/documents/doc_abc123/download-package"
);
var bytes = await response.Content.ReadAsByteArrayAsync();
await File.WriteAllBytesAsync("document.zip", bytes);
|
Konverze do ISDOC
1
|
GET /api/peppol/documents/{documentId}/isdoc
|
Vrátí dokument konvertovaný do formátu ISDOC.
1
2
3
|
curl -X GET "https://api.czpeppol.cz/api/peppol/documents/doc_abc123/isdoc" \
-H "Authorization: Bearer YOUR_API_KEY" \
-o document.isdoc
|
1
2
3
4
5
6
7
|
const response = await fetch('https://api.czpeppol.cz/api/peppol/documents/doc_abc123/isdoc', {
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const xmlContent = await response.text();
await fs.writeFile('document.isdoc', xmlContent);
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
const axios = require('axios');
const fs = require('fs').promises;
const response = await axios.get(
'https://api.czpeppol.cz/api/peppol/documents/doc_abc123/isdoc',
{
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
}
);
await fs.writeFile('document.isdoc', response.data);
|
1
2
3
4
5
6
7
8
9
|
import requests
response = requests.get(
'https://api.czpeppol.cz/api/peppol/documents/doc_abc123/isdoc',
headers={'Authorization': 'Bearer YOUR_API_KEY'}
)
with open('document.isdoc', 'w') as f:
f.write(response.text)
|
1
2
3
4
5
6
7
8
9
10
|
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.czpeppol.cz/api/peppol/documents/doc_abc123/isdoc"))
.header("Authorization", "Bearer YOUR_API_KEY")
.GET()
.build();
HttpResponse<String> response = client.send(request,
HttpResponse.BodyHandlers.ofString());
Files.writeString(Path.of("document.isdoc"), response.body());
|
1
2
3
4
5
6
7
8
|
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer YOUR_API_KEY");
var response = await client.GetAsync(
"https://api.czpeppol.cz/api/peppol/documents/doc_abc123/isdoc"
);
var content = await response.Content.ReadAsStringAsync();
await File.WriteAllTextAsync("document.isdoc", content);
|
1
|
GET /api/peppol/documents/{documentId}/pohoda
|
Vrátí dokument konvertovaný do formátu Pohoda XML.
1
2
3
|
curl -X GET "https://api.czpeppol.cz/api/peppol/documents/doc_abc123/pohoda" \
-H "Authorization: Bearer YOUR_API_KEY" \
-o document.xml
|
1
2
3
4
5
6
7
|
const response = await fetch('https://api.czpeppol.cz/api/peppol/documents/doc_abc123/pohoda', {
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const xmlContent = await response.text();
await fs.writeFile('document.xml', xmlContent);
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
const axios = require('axios');
const fs = require('fs').promises;
const response = await axios.get(
'https://api.czpeppol.cz/api/peppol/documents/doc_abc123/pohoda',
{
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
}
);
await fs.writeFile('document.xml', response.data);
|
1
2
3
4
5
6
7
8
9
|
import requests
response = requests.get(
'https://api.czpeppol.cz/api/peppol/documents/doc_abc123/pohoda',
headers={'Authorization': 'Bearer YOUR_API_KEY'}
)
with open('document.xml', 'w') as f:
f.write(response.text)
|
1
2
3
4
5
6
7
8
9
10
|
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.czpeppol.cz/api/peppol/documents/doc_abc123/pohoda"))
.header("Authorization", "Bearer YOUR_API_KEY")
.GET()
.build();
HttpResponse<String> response = client.send(request,
HttpResponse.BodyHandlers.ofString());
Files.writeString(Path.of("document.xml"), response.body());
|
1
2
3
4
5
6
7
8
|
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer YOUR_API_KEY");
var response = await client.GetAsync(
"https://api.czpeppol.cz/api/peppol/documents/doc_abc123/pohoda"
);
var content = await response.Content.ReadAsStringAsync();
await File.WriteAllTextAsync("document.xml", content);
|
Stav dokumentu
1
|
GET /api/peppol/documents/{documentId}/status
|
1
2
|
curl -X GET "https://api.czpeppol.cz/api/peppol/documents/doc_abc123/status" \
-H "Authorization: Bearer YOUR_API_KEY"
|
1
2
3
4
5
6
|
const response = await fetch('https://api.czpeppol.cz/api/peppol/documents/doc_abc123/status', {
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const data = await response.json();
|
1
2
3
4
5
6
7
8
9
10
|
const axios = require('axios');
const response = await axios.get(
'https://api.czpeppol.cz/api/peppol/documents/doc_abc123/status',
{
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
}
);
|
1
2
3
4
5
6
7
|
import requests
response = requests.get(
'https://api.czpeppol.cz/api/peppol/documents/doc_abc123/status',
headers={'Authorization': 'Bearer YOUR_API_KEY'}
)
data = response.json()
|
1
2
3
4
5
6
7
8
|
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.czpeppol.cz/api/peppol/documents/doc_abc123/status"))
.header("Authorization", "Bearer YOUR_API_KEY")
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
|
1
2
3
4
5
6
7
|
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer YOUR_API_KEY");
var response = await client.GetAsync(
"https://api.czpeppol.cz/api/peppol/documents/doc_abc123/status"
);
var content = await response.Content.ReadAsStringAsync();
|
Odpověď:**
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
{
"documentId": "doc_abc123",
"status": "delivered",
"timeline": [
{
"status": "sent",
"timestamp": "2025-11-30T10:30:00Z"
},
{
"status": "delivered",
"timestamp": "2025-11-30T10:30:15Z"
}
]
}
|
Označení jako přečtené
1
|
POST /api/peppol/documents/{documentId}/mark-as-read
|
1
2
|
curl -X POST "https://api.czpeppol.cz/api/peppol/documents/doc_abc123/mark-as-read" \
-H "Authorization: Bearer YOUR_API_KEY"
|
1
2
3
4
5
6
7
|
const response = await fetch('https://api.czpeppol.cz/api/peppol/documents/doc_abc123/mark-as-read', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const data = await response.json();
|
1
2
3
4
5
6
7
8
9
10
11
|
const axios = require('axios');
const response = await axios.post(
'https://api.czpeppol.cz/api/peppol/documents/doc_abc123/mark-as-read',
{},
{
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
}
);
|
1
2
3
4
5
6
7
|
import requests
response = requests.post(
'https://api.czpeppol.cz/api/peppol/documents/doc_abc123/mark-as-read',
headers={'Authorization': 'Bearer YOUR_API_KEY'}
)
data = response.json()
|
1
2
3
4
5
6
7
|
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.czpeppol.cz/api/peppol/documents/doc_abc123/mark-as-read"))
.header("Authorization", "Bearer YOUR_API_KEY")
.POST(HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
|
1
2
3
4
5
6
7
8
|
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer YOUR_API_KEY");
var response = await client.PostAsync(
"https://api.czpeppol.cz/api/peppol/documents/doc_abc123/mark-as-read",
null
);
var content = await response.Content.ReadAsStringAsync();
|
Odpověď:
1
2
3
4
5
|
{
"success": true,
"documentId": "doc_abc123",
"status": "read"
}
|
Chybové kódy
API používá standardní HTTP stavové kódy:
| Kód |
Význam |
| 200 |
OK - Požadavek úspěšný |
| 201 |
Created - Dokument vytvořen |
| 400 |
Bad Request - Nevalidní požadavek |
| 401 |
Unauthorized - Chybí nebo neplatný API klíč |
| 403 |
Forbidden - Nedostatečná oprávnění |
| 404 |
Not Found - Dokument nebo endpoint nenalezen |
| 422 |
Unprocessable Entity - Validační chyba |
| 429 |
Too Many Requests - Překročen rate limit |
| 500 |
Internal Server Error - Chyba serveru |
Formát chyby:
1
2
3
4
5
6
7
8
9
|
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid document format",
"details": [
"Missing required field: InvoiceNumber"
]
}
}
|
Webhooky
Webhooky umožňují automatické notifikace o událostech ve vašem PEPPOL účtu.
Registrace webhooku
1
2
3
4
5
6
7
8
|
curl -X POST "https://api.czpeppol.cz/api/webhooks" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-app.com/webhook",
"events": ["document.received", "document.sent", "document.failed"],
"secret": "your_webhook_secret"
}'
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
const response = await fetch('https://api.czpeppol.cz/api/webhooks', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
url: 'https://your-app.com/webhook',
events: ['document.received', 'document.sent', 'document.failed'],
secret: 'your_webhook_secret'
})
});
const data = await response.json();
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
const axios = require('axios');
const response = await axios.post(
'https://api.czpeppol.cz/api/webhooks',
{
url: 'https://your-app.com/webhook',
events: ['document.received', 'document.sent', 'document.failed'],
secret: 'your_webhook_secret'
},
{
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
}
);
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
import requests
data = {
'url': 'https://your-app.com/webhook',
'events': ['document.received', 'document.sent', 'document.failed'],
'secret': 'your_webhook_secret'
}
response = requests.post(
'https://api.czpeppol.cz/api/webhooks',
json=data,
headers={'Authorization': 'Bearer YOUR_API_KEY'}
)
|
1
2
3
4
5
6
7
8
9
10
|
String jsonBody = "{\"url\":\"https://your-app.com/webhook\",\"events\":[\"document.received\",\"document.sent\",\"document.failed\"],\"secret\":\"your_webhook_secret\"}";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.czpeppol.cz/api/webhooks"))
.header("Authorization", "Bearer YOUR_API_KEY")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(jsonBody))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer YOUR_API_KEY");
var data = new
{
url = "https://your-app.com/webhook",
events = new[] { "document.received", "document.sent", "document.failed" },
secret = "your_webhook_secret"
};
var json = JsonSerializer.Serialize(data);
var content = new StringContent(json, Encoding.UTF8, "application/json");
var response = await client.PostAsync(
"https://api.czpeppol.cz/api/webhooks",
content
);
|
Odpověď:
1
2
3
4
5
6
7
|
{
"id": "wh_abc123",
"url": "https://your-app.com/webhook",
"events": ["document.received", "document.sent", "document.failed"],
"status": "active",
"createdAt": "2025-11-30T10:30:00Z"
}
|
Podporované události
document.received - Přijat nový dokument
document.sent - Dokument úspěšně odeslán
document.delivered - Dokument doručen příjemci
document.failed - Chyba při zpracování dokumentu
account.verified - Účet byl ověřen
certificate.expiring - Certifikát brzy vyprší (30 dní před expirací)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
{
"id": "evt_xyz789",
"type": "document.received",
"timestamp": "2025-11-30T10:30:00Z",
"data": {
"documentId": "doc_abc123",
"sender": {
"scheme": "CZ:ICO",
"value": "87654321",
"name": "Dodavatel s.r.o."
},
"type": "invoice",
"receivedAt": "2025-11-30T10:30:00Z"
}
}
|
Ověření webhooku
Každá webhook notifikace obsahuje X-Webhook-Signature hlavičku s HMAC SHA256 podpisem.
1
2
3
4
5
6
7
|
const crypto = require('crypto');
function verifyWebhook(payload, signature, secret) {
const hmac = crypto.createHmac('sha256', secret);
const digest = hmac.update(payload).digest('hex');
return digest === signature;
}
|
Seznam webhooků
Odpověď:
1
2
3
4
5
6
7
8
9
10
11
|
{
"webhooks": [
{
"id": "wh_abc123",
"url": "https://your-app.com/webhook",
"events": ["document.received"],
"status": "active",
"createdAt": "2025-11-30T10:30:00Z"
}
]
}
|
Smazání webhooku
1
|
DELETE /api/webhooks/{webhookId}
|
1
2
|
curl -X DELETE "https://api.czpeppol.cz/api/webhooks/wh_abc123" \
-H "Authorization: Bearer YOUR_API_KEY"
|
1
2
3
4
5
6
|
const response = await fetch('https://api.czpeppol.cz/api/webhooks/wh_abc123', {
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
|
1
2
3
4
5
6
7
|
const axios = require('axios');
await axios.delete('https://api.czpeppol.cz/api/webhooks/wh_abc123', {
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
|
1
2
3
4
5
6
|
import requests
response = requests.delete(
'https://api.czpeppol.cz/api/webhooks/wh_abc123',
headers={'Authorization': 'Bearer YOUR_API_KEY'}
)
|
1
2
3
4
5
6
7
|
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.czpeppol.cz/api/webhooks/wh_abc123"))
.header("Authorization", "Bearer YOUR_API_KEY")
.DELETE()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
|
1
2
3
4
5
6
|
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer YOUR_API_KEY");
var response = await client.DeleteAsync(
"https://api.czpeppol.cz/api/webhooks/wh_abc123"
);
|
Rate Limiting
API má nastaveny následující limity:
- 100 požadavků/minutu pro lookup endpointy
- 50 požadavků/minutu pro odesílání dokumentů
- 200 požadavků/minutu pro čtení dat
Při překročení limitu obdržíte HTTP 429 s hlavičkou Retry-After.
Máte otázky?