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

# Dopasowania alertów BZP

> Postępowania dopasowane do alertów użytkownika, najnowsze najpierw; opcjonalnie zawężone do jednego alertu.



## OpenAPI

````yaml /openapi.json get /v1/bzp/alerts/events
openapi: 3.1.0
info:
  title: krdata API
  description: >

    krdata udostępnia dane z polskich rejestrów gospodarczych (KRS, CRBR, KRZ,
    MSiG, RDF, biała lista VAT)

    w postaci jednego, spójnego API.


    Uwierzytelnianie odbywa się przez klucz API przekazywany w nagłówku
    `x-api-key`.

    Limity zapytań oraz pule (RDF, PDF, WPV, raporty) wynikają z wybranego
    abonamentu —

    szczegóły zwraca endpoint `GET /v1/usage/summary`.
  version: 0.1.0
servers:
  - url: https://api.krdata.pl
    description: Production
security: []
paths:
  /v1/bzp/alerts/events:
    get:
      tags:
        - BZP
      summary: Dopasowania alertów BZP
      description: >-
        Postępowania dopasowane do alertów użytkownika, najnowsze najpierw;
        opcjonalnie zawężone do jednego alertu.
      operationId: bzp-alerts-events
      parameters:
        - name: alert_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                maxLength: 64
              - type: 'null'
            title: Alert Id
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            default: 20
            title: Limit
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
            title: Offset
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BzpAlertEventPage'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    BzpAlertEventPage:
      properties:
        items:
          items:
            $ref: '#/components/schemas/BzpAlertEventOut'
          type: array
          title: Items
        limit:
          type: integer
          title: Limit
        offset:
          type: integer
          title: Offset
        has_more:
          type: boolean
          title: Has More
      type: object
      required:
        - items
        - limit
        - offset
        - has_more
      title: BzpAlertEventPage
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    BzpAlertEventOut:
      properties:
        id:
          type: integer
          title: Id
        alert_id:
          type: string
          title: Alert Id
        alert_name:
          type: string
          title: Alert Name
        kind:
          type: string
          enum:
            - new
            - change
            - result
          title: Kind
        created_at:
          type: string
          format: date-time
          title: Created At
        tender:
          $ref: '#/components/schemas/BzpTenderRow'
      type: object
      required:
        - id
        - alert_id
        - alert_name
        - kind
        - created_at
        - tender
      title: BzpAlertEventOut
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    BzpTenderRow:
      properties:
        tender_id:
          type: string
          title: Tender Id
        opening_type:
          type: string
          title: Opening Type
        opening_notice_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Opening Notice Id
        bzp_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Bzp Number
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
        organization_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Organization Name
        organization_nip:
          anyOf:
            - type: string
            - type: 'null'
          title: Organization Nip
        organization_city:
          anyOf:
            - type: string
            - type: 'null'
          title: Organization City
        organization_province:
          anyOf:
            - type: string
            - type: 'null'
          title: Organization Province
        company_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Company Id
        client_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Client Type
        order_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Order Type
        tender_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Tender Type
        is_below_eu:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Below Eu
        cpv:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Cpv
        cpv_divisions:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Cpv Divisions
        nuts3:
          anyOf:
            - type: string
            - type: 'null'
          title: Nuts3
        published_at:
          type: string
          format: date-time
          title: Published At
        deadline_original:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Deadline Original
        deadline:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Deadline
        deadline_changes:
          type: integer
          title: Deadline Changes
          default: 0
        status:
          type: string
          title: Status
        phase:
          type: string
          title: Phase
        result_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Result At
        awarded_value:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Awarded Value
        winners:
          anyOf:
            - items:
                $ref: '#/components/schemas/BzpWinner'
              type: array
            - type: 'null'
          title: Winners
        winner_nips:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Winner Nips
        parts_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Parts Count
        price_only:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Price Only
        wadium_required:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Wadium Required
        criteria:
          anyOf:
            - items:
                $ref: '#/components/schemas/BzpCriterion'
              type: array
            - type: 'null'
          title: Criteria
        notices_count:
          type: integer
          title: Notices Count
        last_notice_at:
          type: string
          format: date-time
          title: Last Notice At
        role:
          anyOf:
            - type: string
              enum:
                - authority
                - winner
            - type: 'null'
          title: Role
      type: object
      required:
        - tender_id
        - opening_type
        - published_at
        - status
        - phase
        - notices_count
        - last_notice_at
      title: BzpTenderRow
    BzpWinner:
      properties:
        name:
          type: string
          title: Name
        city:
          anyOf:
            - type: string
            - type: 'null'
          title: City
        nip:
          anyOf:
            - type: string
            - type: 'null'
          title: Nip
      type: object
      required:
        - name
      title: BzpWinner
    BzpCriterion:
      properties:
        name:
          type: string
          title: Name
        weight:
          anyOf:
            - type: number
            - type: 'null'
          title: Weight
      type: object
      required:
        - name
      title: BzpCriterion
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````