Skip to main content

Import EET Certificates

How to import an EET certificate via REST API?

Written by Lenka Haringerová

Just as in the desktop application, EET certificates can also be imported via the REST API interface.

Calling Method

You can use the HTTP method:

PUT or POST

The service is available at:

/c/{firma}/certifikat-eet/import

  • where {firma} is the database identifier of the company.

The following output formats are supported:

XML or JSON

Example call:

curl -sk -u jmeno:heslo -T {jmeno_souboru} -X PUT(/POST)"https://localhost:5434/c/{firma}/certifikat-eet/import?heslo={heslo}&provozovna={provozovna}"-H 'Content-Type: {content-type}' -H 'Accept: {application/xml | application/json}'

Parameters

Both parameters (password; premises) are required. The password parameter is used to unlock the certificate, and premises is the identifier of your EET business premises.

If an incorrect password or an invalid (or missing) premises value is provided, an error will occur and the operation will return a 400 status code.

Additionally, the Content-Type attribute must be included in the request header. Its value depends on the file extension of the certificate being sent:

  • application/x-x509-ca-cert – for .crt and .der extensions

  • application/x-pem-file – for the .pem extension

  • application/x-pkcs12 – for .p12 and .pfx extensions

  • application/pkix-cert – for the .cer extension

Did this answer your question?