basePath: /api/v1
definitions:
  AddVisitTransactionRequest:
    properties:
      amount:
        type: integer
      durationAmount:
        description: ISO 8601 format (PT1H30M) - for duration-based subscriptions
        type: string
      expiresAt:
        type: string
      metaData:
        additionalProperties: {}
        type: object
      reason:
        type: string
      sourceAllocationID:
        type: string
      transactionType:
        type: string
    required:
      - transactionType
    type: object
  BlockedTimeResponse:
    properties:
      endTime:
        description: End time of the blocked period in RFC3339 format.
        example: '2021-01-01T13:00:00Z'
        type: string
      id:
        description: Unique identifier of the booking that blocks this time.
        example: 95cd2c0c-9541-4c48-acd3-645f81f6f20e
        type: string
      resourceID:
        description: Identifier of the resource for which this time is blocked.
        example: 95cd2c0c-9541-4c48-acd3-645f81f6f20e
        format: uuid
        type: string
      source:
        description: >-
          Source of the blocked time. Currently only "related_resource" is
          supported.
        example: related_resource
        type: string
      startTime:
        description: Start time of the blocked period in RFC3339 format.
        example: '2021-01-01T12:00:00Z'
        type: string
    type: object
  BookingResponse:
    properties:
      accessToken:
        description: Access token for the booking. Used for client-initiated bookings.
        type: string
      bookingPolicy:
        description: >-
          Booking policy. Can be one of `instant`, `confirmation`, `prepayment`,
          `deposit`
        example: instant
        type: string
      client:
        allOf:
          - $ref: '#/definitions/ClientResponse'
        description: Client data that was used at the time of booking
      clientID:
        description: >-
          Identifier for the client this booking is associated with. Can be
          blank if the client is not known.
        example: 95cd2c0c-9541-4c48-acd3-645f81f6f20e
        format: uuid
        type: string
      clientInitiated:
        description: Whether the booking was initiated by the client
        type: boolean
      createdAt:
        description: Date and time when the object was created in RFC3339 format.
        example: '2021-01-01T12:00:00Z'
        type: string
      currency:
        description: >-
          Currency of the booking. A valid [ISO
          4217](https://en.wikipedia.org/wiki/ISO_4217) currency code
        example: USD
        type: string
      duration:
        description: Duration of the booking. In ISO8601 format, e.g. `PT1H` for 1 hour
        example: PT1H
        type: string
      endTime:
        description: End date and time of the booking in RFC3339 format.
        example: '2021-01-01T13:00:00Z'
        type: string
      id:
        description: Unique identifier for the object.
        example: 95cd2c0c-9541-4c48-acd3-645f81f6f20e
        type: string
      metaData:
        additionalProperties: {}
        description: Set of key-value pairs that you can attach to an object.
        type: object
      paymentURL:
        description: >-
          URL to the payment page. Returned for bookings with booking policy
          `prepayment`
        type: string
      pluginData:
        additionalProperties: {}
        description: Plugin specific data that is related to the booking
        type: object
      price:
        description: Price of the booking. In fractional units, e.g. 1000 for $10.00
        example: 1000
        type: integer
      recurringID:
        description: Recurring booking identifier. Only present for recurring bookings.
        example: 95cd2c0c-9541-4c48-acd3-645f81f6f20e
        format: uuid
        type: string
      relatedResourceIDs:
        description: >-
          Identifiers of the resources related to the resource this booking is
          associated with.
        items:
          type: string
        type: array
      resource:
        allOf:
          - $ref: '#/definitions/ResourceResponse'
        description: Resource data that was used at the time of booking
      resourceID:
        description: Identifier for the resource this booking is associated with.
        example: 95cd2c0c-9541-4c48-acd3-645f81f6f20e
        format: uuid
        type: string
      rrule:
        description: >-
          Recurring rule in [RFC5545
          format](https://tools.ietf.org/html/rfc5545). Returned for recurring
          bookings.
        example: FREQ=WEEKLY;BYDAY=MO,WE,FR
        type: string
      service:
        allOf:
          - $ref: '#/definitions/service.ResponseWithTickets'
        description: Service data that was used at the time of booking
      serviceID:
        description: Identifier for the service this booking is associated with.
        example: 95cd2c0c-9541-4c48-acd3-645f81f6f20e
        format: uuid
        type: string
      spots:
        description: >-
          Number of spots booked. It's greater than 1 for services with type
          `group` and `ticket`
        example: 2
        type: integer
      startTime:
        description: Start date and time of the booking in RFC3339 format.
        example: '2021-01-01T12:00:00Z'
        type: string
      status:
        description: >-
          Status of the booking. Can be one of `confirmed`, `pending`,
          `cancelled`, `finished`, `no_show`, `rejected`
        example: confirmed
        type: string
      statusChanges:
        description: History of status changes for the booking.
        items:
          $ref: '#/definitions/booking.StatusChangeResponse'
        type: array
      tickets:
        additionalProperties:
          $ref: '#/definitions/booking.TicketMeta'
        description: >-
          A set of key-value pair pairs where **key** is the ticket ID and
          **value** is the data for the ticket that includes the number of spots
          booked, the current price, and the compared price.
        type: object
      type:
        description: >-
          Type of the service. Can be one of `fixed`, `flexible`, `group`,
          `ticket`, `days`
        example: fixed
        type: string
      updatedAt:
        description: Date and time when the object was last updated in RFC3339 format.
        example: '2021-01-01T12:00:00Z'
        type: string
    type: object
  CancelClientBookingRequest:
    properties:
      metaData:
        additionalProperties: {}
        type: object
    type: object
  ClientAuthResponse:
    properties:
      accessToken:
        type: string
      expiresAt:
        type: string
      expiresIn:
        type: integer
      refreshToken:
        type: string
    type: object
  ClientBookingListResponse:
    properties:
      bookings:
        items:
          $ref: '#/definitions/ClientBookingResponse'
        type: array
      limit:
        type: integer
      offset:
        type: integer
      total:
        type: integer
    type: object
  ClientBookingRequest:
    properties:
      client:
        allOf:
          - $ref: '#/definitions/client.GuestClient'
        description: >-
          Guest client data. Can be used if you want to create a booking for a
          guest client without authentication.
      code:
        description: >-
          Optional parameter that can be handled by plugins like discounts,
          loyalty, etc.
        example: DISCOUNT2025
        type: string
      companyID:
        description: Identifier for the company this booking is associated with.
        example: 95cd2c0c-9541-4c48-acd3-645f81f6f20e
        format: uuid
        type: string
      customPurchaseDescription:
        description: >-
          Optional purchase description that can be passed to payment provider.
          Otherwise, it will be generated automatically.
        type: string
      duration:
        description: In ISO8601 format
        example: PT1H
        type: string
      metaData:
        additionalProperties: {}
        description: Set of key-value pairs that you can attach to an object.
        type: object
      pluginData:
        additionalProperties: {}
        description: >-
          Set of key-value pairs that can be used to send data from plugins to
          the booking handler.
        type: object
      resourceID:
        description: Identifier for the resource this booking is associated with.
        example: 95cd2c0c-9541-4c48-acd3-645f81f6f20e
        format: uuid
        type: string
      serviceID:
        description: Identifier for the service this booking is associated with.
        example: 95cd2c0c-9541-4c48-acd3-645f81f6f20e
        format: uuid
        type: string
      spots:
        description: >-
          Number of spots booked. It's greater than 1 for services with type
          `group` and `ticket`
        example: 2
        type: integer
      startTime:
        description: Start time of the booking in RFC3339 format.
        example: '2021-01-01T12:00:00Z'
        type: string
      tickets:
        additionalProperties:
          type: integer
        description: >-
          Set of key-value pairs where **key** is the ticket ID and **value** is
          the number of tickets booked. Required for services with type `ticket`
        type: object
    required:
      - companyID
      - resourceID
      - serviceID
      - spots
      - startTime
    type: object
  ClientBookingResponse:
    properties:
      accessToken:
        description: Access token for the booking.
        example: some-secure-token
        type: string
      bookingPolicy:
        description: >-
          Booking policy. Can be one of `instant`, `confirmation`, `prepayment`,
          `deposit`
        example: instant
        type: string
      companyID:
        description: Identifier for the company this booking is associated with.
        example: 95cd2c0c-9541-4c48-acd3-645f81f6f20e
        format: uuid
        type: string
      createdAt:
        description: Date and time when the object was created in RFC3339 format.
        example: '2021-01-01T12:00:00Z'
        type: string
      currency:
        description: ISO 4217 currency code
        example: USD
        type: string
      duration:
        description: In ISO8601 format, e.g. `PT1H` for 1 hour
        example: PT1H
        type: string
      endTime:
        description: End time of the booking in RFC3339 format.
        example: '2021-01-01T13:00:00Z'
        type: string
      id:
        description: Unique identifier for the object.
        example: 95cd2c0c-9541-4c48-acd3-645f81f6f20e
        format: uuid
        type: string
      metaData:
        additionalProperties: {}
        description: Set of key-value pairs that you can attach to an object.
        type: object
      paymentURL:
        description: Payment URL for the booking.
        type: string
      pluginData:
        additionalProperties: {}
        description: >-
          PluginData contains data passed back from plugins related to the
          booking.
        type: object
      price:
        description: In fractional units, e.g. 1000 for $10.00
        example: 1000
        type: integer
      relatedResourceIDs:
        description: >-
          IDs of the resources that are related to the linked resource. When the
          linked resource is booked, the related resources are also booked
        items:
          type: string
        type: array
      resourceID:
        description: Identifier for the resource this booking is associated with.
        example: 95cd2c0c-9541-4c48-acd3-645f81f6f20e
        format: uuid
        type: string
      serviceID:
        description: Identifier for the service this booking is associated with.
        example: 95cd2c0c-9541-4c48-acd3-645f81f6f20e
        format: uuid
        type: string
      spots:
        description: >-
          Number of spots booked. It's greater than 1 for services with type
          `group` and `ticket`
        example: 2
        type: integer
      startTime:
        description: Start time of the booking in RFC3339 format.
        example: '2021-01-01T12:00:00Z'
        type: string
      status:
        description: '`confirmed`, `pending`, `cancelled`, `finished`, `no_show`, `rejected`'
        example: confirmed
        type: string
      tickets:
        additionalProperties:
          $ref: '#/definitions/client.TicketMeta'
        description: >-
          A set of key-value pairs where **key** is the ticket ID and **value**
          is the data for the ticket that includes the number of spots booked,
          the current price, and the compared price.
        type: object
      type:
        description: '`fixed`, `flexible`, `group`, `ticket`, `days`'
        example: fixed
        type: string
    type: object
  ClientBulkBookingRequest:
    properties:
      bookings:
        description: List of bookings to create. All bookings must be for the same company.
        items:
          $ref: '#/definitions/ClientBookingRequest'
        minItems: 1
        type: array
    required:
      - bookings
    type: object
  ClientBulkBookingResponse:
    properties:
      bookings:
        description: List of created bookings
        items:
          $ref: '#/definitions/ClientBookingResponse'
        type: array
      currency:
        description: ISO 4217 currency code for the total amount
        example: USD
        type: string
      paymentURL:
        description: Payment URL for all bookings (if prepayment is required)
        type: string
      totalAmount:
        description: >-
          Total amount for all bookings. In fractional units, e.g. 1000 for
          $10.00
        type: integer
      transactionID:
        description: Transaction ID for the payment (if prepayment is required)
        format: uuid
        type: string
    type: object
  ClientCodeValidateRequest:
    properties:
      code:
        description: Code to lookup. It can be a discount code, loyalty code, etc.
        example: DISCOUNT2025
        type: string
      companyID:
        description: Identifier for the company this booking is associated with.
        example: 95cd2c0c-9541-4c48-acd3-645f81f6f20e
        format: uuid
        type: string
      duration:
        description: In ISO8601 format
        example: PT1H
        type: string
      resourceID:
        description: Identifier for the resource this booking is associated with.
        example: 95cd2c0c-9541-4c48-acd3-645f81f6f20e
        format: uuid
        type: string
      serviceID:
        description: Identifier for the service this booking is associated with.
        example: 95cd2c0c-9541-4c48-acd3-645f81f6f20e
        format: uuid
        type: string
      spots:
        description: >-
          Number of spots booked. It's greater than 1 for services with type
          `group` and `ticket`
        example: 2
        type: integer
      startTime:
        description: Start time of the booking in RFC3339 format.
        example: '2021-01-01T12:00:00Z'
        type: string
      tickets:
        additionalProperties:
          type: integer
        description: >-
          Set of key-value pairs where **key** is the ticket ID and **value** is
          the number of tickets booked. Required for services with type `ticket`
        type: object
    required:
      - code
      - companyID
      - resourceID
      - serviceID
      - spots
      - startTime
    type: object
  ClientCreateRequest:
    properties:
      email:
        description: >-
          Email is the email address of the user. It can be used to send
          notifications, invoices and other information.
        example: user@company.com
        type: string
      externalUserID:
        description: >-
          ExternalUserID is the unique identifier of the user in your system. If
          you don't have a unique identifier, you can use the email address or
          generate it.
        example: ID123456789
        type: string
      firstName:
        type: string
      lastName:
        type: string
      metaData:
        additionalProperties: {}
        type: object
    required:
      - email
      - externalUserID
    type: object
  ClientGiftCardPurchaseRequest:
    properties:
      client:
        allOf:
          - $ref: '#/definitions/client.GuestClient'
        description: >-
          Guest client data. Can be used if you want to enable purchase for a
          guest client without authentication.
      giftCardID:
        type: string
      metaData:
        additionalProperties: {}
        type: object
    type: object
  ClientGiftCardPurchaseResponse:
    properties:
      amount:
        type: integer
      clientId:
        type: string
      code:
        type: string
      companyId:
        type: string
      createdAt:
        type: string
      currency:
        type: string
      expiresAt:
        description: RFC3339
        type: string
      giftCardId:
        type: string
      giftCardName:
        description: Name of the gift card
        type: string
      id:
        type: string
      metaData:
        additionalProperties: {}
        type: object
      status:
        type: string
      updatedAt:
        type: string
      usages:
        description: List of usages for this purchase
        items:
          $ref: '#/definitions/GiftCardUsageResponse'
        type: array
      validUntil:
        description: RFC3339 format
        type: string
    type: object
  ClientListResponse:
    properties:
      clients:
        items:
          $ref: '#/definitions/ClientResponse'
        type: array
      limit:
        type: integer
      offset:
        type: integer
      total:
        type: integer
    type: object
  ClientLoginRequest:
    properties:
      companyID:
        description: >-
          CompanyID is the unique identifier of the company that you have
          created in the platform.
        example: da70841f-5a52-45eb-a31f-22e276c64625
        format: uuid
        type: string
      email:
        description: >-
          Email is the email address of the user. It can be used to send
          notifications, invoices and other information.
        example: user@company.com
        type: string
      externalUserID:
        description: >-
          ExternalUserID is the unique identifier of the user in your system. If
          you don't have a unique identifier, you can use the email address or
          generate it.
        example: ID123456789
        type: string
      firstName:
        type: string
      lastName:
        type: string
      metaData:
        additionalProperties: {}
        type: object
    required:
      - companyID
      - email
      - externalUserID
    type: object
  ClientPurchaseSubscriptionsResponse:
    properties:
      currency:
        type: string
      expiresAt:
        type: string
      items:
        items:
          $ref: '#/definitions/ClientSubscriptionContract'
        type: array
      paymentURL:
        type: string
      price:
        type: integer
      tax:
        type: integer
      taxInclusive:
        type: boolean
      taxRate:
        type: number
    type: object
  ClientResourceResponse:
    properties:
      color:
        description: >-
          Color of the resource. Can be used to differentiate resources in the
          UI. Must be a valid hex color code.
        example: '#000000'
        type: string
      companyID:
        description: Identifier for the company this resource is associated with.
        example: 53ebf47a-9ddc-4198-8f6d-f9ff6a909158
        type: string
      createdAt:
        description: Date and time when the object was created in RFC3339 format.
        example: '2021-07-01T00:00:00Z'
        type: string
      id:
        description: A unique identifier of the resource
        example: 53ebf47a-9ddc-4198-8f6d-f9ff6a909158
        type: string
      name:
        description: Name of the resource
        example: Resource name
        type: string
      services:
        description: List of services associated with the resource
        items:
          $ref: '#/definitions/client.BaseServiceResponse'
        type: array
      updatedAt:
        description: Date and time when the object was last updated in RFC3339 format.
        example: '2021-07-01T00:00:00Z'
        type: string
    type: object
  ClientResponse:
    properties:
      createdAt:
        type: string
      email:
        type: string
      externalUserID:
        type: string
      firstName:
        type: string
      id:
        type: string
      lastName:
        type: string
      metaData:
        additionalProperties: {}
        type: object
      state:
        type: string
      updatedAt:
        type: string
    type: object
  ClientServiceResponse:
    properties:
      color:
        description: >-
          Color of the service. Can be used to differentiate services in the UI.
          Must be a valid hex color code.
        example: '#000000'
        type: string
      companyID:
        description: Identifier for the company this service is associated with.
        example: 53ebf47a-9ddc-4198-8f6d-f9ff6a909158
        type: string
      createdAt:
        description: Date and time when the object was created in RFC3339 format.
        example: '2021-07-01T00:00:00Z'
        type: string
      id:
        description: A unique identifier of the service
        example: 53ebf47a-9ddc-4198-8f6d-f9ff6a909158
        type: string
      name:
        description: Name of the service
        example: Service name
        type: string
      resources:
        description: List of resources associated with the service
        items:
          $ref: '#/definitions/client.BaseResourceResponse'
        type: array
      settings:
        allOf:
          - $ref: '#/definitions/ServiceSettings'
        description: Service settings
      tickets:
        description: >-
          List of tickets associated with the service, only available for ticket
          services
        items:
          $ref: '#/definitions/client.TicketResponse'
        type: array
      timeZone:
        description: Timezone of the service
        example: America/New_York
        type: string
      type:
        description: >-
          Type of the service. Can be one of `fixed`, `flexible`, `group`,
          `ticket`, `days`
        example: fixed
        type: string
      updatedAt:
        description: Date and time when the object was last updated in RFC3339 format.
        example: '2021-07-01T00:00:00Z'
        type: string
    type: object
  ClientSubscriptionContract:
    properties:
      activeFrom:
        type: string
      clientID:
        type: string
      code:
        type: string
      duration:
        type: string
      editHistory:
        items:
          $ref: '#/definitions/subscription.ClientSubscriptionRenewHistoryItem'
        type: array
      expiresAt:
        type: string
      id:
        type: string
      limitations:
        $ref: >-
          #/definitions/github_com_bookla-app_platform_api_platform_plugins_subscription.Limitations
      metaData:
        additionalProperties: {}
        type: object
      status:
        type: string
      subscriptionID:
        type: string
      usages:
        items:
          $ref: '#/definitions/ContractUsage'
        type: array
    type: object
  ClientSubscriptionsPurchaseRequest:
    properties:
      client:
        allOf:
          - $ref: '#/definitions/client.GuestClient'
        description: >-
          Guest client data. Can be used if you want to enable purchase for a
          guest client without authentication.
      items:
        items:
          $ref: '#/definitions/subscription.ClientRequestItem'
        type: array
    type: object
  ClientTimesRequest:
    properties:
      duration:
        description: >-
          In ISO8601 format, e.g. `PT1H` for 1 hour. Required for services with
          type 'flexible' and 'days'
        example: PT1H
        type: string
      from:
        description: Date and time for the beginning of the time range in RFC3339 format.
        example: '2021-01-01T00:00:00Z'
        type: string
      resourceIDs:
        description: >-
          List of resource IDs this service is associated with. Can be blank to
          search all resources.
        example:
          - 3587ccc0-d294-499a-b397-224ec61aafa1
          - dd4f3d7c-7092-454b-a509-a9faf3cbcfe1
        items:
          type: string
        type: array
      spots:
        description: >-
          Number of spots booked. It's greater than 1 for services with type
          `group` and `ticket`
        example: 2
        type: integer
      tickets:
        additionalProperties:
          type: integer
        description: >-
          Set of key-value pairs where **key** is the ticket ID and **value** is
          the number of tickets booked. Required for services with type `ticket`
        example:
          3587ccc0-d294-499a-b397-224ec61aafa1: 1
          dd4f3d7c-7092-454b-a509-a9faf3cbcfe1: 2
        type: object
      to:
        description: Date and time for the end of the time range in RFC3339 format.
        example: '2021-01-01T23:59:59Z'
        type: string
    type: object
  ClosingPeriodResponse:
    properties:
      createdAt:
        description: Date and time when the object was created in RFC3339 format.
        type: string
      endTime:
        description: End date and time of the rule.
        type: string
      id:
        description: Unique identifier of the rule.
        type: string
      metaData:
        additionalProperties: {}
        description: User-defined metadata associated with the rule.
        type: object
      priority:
        description: >-
          Priority of the rule. Rules with higher priority will be applied
          first.
        type: integer
      resourceID:
        description: ID of the resource this rule is associated with.
        type: string
      serviceIDs:
        description: Service IDs associated with the rule. Can be empty.
        items:
          type: string
        type: array
      startTime:
        description: Start date and time of the rule.
        type: string
      updatedAt:
        description: Date and time when the object was last updated in RFC3339 format.
        type: string
    type: object
  ContractUsage:
    properties:
      bookingID:
        type: string
      clientID:
        type: string
      companyID:
        type: string
      contractID:
        type: string
      createdAt:
        type: string
      id:
        type: string
      metaData:
        additionalProperties: {}
        type: object
      source:
        type: string
      status:
        type: string
      subscriptionID:
        type: string
      updatedAt:
        type: string
    type: object
  ContractVisitTransactionResponse:
    properties:
      amount:
        type: integer
      clientID:
        type: string
      companyID:
        type: string
      createdAt:
        type: string
      durationAmount:
        description: ISO 8601 format (PT1H30M)
        type: string
      expiresAt:
        type: string
      id:
        type: string
      metaData:
        additionalProperties: {}
        type: object
      reason:
        type: string
      sourceAllocationID:
        type: string
      subscriptionID:
        type: string
      subscriptionItemID:
        type: string
      transactionType:
        type: string
      updatedAt:
        type: string
      usageID:
        type: string
    type: object
  CreateAPIKeyRequest:
    properties:
      name:
        type: string
      permissions:
        additionalProperties:
          items:
            type: string
          type: array
        type: object
    type: object
  CreateAPIKeyResponse:
    properties:
      createdAt:
        description: CreatedAt is the date and time when the API key was created.
        type: string
      id:
        description: ID is the unique identifier of the API key.
        type: string
      key:
        description: Key is the API key value.
        type: string
      name:
        description: Name is the name of the API key.
        type: string
      permissions:
        additionalProperties:
          items:
            type: string
          type: array
        description: Permissions is the list of permissions associated with the API key.
        type: object
      state:
        description: >-
          State is the current state of the API key. Possible values are
          `active` and `inactive`.
        type: string
    type: object
  CreateClosingPeriodRequest:
    properties:
      endTime:
        description: End date and time of the rule.
        type: string
      metaData:
        additionalProperties: {}
        description: User-defined metadata associated with the rule.
        type: object
      priority:
        description: >-
          Priority of the rule. Rules with higher priority will be applied
          first.
        type: integer
      serviceIDs:
        description: List of service IDs associated with the rule. Can be empty.
        items:
          type: string
        type: array
      startTime:
        description: Start date and time of the rule.
        type: string
    type: object
  CreateGiftCardPurchaseRequest:
    properties:
      clientId:
        description: ID of the client making the purchase
        type: string
      giftCardID:
        description: ID of the gift card being purchased'
        type: string
      metaData:
        additionalProperties: {}
        type: object
      status:
        type: string
    type: object
  CreateGiftCardRequest:
    properties:
      active:
        description: Active indicates if the gift card is active.
        type: boolean
      amount:
        description: >-
          Amount is the value of the gift card in the smallest currency unit
          (e.g. cents for USD).
        type: integer
      availableFrom:
        description: AvailableFrom is in RFC3339 format.
        type: string
      availableTo:
        description: >-
          AvailableTo is in RFC3339 format. Until when the gift card is
          available.
        type: string
      currency:
        description: Currency is the ISO 4217 currency code (e.g. "USD", "EUR").
        type: string
      metaData:
        additionalProperties: {}
        description: MetaData contains additional information about the gift card.
        type: object
      taxInclusive:
        description: TaxInclusive indicates if the amount includes tax.
        type: boolean
      taxRate:
        description: >-
          TaxRate is the tax rate applied to the gift card in percentage (e.g.
          20.0 for 20%).
        type: number
      title:
        description: Title is the name of the gift card.
        type: string
      validityDuration:
        description: ValidityDuration is in ISO 8601 format (e.g. "P30D" for 30 days).
        type: string
    type: object
  CreateGiftCardUsageRequest:
    properties:
      amount:
        type: integer
      metaData:
        additionalProperties: {}
        description: Additional metadata for the usage
        type: object
      reservationId:
        description: ID of the reservation associated with the usage
        type: string
    type: object
  CreatePromoCodeRequest:
    properties:
      active:
        description: Active indicates if the promo code is active.
        type: boolean
      activeFrom:
        description: ActiveFrom is when the code can start being entered (RFC3339 format).
        type: string
      activeTo:
        description: >-
          ActiveTo is when the code stops being valid for entry (RFC3339
          format).
        type: string
      code:
        description: Code is the unique promo code string (e.g., "SUMMER2024").
        type: string
      description:
        description: Description provides details about the promo code.
        type: string
      discountAmount:
        description: >-
          DiscountAmount is the fixed discount amount in smallest currency unit
          (e.g., cents). Used when discountType is "amount".
        type: integer
      discountPercent:
        description: >-
          DiscountPercent is the discount percentage (0-100). Used when
          discountType is "percent".
        type: number
      discountType:
        description: DiscountType is either "amount" or "percent".
        type: string
      maxDiscountAmount:
        description: >-
          MaxDiscountAmount is the maximum discount cap for percentage
          discounts.
        type: integer
      metaData:
        additionalProperties: {}
        description: MetaData contains additional information about the promo code.
        type: object
      reservationAllowanceFrom:
        description: >-
          ReservationAllowanceFrom is the start of the booking date range
          (RFC3339 format).
        type: string
      reservationAllowanceTo:
        description: >-
          ReservationAllowanceTo is the end of the booking date range (RFC3339
          format).
        type: string
      serviceIds:
        description: >-
          ServiceIDs is an array of service UUIDs this promo code is restricted
          to.
        items:
          type: string
        type: array
      serviceRules:
        description: ServiceRules defines per-service discount overrides.
        items:
          $ref: '#/definitions/ServiceRuleRequest'
        type: array
      title:
        description: Title is the name/title of the promo code.
        type: string
      usageLimit:
        description: >-
          UsageLimit is the total usage count limit. Required when usageType is
          "limited_count".
        type: integer
      usageType:
        description: >-
          UsageType is one of: "single_use", "one_per_customer",
          "limited_count", "unlimited".
        type: string
    type: object
  CreateSubscriptionCapacityRuleRequest:
    properties:
      endDate:
        type: string
      maxCount:
        type: integer
      metaData:
        additionalProperties: {}
        type: object
      priority:
        type: integer
      startDate:
        type: string
      subscriptionIDs:
        items:
          type: string
        type: array
    type: object
  CreateSubscriptionCapacityRuleResponse:
    properties:
      archivedAt:
        type: string
      createdAt:
        type: string
      endDate:
        type: string
      id:
        type: string
      maxCount:
        type: integer
      metaData:
        additionalProperties: {}
        type: object
      priority:
        type: integer
      startDate:
        type: string
      subscriptionIDs:
        items:
          type: string
        type: array
      updatedAt:
        type: string
    type: object
  CreateSubscriptionContractRequest:
    properties:
      activeFrom:
        description: >-
          ActiveFrom is the date when the subscription contract becomes active
          in RFC3339 format
        type: string
      clientID:
        description: >-
          ClientID is the ID of the client for whom the subscription contract is
          created
        type: string
      duration:
        description: >-
          Duration is the duration of the subscription contract in ISO 8601
          format
        type: string
      expiresAt:
        description: >-
          Optional date when the pending_payment subscription contract expires
          in RFC3339 format.
        type: string
      status:
        description: >-
          Status is the status of the subscription contract. Can be one of
          `active`, `inactive`, `pending_payment`, `failed`, `refunded`,
          `awaiting_refund`
        type: string
    type: object
  CreateSubscriptionPriceRuleRequest:
    properties:
      comparedPrice:
        type: integer
      endDate:
        type: string
      metaData:
        additionalProperties: {}
        type: object
      price:
        type: integer
      priority:
        type: integer
      startDate:
        type: string
      subscriptionIDs:
        items:
          type: string
        type: array
    type: object
  CreateSubscriptionPriceRuleResponse:
    properties:
      archivedAt:
        type: string
      comparedPrice:
        type: integer
      createdAt:
        type: string
      endDate:
        type: string
      id:
        type: string
      metaData:
        additionalProperties: {}
        type: object
      price:
        type: integer
      priority:
        type: integer
      startDate:
        type: string
      subscriptionIDs:
        items:
          type: string
        type: array
      updatedAt:
        type: string
    type: object
  CreateTicketAvailabilityRequest:
    properties:
      limitation:
        allOf:
          - $ref: >-
              #/definitions/github_com_bookla-app_platform_api_platform_scheduling_direct.Limitation
        description: Limitation of the rule.
      priority:
        description: >-
          Priority of the rule. Rules with higher priority will be applied
          first.
        type: integer
      ticketID:
        description: ID of the ticket this availability rule applies to.
        example: 3587ccc0-d294-499a-b397-224ec61aafa1
        type: string
      type:
        description: Type of the rule. Can be one of `capacity`, `ticket_capacity`
        type: string
    type: object
  CreateTicketCapacityRequest:
    properties:
      limitation:
        allOf:
          - $ref: >-
              #/definitions/github_com_bookla-app_platform_api_platform_scheduling_direct.Limitation
        description: Limitation of the rule.
      priority:
        description: >-
          Priority of the rule. Rules with higher priority will be applied
          first.
        type: integer
      spots:
        description: The number of spots available.
        example: 10
        type: integer
      spotsPerTicket:
        additionalProperties:
          type: integer
        description: >-
          A key-value pair of ticket ID and the number of spots available per
          ticket. Required only for `ticket` services.
        example:
          3587ccc0-d294-499a-b397-224ec61aafa1: 4
          dd4f3d7c-7092-454b-a509-a9faf3cbcfe1: 6
        type: object
      type:
        description: Type of the rule. Can be one of `capacity`, `ticket_capacity`
        type: string
    type: object
  DatesResponse:
    properties:
      dates:
        additionalProperties:
          items:
            type: string
          type: array
        description: >-
          A key-value pair of resource IDs and available dates in format
          YYYY-MM-DD.
        type: object
      timeZone:
        description: The timezone of the company in IANA format
        example: Europe/Berlin
        type: string
    type: object
  GiftCardPurchaseResponse:
    properties:
      amount:
        type: integer
      clientId:
        type: string
      code:
        type: string
      companyId:
        type: string
      createdAt:
        type: string
      currency:
        type: string
      expiresAt:
        description: RFC3339
        type: string
      giftCardId:
        type: string
      id:
        type: string
      metaData:
        additionalProperties: {}
        type: object
      status:
        type: string
      updatedAt:
        type: string
      validUntil:
        description: RFC3339 format
        type: string
    type: object
  GiftCardPurchasesPageResult:
    properties:
      items:
        description: List of gift card purchases
        items:
          $ref: '#/definitions/GiftCardPurchaseResponse'
        type: array
      limit:
        description: Maximum number of items per page
        type: integer
      offset:
        description: Offset for pagination
        type: integer
      total:
        description: Total number of purchases matching the search
        type: integer
    type: object
  GiftCardResponse:
    properties:
      active:
        type: boolean
      amount:
        type: integer
      archivedAt:
        type: string
      availableFrom:
        type: string
      availableTo:
        type: string
      createdAt:
        type: string
      currency:
        type: string
      id:
        type: string
      metaData:
        additionalProperties: {}
        type: object
      taxInclusive:
        type: boolean
      taxRate:
        type: number
      title:
        type: string
      updatedAt:
        type: string
      validityDuration:
        type: string
    type: object
  GiftCardUsageResponse:
    properties:
      amount:
        description: Amount used from the gift card
        type: integer
      clientId:
        description: ID of the client using the gift card
        type: string
      companyId:
        description: ID of the company associated with the usage
        type: string
      createdAt:
        description: Creation timestamp in RFC3339 format
        type: string
      currency:
        description: ISO 4217 currency code (e.g., "USD", "EUR")
        type: string
      giftCardId:
        description: ID of the gift card being used
        type: string
      id:
        description: Unique identifier for the usage
        type: string
      metaData:
        additionalProperties: {}
        description: Additional metadata
        type: object
      purchaseId:
        description: ID of the purchase associated with the usage
        type: string
      reservationId:
        description: ID of the reservation associated with the usage
        type: string
      status:
        description: Status of the usage (e.g., "active", "expired")
        type: string
      updatedAt:
        description: Last update timestamp in RFC
        type: string
    type: object
  HTTPError:
    properties:
      code:
        example: error_code
        type: string
      message:
        example: Error message
        type: string
    type: object
  ListClosingPeriodInRangeRequest:
    properties:
      companyID:
        type: string
      from:
        type: string
      resourceIDs:
        items:
          type: string
        type: array
      to:
        type: string
    type: object
  ListClosingPeriodInRangeResponse:
    properties:
      closingPeriods:
        additionalProperties:
          items:
            $ref: '#/definitions/ClosingPeriodResponse'
          type: array
        type: object
    type: object
  ListPriceRulesResponse:
    properties:
      resources:
        description: >-
          List of unique resources associated with the price rules, can be used
          to display the resources in the UI
        items:
          $ref: '#/definitions/ResourceResponse'
        type: array
      rules:
        description: List of price rules
        items:
          $ref: '#/definitions/PriceRuleResponse'
        type: array
      tickets:
        description: >-
          List of unique tickets associated with the price rules, can be used to
          display the tickets in the UI
        items:
          $ref: '#/definitions/TicketResponse'
        type: array
    type: object
  ListServiceCapacityResponse:
    properties:
      capacities:
        items:
          $ref: '#/definitions/ServiceCapacityResponse'
        type: array
      resources:
        items:
          $ref: '#/definitions/ResourceResponse'
        type: array
      tickets:
        items:
          $ref: '#/definitions/TicketResponse'
        type: array
    type: object
  ListTicketAvailabilityResponse:
    properties:
      rules:
        items:
          $ref: '#/definitions/TicketAvailabilityResponse'
        type: array
      tickets:
        items:
          $ref: '#/definitions/TicketResponse'
        type: array
    type: object
  ListWorkingHoursInRangeRequest:
    properties:
      companyID:
        type: string
      from:
        type: string
      resourceIDs:
        items:
          type: string
        type: array
      to:
        type: string
    type: object
  ListWorkingHoursInRangeResponse:
    properties:
      workingHours:
        additionalProperties:
          items:
            $ref: '#/definitions/WorkingHoursResponse'
          type: array
        type: object
    type: object
  PDFTemplateField:
    properties:
      color:
        description: Hex color code
        example: '#000000'
        type: string
      fontName:
        description: Font name (Helvetica, Times-Roman, Courier, etc.)
        example: Helvetica
        type: string
      fontSize:
        description: Font size in points
        example: 14
        type: integer
      name:
        description: Name of the field (e.g., "code", "expirationDate")
        example: code
        type: string
      opacity:
        description: Opacity from 0.0 to 1.0
        example: 1
        maximum: 1
        minimum: 0
        type: number
      rotation:
        description: Rotation in degrees (optional)
        example: 0
        type: number
      x:
        description: X coordinate in points from left
        example: 100
        type: number
      'y':
        description: Y coordinate in points from bottom
        example: 200
        type: number
    required:
      - color
      - fontName
      - fontSize
      - name
      - opacity
      - x
      - 'y'
    type: object
  PDFTemplateMessageResponse:
    properties:
      message:
        example: Template created successfully
        type: string
    type: object
  PDFTemplateResponse:
    properties:
      companyID:
        description: Company identifier
        example: 95cd2c0c-9541-4c48-acd3-645f81f6f20e
        type: string
      createdAt:
        description: Creation timestamp
        example: '2025-12-02T10:00:00Z'
        type: string
      entityID:
        description: Entity identifier (gift card ID or membership ID)
        example: 85cd2c0c-9541-4c48-acd3-645f81f6f20f
        type: string
      entityType:
        description: Entity type (gift_card or membership)
        example: gift_card
        type: string
      fields:
        description: Field definitions
        items:
          $ref: '#/definitions/PDFTemplateField'
        type: array
      id:
        description: Template identifier
        example: 95cd2c0c-9541-4c48-acd3-645f81f6f20e
        type: string
      pageHeight:
        description: Page height in points
        example: 792
        type: number
      pageWidth:
        description: Page width in points
        example: 612
        type: number
      s3Bucket:
        description: S3 bucket name
        example: bookla-templates
        type: string
      s3FileKey:
        description: S3 file key where template is stored
        example: pdf-templates/company-id/gift_card/entity-id/1234567890.pdf
        type: string
      updatedAt:
        description: Last update timestamp
        example: '2025-12-02T10:00:00Z'
        type: string
    type: object
  PriceRuleResponse:
    properties:
      createdAt:
        description: Date and time when the object was created in RFC3339 format.
        type: string
      duration:
        description: >-
          Duration of the price rule, e.g. `PT1H`. Returned for `flexible` price
          rules
        type: string
      id:
        description: A unique identifier of the price rule
        type: string
      limitation:
        allOf:
          - $ref: '#/definitions/limitation.Limitation'
        description: Limitation of the price rule
      maxDuration:
        description: >-
          Maximum duration of the price rule, e.g. `PT4H`. Returned for
          `flexible` and `days` price rules
        type: string
      minDuration:
        description: >-
          Minimum duration of the price rule, e.g. `PT1H`. Returned for
          `flexible` and `days` price rules
        type: string
      price:
        allOf:
          - $ref: '#/definitions/pricing.Price'
        description: Price of the price rule
      priority:
        description: Priority of the price rule
        type: integer
      serviceID:
        description: ID of the service this price rule is associated with
        type: string
      ticketID:
        description: A unique identifier of the ticket. Returned for `ticket` price rules
        type: string
      type:
        description: >-
          Type of the price rule. Can be one of `fixed`, `flexible`, `group`,
          `ticket`, `days`
        type: string
    type: object
  PromoCodeResponse:
    properties:
      active:
        type: boolean
      activeFrom:
        type: string
      activeTo:
        type: string
      archivedAt:
        type: string
      code:
        type: string
      createdAt:
        type: string
      currentUsageCount:
        type: integer
      description:
        type: string
      discountAmount:
        type: integer
      discountPercent:
        type: number
      discountType:
        type: string
      id:
        type: string
      maxDiscountAmount:
        type: integer
      metaData:
        additionalProperties: {}
        type: object
      reservationAllowanceFrom:
        type: string
      reservationAllowanceTo:
        type: string
      serviceIds:
        items:
          type: string
        type: array
      serviceRules:
        items:
          $ref: '#/definitions/ServiceRuleResponse'
        type: array
      title:
        type: string
      updatedAt:
        type: string
      usageLimit:
        type: integer
      usageType:
        type: string
    type: object
  PromoCodeUsageResponse:
    properties:
      clientID:
        type: string
      companyID:
        type: string
      createdAt:
        type: string
      currency:
        type: string
      discountAmount:
        type: integer
      id:
        type: string
      metaData:
        additionalProperties: {}
        type: object
      promoCodeID:
        type: string
      reservationID:
        type: string
      status:
        type: string
      updatedAt:
        type: string
    type: object
  ResourceResponse:
    properties:
      color:
        description: >-
          Color of the resource. Can be used to differentiate resources in the
          UI. Must be a valid hex color code.
        example: '#FF0000'
        type: string
      companyID:
        description: Identifier for the company this resource is associated with.
        example: 31517972-ccad-406c-9100-c0c49e37cf37
        type: string
      createdAt:
        description: Date and time when the object was created in RFC3339 format.
        example: '2024-01-01T08:00:00Z'
        type: string
      disabledAt:
        description: Date and time when the object was disabled in RFC3339 format.
        example: '2024-01-01T08:00:00Z'
        type: string
      id:
        description: A unique identifier of the resource
        example: b431830e-8ee8-4755-bb0c-cd67f855b8f9
        type: string
      metaData:
        additionalProperties: {}
        description: Metadata of the resource
        type: object
      name:
        description: Name of the resource
        example: Resource Name
        type: string
      relatedResourceIDs:
        description: IDs of related resources
        items:
          type: string
        type: array
      updatedAt:
        description: Date and time when the object was last updated in RFC3339 format.
        example: '2024-01-01T08:00:00Z'
        type: string
    type: object
  ResourceServiceLinksResponse:
    properties:
      links:
        description: List of service-resource links
        items:
          $ref: '#/definitions/ServiceResourceLinkResponse'
        type: array
      services:
        description: List of unique service entities linked to the resource
        items:
          $ref: '#/definitions/ServiceResponse'
        type: array
    type: object
  ScheduleSlotResponse:
    properties:
      duration:
        description: In ISO8601 format
        example: PT1H
        type: string
      resourceID:
        description: ID of the resource that is associated with the slot
        example: 53ebf47a-9ddc-4198-8f6d-f9ff6a909158
        type: string
      rrule:
        description: >-
          Recurring rule in [RFC5545
          format](https://tools.ietf.org/html/rfc5545). Returned for recurring
          bookings.
        example: FREQ=WEEKLY;BYDAY=MO,WE,FR
        type: string
      serviceID:
        description: ID of the service this slot is associated with
        example: 53ebf47a-9ddc-4198-8f6d-f9ff6a909158
        type: string
      startTime:
        description: Start time of the slot in RFC3339 format
        example: '2021-01-01T12:00:00Z'
        type: string
      type:
        description: Type of the slot. Can be one of `group` or `ticket`
        type: string
    type: object
  SearchGiftCardPurchasesRequest:
    properties:
      clientIds:
        description: List of client IDs to filter by
        items:
          type: string
        type: array
      code:
        description: Filter by purchase code
        type: string
      fromDate:
        description: Filter purchases created from this date (RFC3339 format)
        type: string
      giftCardIds:
        description: List of gift card IDs to filter by
        items:
          type: string
        type: array
      ids:
        description: List of purchase IDs to filter by
        items:
          type: string
        type: array
      limit:
        description: Maximum
        type: integer
      offset:
        description: Offset for pagination
        type: integer
      status:
        description: Filter by purchase status (e.g., "active", "expired", etc.)
        type: string
      toDate:
        description: Filter purchases created until this date (RFC3339 format)
        type: string
    type: object
  SearchSubscriptionContractsRequest:
    properties:
      clientIDs:
        items:
          type: string
        type: array
      code:
        type: string
      fromDate:
        type: string
      ids:
        items:
          type: string
        type: array
      limit:
        type: integer
      metaDataQuery:
        $ref: '#/definitions/metadata.Query'
      offset:
        type: integer
      resourceIDs:
        items:
          type: string
        type: array
      serviceIDs:
        items:
          type: string
        type: array
      status:
        type: string
      subscriptionIDs:
        items:
          type: string
        type: array
      toDate:
        type: string
    type: object
  ServiceCapacityResponse:
    properties:
      createdAt:
        description: Date and time when the object was created in RFC3339 format.
        example: '2021-01-01T12:00:00Z'
        type: string
      id:
        description: Unique identifier of the rule.
        type: string
      limitation:
        allOf:
          - $ref: '#/definitions/limitation.Limitation'
        description: Limitation of the rule.
      priority:
        description: >-
          Priority of the rule. Rules with higher priority will be applied
          first.
        type: integer
      serviceID:
        description: ID of the service this rule is associated with.
        type: string
      spots:
        description: The number of spots available.
        example: 10
        type: integer
      spotsPerTicket:
        additionalProperties:
          type: integer
        description: The number of spots available per ticket.
        example:
          3587ccc0-d294-499a-b397-224ec61aafa1: 4
          dd4f3d7c-7092-454b-a509-a9faf3cbcfe1: 6
        type: object
      type:
        description: Type of the rule. Can be one of `capacity`, `ticket_capacity`
        type: string
    type: object
  ServiceResourceLinkResponse:
    properties:
      createdAt:
        description: Date and time when the object was created in RFC3339 format.
        type: string
      id:
        description: A unique identifier of the service-resource link
        type: string
      relatedResourceIDs:
        additionalProperties:
          items:
            type: string
          type: array
        description: >-
          IDs of the resources that are related to the linked resource. When the
          linked resource is booked, the related resources are also booked.
        type: object
      resourceID:
        description: ID of the resource that is linked to the service
        type: string
      serviceID:
        description: ID of the service that is linked to the resource
        type: string
      updatedAt:
        description: Date and time when the object was last updated in RFC3339 format.
        type: string
    type: object
  ServiceResourceLinksResponse:
    properties:
      links:
        description: List of service-resource links
        items:
          $ref: '#/definitions/ServiceResourceLinkResponse'
        type: array
      resources:
        description: List of unique resources entities linked to the service
        items:
          $ref: '#/definitions/ResourceResponse'
        type: array
    type: object
  ServiceResponse:
    properties:
      color:
        description: >-
          Color of the service. Can be used to differentiate services in the UI.
          Must be a valid hex color code.
        example: '#FF0000'
        type: string
      companyID:
        description: Identifier for the company this service is associated with.
        example: 53ebf47a-9ddc-4198-8f6d-f9ff6a909158
        type: string
      createdAt:
        description: Date and time when the object was created in RFC3339 format.
        example: '2021-01-01T12:00:00Z'
        type: string
      disabledAt:
        description: Date and time when the object was disabled in RFC3339 format.
        example: '2021-01-01T12:00:00Z'
        type: string
      id:
        description: A unique identifier of the service
        example: 53ebf47a-9ddc-4198-8f6d-f9ff6a909158
        type: string
      metaData:
        additionalProperties: {}
        description: Metadata of the service
        type: object
      name:
        description: Name of the service
        example: Service name
        type: string
      position:
        description: Position of the service in the group
        example: 0
        type: integer
      settings:
        allOf:
          - $ref: '#/definitions/ServiceSettings'
        description: Service settings
      type:
        description: >-
          Type of the service. Can be one of `fixed`, `flexible`, `group`,
          `ticket`, `days`
        example: fixed
        type: string
      updatedAt:
        description: Date and time when the object was last updated in RFC3339 format.
        example: '2021-01-01T12:00:00Z'
        type: string
    type: object
  ServiceRuleRequest:
    properties:
      discountAmount:
        type: integer
      discountPercent:
        type: number
      discountType:
        type: string
      maxDiscountAmount:
        type: integer
      serviceId:
        type: string
    type: object
  ServiceRuleResponse:
    properties:
      discountAmount:
        type: integer
      discountPercent:
        type: number
      discountType:
        type: string
      maxDiscountAmount:
        type: integer
      serviceId:
        type: string
    type: object
  ServiceSettings:
    properties:
      availabilityPeriod:
        description: >-
          Availability period for clients. Limits how far into the future
          clients can book. Must be a valid ISO 8601 duration, e.g. `P30D` for
          30 days.
        example: P30D
        type: string
      bookingPolicy:
        description: >-
          Booking policy of the service. Can be one of `confirmation`,
          `instant`, `prepayment`, `deposit`
        example: instant
        type: string
      bufferAfter:
        description: >-
          Buffer time after booking. Must be a valid ISO 8601 duration, e.g.
          `PT1H` for 1 hour.
        example: PT1H
        type: string
      bufferBefore:
        description: >-
          Buffer time before booking. Must be a valid ISO 8601 duration, e.g.
          `PT1H` for 1 hour.
        example: PT1H
        type: string
      checkInTime:
        description: >-
          Check-in time for the service. Must be a valid RFC 3339 duration, e.g.
          `15:00` for 3 PM.
        example: '15:00'
        type: string
      checkOutTime:
        description: >-
          Check-out time for the service. Must be a valid RFC 3339 duration,
          e.g. `11:00` for 11 AM.
        example: '11:00'
        type: string
      currency:
        description: Currency of the service. Must be a valid ISO 4217 currency code.
        example: USD
        type: string
      duration:
        description: >-
          Duration of the service. Must be a valid ISO 8601 duration, e.g.
          `PT1H` for 1 hour.
        example: PT1H
        type: string
      tax:
        allOf:
          - $ref: '#/definitions/service.Tax'
        description: >-
          Tax settings of the service. Can be used to calculate taxes for the
          service price.
      timeInterval:
        description: >-
          Time interval when service can be booked. Must be a valid ISO 8601
          duration, e.g. `PT30M` for 30 min.
        example: PT1H
        type: string
    type: object
  SlotResponse:
    properties:
      createdAt:
        description: Date and time when the object was created in RFC3339 format.
        example: '2021-01-01T12:00:00Z'
        type: string
      duration:
        description: In ISO8601 format
        example: PT1H
        type: string
      id:
        description: A unique identifier of the slot
        example: 53ebf47a-9ddc-4198-8f6d-f9ff6a909158
        type: string
      resourceID:
        description: ID of the resource that is associated with the slot
        example: 53ebf47a-9ddc-4198-8f6d-f9ff6a909158
        type: string
      rrule:
        description: >-
          Recurring rule in [RFC5545
          format](https://tools.ietf.org/html/rfc5545). Returned for recurring
          bookings.
        example: FREQ=WEEKLY;BYDAY=MO,WE,FR
        type: string
      serviceID:
        description: ID of the service this slot is associated with
        example: 53ebf47a-9ddc-4198-8f6d-f9ff6a909158
        type: string
      startTime:
        description: Start time of the slot in RFC3339 format
        example: '2021-01-01T12:00:00Z'
        type: string
      type:
        description: Type of the slot. Can be one of `group` or `ticket`
        type: string
      updatedAt:
        description: Date and time when the object was last updated in RFC3339 format.
        example: '2021-01-01T12:00:00Z'
        type: string
    type: object
  SubscriptionCapacityAvailabilityResponse:
    properties:
      items:
        items:
          $ref: '#/definitions/subscription.CapacityAvailabilityItem'
        type: array
    type: object
  SubscriptionContractsPageResult:
    properties:
      items:
        items:
          $ref: '#/definitions/ClientSubscriptionContract'
        type: array
      limit:
        type: integer
      offset:
        type: integer
      total:
        type: integer
    type: object
  SubscriptionCreateRequest:
    properties:
      availableFrom:
        type: string
      availableTo:
        type: string
      duration:
        type: string
      limitations:
        $ref: '#/definitions/subscription.CreateLimitations'
      metaData:
        additionalProperties: {}
        type: object
      rRule:
        type: string
      recurringConfig:
        additionalProperties: {}
        type: object
      recurringEnabled:
        type: boolean
      recurringInterval:
        type: string
      recurringIntervalCount:
        type: integer
      recurringProvider:
        type: string
      renewPeriod:
        type: string
      resourceIDs:
        items:
          type: string
        type: array
      rollOverSettings:
        $ref: >-
          #/definitions/github_com_bookla-app_platform_api_platform_plugins_subscription.RollOverSettings
      serviceIDs:
        items:
          type: string
        type: array
      ticketIDs:
        items:
          type: string
        type: array
      title:
        type: string
    type: object
  SubscriptionResponse:
    properties:
      archivedAt:
        type: string
      availableFrom:
        type: string
      availableTo:
        type: string
      createdAt:
        type: string
      duration:
        type: string
      id:
        type: string
      limitations:
        $ref: >-
          #/definitions/github_com_bookla-app_platform_api_platform_plugins_subscription.Limitations
      metaData:
        additionalProperties: {}
        type: object
      rRule:
        type: string
      recurringConfig:
        additionalProperties: {}
        type: object
      recurringEnabled:
        type: boolean
      recurringInterval:
        type: string
      recurringIntervalCount:
        type: integer
      recurringProvider:
        type: string
      resourceIDs:
        items:
          type: string
        type: array
      rollOverSettings:
        $ref: >-
          #/definitions/github_com_bookla-app_platform_api_platform_plugins_subscription.RollOverSettings
      serviceIDs:
        items:
          type: string
        type: array
      title:
        type: string
      updatedAt:
        type: string
    type: object
  SubscriptionSettingsResponse:
    properties:
      cartExpiration:
        type: string
      createdAt:
        type: string
      currency:
        type: string
      id:
        type: string
      metaData:
        additionalProperties: {}
        type: object
      taxInclusive:
        type: boolean
      taxRate:
        type: number
      updatedAt:
        type: string
    type: object
  SubscriptionUpdateRequest:
    properties:
      archive:
        type: boolean
      duration:
        type: string
      metaDataUpdate:
        allOf:
          - $ref: '#/definitions/metadata.Update'
        description: Metadata update object
      rRule:
        type: string
      recurringConfig:
        additionalProperties: {}
        type: object
      recurringEnabled:
        type: boolean
      recurringInterval:
        type: string
      recurringIntervalCount:
        type: integer
      recurringProvider:
        type: string
      resourceIDs:
        items:
          type: string
        type: array
      rollOverSettings:
        $ref: >-
          #/definitions/github_com_bookla-app_platform_api_platform_plugins_subscription.RollOverSettings
      serviceIDs:
        items:
          type: string
        type: array
      title:
        type: string
    type: object
  TicketAvailabilityResponse:
    properties:
      createdAt:
        description: Date and time when the object was created in RFC3339 format.
        example: '2021-01-01T12:00:00Z'
        type: string
      id:
        description: Unique identifier of the rule.
        type: string
      limitation:
        allOf:
          - $ref: '#/definitions/limitation.Limitation'
        description: Limitation of the rule.
      priority:
        description: >-
          Priority of the rule. Rules with higher priority will be applied
          first.
        type: integer
      serviceID:
        description: ID of the service this rule is associated with.
        type: string
      ticketID:
        description: ID of the ticket this availability rule applies to.
        example: 3587ccc0-d294-499a-b397-224ec61aafa1
        type: string
      type:
        description: Type of the rule. Can be one of `capacity`, `ticket_capacity`
        type: string
    type: object
  TicketResponse:
    properties:
      createdAt:
        description: Date and time when the object was created in RFC3339 format.
        example: '2021-01-01T12:00:00Z'
        type: string
      enabled:
        example: true
        type: boolean
      id:
        description: A unique identifier of the ticket
        example: 53ebf47a-9ddc-4198-8f6d-f9ff6a909158
        type: string
      metaData:
        additionalProperties: {}
        description: Metadata of the ticket
        type: object
      name:
        description: Name of the ticket
        example: Ticket name
        type: string
      serviceID:
        description: ID of the service this ticket is associated with
        example: 53ebf47a-9ddc-4198-8f6d-f9ff6a909158
        type: string
      updatedAt:
        description: Date and time when the object was last updated in RFC3339 format.
        example: '2021-01-01T12:00:00Z'
        type: string
    type: object
  TimesResponse:
    properties:
      timeZone:
        description: The timezone of the company in IANA format
        example: Europe/Berlin
        type: string
      times:
        additionalProperties:
          items:
            $ref: '#/definitions/service.TimeSlot'
          type: array
        description: A key-value pair of resource IDs and available timeslots
        type: object
    type: object
  TransactionResponse:
    properties:
      amount:
        type: integer
      createdAt:
        type: string
      currency:
        type: string
      email:
        type: string
      id:
        type: string
      itemID:
        type: string
      itemIDs:
        items:
          type: string
        type: array
      itemType:
        type: string
      perItemAmounts:
        additionalProperties:
          type: integer
        type: object
      pluginNamespace:
        type: string
      providerType:
        type: string
      purchaseID:
        type: string
      purchaseName:
        type: string
      referenceID:
        type: string
      status:
        type: string
      taxInclusive:
        type: boolean
      taxRate:
        type: number
      updatedAt:
        type: string
      userID:
        type: string
    type: object
  TransactionsListResponse:
    properties:
      limit:
        type: integer
      offset:
        type: integer
      total:
        type: integer
      transactions:
        items:
          $ref: '#/definitions/TransactionResponse'
        type: array
    type: object
  UpdateBookingRequest:
    properties:
      duration:
        example: PT1H
        type: string
      metaDataUpdate:
        allOf:
          - $ref: '#/definitions/metadata.Update'
        description: Metadata update object
      price:
        example: 1000
        type: integer
      refundPercent:
        example: 80
        type: integer
      resourceID:
        example: 95cd2c0c-9541-4c48-acd3-645f81f6f20e
        format: uuid
        type: string
      serviceID:
        example: 95cd2c0c-9541-4c48-acd3-645f81f6f20e
        format: uuid
        type: string
      spots:
        example: 2
        type: integer
      startTime:
        example: '2021-01-01T12:00:00Z'
        type: string
      status:
        example: confirmed
        type: string
      tickets:
        additionalProperties:
          type: integer
        description: >-
          Ticket counts keyed by ticket ID. Only applicable to ticket services.

          When provided, tickets are force-overwritten and price is
          recalculated.

          Not allowed for prepayment/deposit bookings or cancelled/rejected
          bookings.
        type: object
    type: object
  UpdateGiftCardRequest:
    properties:
      active:
        description: Active indicates if the gift card is active.
        type: boolean
      amount:
        description: >-
          Amount is the value of the gift card in the smallest currency unit
          (e.g. cents for USD).
        type: integer
      availableFrom:
        description: AvailableFrom is in RFC3339 format.
        type: string
      availableTo:
        description: >-
          AvailableTo is in RFC3339 format. Until when the gift card is
          available.
        type: string
      currency:
        description: Currency is the ISO 4217 currency code (e.g. "USD", "EUR").
        type: string
      metaDataUpdate:
        allOf:
          - $ref: '#/definitions/metadata.Update'
        description: MetaDataUpdate contains updates to the gift card metadata.
      taxInclusive:
        description: TaxInclusive indicates if the amount includes tax.
        type: boolean
      taxRate:
        description: >-
          TaxRate is the tax rate applied to the gift card in percentage (e.g.
          20.0 for 20%).
        type: number
      title:
        description: Title is the name of the gift card.
        type: string
      validityDuration:
        description: ValidityDuration is in ISO 8601 format (e.g. "P30D" for 30 days).
        type: string
    type: object
  UpdatePromoCodeRequest:
    properties:
      active:
        description: Active indicates if the promo code is active.
        type: boolean
      activeFrom:
        description: ActiveFrom is when the code can start being entered (RFC3339 format).
        type: string
      activeTo:
        description: >-
          ActiveTo is when the code stops being valid for entry (RFC3339
          format).
        type: string
      code:
        description: Code is the unique promo code string.
        type: string
      description:
        description: Description provides details about the promo code.
        type: string
      discountAmount:
        description: DiscountAmount is the fixed discount amount in smallest currency unit.
        type: integer
      discountPercent:
        description: DiscountPercent is the discount percentage (0-100).
        type: number
      discountType:
        description: DiscountType is either "amount" or "percent".
        type: string
      maxDiscountAmount:
        description: >-
          MaxDiscountAmount is the maximum discount cap for percentage
          discounts.
        type: integer
      metaDataUpdate:
        allOf:
          - $ref: '#/definitions/metadata.Update'
        description: MetaDataUpdate contains updates to the promo code metadata.
      reservationAllowanceFrom:
        description: >-
          ReservationAllowanceFrom is the start of the booking date range
          (RFC3339 format).
        type: string
      reservationAllowanceTo:
        description: >-
          ReservationAllowanceTo is the end of the booking date range (RFC3339
          format).
        type: string
      serviceIds:
        description: >-
          ServiceIDs is an array of service UUIDs this promo code is restricted
          to.
        items:
          type: string
        type: array
      serviceRules:
        description: ServiceRules defines per-service discount overrides.
        items:
          $ref: '#/definitions/ServiceRuleRequest'
        type: array
      title:
        description: Title is the name/title of the promo code.
        type: string
      usageLimit:
        description: UsageLimit is the total usage count limit.
        type: integer
      usageType:
        description: >-
          UsageType is one of: "single_use", "one_per_customer",
          "limited_count", "unlimited".
        type: string
    type: object
  UpdateResourceRequest:
    properties:
      color:
        description: >-
          Color of the resource. Can be used to differentiate resources in the
          UI. Must be a valid hex color code.
        example: '#FF0000'
        type: string
      enabled:
        description: >-
          Whether the resource is enabled or not. If not provided, the resource
          will be enabled.
        example: true
        type: boolean
      metaDataUpdate:
        allOf:
          - $ref: '#/definitions/metadata.Update'
        description: Metadata update object
      name:
        description: Name of the resource
        example: Resource Name
        type: string
    type: object
  UpdateServiceRequest:
    properties:
      color:
        description: >-
          Color of the service. Can be used to differentiate services in the UI.
          Must be a valid hex color code.
        example: '#FF0000'
        type: string
      enabled:
        description: Flag to enable or disable the service
        example: true
        type: boolean
      metaDataUpdate:
        allOf:
          - $ref: '#/definitions/metadata.Update'
        description: Metadata update object
      name:
        description: Name of the service
        example: Service name
        type: string
    type: object
  UpdateSubscriptionCapacityRuleRequest:
    properties:
      archive:
        type: boolean
      endDate:
        type: string
      maxCount:
        type: integer
      metaDataUpdate:
        $ref: '#/definitions/metadata.Update'
      priority:
        type: integer
      startDate:
        type: string
      subscriptionIDs:
        items:
          type: string
        type: array
    type: object
  UpdateSubscriptionContractRequest:
    properties:
      clientID:
        type: string
      duration:
        type: string
      metaDataUpdate:
        allOf:
          - $ref: '#/definitions/metadata.Update'
        description: Metadata update object
      status:
        type: string
      subscriptionID:
        type: string
    type: object
  UpdateSubscriptionPriceRuleRequest:
    properties:
      archive:
        type: boolean
      comparedPrice:
        type: integer
      endDate:
        type: string
      metaDataUpdate:
        $ref: '#/definitions/metadata.Update'
      price:
        type: integer
      priority:
        type: integer
      startDate:
        type: string
      subscriptionIDs:
        items:
          type: string
        type: array
    type: object
  UpdateSubscriptionSettingsRequest:
    properties:
      cartExpiration:
        type: string
      currency:
        type: string
      taxInclusive:
        type: boolean
      taxRate:
        type: number
    type: object
  ValidatePromoCodeRequest:
    properties:
      bookingAmount:
        description: Total booking amount
        type: integer
      bookingDate:
        description: Booking date (RFC3339)
        type: string
      clientID:
        description: ID of the client attempting to use the promo code
        type: string
      code:
        type: string
      currency:
        description: Currency code
        type: string
      serviceIDs:
        description: Service IDs in the booking
        items:
          type: string
        type: array
    type: object
  ValidatePromoCodeResponse:
    properties:
      discountAmount:
        type: integer
      errorMessage:
        type: string
      promoCode:
        $ref: '#/definitions/PromoCodeResponse'
      valid:
        type: boolean
    type: object
  WorkingHoursResponse:
    properties:
      createdAt:
        description: Date and time when the object was created in RFC3339 format.
        type: string
      endTime:
        description: End date and time of the rule.
        type: string
      id:
        description: Unique identifier of the rule.
        type: string
      metaData:
        additionalProperties: {}
        description: User-defined metadata associated with the rule.
        type: object
      priority:
        description: >-
          Priority of the rule. Rules with higher priority will be applied
          first.
        type: integer
      resourceID:
        description: ID of the resource this rule is associated with.
        type: string
      serviceIDs:
        description: Service IDs associated with the rule. Can be empty.
        items:
          type: string
        type: array
      startTime:
        description: Start date and time of the rule.
        type: string
      updatedAt:
        description: Date and time when the object was last updated in RFC3339 format.
        type: string
      workingHours:
        description: The list of working hours for the resource.
        items:
          $ref: '#/definitions/direct.WorkingHour'
        type: array
    type: object
  auth.ClientUpdateRequest:
    properties:
      email:
        type: string
      firstName:
        type: string
      lastName:
        type: string
      metaDataUpdate:
        allOf:
          - $ref: '#/definitions/metadata.Update'
        description: Metadata update object
    type: object
  booking.CreateBookingRequest:
    properties:
      clientID:
        description: >-
          Identifier of the client this booking is associated with. Can be blank
          if the client is not known.
        example: 95cd2c0c-9541-4c48-acd3-645f81f6f20e
        format: uuid
        type: string
      duration:
        description: In ISO8601 format
        example: PT1H
        type: string
      ignoreSchedule:
        description: >-
          If true, time availability will not be checked when creating the
          booking. Use with caution, as this can result in double bookings.
        type: boolean
      metaData:
        additionalProperties: {}
        description: Set of key-value pairs that you can attach to an object.
        type: object
      repeat:
        description: Recurring rule
        properties:
          rrule:
            description: >-
              Recurring rule in [RFC5545
              format](https://tools.ietf.org/html/rfc5545). Required for
              services with type 'days'
            example: FREQ=WEEKLY;BYDAY=MO,WE,FR
            type: string
          timeZone:
            description: Timezone of the recurring rule in IANA format.
            example: Europe/Madrid
            type: string
          until:
            description: >-
              Date and time until the recurring rule is valid. In RFC3339
              format.
            example: '2021-02-01T12:00:00Z'
            type: string
        type: object
      resourceID:
        description: Identifier for the resource this booking is associated with.
        example: 95cd2c0c-9541-4c48-acd3-645f81f6f20e
        format: uuid
        type: string
      serviceID:
        description: Identifier for the service this booking is associated with.
        example: 95cd2c0c-9541-4c48-acd3-645f81f6f20e
        format: uuid
        type: string
      spots:
        description: >-
          Number of spots booked. It's greater than 1 for services with type
          `group` and `ticket`
        example: 2
        type: integer
      startTime:
        description: Start time of the booking in RFC3339 format.
        example: '2021-01-01T12:00:00Z'
        type: string
      tickets:
        additionalProperties:
          type: integer
        description: >-
          A set of key-value pair pairs where **key** is the ticket ID and
          **value** is the number of tickets booked. Required for services with
          type `ticket`
        type: object
    required:
      - resourceID
      - serviceID
      - startTime
    type: object
  booking.GetBookingsResponse:
    properties:
      blockedTimes:
        items:
          $ref: '#/definitions/BlockedTimeResponse'
        type: array
      bookings:
        items:
          $ref: '#/definitions/BookingResponse'
        type: array
      clients:
        items:
          $ref: '#/definitions/ClientResponse'
        type: array
      limit:
        type: integer
      offset:
        type: integer
      resources:
        items:
          $ref: '#/definitions/ResourceResponse'
        type: array
      services:
        items:
          $ref: '#/definitions/ServiceResponse'
        type: array
      slots:
        items:
          $ref: '#/definitions/ScheduleSlotResponse'
        type: array
      tickets:
        items:
          $ref: '#/definitions/TicketResponse'
        type: array
      total:
        type: integer
    type: object
  booking.MoveBookingRequest:
    properties:
      ignoreSchedule:
        type: boolean
      recalculatePrice:
        type: boolean
      recurringUpdateStrategy:
        description: comment single or upcoming
        example: single
        type: string
      resourceID:
        example: 95cd2c0c-9541-4c48-acd3-645f81f6f20e
        format: uuid
        type: string
      startTime:
        type: string
    required:
      - resourceID
      - startTime
    type: object
  booking.StatusChangeResponse:
    properties:
      bookingID:
        type: string
      createdAt:
        type: string
      id:
        type: string
      metaData:
        additionalProperties: {}
        type: object
      newStatus:
        type: string
      oldStatus:
        type: string
    type: object
  booking.TicketMeta:
    properties:
      comparedPrice:
        description: >-
          Compared price (old price), can be used to show discount. In
          fractional units, e.g. 1000 for $10.00
        type: integer
      price:
        description: Current price. In fractional units, e.g. 1000 for $10.00
        type: integer
      spots:
        description: Number of tickets booked
        type: integer
    type: object
  client.BaseResourceResponse:
    properties:
      color:
        description: >-
          Color of the resource. Can be used to differentiate resources in the
          UI. Must be a valid hex color code.
        example: '#000000'
        type: string
      companyID:
        description: Identifier for the company this resource is associated with.
        example: 53ebf47a-9ddc-4198-8f6d-f9ff6a909158
        type: string
      createdAt:
        description: Date and time when the object was created in RFC3339 format.
        example: '2021-07-01T00:00:00Z'
        type: string
      id:
        description: A unique identifier of the resource
        example: 53ebf47a-9ddc-4198-8f6d-f9ff6a909158
        type: string
      name:
        description: Name of the resource
        example: Resource name
        type: string
      updatedAt:
        description: Date and time when the object was last updated in RFC3339 format.
        example: '2021-07-01T00:00:00Z'
        type: string
    type: object
  client.BaseServiceResponse:
    properties:
      color:
        description: >-
          Color of the service. Can be used to differentiate services in the UI.
          Must be a valid hex color code.
        example: '#000000'
        type: string
      companyID:
        description: Identifier for the company this service is associated with.
        example: 53ebf47a-9ddc-4198-8f6d-f9ff6a909158
        type: string
      createdAt:
        description: Date and time when the object was created in RFC3339 format.
        example: '2021-07-01T00:00:00Z'
        type: string
      id:
        description: A unique identifier of the service
        example: 53ebf47a-9ddc-4198-8f6d-f9ff6a909158
        type: string
      name:
        description: Name of the service
        example: Service name
        type: string
      settings:
        allOf:
          - $ref: '#/definitions/ServiceSettings'
        description: Service settings
      type:
        description: >-
          Type of the service. Can be one of `fixed`, `flexible`, `group`,
          `ticket`, `days`
        example: fixed
        type: string
      updatedAt:
        description: Date and time when the object was last updated in RFC3339 format.
        example: '2021-07-01T00:00:00Z'
        type: string
    type: object
  client.CodeValidateResponse:
    properties:
      canApply:
        description: Can the code be applied to the booking?
        example: true
        type: boolean
      clientEmail:
        description: >-
          Email of the client that can use the code. If not provided, it means
          the code is valid for any client.
        example: john@doe.com
        format: uuid
        type: string
      clientID:
        description: >-
          ID of the client that can use the code. If not provided, it means the
          code is valid for any client.
        example: 95cd2c0c-9541-4c48-acd3-645f81f6f20e
        format: uuid
        type: string
      pluginNameSpace:
        description: Namespace of the plugin that can handle the code
        example: discounts
        type: string
      pluginResponse:
        description: Response from the plugin that can handle the code
      price:
        description: >-
          Price of the booking after applying the code. In fractional units,
          e.g. 1000 for $10.00
        example: 1000
        type: integer
    type: object
  client.GuestClient:
    properties:
      booklaID:
        description: >-
          Bookla client ID. If not provided, a new client will be created. If
          this ID is provided, then other fields are ignored.
        example: 95cd2c0c-9541-4c48-acd3-645f81f6f20e
        format: uuid
        type: string
      email:
        description: Guest client email
        example: john.doe@domain.com
        type: string
      firstName:
        description: Guest client first name
        example: John
        type: string
      id:
        description: >-
          Unique identifier for the object. Will be generated automatically if
          not provided.
        example: 95cd2c0c-9541-4c48-acd3-645f81f6f20e
        type: string
      lastName:
        description: Guest client last name
        example: Doe
        type: string
    required:
      - email
    type: object
  client.TicketMeta:
    properties:
      comparedPrice:
        description: >-
          Compared price (old price), can be used to show discount. In
          fractional units, e.g. 1000 for $10.00
        type: integer
      price:
        description: Current price. In fractional units, e.g. 1000 for $10.00
        type: integer
      spots:
        description: Number of tickets booked
        type: integer
    type: object
  client.TicketResponse:
    properties:
      id:
        description: A unique identifier of the ticket
        type: string
      name:
        description: Name of the ticket
        type: string
    type: object
  company.CreateCompanyRequest:
    properties:
      name:
        description: Name of the company
        example: Company Name
        type: string
      timeZone:
        description: Time zone of the company
        example: America/New_York
        type: string
    required:
      - name
      - timeZone
    type: object
  company.CreateCompanyResponse:
    properties:
      createdAt:
        description: Date and time when the object was created in RFC3339 format.
        example: '2021-01-01T12:00:00Z'
        type: string
      enabled:
        example: true
        type: boolean
      id:
        description: A unique identifier of the company
        example: 53ebf47a-9ddc-4198-8f6d-f9ff6a909158
        type: string
      name:
        description: Name of the company
        type: string
      ownerID:
        example: 34762b60-9a17-436d-9581-85089b1e25aa
        type: string
      timeZone:
        description: Time zone of the company
        example: America/New_York
        type: string
      updatedAt:
        description: Date and time when the object was last updated in RFC3339 format.
        example: '2021-01-01T12:00:00Z'
        type: string
    type: object
  direct.CreatePriceRuleRequest:
    properties:
      duration:
        description: >-
          Duration of the price rule, e.g. `PT1H`. Required for `fixed`,
          `flexible` and `days` price rules
        example: PT1H
        type: string
      limitation:
        allOf:
          - $ref: >-
              #/definitions/github_com_bookla-app_platform_api_platform_pricing_direct.Limitation
        description: Limitation of the price rule
      maxDuration:
        description: >-
          Maximum duration of the price rule, e.g. `PT4H`. Used for `flexible`
          and `days` price rules
        example: PT4H
        type: string
      minDuration:
        description: >-
          Minimum duration of the price rule, e.g. `PT1H`. Used for `flexible`
          and `days` price rules
        example: PT1H
        type: string
      price:
        allOf:
          - $ref: >-
              #/definitions/github_com_bookla-app_platform_api_platform_pricing_direct.Price
        description: Price of the price rule
      priority:
        description: Priority of the price rule
        example: 1
        type: integer
      ticketID:
        description: A unique identifier of the ticket
        example: 90bc7809-b277-4ddf-a827-5c9fdb9a81ad
        type: string
      type:
        description: >-
          Type of the price rule. Can be one of `fixed`, `flexible`, `group`,
          `ticket`, `days`
        example: fixed
        type: string
    required:
      - price
      - priority
      - type
    type: object
  direct.CreateTicketVolumeDiscountRequest:
    properties:
      limitation:
        allOf:
          - $ref: >-
              #/definitions/github_com_bookla-app_platform_api_platform_pricing_direct.Limitation
        description: Limitation of the discount
      priority:
        description: Priority of the discount
        type: integer
      rules:
        description: A list of ticket volume discount rules
        items:
          $ref: >-
            #/definitions/github_com_bookla-app_platform_api_platform_pricing_direct.TicketVolumeDiscountRule
        type: array
      sumsUp:
        description: If true, the discount is summed up with other discounts
        type: boolean
      type:
        description: Type of the discount. Can be one of `volume`, `ticket_volume`
        example: ticket
        type: string
    required:
      - priority
      - type
    type: object
  direct.CreateTicketVolumeDiscountResponse:
    properties:
      id:
        description: A unique identifier of the discount
        type: string
      limitation:
        allOf:
          - $ref: >-
              #/definitions/github_com_bookla-app_platform_api_platform_pricing_direct.Limitation
        description: Limitation of the discount
      priority:
        description: Priority of the discount
        type: integer
      rules:
        description: A list of ticket volume discount rules
        items:
          $ref: >-
            #/definitions/github_com_bookla-app_platform_api_platform_pricing_direct.TicketVolumeDiscountRule
        type: array
      serviceID:
        description: ID of the service this discount is associated with
        type: string
      sumsUp:
        description: If true, the discount is summed up with other discounts
        type: boolean
      type:
        description: Type of the discount. Can be one of `volume`, `ticket_volume`
        type: string
    type: object
  direct.CreateWorkingHoursRequest:
    properties:
      endTime:
        description: End date and time of the rule.
        type: string
      metaData:
        additionalProperties: {}
        description: User-defined metadata associated with the rule.
        type: object
      priority:
        description: >-
          Priority of the rule. Rules with higher priority will be applied
          first.
        type: integer
      serviceIDs:
        description: List of service IDs associated with the rule. Can be empty.
        items:
          type: string
        type: array
      startTime:
        description: Start date and time of the rule.
        type: string
      workingHours:
        description: The list of working hours for the resource.
        items:
          $ref: '#/definitions/direct.WorkingHour'
        type: array
    type: object
  direct.DeleteWorkingHoursRequest:
    type: object
  direct.GetRefundResponse:
    properties:
      ID:
        type: string
      amount:
        type: integer
      createdAt:
        type: string
      idempotencyKey:
        type: string
      itemID:
        type: string
      metadata:
        additionalProperties:
          type: string
        type: object
      providerRefundID:
        type: string
      reason:
        type: string
      status:
        type: string
      transactionID:
        type: string
      updatedAt:
        type: string
    type: object
  direct.ListTicketVolumeDiscountRulesResponse:
    properties:
      discounts:
        description: A list of ticket volume discount rules
        items:
          $ref: '#/definitions/direct.CreateTicketVolumeDiscountResponse'
        type: array
    type: object
  direct.PatchCompanyPaymentSettingsRequest:
    properties:
      data:
        additionalProperties: {}
        type: object
      provider:
        example: stripe,klix
        type: string
    required:
      - data
      - provider
    type: object
  direct.TimePeriod:
    properties:
      end:
        description: End time of the period in the format "HH:MM"
        type: string
      start:
        description: Start time of the period in the format "HH:MM"
        type: string
    type: object
  direct.UpdateCompanyPaymentSettingsRequest:
    properties:
      data:
        additionalProperties: {}
        type: object
      provider:
        example: stripe,klix
        type: string
    required:
      - data
      - provider
    type: object
  direct.UpdateCompanyPreferredPaymentProviderRequest:
    properties:
      provider:
        example: stripe,klix
        type: string
    required:
      - provider
    type: object
  direct.UpdatePriceRuleRequest:
    properties:
      duration:
        description: >-
          Duration of the price rule, e.g. `PT1H`. Required for `fixed`,
          `flexible` and `days` price rules
        example: PT1H
        type: string
      limitation:
        allOf:
          - $ref: >-
              #/definitions/github_com_bookla-app_platform_api_platform_pricing_direct.Limitation
        description: Limitation of the price rule
      maxDuration:
        description: >-
          Maximum duration of the price rule, e.g. `PT4H`. Used for `flexible`
          and `days` price rules
        example: PT4H
        type: string
      minDuration:
        description: >-
          Minimum duration of the price rule, e.g. `PT1H`. Used for `flexible`
          and `days` price rules
        example: PT1H
        type: string
      price:
        allOf:
          - $ref: >-
              #/definitions/github_com_bookla-app_platform_api_platform_pricing_direct.Price
        description: Price of the price rule
      priority:
        description: Priority of the price rule
        example: 1
        type: integer
      ticketID:
        description: A unique identifier of the ticket
        example: 90bc7809-b277-4ddf-a827-5c9fdb9a81ad
        type: string
      type:
        description: >-
          Type of the price rule. Can be one of `fixed`, `flexible`, `group`,
          `ticket`, `days`
        example: fixed
        type: string
    required:
      - type
    type: object
  direct.UpdateWorkingHoursRequest:
    properties:
      endTime:
        description: End date and time of the rule.
        type: string
      metaDataUpdate:
        allOf:
          - $ref: '#/definitions/metadata.Update'
        description: Metadata update object
      priority:
        description: >-
          Priority of the rule. Rules with higher priority will be applied
          first.
        type: integer
      serviceIDs:
        description: List of service IDs associated with the rule. Can be empty.
        items:
          type: string
        type: array
      startTime:
        description: Start date and time of the rule.
        type: string
      workingHours:
        description: The list of working hours for the resource.
        items:
          $ref: '#/definitions/direct.WorkingHour'
        type: array
    type: object
  direct.VerifySignatureResponse:
    properties:
      reason:
        type: string
      valid:
        type: boolean
    type: object
  direct.WorkingHour:
    properties:
      daysOfWeek:
        description: >-
          Bitmask of days of the week when the resource is available, where 1 is
          Monday and 64 is Sunday.
        type: integer
      hours:
        description: List of time periods when the resource is available.
        items:
          $ref: '#/definitions/direct.TimePeriod'
        type: array
    type: object
  giftcards.ArchiveRequest:
    properties:
      archived:
        description: Indicates if the gift card should be archived
        type: boolean
    type: object
  giftcards.UpdateUsageRequest:
    properties:
      amount:
        description: Amount to use from the gift card
        type: integer
      metaDataUpdate:
        allOf:
          - $ref: '#/definitions/metadata.Update'
        description: Metadata updates
      reservationID:
        description: Reservation ID
        type: string
    type: object
  github_com_bookla-app_platform_api_platform_plugins_subscription.Limitations:
    properties:
      bookingsCount:
        description: For visit-based subscriptions
        type: integer
      daysOfWeek:
        type: integer
      maxDuration:
        type: string
      maxSpotsPerBooking:
        description: group bookings
        type: integer
      maxTicketsPerBooking:
        additionalProperties:
          type: integer
        description: ticket bookings
        type: object
      times:
        items:
          $ref: >-
            #/definitions/github_com_bookla-app_platform_api_platform_plugins_subscription.Times
        type: array
      totalDuration:
        description: For duration-based subscriptions (ISO 8601 format)
        type: string
    type: object
  github_com_bookla-app_platform_api_platform_plugins_subscription.RollOverSettings:
    properties:
      rollOverType:
        description: |-
          RollOverType specifies the rollover strategy to apply.
          Available strategies:
            - "reset": No rollover - unused visits are lost at renewal (no settings required)
            - "rollover": Full rollover - all unused visits carry over (no settings required)
            - "capped": Limited rollover - maximum number of visits can roll over
              Required settings: {"maxVisits": number}
            - "timeExpiring": Time-limited rollover - visits expire after N periods
              Required settings: {"maxDuration": string in ISO 8601 duration format}
            - "percentage": Percentage-based rollover - percentage of unused visits carry over
              Required settings: {"percentage": 0-1, "roundingMode": "up"|"down"}
            - "accumulationCapped": Accumulated visits with total cap
              Required settings: {"maxTotalVisits": number}
            - "degrading": Degrading rollover - visits decrease by percentage each period
              Required settings: {"degradationRate": 0-1, "minVisits": number, "roundingMode": "up"|"down"}
        type: string
      settings:
        additionalProperties: {}
        description: |-
          Settings contains strategy-specific configuration as key-value pairs.
          The required fields depend on the RollOverType:

          For "capped":
            - maxVisits (number): Maximum visits that can roll over
            - maxDuration (string): Maximum duration visits remain valid (ISO 8601 duration format)

          For "timeExpiring":
            - maxDuration (string): Maximum duration visits remain valid (ISO 8601 duration format)

          For "percentage":
            - percentage (number): Percentage of unused visits to carry over (0-1, e.g., 0.2 = 20%)
            - roundingMode (string): How to round fractional visits ("up" or "down")

          For "accumulationCapped":
            - maxTotalVisits (number): Maximum total visits that can accumulate

          For "degrading":
            - degradationRate (number): Percentage by which visits decrease each period (0-1, e.g., 0.1 = 10%)
            - minVisits (number): Minimum visits that can be carried over (0 or greater)
            - roundingMode (string): How to round fractional visits ("up" or "down")
        type: object
    type: object
  github_com_bookla-app_platform_api_platform_plugins_subscription.Times:
    properties:
      endTime:
        type: string
      startTime:
        type: string
    type: object
  github_com_bookla-app_platform_api_platform_pricing_direct.Dates:
    properties:
      end:
        description: End date of the range in RFC3339 format
        example: '2021-02-01T00:00:00Z'
        type: string
      start:
        description: Start date of the range in RFC3339 format
        example: '2021-01-01T00:00:00Z'
        type: string
    type: object
  github_com_bookla-app_platform_api_platform_pricing_direct.Limitation:
    properties:
      dates:
        description: Date ranges when the limitation is active
        items:
          $ref: >-
            #/definitions/github_com_bookla-app_platform_api_platform_pricing_direct.Dates
        type: array
      daysOfWeek:
        description: >-
          Days of the week when the limitation is active. Bitmask of days, where
          1 is Monday and 64 is Sunday
        type: integer
      resourceIDs:
        description: Resource IDs that the limitation is applied to
        items:
          type: string
        type: array
      times:
        description: Time ranges when the limitation is active, in the format "HH:MM"
        items:
          $ref: >-
            #/definitions/github_com_bookla-app_platform_api_platform_pricing_direct.Times
        type: array
    type: object
  github_com_bookla-app_platform_api_platform_pricing_direct.Price:
    properties:
      comparedPrice:
        description: >-
          Compared price in fractional units, e.g. 200 for 2.00$. Can be used to
          show the discount amount
        example: 200
        type: integer
      price:
        description: Price in fractional units, e.g. 1000 for 10.00$
        example: 100
        type: integer
    type: object
  github_com_bookla-app_platform_api_platform_pricing_direct.TicketVolumeDiscountRule:
    properties:
      from:
        description: Start of the volume range
        type: integer
      price:
        description: Price in fractional units, e.g. 1000 for 10.00$
        type: integer
      ticketID:
        description: Unique identifier of the ticket
        type: string
      to:
        description: End of the volume range
        type: integer
    type: object
  github_com_bookla-app_platform_api_platform_pricing_direct.Times:
    properties:
      end:
        description: End time of the range in the format "HH:MM"
        example: '18:00'
        type: string
      start:
        description: Start time of the range in the format "HH:MM"
        example: '09:00'
        type: string
    type: object
  github_com_bookla-app_platform_api_platform_scheduling_direct.Dates:
    properties:
      end:
        type: string
      start:
        type: string
    type: object
  github_com_bookla-app_platform_api_platform_scheduling_direct.Limitation:
    properties:
      dates:
        items:
          $ref: >-
            #/definitions/github_com_bookla-app_platform_api_platform_scheduling_direct.Dates
        type: array
      daysOfWeek:
        type: integer
      id:
        type: string
      resourceIDs:
        items:
          type: string
        type: array
      times:
        items:
          $ref: >-
            #/definitions/github_com_bookla-app_platform_api_platform_scheduling_direct.Times
        type: array
    type: object
  github_com_bookla-app_platform_api_platform_scheduling_direct.Times:
    properties:
      end:
        type: string
      start:
        type: string
    type: object
  limitation.Date:
    properties:
      end:
        description: End date of the range in RFC3339 format
        example: '2021-02-01T00:00:00Z'
        type: string
      start:
        description: Start date of the range in RFC3339 format
        example: '2021-01-01T00:00:00Z'
        type: string
    type: object
  limitation.Limitation:
    properties:
      dates:
        description: Date ranges when the limitation is active
        items:
          $ref: '#/definitions/limitation.Date'
        type: array
      daysOfWeek:
        description: >-
          Days of the week when the limitation is active. Bitmask of days, where
          1 is Monday and 64 is Sunday
        type: integer
      resourceIDs:
        description: Resource IDs that the limitation is applied to
        items:
          type: string
        type: array
      times:
        description: Time ranges when the limitation is active, in the format "HH:MM"
        items:
          type: string
        type: array
    type: object
  metadata.Query:
    properties:
      op:
        allOf:
          - $ref: '#/definitions/metadata.QueryOperation'
        description: Operator is the comparison operator.
      path:
        description: Path is the key path to the metadata value.
        type: string
      value:
        description: Value is the value to compare.
    type: object
  metadata.QueryOperation:
    enum:
      - eq
      - contains
      - gt
      - lt
    type: string
    x-enum-varnames:
      - QueryOperationEqual
      - QueryOperationContains
      - QueryOperationGreaterThan
      - QueryOperationLessThan
  metadata.Update:
    properties:
      expectedVersion:
        description: >-
          ExpectedVersion is the version of the metadata that is expected to be
          updated. If the version does not match, the update will fail. If the
          version is -1, the update will always succeed.
        type: integer
      path:
        description: Path is the key path to the metadata value.
        type: string
      value:
        description: Value is the new value to set.
    type: object
  payment.CompanyPaymentDectaResponse:
    properties:
      cancelRedirectURL:
        type: string
      dueDuration:
        type: string
      enableUrlTemplating:
        type: boolean
      failureRedirectURL:
        type: string
      secretKey:
        type: string
      signingSecret:
        type: string
      successRedirectURL:
        type: string
    type: object
  payment.CompanyPaymentKlixResponse:
    properties:
      brandID:
        type: string
      enableUrlTemplating:
        type: boolean
      failureRedirect:
        type: string
      signingSecret:
        type: string
      successRedirect:
        type: string
      token:
        type: string
    type: object
  payment.CompanyPaymentMercadoPagoResponse:
    properties:
      accessToken:
        type: string
      cancelRedirectURL:
        type: string
      enableUrlTemplating:
        type: boolean
      failureRedirectURL:
        type: string
      signingSecret:
        type: string
      successRedirectURL:
        type: string
    type: object
  payment.CompanyPaymentMontonioResponse:
    properties:
      accessKey:
        type: string
      enableUrlTemplating:
        type: boolean
      failureRedirectURL:
        type: string
      locale:
        type: string
      secretKey:
        type: string
      signingSecret:
        type: string
      successRedirectURL:
        type: string
    type: object
  payment.CompanyPaymentNBGResponse:
    properties:
      cancelRedirectURL:
        type: string
      clientID:
        type: string
      clientSecret:
        type: string
      enableUrlTemplating:
        type: boolean
      failureRedirectURL:
        type: string
      signingSecret:
        type: string
      successRedirectURL:
        type: string
    type: object
  payment.CompanyPaymentSettingsResponse:
    properties:
      decta:
        $ref: '#/definitions/payment.CompanyPaymentDectaResponse'
      klix:
        $ref: '#/definitions/payment.CompanyPaymentKlixResponse'
      mercadopago:
        $ref: '#/definitions/payment.CompanyPaymentMercadoPagoResponse'
      montonio:
        $ref: '#/definitions/payment.CompanyPaymentMontonioResponse'
      nbg:
        $ref: '#/definitions/payment.CompanyPaymentNBGResponse'
      preferredPaymentProvider:
        example: stripe
        type: string
      stripe:
        $ref: '#/definitions/payment.CompanyPaymentStripeResponse'
    type: object
  payment.CompanyPaymentStripeResponse:
    properties:
      automaticTax:
        type: boolean
      billingAddressCollection:
        type: string
      cancelRedirectURL:
        type: string
      enableUrlTemplating:
        type: boolean
      failureRedirectURL:
        type: string
      secretKey:
        type: string
      signingSecret:
        type: string
      successRedirectURL:
        type: string
      taxIDCollection:
        type: boolean
    type: object
  pricing.Price:
    properties:
      comparedPrice:
        description: >-
          Compared price in fractional units, e.g. 200 for 2.00$. Can be used to
          show the discount amount
        example: 200
        type: integer
      price:
        description: Price in fractional units, e.g. 1000 for 10.00$
        example: 100
        type: integer
    type: object
  promocodes.ArchiveRequest:
    properties:
      archived:
        description: Indicates if the promo code should be archived
        type: boolean
    type: object
  resource.CreateResourceRequest:
    properties:
      color:
        description: >-
          Color of the resource. Can be used to differentiate resources in the
          UI. Must be a valid hex color code.
        example: '#FF0000'
        type: string
      metaData:
        additionalProperties: {}
        description: Metadata of the resource
        type: object
      name:
        description: Name of the resource
        example: Resource Name
        type: string
    required:
      - color
      - name
    type: object
  service.BulkUpdateItem:
    properties:
      entityID:
        description: Required when itemType="entity"
        type: string
      groupID:
        description: >-
          For entities: target group (nil = ungrouped). For groups: the group
          being moved
        type: string
      itemType:
        description: '"entity" or "group"'
        type: string
      parentGroupID:
        description: 'Only for itemType="group": target parent (nil = root)'
        type: string
      position:
        type: integer
    type: object
  service.BulkUpdateStructureRequest:
    properties:
      companyID:
        type: string
      entityType:
        type: string
      updates:
        items:
          $ref: '#/definitions/service.BulkUpdateItem'
        type: array
    type: object
  service.CreateEntityGroupRequest:
    properties:
      color:
        type: string
      companyID:
        type: string
      entityType:
        type: string
      name:
        type: string
      parentGroupID:
        type: string
      position:
        type: integer
    type: object
  service.CreateServiceRequest:
    properties:
      color:
        description: >-
          Color of the service. Can be used to differentiate services in the UI.
          Must be a valid hex color code.
        example: '#FF0000'
        type: string
      metaData:
        additionalProperties: {}
        description: Metadata of the service
        type: object
      name:
        description: Name of the service
        example: Service name
        type: string
      settings:
        allOf:
          - $ref: '#/definitions/ServiceSettings'
        description: Service settings
      type:
        description: >-
          Type of the service. Can be one of `fixed`, `flexible`, `group`,
          `ticket`, `days`
        example: fixed
        type: string
    required:
      - name
      - type
    type: object
  service.CreateServiceResourceLinkRequest:
    properties:
      relatedResourceIDs:
        additionalProperties:
          items:
            type: string
          type: array
        description: >-
          Key-value pairs where key is the strategy and value is the list of
          related resource IDs.

          When the linked resource is booked, the related resources are also
          booked according to the strategy. There are two strategies: "all" and
          "any". "all" means that all related resources are booked. "any" means
          that any of the related resources can be booked. The default strategy
          is "all".

          Example: {"all": ["90bc7809-b277-4ddf-a827-5c9fdb9a81ad",
          "90bc7809-b277-4ddf-a827-5c9fdb9a81ae"], "any":
          ["90bc7809-b277-4ddf-a827-5c9fdb9a81af"]}
        type: object
      resourceID:
        description: ID of the resource that is linked to the service
        example: 90bc7809-b277-4ddf-a827-5c9fdb9a81ad
        type: string
    type: object
  service.CreateSlotRequest:
    properties:
      duration:
        description: In ISO8601 format
        example: PT1H
        type: string
      repeat:
        allOf:
          - $ref: '#/definitions/service.Repeat'
        description: Recurring rule
      startTime:
        description: Start time of the slot in RFC3339 format
        example: '2021-01-01T12:00:00Z'
        type: string
    required:
      - startTime
    type: object
  service.CreateTicketRequest:
    properties:
      metaData:
        additionalProperties: {}
        description: Metadata of the ticket
        type: object
      name:
        description: Name of the ticket
        example: Ticket name
        type: string
    required:
      - name
    type: object
  service.DatesRequest:
    properties:
      duration:
        description: Duration of the timeslot in ISO8601 format (eg. PT1H)
        example: PT1H
        type: string
      from:
        description: Start of the time range in RFC3339 format
        example: '2021-01-01T00:00:00Z'
        type: string
      ignoreBookingID:
        description: >-
          Ignored booking ID. The timeslots that overlap with the times of the
          booking with this ID will not be filtered out. This can be used when
          requesting timeslots for an existing booking, so that the times of the
          existing booking will not cause the available timeslots to be empty.
        example: 3587ccc0-d294-499a-b397-224ec61aafa1
        type: string
      includePastTimes:
        description: Whether to include past timeslots in the response. Defaults to false
        example: false
        type: boolean
      resourceIDs:
        description: IDs of the resources that will be used to filter available timeslots
        example:
          - 3587ccc0-d294-499a-b397-224ec61aafa1
          - dd4f3d7c-7092-454b-a509-a9faf3cbcfe1
        items:
          type: string
        type: array
      spots:
        description: Number of spots that will be requested. Required for `group` services
        example: 2
        type: integer
      tickets:
        additionalProperties:
          type: integer
        description: >-
          A key-value pair of ticket IDs and the number of spots that will be
          requested. Required for `ticket` services
        example:
          3587ccc0-d294-499a-b397-224ec61aafa1: 1
          dd4f3d7c-7092-454b-a509-a9faf3cbcfe1: 2
        type: object
      to:
        description: End of the time range in RFC3339 format
        example: '2021-01-01T23:59:59Z'
        type: string
    required:
      - from
      - to
    type: object
  service.EntityGroupResponse:
    properties:
      color:
        type: string
      companyID:
        type: string
      createdAt:
        type: string
      entityType:
        type: string
      id:
        type: string
      name:
        type: string
      parentGroupID:
        type: string
      position:
        type: integer
      updatedAt:
        type: string
    type: object
  service.Repeat:
    properties:
      rrule:
        description: >-
          Recurring rule in [RFC5545
          format](https://tools.ietf.org/html/rfc5545).
        example: FREQ=WEEKLY;BYDAY=MO,WE,FR
        type: string
      timeZone:
        description: Timezone of the recurring rule in IANA format.
        example: Europe/Madrid
        type: string
      until:
        description: Date and time until the recurring rule is valid. In RFC3339 format.
        example: '2021-02-01T12:00:00Z'
        type: string
    type: object
  service.ResponseWithTickets:
    properties:
      color:
        description: >-
          Color of the service. Can be used to differentiate services in the UI.
          Must be a valid hex color code.
        example: '#FF0000'
        type: string
      companyID:
        description: Identifier for the company this service is associated with.
        example: 53ebf47a-9ddc-4198-8f6d-f9ff6a909158
        type: string
      createdAt:
        description: Date and time when the object was created in RFC3339 format.
        example: '2021-01-01T12:00:00Z'
        type: string
      disabledAt:
        description: Date and time when the object was disabled in RFC3339 format.
        example: '2021-01-01T12:00:00Z'
        type: string
      id:
        description: A unique identifier of the service
        example: 53ebf47a-9ddc-4198-8f6d-f9ff6a909158
        type: string
      metaData:
        additionalProperties: {}
        description: Metadata of the service
        type: object
      name:
        description: Name of the service
        example: Service name
        type: string
      position:
        description: Position of the service in the group
        example: 0
        type: integer
      settings:
        allOf:
          - $ref: '#/definitions/ServiceSettings'
        description: Service settings
      tickets:
        description: >-
          List of tickets associated with the service. Only populated for
          services of type `ticket`.
        items:
          $ref: '#/definitions/TicketResponse'
        type: array
      type:
        description: >-
          Type of the service. Can be one of `fixed`, `flexible`, `group`,
          `ticket`, `days`
        example: fixed
        type: string
      updatedAt:
        description: Date and time when the object was last updated in RFC3339 format.
        example: '2021-01-01T12:00:00Z'
        type: string
    type: object
  service.Tax:
    properties:
      inclusive:
        description: >-
          Indicates if the tax is included in the price. If true, the tax will
          be included in the price. If false, the tax will be added to the
          price.
        example: true
        type: boolean
      rate:
        description: Tax rate. Must be a positive number.
        example: 10
        type: number
    type: object
  service.TimeSlot:
    properties:
      bookedSpots:
        description: >-
          Number of booked spots in the timeslot. Is present only for `ticket`
          and `group` services.
        example: 15
        type: integer
      bookedSpotsPerTicket:
        additionalProperties:
          type: integer
        description: >-
          A key-value pair of ticket IDs and booked spots per ticket type. Is
          present only for `ticket` services.
        type: object
      duration:
        description: Duration of the timeslot in ISO8601 format (eg. PT1H)
        example: PT1H
        type: string
      price:
        allOf:
          - $ref: '#/definitions/service.TimeSlotPrice'
        description: Price of the timeslot
      spotsAvailable:
        description: >-
          Number of spots available in the timeslot. Is present only for
          `ticket` and `group` services.
        example: 2
        type: integer
      startTime:
        description: Start time of the timeslot in RFC3339 format
        example: '2021-01-01T00:00:00Z'
        type: string
      ticketPrices:
        additionalProperties:
          $ref: '#/definitions/service.TimeSlotPrice'
        description: >-
          A key-value pair of ticket IDs and the price of tickets. Is present
          only for `ticket` services.
        type: object
      totalSpots:
        description: >-
          Total capacity of spots in the timeslot. Is present only for `ticket`
          and `group`  services.
        example: 20
        type: integer
      totalSpotsPerTicket:
        additionalProperties:
          type: integer
        description: >-
          A key-value pair of ticket IDs and total capacity per ticket type. Is
          present only for `ticket` services.
        type: object
    type: object
  service.TimeSlotPrice:
    properties:
      amount:
        description: Price amount. In fractional units, e.g. 1000 for 10.00$
        example: 1000
        type: integer
      comparedAmount:
        description: >-
          Compared price amount. Can be used to show the discount amount. In
          fractional units, e.g. 2000 for 20.00$
        example: 2000
        type: integer
      currency:
        description: Currency code in ISO 4217 format
        example: USD
        type: string
    type: object
  service.TimesRequest:
    properties:
      duration:
        description: Duration of the timeslot in ISO8601 format (eg. PT1H)
        example: PT1H
        type: string
      from:
        description: Start of the time range in RFC3339 format
        example: '2021-01-01T00:00:00Z'
        type: string
      ignoreBookingID:
        description: >-
          Ignored booking ID. The timeslots that overlap with the times of the
          booking with this ID will not be filtered out. This can be used when
          requesting timeslots for an existing booking, so that the times of the
          existing booking will not cause the available timeslots to be empty.
        example: 3587ccc0-d294-499a-b397-224ec61aafa1
        type: string
      includePastTimes:
        description: Whether to include past timeslots in the response. Defaults to false
        example: false
        type: boolean
      resourceIDs:
        description: IDs of the resources that will be used to filter available timeslots
        example:
          - 3587ccc0-d294-499a-b397-224ec61aafa1
          - dd4f3d7c-7092-454b-a509-a9faf3cbcfe1
        items:
          type: string
        type: array
      spots:
        description: Number of spots that will be requested. Required for `group` services
        example: 2
        type: integer
      tickets:
        additionalProperties:
          type: integer
        description: >-
          A key-value pair of ticket IDs and the number of spots that will be
          requested. Required for `ticket` services
        example:
          3587ccc0-d294-499a-b397-224ec61aafa1: 1
          dd4f3d7c-7092-454b-a509-a9faf3cbcfe1: 2
        type: object
      to:
        description: End of the time range in RFC3339 format
        example: '2021-01-01T23:59:59Z'
        type: string
    required:
      - from
      - to
    type: object
  service.UpdateEntityGroupRequest:
    properties:
      color:
        type: string
      companyID:
        type: string
      groupID:
        type: string
      name:
        type: string
      parentGroupID:
        type: string
    type: object
  service.UpdateServiceResourceLinkRequest:
    properties:
      relatedResourceIDs:
        additionalProperties:
          items:
            type: string
          type: array
        description: >-
          Key-value pairs where key is the strategy and value is the list of
          related resource IDs.

          When the linked resource is booked, the related resources are also
          booked according to the strategy. There are two strategies: "all" and
          "any". "all" means that all related resources are booked. "any" means
          that any of the related resources can be booked. The default strategy
          is "all".

          Example: {"all": ["90bc7809-b277-4ddf-a827-5c9fdb9a81ad",
          "90bc7809-b277-4ddf-a827-5c9fdb9a81ae"], "any":
          ["90bc7809-b277-4ddf-a827-5c9fdb9a81af"]}
        type: object
    type: object
  service.UpdateServiceSettingsRequest:
    properties:
      availabilityPeriod:
        description: >-
          Availability period for clients. Limits how far into the future
          clients can book. Must be a valid ISO 8601 duration, e.g. `P30D` for
          30 days.
        example: P30D
        type: string
      bookingPolicy:
        description: >-
          Booking policy of the service. Can be one of `confirmation`,
          `instant`, `prepayment`, `deposit`
        example: instant
        type: string
      bufferAfter:
        description: >-
          Buffer time after booking. Must be a valid ISO 8601 duration, e.g.
          `PT1H` for 1 hour.
        example: PT1H
        type: string
      bufferBefore:
        description: >-
          Buffer time before booking. Must be a valid ISO 8601 duration, e.g.
          `PT1H` for 1 hour.
        example: PT1H
        type: string
      checkInTime:
        description: >-
          Check-in time for the service. Must be a valid RFC 3339 duration, e.g.
          `15:00` for 3 PM.
        example: '15:00'
        type: string
      checkOutTime:
        description: >-
          Check-out time for the service. Must be a valid RFC 3339 duration,
          e.g. `11:00` for 11 AM.
        example: '11:00'
        type: string
      currency:
        description: Currency of the service. Must be a valid ISO 4217 currency code.
        example: USD
        type: string
      duration:
        description: >-
          Duration of the service. Must be a valid ISO 8601 duration, e.g.
          `PT1H` for 1 hour.
        example: PT1H
        type: string
      tax:
        description: >-
          Tax settings of the service. Can be used to calculate taxes for the
          service price.
        properties:
          inclusive:
            example: true
            type: boolean
          rate:
            example: 10
            type: number
        type: object
      timeInterval:
        description: >-
          Time interval when service can be booked. Must be a valid ISO 8601
          duration, e.g. `PT30M` for 30 min.
        example: PT1H
        type: string
    type: object
  service.UpdateSlotRequest:
    properties:
      newDuration:
        example: PT1H
        type: string
      newRepeat:
        $ref: '#/definitions/service.Repeat'
      newResourceID:
        example: 53ebf47a-9ddc-4198-8f6d-f9ff6a909158
        type: string
      newStartTime:
        example: '2021-01-01T12:00:00Z'
        type: string
      resourceID:
        description: ID of the resource that is providing the service
        example: 53ebf47a-9ddc-4198-8f6d-f9ff6a909158
        type: string
      startTime:
        example: '2021-01-01T12:00:00Z'
        type: string
      updateStrategy:
        example: single|upcoming
        type: string
    type: object
  subscription.CapacityAvailabilityItem:
    properties:
      active:
        type: integer
      max:
        type: integer
      pending:
        type: integer
      subscriptionID:
        type: string
    type: object
  subscription.ClientAddToCartRequest:
    properties:
      items:
        items:
          $ref: '#/definitions/subscription.ClientRequestItem'
        type: array
    type: object
  subscription.ClientCartResponse:
    properties:
      expiresAt:
        type: string
      items:
        items:
          $ref: '#/definitions/ClientSubscriptionContract'
        type: array
    type: object
  subscription.ClientRequestItem:
    properties:
      metaData:
        additionalProperties: {}
        description: Optional. If you want to pass some additional data to the purchase.
        type: object
      subscriptionID:
        type: string
    type: object
  subscription.ClientSubscriptionRenewHistoryItem:
    properties:
      date:
        type: string
      type:
        type: string
    type: object
  subscription.ClientSubscriptionsRenewRequest:
    properties:
      allowPartialRenewal:
        type: boolean
      ids:
        items:
          type: string
        type: array
    type: object
  subscription.CompanySubscriptionClient:
    properties:
      availableFrom:
        type: string
      availableTo:
        type: string
      comparedPrice:
        type: integer
      currency:
        type: string
      duration:
        type: string
      id:
        type: string
      limitations:
        $ref: >-
          #/definitions/github_com_bookla-app_platform_api_platform_plugins_subscription.Limitations
      metaData:
        additionalProperties: {}
        type: object
      price:
        type: integer
      rRule:
        type: string
      recurringEnabled:
        type: boolean
      recurringInterval:
        type: string
      recurringIntervalCount:
        type: integer
      recurringProvider:
        type: string
      resourceIDs:
        items:
          type: string
        type: array
      rollOverSettings:
        $ref: >-
          #/definitions/github_com_bookla-app_platform_api_platform_plugins_subscription.RollOverSettings
      serviceIDs:
        items:
          type: string
        type: array
      title:
        type: string
    type: object
  subscription.CreateLimitations:
    properties:
      bookingsCount:
        description: For visit-based subscriptions
        type: integer
      daysOfWeek:
        type: integer
      maxDuration:
        type: string
      maxSpotsPerBooking:
        description: group bookings
        type: integer
      maxTicketsPerBooking:
        additionalProperties:
          type: integer
        description: ticket bookings
        type: object
      times:
        items:
          $ref: >-
            #/definitions/github_com_bookla-app_platform_api_platform_plugins_subscription.Times
        type: array
      totalDuration:
        description: >-
          For duration-based subscriptions (ISO 8601 format, e.g., PT8H for 8
          hours)
        type: string
    type: object
externalDocs:
  description: OpenAPI
  url: https://swagger.io/resources/open-api/
host: eu.bookla.com
info:
  contact:
    email: support@bookla.com
    name: API Support
    url: https://bookla.com/support
  description: This is the API documentation for the Bookla Platform API.
  termsOfService: https://bookla.com/terms/
  title: Bookla Platform API
  version: '1.0'
paths:
  /api-keys:
    get:
      consumes:
        - application/json
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            items:
              $ref: '#/definitions/CreateAPIKeyResponse'
            type: array
        '401':
          description: Unauthorized
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      summary: List all API keys
      tags:
        - Merchant
        - Developer
    post:
      consumes:
        - application/json
      parameters:
        - description: API key data
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/CreateAPIKeyRequest'
      produces:
        - application/json
      responses:
        '201':
          description: Created
          schema:
            $ref: '#/definitions/CreateAPIKeyResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '401':
          description: Unauthorized
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      summary: Create a new API key
      tags:
        - Merchant
        - Developer
  /api-keys/{id}:
    delete:
      parameters:
        - description: API key ID
          format: uuid
          in: path
          name: id
          required: true
          type: string
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '401':
          description: Unauthorized
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      summary: Delete an API key
      tags:
        - Merchant
        - Developer
  /client/auth/login:
    post:
      consumes:
        - application/json
      operationId: ClientLogin
      parameters:
        - description: Client login request
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/ClientLoginRequest'
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/ClientAuthResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      summary: Client authorization
      tags:
        - Client
        - ClientAuth
  /client/auth/refresh:
    post:
      consumes:
        - application/json
      operationId: ClientRefreshToken
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/ClientAuthResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - BearerAuth: []
      summary: Client refresh token
      tags:
        - Client
        - ClientAuth
  /client/bookings:
    get:
      description: Get client bookings
      parameters:
        - description: Limit
          in: query
          name: limit
          type: integer
        - description: Offset
          in: query
          name: offset
          type: integer
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/ClientBookingListResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '401':
          description: Unauthorized
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - BearerAuth: []
      summary: Get client bookings
      tags:
        - Client
        - ClientBooking
    post:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Booking request
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/ClientBookingRequest'
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/ClientBookingResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '401':
          description: Unauthorized
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - BearerAuth: []
      summary: Request booking
      tags:
        - Client
        - ClientBooking
  /client/bookings/{booking_id}:
    get:
      description: Get client booking
      parameters:
        - description: Booking ID
          in: path
          name: booking_id
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/ClientBookingResponse'
      security:
        - BearerAuth: []
      summary: Get client booking
      tags:
        - Client
        - ClientBooking
  /client/bookings/{booking_id}/cancel:
    post:
      consumes:
        - application/json
      parameters:
        - description: Booking ID
          in: path
          name: booking_id
          required: true
          type: string
        - description: Cancel booking request
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/CancelClientBookingRequest'
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/ClientBookingResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '401':
          description: Unauthorized
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - BearerAuth: []
      summary: Cancel booking
      tags:
        - Client
        - ClientBooking
  /client/bookings/bulk:
    post:
      consumes:
        - application/json
      parameters:
        - description: Bulk booking request
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/ClientBulkBookingRequest'
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/ClientBulkBookingResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '401':
          description: Unauthorized
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - BearerAuth: []
      summary: Request multiple bookings with single payment
      tags:
        - Client
        - ClientBooking
  /client/codes/{code}/validate:
    post:
      consumes:
        - application/json
      parameters:
        - description: Code
          in: path
          name: code
          required: true
          type: string
        - description: Code validate request
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/ClientCodeValidateRequest'
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/client.CodeValidateResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '401':
          description: Unauthorized
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - BearerAuth: []
      summary: Validate code before booking
      tags:
        - Client
        - ClientBooking
  /client/companies/{company_id}/resources:
    get:
      operationId: clientResources
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            items:
              $ref: '#/definitions/ClientResourceResponse'
            type: array
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Get list of resources
      tags:
        - Client
        - ClientResource
  /client/companies/{company_id}/resources/{resource_id}:
    get:
      operationId: clientResource
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Resource ID
          in: path
          name: resource_id
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/ClientResourceResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Get one resource
      tags:
        - Client
        - ClientResource
  /client/companies/{company_id}/services:
    get:
      operationId: clientServices
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            items:
              $ref: '#/definitions/ClientServiceResponse'
            type: array
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Get list of services
      tags:
        - Client
        - ClientService
  /client/companies/{company_id}/services/{service_id}:
    get:
      operationId: clientOneService
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Service ID
          in: path
          name: service_id
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/ClientServiceResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Get one service
      tags:
        - Client
        - ClientService
  /client/companies/{company_id}/services/{service_id}/dates:
    post:
      consumes:
        - application/json
      operationId: clientServiceDates
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Service ID
          in: path
          name: service_id
          required: true
          type: string
        - description: Times data
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/ClientTimesRequest'
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/TimesResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '409':
          description: Conflict
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Get available dates for service
      tags:
        - Client
        - ClientService
  /client/companies/{company_id}/services/{service_id}/times:
    post:
      consumes:
        - application/json
      operationId: clientServiceTimes
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Service ID
          in: path
          name: service_id
          required: true
          type: string
        - description: Times data
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/ClientTimesRequest'
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/TimesResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '409':
          description: Conflict
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Get available times for service
      tags:
        - Client
        - ClientService
  /client/payments:
    get:
      operationId: clientPayments
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/TransactionsListResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '401':
          description: Unauthorized
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Get client payments
      tags:
        - Client
        - ClientProfile
  /client/payments/{transaction_id}:
    get:
      operationId: clientOnePayment
      parameters:
        - description: Transaction ID
          in: path
          name: transaction_id
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/TransactionResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '401':
          description: Unauthorized
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Get client payment
      tags:
        - Client
        - ClientProfile
  /client/profile:
    get:
      operationId: clientProfile
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/ClientResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '401':
          description: Unauthorized
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Get client profile
      tags:
        - Client
        - ClientProfile
  /companies:
    get:
      consumes:
        - application/json
      description: Method to get list of companies for merchant
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            items:
              $ref: '#/definitions/company.CreateCompanyResponse'
            type: array
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: List companies
      tags:
        - Merchant
        - Company
    post:
      consumes:
        - application/json
      description: Method to create a company for merchant
      parameters:
        - description: Company data
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/company.CreateCompanyRequest'
      produces:
        - application/json
      responses:
        '201':
          description: Created
          schema:
            $ref: '#/definitions/company.CreateCompanyResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Create company
      tags:
        - Merchant
        - Company
  /companies/{company_id}:
    delete:
      description: Method to delete company for merchant
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Delete company
      tags:
        - Merchant
        - Company
  /companies/{company_id}/bookings:
    delete:
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Booking ID
          format: uuid
          in: path
          name: booking_id
          required: true
          type: string
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '409':
          description: Conflict
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Delete booking
      tags:
        - Merchant
        - Booking
    get:
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Client ID to filter by.
          in: query
          name: clientID
          type: string
        - description: From date and time in RFC3339 format.
          in: query
          name: from
          type: string
        - description: Whether to include failed bookings. Default is false.
          in: query
          name: includeFailures
          type: boolean
        - description: Limit the number of results. Default is 100.
          in: query
          name: limit
          type: integer
        - description: Offset the results. Default is 0.
          in: query
          name: offset
          type: integer
        - description: List of resource IDs to filter by seperated by comma.
          in: query
          name: resourceIDs
          type: string
        - description: List of service IDs to filter by seperated by comma.
          in: query
          name: serviceIDs
          type: string
        - description: >-
            List of booking statuses to filter by separated by comma (e.g.,
            "confirmed,pending"). Valid statuses: pending, confirmed, finished,
            cancelled, no_show, rejected, failed.
          in: query
          name: statuses
          type: string
        - description: To date and time in RFC3339 format.
          in: query
          name: to
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/booking.GetBookingsResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Get bookings
      tags:
        - Merchant
        - Booking
    post:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Booking data
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/booking.CreateBookingRequest'
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/BookingResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '409':
          description: Conflict
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Create a booking
      tags:
        - Merchant
        - Booking
  /companies/{company_id}/bookings/{booking_id}:
    get:
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Booking ID
          format: uuid
          in: path
          name: booking_id
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/BookingResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Get one booking
      tags:
        - Merchant
        - Booking
    patch:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Booking ID
          format: uuid
          in: path
          name: booking_id
          required: true
          type: string
        - description: Update booking data
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/UpdateBookingRequest'
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/BookingResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '409':
          description: Conflict
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Update booking
      tags:
        - Merchant
        - Booking
  /companies/{company_id}/bookings/{booking_id}/move:
    post:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Booking ID
          format: uuid
          in: path
          name: booking_id
          required: true
          type: string
        - description: Move booking data
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/booking.MoveBookingRequest'
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/BookingResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '409':
          description: Conflict
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Move a booking
      tags:
        - Merchant
        - Booking
  /companies/{company_id}/clients:
    get:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Limit the number of clients returned, 100 is the maximum.
          in: query
          name: limit
          type: integer
        - description: Offset the list of clients by this amount.
          in: query
          name: offset
          type: integer
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/ClientListResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '409':
          description: Conflict
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Get list of clients
      tags:
        - Merchant
        - Clients
    post:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Client create data
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/ClientCreateRequest'
      produces:
        - application/json
      responses:
        '201':
          description: Created
          schema:
            $ref: '#/definitions/ClientResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '409':
          description: Conflict
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Create client
      tags:
        - Merchant
        - Clients
  /companies/{company_id}/clients/{client_id}:
    delete:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Client ID
          format: uuid
          in: path
          name: client_id
          required: true
          type: string
      produces:
        - application/json
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Delete client
      tags:
        - Merchant
        - Clients
    patch:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Client ID
          format: uuid
          in: path
          name: client_id
          required: true
          type: string
        - description: Client update data
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/auth.ClientUpdateRequest'
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/ClientResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '409':
          description: Conflict
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Update client
      tags:
        - Merchant
        - Clients
  /companies/{company_id}/clients/search:
    get:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: ClientID is the unique identifier of the client in Bookla
          in: query
          name: clientID
          type: string
        - description: Email is the email address of the user.
          in: query
          name: email
          type: string
        - description: ExternalUserID is the unique identifier of the user in your system.
          in: query
          name: externalUserID
          type: string
        - description: >-
            Query is a search string to search for clients by first name, last
            name, email and metadata.
          in: query
          name: query
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            items:
              $ref: '#/definitions/ClientResponse'
            type: array
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '409':
          description: Conflict
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Search for clients by clientID, externalUserID or email
      tags:
        - Merchant
        - Clients
  /companies/{company_id}/closing-periods/range:
    post:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Request body with resource IDs and date range
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/ListClosingPeriodInRangeRequest'
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/ListClosingPeriodInRangeResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '401':
          description: Unauthorized
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      summary: List closing periods within a date range
      tags:
        - Merchant
        - ClosingPeriod
  /companies/{company_id}/entity-groups:
    get:
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Entity type (service, resource, subscription, ticket)
          in: query
          name: entity_type
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            items:
              $ref: '#/definitions/service.EntityGroupResponse'
            type: array
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: List entity groups
      tags:
        - Merchant
        - EntityGroup
    post:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Entity group data
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/service.CreateEntityGroupRequest'
      produces:
        - application/json
      responses:
        '201':
          description: Created
          schema:
            $ref: '#/definitions/service.EntityGroupResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Create entity group
      tags:
        - Merchant
        - EntityGroup
  /companies/{company_id}/entity-groups/{group_id}:
    delete:
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Group ID
          format: uuid
          in: path
          name: group_id
          required: true
          type: string
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Delete entity group
      tags:
        - Merchant
        - EntityGroup
    patch:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Group ID
          format: uuid
          in: path
          name: group_id
          required: true
          type: string
        - description: Update entity group data
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/service.UpdateEntityGroupRequest'
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/service.EntityGroupResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Update entity group
      tags:
        - Merchant
        - EntityGroup
  /companies/{company_id}/entity-groups/structure:
    put:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Bulk update data
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/service.BulkUpdateStructureRequest'
      produces:
        - application/json
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Bulk update entity structure (drag-drop, reorder)
      tags:
        - Merchant
        - EntityGroup
  /companies/{company_id}/payment/settings:
    get:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/payment.CompanyPaymentSettingsResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '409':
          description: Conflict
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Get company settings
      tags:
        - Payment
    patch:
      consumes:
        - application/json
      description: >-
        Update specific configuration fields for an already-configured payment
        provider without re-registering webhooks
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: patch payment settings data
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/direct.PatchCompanyPaymentSettingsRequest'
      produces:
        - application/json
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Patch company payment settings
      tags:
        - Payment
    put:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: payment settings data
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/direct.UpdateCompanyPaymentSettingsRequest'
      produces:
        - application/json
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '409':
          description: Conflict
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Update company payment settings
      tags:
        - Payment
  /companies/{company_id}/payment/settings/{provider}:
    delete:
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Provider
          enum:
            - stripe
            - klix
            - decta
          in: path
          name: provider
          required: true
          type: string
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '409':
          description: Conflict
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Delete company payment settings for provider
      tags:
        - Payment
  /companies/{company_id}/payment/settings/preferred-provider:
    put:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: payment provider data
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/direct.UpdateCompanyPreferredPaymentProviderRequest'
      produces:
        - application/json
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '409':
          description: Conflict
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Update company preferred payment provider
      tags:
        - Payment
  /companies/{company_id}/payments:
    get:
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: From date and time in RFC3339 format.
          in: query
          name: from
          type: string
        - description: List of transaction IDs to filter by seperated by comma.
          in: query
          name: ids
          type: string
        - description: Item IDs to filter by seperated by comma.
          in: query
          name: itemIDs
          type: string
        - description: Limit the number of results. Default is 100.
          in: query
          name: limit
          type: integer
        - description: Offset the results. Default is 0.
          in: query
          name: offset
          type: integer
        - description: List of plugin namespaces to filter by seperated by comma.
          in: query
          name: pluginNamespaces
          type: string
        - description: List of provider types to filter by seperated by comma.
          in: query
          name: providerTypes
          type: string
        - description: List of statuses to filter by seperated by comma.
          in: query
          name: statuses
          type: string
        - description: To date and time in RFC3339 format.
          in: query
          name: to
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/TransactionsListResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '409':
          description: Conflict
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Get company payments list
      tags:
        - Merchant
        - Payments
  /companies/{company_id}/payments/verify-signature:
    get:
      description: >-
        Verifies the HMAC-SHA256 signature of a payment redirect URL to ensure
        authenticity and prevent tampering
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/direct.VerifySignatureResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      summary: Verify payment redirect URL signature
      tags:
        - Public
        - Payments
  /companies/{company_id}/pdf-templates:
    post:
      consumes:
        - multipart/form-data
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: companyID
          required: true
          type: string
        - description: Entity type (gift_card or membership)
          in: path
          name: entityType
          required: true
          type: string
        - description: Entity ID (gift card or membership ID)
          format: uuid
          in: path
          name: entityID
          required: true
          type: string
        - description: PDF template file
          in: formData
          name: file
          required: true
          type: file
        - description: JSON array of field definitions
          in: formData
          name: fields
          required: true
          type: string
      produces:
        - application/json
      responses:
        '201':
          description: Created
          schema:
            $ref: '#/definitions/PDFTemplateMessageResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Create PDF template
      tags:
        - Merchant
        - PDF Templates
  /companies/{company_id}/pdf-templates/{entity_type}:
    get:
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: companyID
          required: true
          type: string
        - description: Entity type (gift_card or membership)
          in: path
          name: entityType
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            items:
              $ref: '#/definitions/PDFTemplateResponse'
            type: array
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: List PDF templates
      tags:
        - Merchant
        - PDF Templates
  /companies/{company_id}/pdf-templates/{entity_type}/{entity_id}:
    delete:
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: companyID
          required: true
          type: string
        - description: Entity type (gift_card or membership)
          in: path
          name: entityType
          required: true
          type: string
        - description: Entity ID (gift card or membership ID)
          format: uuid
          in: path
          name: entityID
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/PDFTemplateMessageResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Delete PDF template
      tags:
        - Merchant
        - PDF Templates
    get:
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Entity type (gift_card or membership)
          in: path
          name: entity_type
          required: true
          type: string
        - description: Entity ID (gift card or membership ID)
          format: uuid
          in: path
          name: entity_id
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/PDFTemplateResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Get PDF template
      tags:
        - Merchant
        - PDF Templates
    patch:
      consumes:
        - multipart/form-data
      description: >-
        Update PDF template fields and/or PDF file. Both parameters are optional
        - you can update just fields, just the PDF, or both.
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Entity type (gift_card or membership)
          in: path
          name: entity_type
          required: true
          type: string
        - description: Entity ID (gift card or membership ID)
          format: uuid
          in: path
          name: entity_id
          required: true
          type: string
        - description: PDF template file (optional)
          in: formData
          name: file
          type: file
        - description: JSON array of field definitions (optional)
          in: formData
          name: fields
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/PDFTemplateMessageResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Update PDF template (partial update)
      tags:
        - Merchant
        - PDF Templates
  /companies/{company_id}/pdf-templates/{entity_type}/{entity_id}/pdf:
    get:
      description: >-
        Downloads the original template PDF file from S3 (without generated
        data)
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: companyID
          required: true
          type: string
        - description: Entity type (gift_card or membership)
          in: path
          name: entityType
          required: true
          type: string
        - description: Entity ID (gift card or membership ID)
          format: uuid
          in: path
          name: entityID
          required: true
          type: string
      produces:
        - application/pdf
      responses:
        '200':
          description: OK
          schema:
            type: file
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Download template PDF file
      tags:
        - Merchant
        - PDF Templates
  /companies/{company_id}/pdf-templates/{entity_type}/{entity_id}/pdf/{item_id}:
    get:
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: companyID
          required: true
          type: string
        - description: Entity type (gift_card or membership)
          in: path
          name: entityType
          required: true
          type: string
        - description: Entity ID (gift card or membership ID)
          format: uuid
          in: path
          name: entityID
          required: true
          type: string
        - description: Item ID (gift card purchase ID or membership purchase ID)
          format: uuid
          in: path
          name: itemID
          required: true
          type: string
      produces:
        - application/pdf
      responses:
        '200':
          description: OK
          schema:
            type: file
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Download entity PDF
      tags:
        - Client
        - PDF Templates
  /companies/{company_id}/pdf-templates/{entity_type}/demo:
    get:
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: companyID
          required: true
          type: string
        - description: Entity type (gift_card or membership)
          in: path
          name: entityType
          required: true
          type: string
      produces:
        - application/pdf
      responses:
        '200':
          description: OK
          schema:
            type: file
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Generate demo PDF with sample values
      tags:
        - Merchant
        - PDF Templates
  /companies/{company_id}/plugins/giftcards/client/giftcards:
    get:
      parameters:
        - description: Company ID
          in: path
          name: companyID
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: List of available gift cards
          schema:
            items:
              $ref: '#/definitions/GiftCardResponse'
            type: array
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      summary: List available gift cards for clients
      tags:
        - Client
        - ClientGiftCards
  /companies/{company_id}/plugins/giftcards/client/orders:
    get:
      parameters:
        - description: Company ID
          in: path
          name: companyID
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: List of client's gift card purchases
          schema:
            items:
              $ref: '#/definitions/ClientGiftCardPurchaseResponse'
            type: array
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - BearerAuth: []
      summary: List client's gift card purchases
      tags:
        - Client
        - ClientGiftCards
    post:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          in: path
          name: companyID
          required: true
          type: string
        - description: Purchase details
          in: body
          name: purchase
          required: true
          schema:
            $ref: '#/definitions/ClientGiftCardPurchaseRequest'
      produces:
        - application/json
      responses:
        '200':
          description: Details of the gift card purchase
          schema:
            $ref: '#/definitions/ClientGiftCardPurchaseResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - BearerAuth: []
      summary: Make a gift card purchase
      tags:
        - Client
        - ClientGiftCards
  /companies/{company_id}/plugins/giftcards/client/orders/{itemID}:
    get:
      parameters:
        - description: Company ID
          in: path
          name: companyID
          required: true
          type: string
        - description: Purchase ID
          in: path
          name: itemID
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: Details of the gift card purchase
          schema:
            $ref: '#/definitions/ClientGiftCardPurchaseResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - BearerAuth: []
      summary: Get one gift card purchase for client
      tags:
        - Client
        - ClientGiftCards
  /companies/{company_id}/plugins/giftcards/list:
    get:
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: List of gift cards
          schema:
            items:
              $ref: '#/definitions/GiftCardResponse'
            type: array
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      summary: List of gift cards in company
      tags:
        - Merchant
        - GiftCards
    post:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Create gift card request
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/CreateGiftCardRequest'
      produces:
        - application/json
      responses:
        '201':
          description: Created
          schema:
            $ref: '#/definitions/GiftCardResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '409':
          description: Conflict
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Create a new gift card
      tags:
        - Merchant
        - GiftCards
  /companies/{company_id}/plugins/giftcards/list/{gift_card_ad}:
    patch:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Gift Card ID
          in: path
          name: gift_card_id
          required: true
          type: string
        - description: Update gift card request
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/UpdateGiftCardRequest'
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/GiftCardResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Update a gift card
      tags:
        - Merchant
        - GiftCards
  /companies/{company_id}/plugins/giftcards/list/{gift_card_id}/archive:
    patch:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Gift Card ID
          in: path
          name: gift_card_id
          required: true
          type: string
        - description: Archive gift card request
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/giftcards.ArchiveRequest'
      produces:
        - application/json
      responses:
        '204':
          description: Gift card archived successfully
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Archive a gift card
      tags:
        - Merchant
        - GiftCards
  /companies/{company_id}/plugins/giftcards/orders:
    post:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Create gift card contract request
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/CreateGiftCardPurchaseRequest'
      produces:
        - application/json
      responses:
        '201':
          description: Created
          schema:
            $ref: '#/definitions/GiftCardPurchaseResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Create a new gift card contract
      tags:
        - Merchant
        - GiftCards
  /companies/{company_id}/plugins/giftcards/orders/{contract_id}:
    delete:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Contract ID
          in: path
          name: contract_id
          required: true
          type: string
      produces:
        - application/json
      responses:
        '204':
          description: Purchase deleted successfully
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Delete a gift card contract
      tags:
        - Merchant
        - GiftCards
  /companies/{company_id}/plugins/giftcards/orders/{contract_id}/usages:
    get:
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Contract ID
          in: path
          name: contract_id
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: List of gift card usages
          schema:
            items:
              $ref: '#/definitions/GiftCardUsageResponse'
            type: array
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      summary: List usages of a gift card
      tags:
        - Merchant
        - GiftCards
    post:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Contract ID
          in: path
          name: contract_id
          required: true
          type: string
        - description: Create gift card usage request
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/CreateGiftCardUsageRequest'
      produces:
        - application/json
      responses:
        '201':
          description: Created
          schema:
            $ref: '#/definitions/GiftCardUsageResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Create a new gift card usage
      tags:
        - Merchant
        - GiftCards
  /companies/{company_id}/plugins/giftcards/orders/{contract_id}/usages/{usage_id}:
    delete:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Contract ID
          in: path
          name: contract_id
          required: true
          type: string
        - description: Usage ID
          in: path
          name: usage_id
          required: true
          type: string
      produces:
        - application/json
      responses:
        '204':
          description: Usage deleted successfully
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Delete a gift card usage
      tags:
        - Merchant
        - GiftCards
    patch:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Contract ID
          in: path
          name: contract_id
          required: true
          type: string
        - description: Usage ID
          in: path
          name: usage_id
          required: true
          type: string
        - description: Update gift card usage request
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/giftcards.UpdateUsageRequest'
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/GiftCardUsageResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '409':
          description: Conflict
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Update a gift card usage
      tags:
        - Merchant
        - GiftCards
  /companies/{company_id}/plugins/giftcards/orders/search:
    post:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Search gift card contracts request
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/SearchGiftCardPurchasesRequest'
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/GiftCardPurchasesPageResult'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Search gift card contracts
      tags:
        - Merchant
        - GiftCards
  /companies/{company_id}/plugins/promocodes/client/validate:
    post:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Validate promo code request
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/ValidatePromoCodeRequest'
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/ValidatePromoCodeResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Validate promo code for a booking
      tags:
        - Client
        - PromoCodes
  /companies/{company_id}/plugins/promocodes/list:
    get:
      parameters:
        - description: Company ID
          in: path
          name: companyID
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            items:
              $ref: '#/definitions/PromoCodeResponse'
            type: array
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: List of promo codes in company
      tags:
        - Merchant
        - PromoCodes
    post:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Create promo code request
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/CreatePromoCodeRequest'
      produces:
        - application/json
      responses:
        '201':
          description: Created
          schema:
            $ref: '#/definitions/PromoCodeResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '409':
          description: Conflict
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Create a new promo code
      tags:
        - Merchant
        - PromoCodes
  /companies/{company_id}/plugins/promocodes/list/{promoCodeID}:
    delete:
      parameters:
        - description: Company ID
          in: path
          name: companyID
          required: true
          type: string
        - description: Promo Code ID
          in: path
          name: promoCodeID
          required: true
          type: string
      produces:
        - application/json
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Delete promo code
      tags:
        - Merchant
        - PromoCodes
    get:
      parameters:
        - description: Company ID
          in: path
          name: companyID
          required: true
          type: string
        - description: Promo Code ID
          in: path
          name: promoCodeID
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/PromoCodeResponse'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Get one promo code
      tags:
        - Merchant
        - PromoCodes
    patch:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          in: path
          name: companyID
          required: true
          type: string
        - description: Promo Code ID
          in: path
          name: promoCodeID
          required: true
          type: string
        - description: Update promo code request
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/UpdatePromoCodeRequest'
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/PromoCodeResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Update promo code
      tags:
        - Merchant
        - PromoCodes
  /companies/{company_id}/plugins/promocodes/list/{promoCodeID}/archive:
    patch:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          in: path
          name: companyID
          required: true
          type: string
        - description: Promo Code ID
          in: path
          name: promoCodeID
          required: true
          type: string
        - description: Archive request
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/promocodes.ArchiveRequest'
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/PromoCodeResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Archive or unarchive promo code
      tags:
        - Merchant
        - PromoCodes
  /companies/{company_id}/plugins/promocodes/list/{promoCodeID}/usages:
    get:
      parameters:
        - description: Company ID
          in: path
          name: companyID
          required: true
          type: string
        - description: Promo Code ID
          in: path
          name: promoCodeID
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            items:
              $ref: '#/definitions/PromoCodeUsageResponse'
            type: array
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: List usages for a promo code
      tags:
        - Merchant
        - PromoCodes
  /companies/{company_id}/plugins/subscription/capacity:
    get:
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Subscription IDs
          in: query
          name: subscription_ids
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            items:
              $ref: '#/definitions/CreateSubscriptionCapacityRuleResponse'
            type: array
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Get capacity rules for subscriptions
      tags:
        - Merchant
        - Subscription
    post:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Create capacity rule request
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/CreateSubscriptionCapacityRuleRequest'
      produces:
        - application/json
      responses:
        '201':
          description: Created
          schema:
            $ref: '#/definitions/CreateSubscriptionCapacityRuleResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Create capacity rule for subscriptions
      tags:
        - Merchant
        - Subscription
  /companies/{company_id}/plugins/subscription/capacity/{item_id}:
    delete:
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Capacity rule ID
          in: path
          name: item_id
          required: true
          type: string
      produces:
        - application/json
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Delete capacity rule for subscriptions
      tags:
        - Merchant
        - Subscription
    patch:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Capacity rule ID
          in: path
          name: item_id
          required: true
          type: string
        - description: Update capacity rule request
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/UpdateSubscriptionCapacityRuleRequest'
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/CreateSubscriptionCapacityRuleResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Update capacity rule for subscriptions
      tags:
        - Merchant
        - Subscription
  /companies/{company_id}/plugins/subscription/capacity/availability:
    get:
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Subscription IDs
          in: query
          name: subscription_ids
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/SubscriptionCapacityAvailabilityResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Get capacity availability for subscriptions
      tags:
        - Merchant
        - Subscription
  /companies/{company_id}/plugins/subscription/client/cart:
    get:
      parameters:
        - description: Company ID
          in: path
          name: companyID
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/subscription.ClientCartResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - BearerAuth: []
      summary: Get client subscriptions cart in company
      tags:
        - Client
        - ClientSubscription
    post:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          in: path
          name: companyID
          required: true
          type: string
        - description: Request body
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/subscription.ClientAddToCartRequest'
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/subscription.ClientCartResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '409':
          description: Conflict
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - BearerAuth: []
      summary: Add item to client subscriptions cart in company
      tags:
        - Client
        - ClientSubscription
  /companies/{company_id}/plugins/subscription/client/cart/{item_id}:
    delete:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          in: path
          name: companyID
          required: true
          type: string
        - description: Item ID
          in: path
          name: item_id
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/subscription.ClientCartResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - BearerAuth: []
      summary: Delete item from client subscriptions cart in company
      tags:
        - Client
        - ClientSubscription
  /companies/{company_id}/plugins/subscription/client/cart/checkout:
    post:
      parameters:
        - description: Company ID
          in: path
          name: companyID
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/ClientPurchaseSubscriptionsResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '409':
          description: Conflict
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - BearerAuth: []
      summary: Checkout client subscriptions cart in company
      tags:
        - Client
        - ClientSubscription
  /companies/{company_id}/plugins/subscription/client/purchases:
    get:
      parameters:
        - description: Company ID
          in: path
          name: companyID
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            items:
              $ref: '#/definitions/ClientSubscriptionContract'
            type: array
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - BearerAuth: []
      summary: Get list of purchased subscriptions for client in company
      tags:
        - Client
        - ClientSubscription
    post:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          in: path
          name: companyID
          required: true
          type: string
        - description: Request body
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/ClientSubscriptionsPurchaseRequest'
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/ClientPurchaseSubscriptionsResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '409':
          description: Conflict
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - BearerAuth and ApiKeyAuth: []
      summary: Purchase subscriptions for client in company
      tags:
        - Client
        - ClientSubscription
  /companies/{company_id}/plugins/subscription/client/purchases/{item_id}:
    get:
      parameters:
        - description: Company ID
          in: path
          name: companyID
          required: true
          type: string
        - description: Item ID
          in: path
          name: itemID
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/ClientSubscriptionContract'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - BearerAuth: []
      summary: Get one purchased subscription for client in company
      tags:
        - Client
        - ClientSubscription
  /companies/{company_id}/plugins/subscription/client/purchases/renew:
    post:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          in: path
          name: companyID
          required: true
          type: string
        - description: Request body
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/subscription.ClientSubscriptionsRenewRequest'
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/ClientPurchaseSubscriptionsResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '409':
          description: Conflict
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - BearerAuth: []
      summary: Renew purchased subscriptions for client in company
      tags:
        - Client
        - ClientSubscription
  /companies/{company_id}/plugins/subscription/client/subscriptions:
    get:
      parameters:
        - description: Company ID
          in: path
          name: companyID
          required: true
          type: string
        - collectionFormat: csv
          description: Subscription IDs
          in: query
          items:
            type: string
          name: ids
          type: array
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            items:
              $ref: '#/definitions/subscription.CompanySubscriptionClient'
            type: array
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Get list of available subscriptions for client in company
      tags:
        - Client
        - ClientSubscription
  /companies/{company_id}/plugins/subscription/contracts/{item_id}:
    delete:
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Subscription contract ID
          in: path
          name: item_id
          required: true
          type: string
      produces:
        - application/json
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Delete client subscription contract
      tags:
        - Merchant
        - Subscription
    get:
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Subscription contract ID
          in: path
          name: item_id
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/ClientSubscriptionContract'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Get client subscription contract
      tags:
        - Merchant
        - Subscription
    patch:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Subscription contract ID
          in: path
          name: item_id
          required: true
          type: string
        - description: Create subscription contract request
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/UpdateSubscriptionContractRequest'
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/ClientSubscriptionContract'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Update client subscription contract
      tags:
        - Merchant
        - Subscription
  /companies/{company_id}/plugins/subscription/contracts/{item_id}/visits-ledger:
    get:
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Subscription contract ID
          in: path
          name: item_id
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            items:
              $ref: '#/definitions/ContractVisitTransactionResponse'
            type: array
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Get visit transactions log for a subscription contract
      tags:
        - Merchant
        - Subscription
    post:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Subscription contract ID
          in: path
          name: item_id
          required: true
          type: string
        - description: Add visit transaction request
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/AddVisitTransactionRequest'
      produces:
        - application/json
      responses:
        '201':
          description: Created
          schema:
            $ref: '#/definitions/ContractVisitTransactionResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Add visit transaction to a subscription contract
      tags:
        - Merchant
        - Subscription
  /companies/{company_id}/plugins/subscription/contracts/search:
    post:
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Search contracts request
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/SearchSubscriptionContractsRequest'
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            items:
              $ref: '#/definitions/SubscriptionContractsPageResult'
            type: array
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Search contracts in company
      tags:
        - Merchant
        - Subscription
  /companies/{company_id}/plugins/subscription/list:
    get:
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            items:
              $ref: '#/definitions/SubscriptionResponse'
            type: array
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: List of subscriptions in company
      tags:
        - Merchant
        - Subscription
    post:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Create subscription request
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/SubscriptionCreateRequest'
      produces:
        - application/json
      responses:
        '201':
          description: Created
          schema:
            $ref: '#/definitions/SubscriptionResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '409':
          description: Conflict
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Create a new subscription
      tags:
        - Merchant
        - Subscription
  /companies/{company_id}/plugins/subscription/list/{subscription_id}:
    delete:
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Subscription ID
          in: path
          name: subscription_id
          required: true
          type: string
      produces:
        - application/json
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Delete a subscription
      tags:
        - Merchant
        - Subscription
    get:
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Subscription ID
          in: path
          name: subscription_id
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/SubscriptionResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Get one subscription
      tags:
        - Merchant
        - Subscription
    patch:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Subscription ID
          in: path
          name: subscription_id
          required: true
          type: string
        - description: Update subscription request
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/SubscriptionUpdateRequest'
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/SubscriptionResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Update a subscription
      tags:
        - Merchant
        - Subscription
  /companies/{company_id}/plugins/subscription/list/{subscription_id}/contracts:
    post:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Subscription ID
          in: path
          name: subscription_id
          required: true
          type: string
        - description: Create subscription contract request
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/CreateSubscriptionContractRequest'
      produces:
        - application/json
      responses:
        '201':
          description: Created
          schema:
            $ref: '#/definitions/ClientSubscriptionContract'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Create client subscription contract
      tags:
        - Merchant
        - Subscription
  /companies/{company_id}/plugins/subscription/prices:
    get:
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Subscription IDs
          in: query
          name: subscription_ids
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            items:
              $ref: '#/definitions/CreateSubscriptionPriceRuleResponse'
            type: array
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Get price rules for subscriptions
      tags:
        - Merchant
        - Subscription
    post:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Create price rule request
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/CreateSubscriptionPriceRuleRequest'
      produces:
        - application/json
      responses:
        '201':
          description: Created
          schema:
            $ref: '#/definitions/CreateSubscriptionPriceRuleResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Create price rule for subscriptions
      tags:
        - Merchant
        - Subscription
  /companies/{company_id}/plugins/subscription/prices/{item_id}:
    delete:
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Price rule ID
          in: path
          name: item_id
          required: true
          type: string
      produces:
        - application/json
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Delete price rule for subscriptions
      tags:
        - Merchant
        - Subscription
    patch:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Price rule ID
          in: path
          name: item_id
          required: true
          type: string
        - description: Update price rule request
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/UpdateSubscriptionPriceRuleRequest'
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/CreateSubscriptionPriceRuleResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Update price rule for subscriptions
      tags:
        - Merchant
        - Subscription
  /companies/{company_id}/plugins/subscription/settings:
    get:
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/SubscriptionSettingsResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Get settings for subscriptions
      tags:
        - Merchant
        - Subscription
    patch:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Update settings request
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/UpdateSubscriptionSettingsRequest'
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/SubscriptionSettingsResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Update settings for subscriptions
      tags:
        - Merchant
        - Subscription
  /companies/{company_id}/refunds/{item_id}:
    get:
      parameters:
        - description: Item ID
          format: uuid
          in: path
          name: item_id
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/direct.GetRefundResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Get refund by item ID
      tags:
        - Merchant
        - Payments
  /companies/{company_id}/resources:
    get:
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            items:
              $ref: '#/definitions/ResourceResponse'
            type: array
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: List resources
      tags:
        - Merchant
        - Resource
    post:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Resource data
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/resource.CreateResourceRequest'
      produces:
        - application/json
      responses:
        '201':
          description: Created
          schema:
            $ref: '#/definitions/ResourceResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Create a resource
      tags:
        - Merchant
        - Resource
  /companies/{company_id}/resources/{resource_id}:
    delete:
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Resource ID
          format: uuid
          in: path
          name: service_id
          required: true
          type: string
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Delete resource
      tags:
        - Merchant
        - Resource
    get:
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Resource ID
          format: uuid
          in: path
          name: resource_id
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/ResourceResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Get one resource
      tags:
        - Merchant
        - Resource
    patch:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Resource ID
          format: uuid
          in: path
          name: resource_id
          required: true
          type: string
        - description: Resource data
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/UpdateResourceRequest'
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/ResourceResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Update resource
      tags:
        - Merchant
        - Resource
  /companies/{company_id}/resources/{resource_id}/closing-periods:
    get:
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Resource ID
          in: path
          name: resource_id
          required: true
          type: string
      responses:
        '200':
          description: OK
          schema:
            items:
              $ref: '#/definitions/ClosingPeriodResponse'
            type: array
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '401':
          description: Unauthorized
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      summary: List closing periods
      tags:
        - Merchant
        - ClosingPeriod
    post:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Resource ID
          in: path
          name: resource_id
          required: true
          type: string
        - description: Closing period data
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/CreateClosingPeriodRequest'
      produces:
        - application/json
      responses:
        '201':
          description: Created
          schema:
            $ref: '#/definitions/ClosingPeriodResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '401':
          description: Unauthorized
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      summary: Create a closing period
      tags:
        - Merchant
        - ClosingPeriod
  /companies/{company_id}/resources/{resource_id}/closing-periods/{rule_id}:
    delete:
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Resource ID
          in: path
          name: resource_id
          required: true
          type: string
        - description: Rule ID
          in: path
          name: rule_id
          required: true
          type: string
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '401':
          description: Unauthorized
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      summary: Delete a closing period
      tags:
        - Merchant
        - ClosingPeriod
  /companies/{company_id}/resources/{resource_id}/links:
    get:
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Resource ID
          format: uuid
          in: path
          name: resource_id
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/ResourceServiceLinksResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: List of resource-service links
      tags:
        - Merchant
        - Resource
  /companies/{company_id}/resources/{resource_id}/working-hours:
    delete:
      parameters:
        - description: Resource ID
          format: uuid
          in: path
          name: resource_id
          required: true
          type: string
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Working hours data
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/direct.DeleteWorkingHoursRequest'
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Delete working hours for resource
      tags:
        - Merchant
        - WorkingHours
    get:
      parameters:
        - description: Resource ID
          format: uuid
          in: path
          name: resource_id
          required: true
          type: string
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            items:
              $ref: '#/definitions/WorkingHoursResponse'
            type: array
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: List working hours
      tags:
        - Merchant
        - WorkingHours
    post:
      consumes:
        - application/json
      parameters:
        - description: Resource ID
          format: uuid
          in: path
          name: resource_id
          required: true
          type: string
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Working hours data
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/direct.CreateWorkingHoursRequest'
      produces:
        - application/json
      responses:
        '201':
          description: Created
          schema:
            $ref: '#/definitions/WorkingHoursResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '409':
          description: Conflict
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Create working hours
      tags:
        - Merchant
        - WorkingHours
  /companies/{company_id}/resources/{resource_id}/working-hours/{rule_id}:
    get:
      parameters:
        - description: Resource ID
          format: uuid
          in: path
          name: resource_id
          required: true
          type: string
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Working hours ID
          format: uuid
          in: path
          name: rule_id
          required: true
          type: string
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/WorkingHoursResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Get one working hours
      tags:
        - Merchant
        - WorkingHours
    patch:
      consumes:
        - application/json
      parameters:
        - description: Resource ID
          format: uuid
          in: path
          name: resource_id
          required: true
          type: string
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Working hours ID
          format: uuid
          in: path
          name: rule_id
          required: true
          type: string
        - description: Working hours data
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/direct.UpdateWorkingHoursRequest'
      produces:
        - application/json
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '409':
          description: Conflict
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Update working hours
      tags:
        - Merchant
        - WorkingHours
  /companies/{company_id}/services:
    get:
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            items:
              $ref: '#/definitions/ServiceResponse'
            type: array
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: List services
      tags:
        - Merchant
        - Service
    post:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Service data
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/service.CreateServiceRequest'
      produces:
        - application/json
      responses:
        '201':
          description: Created
          schema:
            $ref: '#/definitions/ServiceResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Create service
      tags:
        - Merchant
        - Service
  /companies/{company_id}/services/{service_id}:
    delete:
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Service ID
          format: uuid
          in: path
          name: service_id
          required: true
          type: string
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Delete service
      tags:
        - Merchant
        - Service
    get:
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Service ID
          format: uuid
          in: path
          name: service_id
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/ServiceResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Get one service
      tags:
        - Merchant
        - Service
    patch:
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Service ID
          format: uuid
          in: path
          name: service_id
          required: true
          type: string
        - description: Update service data
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/UpdateServiceRequest'
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/ServiceResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Update service
      tags:
        - Merchant
        - Service
  /companies/{company_id}/services/{service_id}/capacity:
    get:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Service ID
          in: path
          name: service_id
          required: true
          type: string
        - description: Type of the rule. Can be one of `capacity`, `ticket_capacity`
          in: query
          name: type
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/ListServiceCapacityResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '401':
          description: Unauthorized
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      summary: List capacity rules
      tags:
        - Merchant
        - Capacity
    post:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Service ID
          in: path
          name: service_id
          required: true
          type: string
        - description: Capacity rule data
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/CreateTicketCapacityRequest'
      produces:
        - application/json
      responses:
        '201':
          description: Created
          schema:
            $ref: '#/definitions/ServiceCapacityResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '401':
          description: Unauthorized
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Create a capacity
      tags:
        - Merchant
        - Capacity
  /companies/{company_id}/services/{service_id}/capacity/{rule_id}:
    delete:
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Service ID
          in: path
          name: service_id
          required: true
          type: string
        - description: Rule ID
          in: path
          name: rule_id
          required: true
          type: string
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '401':
          description: Unauthorized
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      summary: Delete a capacity
      tags:
        - Merchant
        - Capacity
  /companies/{company_id}/services/{service_id}/dates:
    post:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Service ID
          format: uuid
          in: path
          name: service_id
          required: true
          type: string
        - description: Dates data
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/service.DatesRequest'
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/DatesResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '409':
          description: Conflict
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: List available dates
      tags:
        - Merchant
        - Dates
  /companies/{company_id}/services/{service_id}/discounts:
    get:
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Service ID
          format: uuid
          in: path
          name: service_id
          required: true
          type: string
        - description: Discount type
          in: query
          name: type
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/direct.ListTicketVolumeDiscountRulesResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: List discounts for service
      tags:
        - Merchant
        - Discount
    post:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Service ID
          format: uuid
          in: path
          name: service_id
          required: true
          type: string
        - description: Discount data
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/direct.CreateTicketVolumeDiscountRequest'
      produces:
        - application/json
      responses:
        '201':
          description: Created
          schema:
            $ref: '#/definitions/direct.CreateTicketVolumeDiscountResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Create a discount
      tags:
        - Merchant
        - Discount
  /companies/{company_id}/services/{service_id}/discounts/{discount_id}:
    delete:
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Service ID
          format: uuid
          in: path
          name: service_id
          required: true
          type: string
        - description: Discount ID
          format: uuid
          in: path
          name: discount_id
          required: true
          type: string
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Delete a discount for service
      tags:
        - Merchant
        - Discount
  /companies/{company_id}/services/{service_id}/links:
    get:
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Service ID
          format: uuid
          in: path
          name: service_id
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/ServiceResourceLinksResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: List of service-resource links
      tags:
        - Merchant
        - ServiceResourceLink
    post:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Service ID
          format: uuid
          in: path
          name: service_id
          required: true
          type: string
        - description: Link data
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/service.CreateServiceResourceLinkRequest'
      produces:
        - application/json
      responses:
        '201':
          description: Created
          schema:
            $ref: '#/definitions/ServiceResourceLinkResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Link service with resource
      tags:
        - Merchant
        - ServiceResourceLink
  /companies/{company_id}/services/{service_id}/links/{link_id}:
    delete:
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Service ID
          format: uuid
          in: path
          name: service_id
          required: true
          type: string
        - description: Link ID
          in: path
          name: link_id
          required: true
          type: string
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Delete service to resource link
      tags:
        - Merchant
        - ServiceResourceLink
    patch:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Service ID
          format: uuid
          in: path
          name: service_id
          required: true
          type: string
        - description: Link ID
          in: path
          name: link_id
          required: true
          type: string
        - description: Update data
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/service.UpdateServiceResourceLinkRequest'
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/ServiceResourceLinkResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Update service to resource link
      tags:
        - Merchant
        - ServiceResourceLink
  /companies/{company_id}/services/{service_id}/prices:
    get:
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Service ID
          format: uuid
          in: path
          name: service_id
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/ListPriceRulesResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: List price rules for a service
      tags:
        - Merchant
        - Pricing
    post:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Service ID
          format: uuid
          in: path
          name: service_id
          required: true
          type: string
        - description: Price rule data
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/direct.CreatePriceRuleRequest'
      produces:
        - application/json
      responses:
        '201':
          description: Created
          schema:
            $ref: '#/definitions/PriceRuleResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Create a price rule for service
      tags:
        - Merchant
        - Pricing
  /companies/{company_id}/services/{service_id}/prices/{price_rule_id}:
    delete:
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Service ID
          format: uuid
          in: path
          name: service_id
          required: true
          type: string
        - description: Price rule ID
          format: uuid
          in: path
          name: price_rule_id
          required: true
          type: string
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Delete price rule for particular service
      tags:
        - Merchant
        - Pricing
    patch:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Service ID
          format: uuid
          in: path
          name: service_id
          required: true
          type: string
        - description: Price rule ID
          format: uuid
          in: path
          name: price_rule_id
          required: true
          type: string
        - description: Price rule data
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/direct.UpdatePriceRuleRequest'
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/PriceRuleResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Update price rule for particular service
      tags:
        - Merchant
        - Pricing
  /companies/{company_id}/services/{service_id}/settings:
    patch:
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Service ID
          format: uuid
          in: path
          name: service_id
          required: true
          type: string
        - description: Service data
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/service.UpdateServiceSettingsRequest'
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Update service settings
      tags:
        - Merchant
        - Service
  /companies/{company_id}/services/{service_id}/slots:
    delete:
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Service ID
          format: uuid
          in: path
          name: service_id
          required: true
          type: string
        - description: Resource ID
          format: uuid
          in: query
          name: resourceID
          required: true
          type: string
        - description: Start time
          format: date-time
          in: query
          name: startTime
          required: true
          type: string
        - description: Delete strategy
          enum:
            - single
            - upcoming
          in: query
          name: deleteStrategy
          required: true
          type: string
        - description: >-
            Refund percent (0-100) applied to affected paid bookings. Defaults
            to 100.
          in: query
          name: refundPercent
          type: integer
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Delete scheduled slot for particular service
      tags:
        - Merchant
        - Slot
    get:
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Service ID
          format: uuid
          in: path
          name: service_id
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            items:
              $ref: '#/definitions/SlotResponse'
            type: array
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: List slots for a service
      tags:
        - Merchant
        - Slot
    patch:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Service ID
          format: uuid
          in: path
          name: service_id
          required: true
          type: string
        - description: Slot data
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/service.UpdateSlotRequest'
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/SlotResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Update slot for particular service
      tags:
        - Merchant
        - Slot
    post:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Service ID
          format: uuid
          in: path
          name: service_id
          required: true
          type: string
        - description: Slot data
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/service.CreateSlotRequest'
      produces:
        - application/json
      responses:
        '201':
          description: Created
          schema:
            $ref: '#/definitions/SlotResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Create slot for service
      tags:
        - Merchant
        - Slot
  /companies/{company_id}/services/{service_id}/slots/{slot_id}:
    delete:
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Service ID
          format: uuid
          in: path
          name: service_id
          required: true
          type: string
        - description: Slot ID
          in: path
          name: slot_id
          required: true
          type: string
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Delete slot for particular service
      tags:
        - Merchant
        - Slot
  /companies/{company_id}/services/{service_id}/ticket-availability-rules:
    get:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Service ID
          in: path
          name: service_id
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/ListTicketAvailabilityResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '401':
          description: Unauthorized
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      summary: List ticket availability rules
      tags:
        - Merchant
        - Ticket Availability
    post:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Service ID
          in: path
          name: service_id
          required: true
          type: string
        - description: Ticket availability rule data
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/CreateTicketAvailabilityRequest'
      produces:
        - application/json
      responses:
        '201':
          description: Created
          schema:
            $ref: '#/definitions/TicketAvailabilityResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '401':
          description: Unauthorized
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Create a ticket availability rule
      tags:
        - Merchant
        - Ticket Availability
  /companies/{company_id}/services/{service_id}/ticket-availability-rules/{rule_id}:
    delete:
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Service ID
          in: path
          name: service_id
          required: true
          type: string
        - description: Rule ID
          in: path
          name: rule_id
          required: true
          type: string
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '401':
          description: Unauthorized
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      summary: Delete a ticket availability rule
      tags:
        - Merchant
        - Ticket Availability
  /companies/{company_id}/services/{service_id}/tickets:
    get:
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Service ID
          format: uuid
          in: path
          name: service_id
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            items:
              $ref: '#/definitions/TicketResponse'
            type: array
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: List tickets for a service
      tags:
        - Merchant
        - Ticket
    post:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Service ID
          format: uuid
          in: path
          name: service_id
          required: true
          type: string
        - description: Ticket data
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/service.CreateTicketRequest'
      produces:
        - application/json
      responses:
        '201':
          description: Created
          schema:
            $ref: '#/definitions/TicketResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Create ticket for service
      tags:
        - Merchant
        - Ticket
  /companies/{company_id}/services/{service_id}/tickets/{ticket_id}:
    delete:
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Service ID
          format: uuid
          in: path
          name: service_id
          required: true
          type: string
        - description: Ticket ID
          in: path
          name: ticket_id
          required: true
          type: string
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Delete ticket for particular service
      tags:
        - Merchant
        - Ticket
    get:
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Service ID
          format: uuid
          in: path
          name: service_id
          required: true
          type: string
        - description: Ticket ID
          in: path
          name: ticket_id
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/TicketResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Get a ticket for a service
      tags:
        - Merchant
        - Ticket
  /companies/{company_id}/services/{service_id}/times:
    post:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Service ID
          format: uuid
          in: path
          name: service_id
          required: true
          type: string
        - description: Times data
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/service.TimesRequest'
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/TimesResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '409':
          description: Conflict
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: List available times
      tags:
        - Merchant
        - Times
  /companies/{company_id}/services/slots:
    post:
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
        - description: Service IDs
          in: query
          name: service_ids
          required: true
          type: string
        - description: Resource IDs
          in: query
          name: resource_ids
          required: true
          type: string
        - description: From time
          format: date-time
          in: query
          name: from
          required: true
          type: string
        - description: To time
          format: date-time
          in: query
          name: to
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            items:
              $ref: '#/definitions/SlotResponse'
            type: array
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Schedule slots for a service
      tags:
        - Merchant
        - Slot
  /companies/{company_id}/working-hours/range:
    post:
      consumes:
        - application/json
      parameters:
        - description: Company ID
          in: path
          name: company_id
          required: true
          type: string
        - description: Request body with resource IDs and date range
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/ListWorkingHoursInRangeRequest'
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/ListWorkingHoursInRangeResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '401':
          description: Unauthorized
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      summary: List working hours within a date range
      tags:
        - Merchant
        - WorkingHours
  /companies/{id}:
    get:
      consumes:
        - application/json
      description: Method to get company for merchant
      parameters:
        - description: Company ID
          format: uuid
          in: path
          name: company_id
          required: true
          type: string
      produces:
        - application/json
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/company.CreateCompanyResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/HTTPError'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/HTTPError'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/HTTPError'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/HTTPError'
      security:
        - ApiKeyAuth: []
      summary: Get company
      tags:
        - Merchant
        - Company
securityDefinitions:
  ApiKeyAuth:
    in: header
    name: x-api-key
    type: apiKey
  BearerAuth:
    in: header
    name: Authorization
    type: apiKey
swagger: '2.0'
tags:
  - description: Endpoints to be used be merchant
    name: Merchant
  - description: Endpoints to be used be merchant's clients
    name: Client
  - description: >-
      **Service** - is a service that is provided by the company. Service is
      linked to one or many resources. These are services that are provided by
      the location (company). <br /><br />Types of services: <br />1. **Fixed**
      - Services with a predetermined duration (e.g., 1-hour massage, 1-hour
      training session) <br /> 2. **Flexible** - Services where clients can
      choose the duration of the booking (e.g., tennis court, wakeboard
      reservation). <br />3. **Group** - Services that accommodate multiple
      bookings within a single time slot until the capacity is reached (e.g.,
      group training, group excursions). <br />4. **Ticket** - Similar to group
      services but requires selecting tickets for the slot (e.g., concert
      tickets, museum entry). <br />5. **Days** - Services intended for
      long-term bookings (e.g., guest houses, hotel stays). <br />6.
      **Sharable** - Pay-as-you-go bookings (e.g., scooter rental, car rental,
      equipment rental).
    name: Service
  - description: >-
      A **Resource** refers to any entity a company offers that clients can
      book, including human resources like hairdressers or coaches, and physical
      assets such as tennis courts or guest houses. Resources are central to
      scheduling appointments in the Bookla ecosystem.
    name: Resource
  - description: >-
      The "Company" serves as the foundational element within the Bookla system.
      It acts as the central entity to which services and resources are linked.
      Companies can encapsulate legal information, crucial for invoicing
      purposes, especially when integrating payment functionalities. <br /><br
      />A company in the Bookla platform is not just a business entity; it's the
      primary instance around which the booking infrastructure revolves.
      Merchants can manage multiple companies under a single account, seamlessly
      switching between them as needed to cater to diverse operational
      requirements.
    name: Company
  - description: >-
      The "Capacity" rule defines the maximum number of clients or tickets that
      can be accommodated within a given time slot. This rule is particularly
      useful for `group` and `ticket` services, where multiple clients can book
      the same slot until the capacity is reached.
    name: Capacity
  - description: >-
      The "Discount" rule allows merchants to offer discounts based on various
      parameters, such as the number of bookings, the time of booking, or the
      duration of the booking. This rule is highly versatile, enabling merchants
      to create custom discount strategies to attract and retain clients.
    name: Discount
  - description: >-
      This rule dynamically determines the pricing of each service offered. It
      is highly versatile, allowing adjustments based on various parameters to
      meet any pricing strategy needs.
    name: Pricing
  - description: >-
      The "ServiceResourceLink" entity establishes a connection between a
      service and a resource. This link is crucial for the Bookla platform to
      determine which resources are available for a given service, enabling
      clients to book appointments seamlessly.
    name: ServiceResourceLink
  - description: >-
      The "Slot" entity represents a group or ticket service's time slot. It
      encapsulates the start and end times of the slot, as well as the number of
      available slots.
    name: Slot
  - description: The "Ticket" entity represents a ticket that can be booked by a client.
    name: Ticket
  - description: Get available times for **services**.
    name: Times
  - description: >-
      Defines the availability of resources, ensuring bookings align with
      operational hours.
    name: WorkingHours
  - description: >-
      Closing periods are used to define when a resource is not available. This
      is particularly useful for holidays or other special occasions.
    name: ClosingPeriod
  - description: Endpoints to be used be client's services
    name: ClientService
  - description: Endpoints to be used be client's resources
    name: ClientResource
  - description: Endpoints to be used be client's bookings
    name: ClientBooking
x-tagGroups:
  - name: Merchant
    tags:
      - Company
      - Service
      - Resource
      - Capacity
      - ClosingPeriod
      - Discount
      - Pricing
      - ServiceResourceLink
      - Slot
      - Ticket
      - Times
      - WorkingHours
      - Booking
      - Clients
      - Subscription
      - GiftCards
      - PromoCodes
      - Payments
      - PDF Templates
      - Developer
  - name: Client
    tags:
      - ClientAuth
      - ClientProfile
      - ClientService
      - ClientResource
      - ClientBooking
      - ClientSubscription
      - ClientGiftCards
