> ## Documentation Index
> Fetch the complete documentation index at: https://docs.openfiskal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 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.



## OpenAPI

````yaml /api-reference/openapi.yaml post /regimes/czechia_eet2/cash-certificates
openapi: 3.0.0
info:
  title: OpenFiskal fiscalization API
  description: >-
    OpenFiskal exposes a server-to-server fiscalization API for merchant
    onboarding,

    register setup, and operation handling.


    The `v1` contract uses server-issued resource versions and conditional

    writes through `If-Match` for safe concurrent mutation handling.
  version: 1.1.0
  contact: {}
  license:
    name: Proprietary
servers:
  - url: https://api.openfiskal.com/v1
    description: Production
  - url: https://sandbox.api.openfiskal.com/v1
    description: Sandbox
security: []
tags:
  - name: Merchants
    description: Create and manage merchant merchants.
  - name: Locations
    description: Create and manage merchant locations.
  - name: Registers
    description: Create and manage registers or terminals.
  - name: Operations
    description: Start, update, complete, cancel, list, and read operations.
paths:
  /regimes/czechia_eet2/cash-certificates:
    post:
      tags:
        - Czechia (EET 2.0)
      summary: Upload a cash certificate
      description: >-
        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.
      operationId: EetCashCertificatesController_upload
      parameters:
        - name: X-OpenFiskal-Merchant
          in: header
          description: Merchant identifier returned by the merchants resource.
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UploadEet2CashCertificateDto'
      responses:
        '201':
          description: Certificate stored
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Eet2CashCertificateMetadata'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
              examples:
                default:
                  summary: invalid_request
                  value:
                    code: invalid_request
                    message: The request body is malformed.
                    retryable: false
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
              examples:
                default:
                  summary: unauthorized
                  value:
                    code: unauthorized
                    message: Authentication failed.
                    retryable: false
        '403':
          description: >-
            Authenticated caller is not allowed to access the requested tenant,
            country, or merchant.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
              examples:
                default:
                  summary: forbidden
                  value:
                    code: forbidden
                    message: The authenticated caller cannot access this resource.
                    retryable: false
        '409':
          description: Certificate already uploaded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
              examples:
                default:
                  summary: certificate_already_uploaded
                  value:
                    code: certificate_already_uploaded
                    message: >-
                      This certificate (serial 01AB) is already uploaded as
                      cm...
                    retryable: false
        '422':
          description: The certificate cannot be used. Not retryable as sent.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
              examples:
                certificate_wrong_password:
                  summary: certificate_wrong_password
                  value:
                    code: certificate_wrong_password
                    message: The password does not open the .p12.
                    retryable: false
                certificate_unreadable:
                  summary: certificate_unreadable
                  value:
                    code: certificate_unreadable
                    message: The file is not a .p12 (PKCS#12).
                    retryable: false
                certificate_issuer_unknown:
                  summary: certificate_issuer_unknown
                  value:
                    code: certificate_issuer_unknown
                    message: >-
                      The certificate was not issued by CA EET (issuer:
                      CN=CZ27082440). Upload the .p12 from the tax portal.
                    retryable: false
                certificate_environment_mismatch:
                  summary: certificate_environment_mismatch
                  value:
                    code: certificate_environment_mismatch
                    message: >-
                      The sandbox takes certificates of the EET playground only:
                      this one is a production certificate. Upload it with a
                      live API key.
                    retryable: false
                certificate_vat_id_mismatch:
                  summary: certificate_vat_id_mismatch
                  value:
                    code: certificate_vat_id_mismatch
                    message: >-
                      The certificate is issued to CZ683555118, not to the
                      merchant's DIČ CZ27082440.
                    retryable: false
                certificate_expired:
                  summary: certificate_expired
                  value:
                    code: certificate_expired
                    message: The certificate expired on 2026-11-01T00:00:00.000Z.
                    retryable: false
                validation_error:
                  summary: validation_error
                  value:
                    code: validation_error
                    message: >-
                      Merchant is missing a Czech fiscal identity (CZE): set its
                      DIČ first.
                    retryable: false
      security:
        - BearerAuth: []
components:
  schemas:
    UploadEet2CashCertificateDto:
      type: object
      properties:
        p12:
          type: string
          description: >-
            The `.p12` file the tax portal issued, base64 (line breaks are
            ignored). It holds the private key sales are signed with, so it is
            stored encrypted and never returned.
        password:
          type: string
          description: The password of the `.p12`. Stored encrypted, never returned.
        description:
          type: string
          maxLength: 64
          example: Kavárna Praha
          description: >-
            A note to tell certificates apart, e.g. the description given in the
            tax portal.
      required:
        - p12
        - password
    Eet2CashCertificateMetadata:
      type: object
      properties:
        id:
          type: string
        vat_id:
          type: string
          example: CZ27082440
          description: >-
            The DIČ the certificate is issued to (its subject CN), the
            merchant's `vat_id`.
        serial_number:
          type: string
          example: 15584C0A86BB6E65CC5C7097792CB26481A9A6AD
          description: Serial number, hex, as the tax portal lists it.
        valid_from:
          type: string
          format: date-time
        valid_to:
          type: string
          format: date-time
          description: >-
            When it expires (366 days after issue). Upload its successor before:
            sales cannot be signed after.
        status:
          type: string
          enum:
            - scheduled
            - active
            - standby
            - expired
            - superseded
          description: >-
            `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.
        description:
          type: string
          nullable: true
          maxLength: 64
        created_at:
          type: string
          format: date-time
      required:
        - id
        - vat_id
        - serial_number
        - valid_from
        - valid_to
        - status
        - created_at
    ErrorDto:
      type: object
      properties:
        code:
          type: string
          description: Stable machine-readable error code.
          example: invalid_request
        message:
          type: string
          description: Human-readable explanation of the error.
        retryable:
          type: boolean
          description: Whether retrying the request is safe.
        details:
          type: object
          description: Additional structured context for the error.
          additionalProperties: true
      required:
        - code
        - message
        - retryable
  securitySchemes:
    BearerAuth:
      scheme: bearer
      bearerFormat: API key
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.