Tvarka ATK API Tvarka ATK API API

The Tvarka ATK API API from Tvarka ATK API — 0 operation(s) for tvarka atk api.

OpenAPI Specification

tvarka-atk-api-tvarka-atk-api-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Tvarka ATK Tvarka ATK API API
  version: 1.3.0
  summary: Lithuanian eID authentication, qualified signing, validation and LTV services.
  description: The canonical ATK API contract. ATK physical-reader and NFC ceremonies are the primary authentication and signing methods. Smart-ID and Mobile-ID are optional server-side methods under the same request, polling, webhook and metering model. Start with the [five-minute quickstart](https://atk.tvarka.pro/docs/quickstart/) or use the specialist [authentication](https://atk.tvarka.pro/docs/auth/) and [signing](https://atk.tvarka.pro/docs/sign/) references.
  termsOfService: https://atk.tvarka.pro/docs/lifecycle/
  contact:
    name: Tvarka API team
    url: https://atk.tvarka.pro/docs/access/
    email: info@tvarka.pro
  license:
    name: Proprietary
    url: https://tvarka.pro/salygos/
servers:
- url: https://atk.tvarka.pro/v1
  description: 'Production. Sandbox runs on the same host - provider credentials issued with

    environment=sandbox get the identical API against test-card material and are never billed.

    '
security:
- basicAuth: []
tags:
- name: Tvarka ATK API
paths: {}
webhooks:
  signStatus:
    post:
      operationId: receiveSignStatus
      summary: Terminal status + validation-change callback (per-tenant HMAC-signed)
      description: 'Sent to the provider''s `webhookUrl` on terminal `status` and on every `validation.status` change.

        Headers - `X-Atk-Signature: sha256=<HMAC-SHA256(secret, raw-body)>`, `X-Atk-Idempotency-Key`, and

        a timestamp. At-least-once; verify the MAC, reject stale timestamps, dedupe by idempotency key.

        '
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SignSignRequestState'
      responses:
        2XX:
          description: Acknowledged.
      tags:
      - Tvarka ATK API
components:
  schemas:
    SignErrorCode:
      type: string
      description: 'The full stable error-code catalog of the ATK API family (auth + sign + services);

        each endpoint returns the subset that applies to it. By HTTP status:

        400 invalid_json, missing_field, invalid_field, invalid_webhook_url, invalid_document_ref.

        401 invalid_basic_credentials, invalid_client_token, client_token_expired,

        operation_token_expired, invalid_download_token.

        403 origin_not_allowed, ip_not_allowed, format_not_allowed, document_ref_host_not_allowed,

        method_not_allowed, tenant_suspended, tier_forbidden.

        404 request_not_found, pairing_not_found, document_not_ready.

        409 request_terminal, operation_token_spent, identity_swap, idempotency_conflict,

        service_in_progress, pairing_not_available, pairing_already_claimed.

        410 pairing_expired. 413 document_too_large.

        422 cert_invalid, untrusted_chain, cert_revoked, cert_expired, not_qualified,

        cert_purpose_mismatch, signature_invalid, document_hash_mismatch, document_size_mismatch.

        429 rate_limited. 500 assembly_failed. 502 document_ref_fetch_failed.

        503 erasure_failed, pairing_service_unavailable, service_unavailable.

        The catalog can grow in minor versions - fall back to HTTP status semantics

        for codes you do not recognize.

        '
      enum:
      - invalid_json
      - missing_field
      - invalid_field
      - invalid_webhook_url
      - invalid_document_ref
      - invalid_basic_credentials
      - invalid_client_token
      - client_token_expired
      - operation_token_expired
      - invalid_download_token
      - origin_not_allowed
      - ip_not_allowed
      - format_not_allowed
      - document_ref_host_not_allowed
      - method_not_allowed
      - tenant_suspended
      - tier_forbidden
      - request_not_found
      - pairing_not_found
      - document_not_ready
      - request_terminal
      - operation_token_spent
      - identity_swap
      - idempotency_conflict
      - service_in_progress
      - pairing_not_available
      - pairing_already_claimed
      - pairing_expired
      - document_too_large
      - cert_invalid
      - untrusted_chain
      - cert_revoked
      - cert_expired
      - not_qualified
      - cert_purpose_mismatch
      - signature_invalid
      - document_hash_mismatch
      - document_size_mismatch
      - rate_limited
      - assembly_failed
      - document_ref_fetch_failed
      - erasure_failed
      - pairing_service_unavailable
      - service_unavailable
    SignCertSubject:
      type: object
      properties:
        serialNumber:
          type: string
          example: PNOLT-39001010000
        givenName:
          type: string
        sn:
          type: string
        cn:
          type: string
        c:
          type: string
          example: LT
    SignMethod:
      type: string
      enum:
      - physical
      - nfc
      - smart_id
      - mobile_id
      example: physical
      description: physical/NFC use card endpoints; smart_id/mobile_id complete server-side and support PAdES only.
    SignStatus:
      type: string
      description: 'Non-terminal - pending/awaitingCard/awaitingCredentials/finalizing. Terminal success - done.

        Terminal failure - cancelled/timeout/deviceError/pinBlocked/cardRemoved/certInvalid.

        Validation failure is on the `validation` axis, NOT here.

        '
      enum:
      - pending
      - awaitingCard
      - awaitingCredentials
      - finalizing
      - done
      - cancelled
      - timeout
      - deviceError
      - pinBlocked
      - cardRemoved
      - certInvalid
    SignValidation:
      type: object
      description: The advisory validation axis. Independent of `status`. See the two-axes note.
      required:
      - status
      properties:
        status:
          type: string
          enum:
          - pending
          - passed
          - failed
          - notApplicable
        level:
          type: string
          description: e.g. QUALIFIED_VALID, VALID_NOT_QUALIFIED, INDETERMINATE.
        report:
          type: string
          description: Optional pointer/id to the stored validation report.
    SignErrorBody:
      type: object
      required:
      - code
      - message
      properties:
        code:
          $ref: '#/components/schemas/SignErrorCode'
          description: 'Stable machine code. documentRef failures use `invalid_document_ref`,

            `document_ref_host_not_allowed`, `document_ref_fetch_failed`,

            `document_size_mismatch`, `document_hash_mismatch`, or `document_too_large`.

            '
        message:
          type: string
        requestId:
          type: string
          format: uuid
        retryable:
          type: boolean
    SignSignRequestState:
      type: object
      required:
      - requestId
      - method
      - status
      properties:
        requestId:
          type: string
          format: uuid
        method:
          $ref: '#/components/schemas/SignMethod'
        status:
          $ref: '#/components/schemas/SignStatus'
        verificationCode:
          type: string
          description: Present while a Smart-ID/Mobile-ID request is non-terminal.
        validation:
          $ref: '#/components/schemas/SignValidation'
        cert:
          type: object
          properties:
            subject:
              $ref: '#/components/schemas/SignCertSubject'
        sig:
          type: string
          format: byte
        sigAlgOid:
          type: string
        downloadToken:
          type: string
        error:
          $ref: '#/components/schemas/SignErrorBody'
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: 'Provider server-to-server credentials `keyId:keySecret`. Server-to-server only, also gated by the

        provider''s server IP allow-list. Never placed in a browser/mobile client.

        '
    clientToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Short-lived, per-request JWT (`ES256`) minted at request creation, scoped

        `{tenant, requestId, purpose, method, allowedOrigins}`. Safe to hand to a browser/mobile client:

        it cannot create requests, read tenant data, or touch other requests. For browser clients the API

        enforces `Origin` against `allowedOrigins` (rejects cross-origin replay).

        '
    downloadToken:
      type: apiKey
      in: query
      name: downloadToken
      description: One-off token returned with a completed sign result, for fetching the signed document.
externalDocs:
  description: Quickstart, SDKs, test data, pricing and lifecycle policy
  url: https://atk.tvarka.pro/docs/
x-publication:
  specialistContracts:
  - https://atk.tvarka.pro/openapi/auth.yaml
  - https://atk.tvarka.pro/openapi/sign.yaml
  postmanCollections:
  - https://atk.tvarka.pro/postman/auth.json
  - https://atk.tvarka.pro/postman/sign.json