curl --request POST \
--url https://api.openfiskal.com/v1/regimes/czechia_eet2/cash-certificates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-OpenFiskal-Merchant: <x-openfiskal-merchant>' \
--data '
{
"p12": "<string>",
"password": "<string>",
"description": "Kavárna Praha"
}
'import requests
url = "https://api.openfiskal.com/v1/regimes/czechia_eet2/cash-certificates"
payload = {
"p12": "<string>",
"password": "<string>",
"description": "Kavárna Praha"
}
headers = {
"X-OpenFiskal-Merchant": "<x-openfiskal-merchant>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-OpenFiskal-Merchant': '<x-openfiskal-merchant>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({p12: '<string>', password: '<string>', description: 'Kavárna Praha'})
};
fetch('https://api.openfiskal.com/v1/regimes/czechia_eet2/cash-certificates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.openfiskal.com/v1/regimes/czechia_eet2/cash-certificates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'p12' => '<string>',
'password' => '<string>',
'description' => 'Kavárna Praha'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-OpenFiskal-Merchant: <x-openfiskal-merchant>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.openfiskal.com/v1/regimes/czechia_eet2/cash-certificates"
payload := strings.NewReader("{\n \"p12\": \"<string>\",\n \"password\": \"<string>\",\n \"description\": \"Kavárna Praha\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-OpenFiskal-Merchant", "<x-openfiskal-merchant>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.openfiskal.com/v1/regimes/czechia_eet2/cash-certificates")
.header("X-OpenFiskal-Merchant", "<x-openfiskal-merchant>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"p12\": \"<string>\",\n \"password\": \"<string>\",\n \"description\": \"Kavárna Praha\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openfiskal.com/v1/regimes/czechia_eet2/cash-certificates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-OpenFiskal-Merchant"] = '<x-openfiskal-merchant>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"p12\": \"<string>\",\n \"password\": \"<string>\",\n \"description\": \"Kavárna Praha\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"vat_id": "CZ27082440",
"serial_number": "15584C0A86BB6E65CC5C7097792CB26481A9A6AD",
"valid_from": "2023-11-07T05:31:56Z",
"valid_to": "2023-11-07T05:31:56Z",
"status": "scheduled",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>"
}Upload a cash certificate
Uploads a Czech merchant’s EET 2.0 cash certificate (the .p12 from the tax portal) and its password, stored encrypted. It must be issued by CA EET to the merchant’s DIČ and not be expired. The sandbox takes certificates of the EET playground only, live keys production ones. Sales are signed with the valid certificate that expires last, so upload the next one before the current one expires.
curl --request POST \
--url https://api.openfiskal.com/v1/regimes/czechia_eet2/cash-certificates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-OpenFiskal-Merchant: <x-openfiskal-merchant>' \
--data '
{
"p12": "<string>",
"password": "<string>",
"description": "Kavárna Praha"
}
'import requests
url = "https://api.openfiskal.com/v1/regimes/czechia_eet2/cash-certificates"
payload = {
"p12": "<string>",
"password": "<string>",
"description": "Kavárna Praha"
}
headers = {
"X-OpenFiskal-Merchant": "<x-openfiskal-merchant>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-OpenFiskal-Merchant': '<x-openfiskal-merchant>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({p12: '<string>', password: '<string>', description: 'Kavárna Praha'})
};
fetch('https://api.openfiskal.com/v1/regimes/czechia_eet2/cash-certificates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.openfiskal.com/v1/regimes/czechia_eet2/cash-certificates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'p12' => '<string>',
'password' => '<string>',
'description' => 'Kavárna Praha'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-OpenFiskal-Merchant: <x-openfiskal-merchant>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.openfiskal.com/v1/regimes/czechia_eet2/cash-certificates"
payload := strings.NewReader("{\n \"p12\": \"<string>\",\n \"password\": \"<string>\",\n \"description\": \"Kavárna Praha\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-OpenFiskal-Merchant", "<x-openfiskal-merchant>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.openfiskal.com/v1/regimes/czechia_eet2/cash-certificates")
.header("X-OpenFiskal-Merchant", "<x-openfiskal-merchant>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"p12\": \"<string>\",\n \"password\": \"<string>\",\n \"description\": \"Kavárna Praha\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openfiskal.com/v1/regimes/czechia_eet2/cash-certificates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-OpenFiskal-Merchant"] = '<x-openfiskal-merchant>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"p12\": \"<string>\",\n \"password\": \"<string>\",\n \"description\": \"Kavárna Praha\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"vat_id": "CZ27082440",
"serial_number": "15584C0A86BB6E65CC5C7097792CB26481A9A6AD",
"valid_from": "2023-11-07T05:31:56Z",
"valid_to": "2023-11-07T05:31:56Z",
"status": "scheduled",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>"
}Authorizations
Body
Response
Certificate stored
active: sales are signed with it now (of the valid certificates issued to the merchant's current DIČ, the one that expires last). standby: valid, but another one expires later. scheduled: valid from a later date, e.g. a successor uploaded ahead. expired: past valid_to. superseded: issued to a DIČ the merchant no longer has.
scheduled, active, standby, expired, superseded Was this page helpful?