openapi: 3.0.1
info:
  title: platform_billing API
  description: Merged OpenAPI spec for platform_billing domain
  version: 1.0.0
servers:
- description: ''
  url: https://api.uat.btx.fr.banqup.com/platform/billing
- description: ''
  url: https://api.uat.btx.eu.banqup.com/platform/billing
paths:
  /api/v1/tenants/{tenant_id}/customer_groups/fetch_customer_group_data:
    get:
      summary: Fetch customer group data
      operationId: fetch_customer_group_data
      tags:
      - CustomerGroup
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: group_name
        in: query
        required: false
        schema:
          type: string
          description: Customer group name
        description: Customer group name
      - name: group_names[]
        in: query
        required: false
        schema:
          type: array
          items:
            type: string
            description: Customer group name
        description: Customer group names
      - name: group_slugs[]
        in: query
        required: false
        schema:
          type: array
          items:
            type: string
            description: Customer group slug
        description: Customer group slugs
      responses:
        '200':
          description: Returns customer group data
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/FetchCustomerGroupDataResponse'
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '404':
          description: The specified resource was not found
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/coupons/promo_code/{promo_code}/{language}:
    get:
      summary: Returns coupon slug
      operationId: promo_code
      tags:
      - Coupons
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: promo_code
        in: path
        required: true
        schema:
          type: string
          description: Promo code
        description: Promo code
      - name: language
        in: path
        required: true
        schema:
          type: string
          description: en
        description: en
      responses:
        '200':
          description: Returns coupon slug
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/PromoCodeResponse'
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '404':
          description: The specified resource was not found
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
        '422':
          description: UnprocessableEntity
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    example:
                    - Promo code has expired.
                    items:
                      type: string
                additionalProperties: false
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/customer_license_usages/create_allowed:
    get:
      summary: Check if creation is allowed
      operationId: createAllowed
      tags:
      - CustomerLicenseUsages
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: customer_id
        in: query
        required: true
        schema:
          type: string
          description: Customer slug
        description: Customer slug
      - name: item
        in: query
        required: true
        schema:
          type: string
          description: Item
        description: Item
      responses:
        '200':
          description: Creation allowed
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  create_allowed:
                    type: boolean
                    example: true
                additionalProperties: false
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/customer_license_usages/update_usage:
    put:
      summary: Updates or creates usage
      operationId: updateUsage
      tags:
      - CustomerLicenseUsages
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: customer_id
        in: query
        required: true
        schema:
          type: string
          description: Customer slug
        description: Customer slug
      - name: item
        in: query
        required: true
        schema:
          type: string
          description: Item
        description: Item
      - name: count
        in: query
        required: true
        schema:
          type: integer
          description: Counter
        description: Counter
      responses:
        '200':
          description: Customer Updated
          content:
            application/vnd.api+json:
              schema:
                type: object
                additionalProperties: false
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '404':
          description: The specified resource was not found
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
        '422':
          description: UnprocessableEntity
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        detail:
                          type: string
                          example: Customer suspended.
                additionalProperties: false
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/customers:
    post:
      summary: Creates a customer
      operationId: post_customers
      tags:
      - Customers
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      requestBody:
        required: true
        description: ''
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/CustomerRequest'
      responses:
        '200':
          description: Created
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/CustomerResponseShow'
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/customers/customer_exists:
    get:
      summary: Customer exists
      operationId: customer_exists
      tags:
      - Customers
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: customer_id
        in: query
        required: true
        schema:
          type: string
          description: Customer slug
        description: Customer slug
      responses:
        '200':
          description: Check if the customer exists in PE
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/CustomerExistsResponse'
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/customers/force_consent_for_customer:
    get:
      summary: Check if consent is needed for customer
      operationId: force_consent_for_customer
      tags:
      - Customers
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: customer_id
        in: query
        required: true
        schema:
          type: string
          description: Customer slug
        description: Customer slug
      responses:
        '200':
          description: Check if consent is needed for customer
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ForceConsentForCustomerResponse'
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/customers/{customer_id}/cancel_payment_consent:
    post:
      summary: Cancel payment consent
      operationId: cancel_payment_consent
      tags:
      - Customers
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: customer_id
        in: path
        required: true
        schema:
          type: string
          description: Customer slug
        description: Customer slug
      requestBody:
        required: true
        description: ''
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/CancelPaymentConsentRequest'
      responses:
        '200':
          description: Cancel payment consent
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/CancelPaymentConsentResponse'
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '404':
          description: The specified resource was not found
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
        '412':
          description: Preconditions failed
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/PreconditionFailedError'
        '422':
          description: UnprocessableEntity
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        title:
                          type: string
                          example: the server responded with 404
                        detail:
                          type: string
                          example: BillingEngine::Dolphin::BaseClient::NotProcessedError
                additionalProperties: false
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/customers/{customer_id}/check_vas_with_trial:
    get:
      summary: Check VAS with Trial
      operationId: check_vas_with_trialCustomer
      tags:
      - Customers
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: customer_id
        in: path
        required: true
        schema:
          type: string
          description: Customer slug
        description: Customer slug
      - name: checked_vas_trial_sub[akti]
        in: query
        required: true
        schema:
          type: string
          description: product_slug
        description: product_slug
      responses:
        '200':
          description: Customer on vas with trial
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/CheckVasWithTrialResponse'
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/customers/{customer_id}/consents:
    post:
      summary: Creates consent for customer
      operationId: consents
      tags:
      - Customers
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: customer_id
        in: path
        required: true
        schema:
          type: string
          description: Customer slug
        description: Customer slug
      requestBody:
        required: true
        description: ''
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/ConsentsRequest'
      responses:
        '201':
          description: Creates consent for customer
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ConsentsResponse'
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '404':
          description: The specified resource was not found
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/customers/{customer_id}/add_to_group_by_name:
    post:
      summary: Creates customer grouping for customer
      operationId: add_to_group_by_name
      tags:
      - Customers
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: customer_id
        in: path
        required: true
        schema:
          type: string
          description: Customer slug
        description: Customer slug
      requestBody:
        required: true
        description: ''
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/AddToGroupByNameRequest'
      responses:
        '200':
          description: Creates customer grouping for customer
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '404':
          description: The specified resource was not found
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/customers/{customer_id}/consume:
    put:
      summary: Consume bundle
      operationId: putConsume
      tags:
      - Customers
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: customer_id
        in: path
        required: true
        schema:
          type: string
          description: Customer slug
        description: Customer slug
      requestBody:
        required: true
        description: ''
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/ConsumeRequest'
      responses:
        '200':
          description: Bundle consumed
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: string
                additionalProperties: false
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '404':
          description: The specified resource was not found
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
        '422':
          description: UnprocessableEntity
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        detail:
                          type: string
                          example: Bundle not consumed.
                additionalProperties: false
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/customers/{customer_id}/coupons:
    post:
      summary: Creates customer coupons
      operationId: customerCoupons
      tags:
      - Customers
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: customer_id
        in: path
        required: true
        schema:
          type: string
          description: Customer slug
        description: Customer slug
      requestBody:
        required: true
        description: ''
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/CouponsRequest'
      responses:
        '201':
          description: Creates customer coupons
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/CouponsResponse'
        '400':
          description: BadRequest
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '404':
          description: The specified resource was not found
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
        '422':
          description: UnprocessableEntity
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        detail:
                          type: string
                          example: Name is mandatory.
                additionalProperties: false
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/customers/{customer_id}/coupons_remaining:
    get:
      summary: Fetch customer coupons remaining
      operationId: coupons_remaining
      tags:
      - Customers
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: customer_id
        in: path
        required: true
        schema:
          type: string
          description: Customer slug
        description: Customer slug
      - name: coupon_slug
        in: query
        required: false
        schema:
          type: string
      - name: language
        in: query
        required: true
        schema:
          type: string
          description: User language
        description: User language
      responses:
        '200':
          description: Returns license bundle usage totals for customer
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/CouponsRemaining'
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '404':
          description: The specified resource was not found
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/customers/{customer_id}/fetch_bundle_usage_totals:
    post:
      summary: Fetch bundle usage totals for customer
      operationId: fetch_bundle_usage_totals
      tags:
      - Customers
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: customer_id
        in: path
        required: true
        schema:
          type: string
          description: Customer slug
        description: Customer slug
      requestBody:
        required: true
        description: ''
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/BundleTotalsRequest'
      responses:
        '200':
          description: Returns bundle usage totals for customer
          content:
            application/vnd.api+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/FetchBundleUsageTotals'
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '404':
          description: The specified resource was not found
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/customers/{customer_id}/purge:
    delete:
      summary: Purge customer
      operationId: purge_customer
      tags:
      - Customers
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: customer_id
        in: path
        required: true
        schema:
          type: string
          description: Customer slug
        description: Customer slug
      responses:
        '204':
          description: Customer purged
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '404':
          description: The specified resource was not found
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
        '422':
          description: UnprocessableEntity
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    example:
                    - Action not allowed since customer has invoices
                    items:
                      type: string
                additionalProperties: false
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/customers/{customer_id}/fetch_customer_active_subscriptions:
    get:
      summary: Fetch active purchases and future orders for customer
      operationId: fetch_customer_active_subscriptions
      tags:
      - Customers
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: customer_id
        in: path
        required: true
        schema:
          type: string
          description: Customer slug
        description: Customer slug
      - name: language
        in: query
        required: true
        schema:
          type: string
          description: Requested language
        description: Requested language
      responses:
        '200':
          description: Returns customer active subscriptions
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/FetchCustomerActiveSubscriptions'
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/customers/{customer_id}/fetch_customer_data:
    get:
      summary: Fetch customer data
      operationId: fetch_customer_data
      tags:
      - Customers
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: customer_id
        in: path
        required: true
        schema:
          type: string
          description: Customer slug
        description: Customer slug
      - name: country
        in: query
        required: true
        schema:
          type: string
          description: Customer country
        description: Customer country
      responses:
        '200':
          description: Returns customer data
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/FetchCustomerDataResponse'
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/customers/{customer_id}/fetch_promo_code_data:
    get:
      summary: Fetch promo code data
      operationId: fetch_promo_code_data
      tags:
      - Customers
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: customer_id
        in: path
        required: true
        schema:
          type: string
          description: Customer slug
        description: Customer slug
      - name: promo_code
        in: query
        required: false
        schema:
          type: string
          description: Promo code
        description: Promo code
      - name: promo_codes[]
        in: query
        required: false
        schema:
          type: array
          items:
            type: string
            description: Requested promo codes
      responses:
        '200':
          description: Returns customer group data
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/FetchPromoCodeDataResponse'
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '404':
          description: The specified resource was not found
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/customers/{customer_id}/expire_purchase:
    put:
      summary: Expire purchase and order
      operationId: customer_expire_purchase
      tags:
      - Customers
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: customer_id
        in: path
        required: true
        schema:
          type: string
          description: Customer slug
        description: Customer slug
      - name: purchase_slug
        in: query
        required: true
        schema:
          type: string
          description: Purchase slug
        description: Purchase slug
      responses:
        '200':
          description: Expires purchase and order
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '404':
          description: The specified resource was not found
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
        '422':
          description: UnprocessableEntity
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    example:
                    - Purchase not active
                    items:
                      type: string
                additionalProperties: false
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/customers/{customer_id}/fetch_customer_invoice_discount:
    get:
      summary: Fetch customer invoice discount
      operationId: fetch_customer_invoice_discount
      tags:
      - Customers
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: customer_id
        in: path
        required: true
        schema:
          type: string
          description: Customer slug
        description: Customer slug
      responses:
        '200':
          description: Returns customer invoice discount
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/FetchCustomerInvoiceDiscountResponse'
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/customers/{customer_id}/fetch_license_bundle_usage_totals:
    post:
      summary: Fetch license bundle usage totals for customer
      operationId: fetch_license_bundle_usage_totals
      tags:
      - Customers
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: customer_id
        in: path
        required: true
        schema:
          type: string
          description: Customer slug
        description: Customer slug
      requestBody:
        required: true
        description: ''
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/BundleTotalsRequest'
      responses:
        '200':
          description: Returns license bundle usage totals for customer
          content:
            application/vnd.api+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/FetchLicenseBundleUsageTotals'
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '404':
          description: The specified resource was not found
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/customers/{customer_id}/fetch_fee_usage_totals:
    post:
      summary: Fetch fee usage totals for customer from current month
      operationId: fetch_fee_usage_totals
      tags:
      - Customers
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: customer_id
        in: path
        required: true
        schema:
          type: string
          description: Customer slug
        description: Customer slug
      responses:
        '200':
          description: Returns fee usage totals for customer
          content:
            application/vnd.api+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/FetchFeeUsageTotals'
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '404':
          description: The specified resource was not found
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/customers/{customer_id}/fetch_payment_status_failed_invoices:
    get:
      summary: Fetch payment failed invoices for customer
      operationId: fetch_payment_status_failed_invoices
      tags:
      - Customers
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: customer_id
        in: path
        required: true
        schema:
          type: string
          description: Customer slug
        description: Customer slug
      - name: with_details
        in: query
        required: true
        schema:
          type: string
          description: Extra details requested
        description: Extra details requested
      responses:
        '200':
          description: Returns customer active subscriptions
          content:
            application/vnd.api+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/FetchCustomerFailedInvoices'
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '404':
          description: The specified resource was not found
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/customers/{customer_id}/fetch_future_invoice:
    get:
      summary: Fetch future invoice for customer
      operationId: fetch_future_invoice
      tags:
      - Customers
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: customer_id
        in: path
        required: true
        schema:
          type: string
          description: Customer slug
        description: Customer slug
      responses:
        '200':
          description: Returns customer future invoice
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/FetchCustomerFutureInvoice'
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '404':
          description: The specified resource was not found
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/customers/{customer_id}/fetch_clients_invoices:
    get:
      summary: Fetch invoices for customers
      operationId: fetch_clients_invoices
      tags:
      - Customers
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: customer_id
        in: path
        required: true
        schema:
          type: string
          description: Customer slug
        description: Customer slug
      - name: month
        in: query
        required: false
        schema:
          type: string
      - name: from
        in: query
        required: false
        schema:
          type: string
      - name: to
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Returns data for the approved invoices
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/FetchClientsInvoicesResponse'
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '404':
          description: The specified resource was not found
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/customers/{customer_id}/fetch_client_invoice_details:
    get:
      summary: Fetch client invoice details
      operationId: fetch_client_invoice_details
      tags:
      - Customers
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: customer_id
        in: path
        required: true
        schema:
          type: string
          description: Customer slug
        description: Customer slug
      - name: invoice_slug
        in: query
        required: true
        schema:
          type: string
      - name: assignee_slug
        in: query
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Returns client data for the invoice
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/FetchClientInvoiceDetailsResponse'
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '404':
          description: The specified resource was not found
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/customers/{customer_id}/fetch_clients_invoices_details:
    get:
      summary: Fetch clients invoices details
      operationId: fetch_clients_invoices_details
      tags:
      - Customers
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: customer_id
        in: path
        required: true
        schema:
          type: string
          description: Customer slug
        description: Customer slug
      - name: month
        in: query
        required: false
        schema:
          type: string
      - name: from
        in: query
        required: false
        schema:
          type: string
      - name: to
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Returns client data for the invoice
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/FetchClientsInvoicesDetailsResponse'
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '404':
          description: The specified resource was not found
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/customers/{customer_id}/fetch_client_active_subscriptions:
    get:
      summary: Fetch client active subscriptions
      operationId: fetch_client_active_subscriptions
      tags:
      - Customers
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: customer_id
        in: path
        required: true
        schema:
          type: string
          description: Customer slug
        description: Customer slug
      - name: assignee_slug
        in: query
        required: true
        schema:
          type: string
          description: Assignee slug
        description: Assignee slug
      responses:
        '200':
          description: Returns data for the active subscriptions
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/FetchClientActiveSubscriptionsResponse'
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '404':
          description: The specified resource was not found
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/customers/{customer_id}/fetch_client_monthly_purchases:
    get:
      summary: Fetch client monthly purchases
      operationId: fetch_client_monthly_purchases
      tags:
      - Customers
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: customer_id
        in: path
        required: true
        schema:
          type: string
          description: Customer slug
        description: Customer slug
      - name: assignee_slug
        in: query
        required: true
        schema:
          type: string
          description: Assignee slug
        description: Assignee slug
      - name: month
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Returns data for the monthly purchases
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/FetchClientMonthlyPurchasesResponse'
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '404':
          description: The specified resource was not found
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/customers/{customer_id}/fetch_client_billing_history:
    get:
      summary: Fetch client billing history
      operationId: fetch_client_billing_history
      tags:
      - Customers
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: customer_id
        in: path
        required: true
        schema:
          type: string
          description: Customer slug
        description: Customer slug
      - name: assignee_slug
        in: query
        required: true
        schema:
          type: string
          description: Assignee slug
        description: Assignee slug
      responses:
        '200':
          description: Returns data for client billing history
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/FetchClientBillingHistoryResponse'
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '404':
          description: The specified resource was not found
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/customers/{customer_id}/fetch_client_active_usages:
    get:
      summary: Fetch client active usages
      operationId: fetch_client_active_usages
      tags:
      - Customers
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: customer_id
        in: path
        required: true
        schema:
          type: string
          description: Customer slug
        description: Customer slug
      - name: assignee_slug
        in: query
        required: true
        schema:
          type: string
          description: Assignee slug
        description: Assignee slug
      responses:
        '200':
          description: Returns data for the client active usages
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/FetchClientActiveUsagesResponse'
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '404':
          description: The specified resource was not found
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/customers/{customer_id}/fetch_subscription_details:
    get:
      summary: Fetch subscriptions details
      operationId: fetch_subscription_details
      tags:
      - Customers
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: customer_id
        in: path
        required: true
        schema:
          type: string
          description: Customer slug
        description: Customer slug
      - name: default_currency
        in: query
        required: true
        schema:
          type: string
          description: Customer currency
        description: Customer currency
      - name: language
        in: query
        required: true
        schema:
          type: string
          description: Customer language
        description: Customer language
      - name: product_id
        in: query
        required: true
        schema:
          type: string
          description: Product slug
        description: Product slug
      - name: period_quantity
        in: query
        required: false
        schema:
          type: string
          description: Required period quantity for product
        description: Required period quantity for product
      - name: labels[]
        in: query
        required: false
        schema:
          type: array
          items:
            type: string
            description: Requested labels
      responses:
        '200':
          description: Returns subscription details
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/FetchSubscriptionDetailsResponse'
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/customers/{customer_id}/fetch_plan_details:
    get:
      summary: Fetch plan details
      operationId: fetch_plan_details
      tags:
      - Customers
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: customer_id
        in: path
        required: true
        schema:
          type: string
          description: Customer slug
        description: Customer slug
      - name: owner_id
        in: query
        required: false
        schema:
          type: string
          description: Owner slug
        description: Owner slug
      - name: caller_id
        in: query
        required: false
        schema:
          type: string
          description: Caller slug
        description: Caller slug
      - name: default_currency
        in: query
        required: true
        schema:
          type: string
          description: Customer currency
        description: Customer currency
      - name: language
        in: query
        required: true
        schema:
          type: string
          description: Customer language
        description: Customer language
      - name: product_id
        in: query
        required: true
        schema:
          type: string
          description: Product slug
        description: Product slug
      - name: period_quantity
        in: query
        required: false
        schema:
          type: string
          description: Required period quantity for product
        description: Required period quantity for product
      - name: labels[]
        in: query
        required: false
        schema:
          type: array
          items:
            type: string
            description: Requested labels
      responses:
        '200':
          description: Returns subscription details
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/FetchPlanDetailsResponse'
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/customers/{customer_id}/fetch_plan_details_for_clients:
    get:
      summary: Fetch plan details for clients
      operationId: fetch_plan_details_for_clients
      tags:
      - Customers
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: customer_id
        in: path
        required: true
        schema:
          type: string
          description: Customer slug
        description: Customer slug
      - name: language
        in: query
        required: true
        schema:
          type: string
          description: Customer language
        description: Customer language
      - name: product_id
        in: query
        required: true
        schema:
          type: string
          description: Product slug
        description: Product slug
      - name: period_quantity
        in: query
        required: false
        schema:
          type: string
          description: Required period quantity for product
        description: Required period quantity for product
      - name: labels[]
        in: query
        required: false
        schema:
          type: array
          items:
            type: string
            description: Requested labels
      responses:
        '200':
          description: Returns subscription details
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/FetchPlanDetailsForClientsResponse'
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/customers/{customer_id}/fetch_subscription_with_feature:
    get:
      summary: Fetch subscriptions with feature
      operationId: fetch_subscription_with_feature
      tags:
      - Customers
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: customer_id
        in: path
        required: true
        schema:
          type: string
          description: Customer slug
        description: Customer slug
      - name: default_currency
        in: query
        required: true
        schema:
          type: string
          description: Customer currency
        description: Customer currency
      - name: feature_slug
        in: query
        required: true
        schema:
          type: string
          description: Feature slug
        description: Feature slug
      - name: labels[]
        in: query
        required: false
        schema:
          type: array
          items:
            type: string
            description: Requested labels
      responses:
        '200':
          description: Returns available subscriptions having the feature
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/FetchSubscriptionsWithFeatureResponse'
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/customers/{customer_id}/fetch_subscription_with_features:
    post:
      summary: Fetch subscriptions with features
      operationId: fetch_subscription_with_features
      tags:
      - Customers
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: customer_id
        in: path
        required: true
        schema:
          type: string
          description: Customer slug
        description: Customer slug
      requestBody:
        required: true
        description: ''
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/FetchSubscriptionWithFeaturesRequest'
      responses:
        '200':
          description: Returns available subscriptions having the features
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/FetchSubscriptionsWithFeaturesResponse'
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '404':
          description: The specified resource was not found
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/customers/{customer_id}/fetch_subscriptions_for_customer:
    get:
      summary: Fetch subscriptions for customer
      operationId: fetch_subscriptions_for_customer
      tags:
      - Customers
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: customer_id
        in: path
        required: true
        schema:
          type: string
          description: Customer slug
        description: Customer slug
      - name: default_currency
        in: query
        required: true
        schema:
          type: string
          description: Customer currency
        description: Customer currency
      - name: language
        in: query
        required: true
        schema:
          type: string
          description: Customer language
        description: Customer language
      - name: labels[]
        in: query
        required: false
        schema:
          type: array
          items:
            type: string
            description: Requested labels
      responses:
        '200':
          description: Returns available subscriptions for customer
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/FetchSubscriptionsForCustomerResponse'
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/customers/{customer_id}/fetch_plans_for_customer:
    get:
      summary: Fetch plans for customer
      operationId: fetch_plans_for_customer
      tags:
      - Customers
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: customer_id
        in: path
        required: true
        schema:
          type: string
          description: Customer slug
        description: Customer slug
      - name: caller_id
        in: query
        required: false
        schema:
          type: string
          description: Caller slug
        description: Caller slug
      - name: period_quantity
        in: query
        required: true
        schema:
          type: string
          description: Requested period quantity
        description: Period quantity
      - name: default_currency
        in: query
        required: true
        schema:
          type: string
          description: Customer currency
        description: Customer currency
      - name: language
        in: query
        required: true
        schema:
          type: string
          description: Customer language
        description: Customer language
      - name: labels[]
        in: query
        required: false
        schema:
          type: array
          items:
            type: string
            description: Requested labels
      responses:
        '200':
          description: Returns available subscriptions for customer
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/FetchPlansForCustomerResponse'
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/customers/{customer_id}/fetch_plans_for_customer_clients:
    get:
      summary: Fetch plans for customer clients
      operationId: fetch_plans_for_customer_clients
      tags:
      - Customers
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: customer_id
        in: path
        required: true
        schema:
          type: string
          description: Customer slug
        description: Customer slug
      - name: period_quantity
        in: query
        required: true
        schema:
          type: string
          description: Requested period quantity
        description: Period quantity
      - name: language
        in: query
        required: true
        schema:
          type: string
          description: Customer language
        description: Customer language
      - name: labels[]
        in: query
        required: false
        schema:
          type: array
          items:
            type: string
            description: Requested labels
      responses:
        '200':
          description: Returns available subscriptions for customer clients
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/FetchPlansForCustomerClientsResponse'
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/customers/{customer_id}/fetch_plans_info:
    get:
      summary: Fetch plans info
      operationId: fetch_plans_info
      tags:
      - Customers
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: customer_id
        in: path
        required: true
        schema:
          type: string
          description: Customer slug
        description: Customer slug
      - name: period_quantity
        in: query
        required: true
        schema:
          type: string
          description: Requested period quantity
        description: Period quantity
      - name: language
        in: query
        required: true
        schema:
          type: string
          description: Customer language
        description: Customer language
      - name: plan_ids[]
        in: query
        required: true
        schema:
          type: array
          items:
            type: string
            description: Requested plans
      responses:
        '200':
          description: Returns info for requested plans
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/FetchPlansInfoResponse'
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/customers/active_customer_term:
    get:
      summary: Fetch active period quantity or the highest allowed for a customer
      operationId: active_customer_term
      tags:
      - Customers
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: assignee_id
        in: query
        required: true
        schema:
          type: string
          description: Assignee slug
        description: Assignee slug
      - name: owner_id
        in: query
        required: true
        schema:
          type: string
          description: Owner slug
        description: Owner slug
      responses:
        '200':
          description: active period quantity or the highest allowed for a customer
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ActiveCustomerTermResponse'
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '404':
          description: The specified resource was not found
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/customers/{customer_id}/customers_for_orders_with_different_owners:
    get:
      summary: Returns customers from orders with different owner or partner
      operationId: customers_for_orders_with_different_owners
      tags:
      - Customers
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: customer_id
        in: path
        required: true
        schema:
          type: string
          description: Customer slug
        description: Customer slug
      responses:
        '200':
          description: Returns unique list of different owner and partner slugs
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/CustomersForOrdersWithDifferentOwnersResponse'
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '404':
          description: The specified resource was not found
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/customers/{customer_id}/client_report:
    get:
      summary: Generate client report
      operationId: generate_client_report
      tags:
      - Customers
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: customer_id
        in: path
        required: true
        schema:
          type: string
          description: Customer slug
        description: Customer slug
      - name: from
        in: query
        required: false
        schema:
          type: string
          description: Start date
          example: 09-2024
        description: The date from when to start
      - name: to
        in: query
        required: false
        schema:
          type: string
          description: End Date
          example: 10-2024
        description: The date from when to end
      responses:
        '200':
          description: Triggers generation of client report
          content:
            application/vnd.api+json:
              schema:
                type: object
                additionalProperties: false
        '400':
          description: BadRequest
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/customers/{customer_id}/gather_payment_consents:
    get:
      summary: Get customer payment consents
      operationId: gather_payment_consents
      tags:
      - Customers
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: customer_id
        in: path
        required: true
        schema:
          type: string
          description: Customer slug
        description: Customer slug
      - name: consents
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Get customer payment consents
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/GatherPaymentConsentsResponse'
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '404':
          description: The specified resource was not found
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
        '412':
          description: Precondition failed
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/PreconditionFailedError'
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/customers/{customer_id}/select_default_consent:
    put:
      summary: Select default consent
      operationId: select_default_consent
      tags:
      - Customers
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: customer_id
        in: path
        required: true
        schema:
          type: string
          description: Customer slug
        description: Customer slug
      requestBody:
        required: true
        description: ''
        content:
          application/vnd.api+json:
            schema:
              type: object
              properties:
                consent_id:
                  type: string
                  example: 52311690-5adb-420f-a154-82e21e46b2c1
              additionalProperties: false
      responses:
        '200':
          description: Default consent selected
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      attributes:
                        type: object
                        properties:
                          default_consent_id:
                            type: string
                            example: 52311690-5adb-420f-a154-82e21e46b2c1
                additionalProperties: false
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '404':
          description: The specified resource was not found
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
        '412':
          description: Preconditions failed
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/PreconditionFailedError'
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/customers/{customer_id}/validate_consent:
    get:
      summary: Validate consent
      operationId: validate_consent
      tags:
      - Customers
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: customer_id
        in: path
        required: true
        schema:
          type: string
          description: Customer slug
        description: Customer slug
      responses:
        '200':
          description: Valid consent
          content:
            application/vnd.api+json:
              schema:
                type: object
                additionalProperties: false
        '422':
          description: UnprocessableEntity
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        detail:
                          type: array
                          example:
                          - consent_invalid
                          items:
                            type: string
                additionalProperties: false
      security:
      - oauth2: []
      description: ' <br/> Scope: []'
  /api/v1/tenants/{tenant_id}/customers/{id}:
    put:
      summary: Updates a customer
      operationId: put_customer
      tags:
      - Customers
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: id
        in: path
        required: true
        schema:
          type: string
          description: Customer slug
        description: Customer slug
      requestBody:
        required: true
        description: ''
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/CustomerUpdateRequest'
      responses:
        '200':
          description: Customer Updated
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/CustomerResponseShow'
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '404':
          description: The specified resource was not found
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/orders/{order_id}/cancel_future_order:
    put:
      summary: Cancel a future order
      operationId: cancelFutureOrderOrder
      tags:
      - Order
      parameters:
      - name: order_id
        in: path
        required: true
        schema:
          type: string
          description: Order id
        description: Order id
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      responses:
        '200':
          description: A order
          content:
            application/vnd.api+json:
              schema:
                type: object
                additionalProperties: false
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/orders/bulk_future:
    post:
      summary: Creates bulk future orders
      operationId: bulkFutureOrders
      tags:
      - Order
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      requestBody:
        required: true
        description: ''
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/BulkFutureOrderRequest'
      responses:
        '201':
          description: Bulk future orders created
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: string
                additionalProperties: false
        '400':
          description: BadRequest
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '422':
          description: UnprocessableEntity
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: string
                    example:
                    - Product slug doesn't exist.
                additionalProperties: false
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/orders/cancel_all:
    put:
      summary: Cancel all orders
      operationId: cancelAllOrders
      tags:
      - Order
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: owner_slug
        in: query
        required: true
        schema:
          type: string
          description: Owner slug
        description: Owner slug
      - name: assignee_slug
        in: query
        required: true
        schema:
          type: string
          description: Assignee slug
        description: Assignee slug
      responses:
        '200':
          description: Cancel all orders
          content:
            application/vnd.api+json:
              schema:
                type: object
                additionalProperties: false
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/purchases/bulk:
    post:
      summary: Creates bulk purchases
      operationId: bulk
      tags:
      - Purchase
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      requestBody:
        required: true
        description: ''
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/BulkRequest'
      responses:
        '201':
          description: Creates purchases
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/BulkResponse'
        '400':
          description: BadRequest
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '404':
          description: The specified resource was not found
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
        '422':
          description: UnprocessableEntity
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        detail:
                          type: string
                          example: Owner is missing.
                additionalProperties: false
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/purchases/{purchase_id}/cancel_order:
    put:
      summary: Cancel Order
      operationId: cancelPurchaseOrder
      tags:
      - Purchase
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: purchase_id
        in: path
        required: true
        schema:
          type: string
          description: Purchase slug
        description: Purchase slug
      responses:
        '200':
          description: A purchase
          content:
            application/vnd.api+json:
              schema:
                type: object
                additionalProperties: false
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '404':
          description: The specified resource was not found
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/purchases/{purchase_id}/expire_purchase:
    put:
      summary: Expire a purchase
      operationId: expirePurchase
      tags:
      - Purchase
      parameters:
      - name: purchase_id
        in: path
        required: true
        schema:
          type: string
          description: Purchase slug
        description: Purchase slug
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      responses:
        '200':
          description: A purchase
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/PurchaseResponse'
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '404':
          description: The specified resource was not found
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
      security:
      - oauth2: []
      description: ''
  /api/v1/tenants/{tenant_id}/purchases/{purchase_id}/restart_order:
    put:
      summary: Restart Order
      operationId: restartPurchaseOrder
      tags:
      - Purchase
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          description: Tenant slug
        description: Tenant slug
      - name: purchase_id
        in: path
        required: true
        schema:
          type: string
          description: Purchase slug
        description: Purchase slug
      responses:
        '200':
          description: A purchase
          content:
            application/vnd.api+json:
              schema:
                type: object
                additionalProperties: false
        '401':
          description: Unauthorized
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '404':
          description: The specified resource was not found
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
      security:
      - oauth2: []
      description: ''
components:
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://api.uat.btx.fr.banqup.com/oauth2/client_credential/gettoken
          scopes:
            info: Scopes are endpoint-specific, see each endpoint for required scope.
        authorizationCode:
          authorizationUrl: https://api.uat.btx.fr.banqup.com/oauth2/auth
          tokenUrl: https://api.uat.btx.fr.banqup.com/oauth2/token
          scopes:
            info: Scopes are endpoint-specific, see each endpoint for required scope.
  schemas:
    BadRequestError:
      type: object
      default:
        errors: []
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              title:
                type: string
                example: Bad request
              code:
                type: string
                example: '400'
              status:
                type: string
                example: '400'
      additionalProperties: false
    ForbiddenError:
      type: object
      default:
        errors: []
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              title:
                type: string
                example: Forbidden
              code:
                type: string
                example: '403'
              status:
                type: string
                example: '403'
      additionalProperties: false
    NotFoundError:
      type: object
      default:
        errors: []
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              title:
                type: string
                example: Not found
              detail:
                type: string
                example: Not found
              code:
                type: string
                example: '404'
              status:
                type: string
                example: '404'
      additionalProperties: false
    UnauthorizedError:
      type: object
      default:
        errors: []
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              title:
                type: string
                example: You need to sign in or sign up before continuing.
              code:
                type: string
                example: '401'
              status:
                type: string
                example: '401'
      additionalProperties: false
    PreconditionFailedError:
      type: object
      default:
        errors: []
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              title:
                type: string
                example: Precondition failed
              code:
                type: string
                example: '412'
              status:
                type: integer
                example: 412
      additionalProperties: false
    PromoCodeResponse:
      type: object
      properties:
        id:
          type: string
          example: coupon_slug
      additionalProperties: false
    FetchCustomerDataResponse:
      type: object
      properties:
        dunning_email:
          type: string
          example: foobar@up.com
        autopay:
          type: boolean
        request_autopay_details:
          type: boolean
          example: true
        tax_code:
          type: string
          example: BE0317749333
        vat_liable:
          type: boolean
          example: true
        suspended:
          type: boolean
        owner_suspended:
          type: boolean
        payments_provider_supports_recurring:
          type: boolean
        customer_address:
          type: object
          properties:
            address:
              type: string
              example: 5519 Bernier Gateway
            city:
              type: string
              example: Timisoara
            country:
              type: string
              example: RO
            postal_code:
              type: string
              example: '123456'
      required:
      - dunning_email
      - autopay
      - request_autopay_details
      - tax_code
      - vat_liable
      - suspended
      - owner_suspended
      - payments_provider_supports_recurring
      additionalProperties: false
    FetchCustomerGroupDataResponse:
      type: object
      properties:
        groups_data:
          type: array
          example:
          - customer_group_slug:
              type: string
              example: customer group slug
            name:
              type: string
              example: name
          items:
            type: object
      additionalProperties: false
    FetchPromoCodeDataResponse:
      type: object
      properties:
        coupon_data:
          type: array
          example:
          - translated_name:
              type: string
              example: translated name
            currency:
              type: string
              example: EUR
            amount:
              type: string
              example: '21.0'
            promo_code:
              type: string
              example: PROMO
          items:
            type: object
      additionalProperties: false
    FetchCustomerInvoiceDiscountResponse:
      type: object
      properties:
        discount_percentage:
          type: string
          example: '20.0'
        translated_name:
          type: string
          example: translated_name
        item_name:
          type: string
          example: item_name
        item_description:
          type: string
          example: item_description
      additionalProperties: false
    FetchSubscriptionDetailsResponse:
      type: object
      properties:
        id:
          type: string
          example: product_slug
        name:
          type: string
          example: product_name
        active:
          type: boolean
          example: true
        purchase_details:
          type: object
          example:
            purchase_id:
              type: String
              example: active_purchase_slug
            start_date:
              type: String
              example: '2021-08-15'
            renewal_date:
              type: String
              example: '2021-09-01'
            end_date:
              type: String
              example: '2021-08-31'
            different_owner:
              type: boolean
              example: true
            owner_name:
              type: String
              example: owner_name
            period_quantity:
              type: Integer
              example: 1
          additionalProperties: false
        prices:
          type: object
          example:
            id:
              type: String
              example: price_id
            amount:
              type: String
              example: '12.43'
            discounted_amount:
              type: String
              example: '12.43'
            discount_end_date:
              type: String
              example: '2021-09-01'
            currency:
              type: String
              example: EUR
            term:
              type: String
              example: monthly
            period_quantity:
              type: Integer
              example: 1
            highest_supported_term:
              type: Integer
              example: 1
            monthly_amount:
              type: string
              example: '12.43'
            monthly_discounted_amount_for_highest_period_quantity:
              type: string
              example: '12.43'
            is_purchase_allowed:
              type: boolean
              example: true
            prorated_amount:
              type: object
              example:
                prorated:
                  type: boolean
                  example: true
                amount:
                  type: string
                  example: 12,43
                end_date:
                  type: String
                  example: '2021-09-01'
                start_date:
                  type: String
                  example: '2021-09-01'
        product_bundles:
          type: array
          example:
          - id:
              type: String
              example: bundle_id
            name:
              type: String
              example: bundle_name
            size:
              type: Integer
              example: 1
            term:
              type: String
              example: monthly
            allow_out_of_bundle:
              type: boolean
              example: true
            oob_price:
              type: number
              example: '12.43'
            currency:
              type: String
              example: EUR
          items:
            type: object
        product_license_bundles:
          type: array
          example:
          - id:
              type: String
              example: license_bundle_id
            name:
              type: String
              example: license_bundle_name
            size:
              type: Integer
              example: 1
            term:
              type: String
              example: monthly
            allow_out_of_bundle:
              type: boolean
              example: true
            oob_price:
              type: number
              example: '12.43'
            currency:
              type: String
              example: EUR
          items:
            type: object
        product_features:
          type: array
          example:
          - name:
              type: String
              example: product_metadata_name
            value:
              type: String
              example: free text
            value_type:
              type: String
              example: boolean
          items:
            type: object
        template_data:
          type: object
          example:
            template_id:
              type: String
              example: template_id
            template_name:
              type: String
              example: template_name
            tiered_bundle_slug:
              type: String
              example: tiered_bundle_slug
          additionalProperties: false
        products_with_same_template:
          type: array
          example:
          - product_slug:
              type: String
              example: product_slug
            tiered_bundle_slug:
              type: String
              example: tiered_bundle_slug
            tiered_bundle_size:
              type: Integer
              example: 100
            prices:
              type:
              - Object
              example:
              - id:
                  type: String
                  example: price_id
                amount:
                  type: number
                  example: '12.43'
                discounted_amount:
                  type: number
                  example: '12.43'
                discount_end_date:
                  type: String
                  example: '2021-09-01'
                currency:
                  type: String
                  example: EUR
                term:
                  type: String
                  example: monthly
                period_quantity:
                  type: Integer
                  example: 1
                highest_supported_term:
                  type: Integer
                  example: 1
                monthly_amount:
                  type: number
                  example: '12.43'
                monthly_discounted_amount_for_highest_period_quantity:
                  type: number
                  example: '12.43'
                prorated_amount:
                  type: Object
                  example:
                    prorated:
                      type: boolean
                      example: true
                    amount:
                      type: number
                      example: '12.43'
                    end_date:
                      type: String
                      example: '2021-09-01'
                    start_date:
                      type: String
                      example: '2021-09-01'
                is_purchase_allowed:
                  type: boolean
                  example: true
          items:
            type: object
        add_ons:
          type: array
          example:
          - id:
              type: String
              example: add_on_slug
            name:
              type: String
              example: add_on_name
            active:
              type: boolean
              example: true
            purchase_details:
              type: Object
              example:
                purchase_id:
                  type: String
                  example: active_purchase_slug
                start_date:
                  type: String
                  example: '2021-08-15'
                renewal_date:
                  type: String
                  example: '2021-09-01'
                end_date:
                  type: String
                  example: '2021-08-31'
                different_owner:
                  type: boolean
                  example: true
                owner_name:
                  type: String
                  example: owner_name
                period_quantity:
                  type: Integer
                  example: 1
            prices:
              type:
              - Object
              example:
              - id:
                  type: String
                  example: price_id
                amount:
                  type: number
                  example: '12.43'
                discounted_amount:
                  type: number
                  example: '12.43'
                discount_end_date:
                  type: String
                  example: '2021-09-01'
                currency:
                  type: String
                  example: EUR
                term:
                  type: String
                  example: monthly
                period_quantity:
                  type: Integer
                  example: 1
                highest_supported_term:
                  type: Integer
                  example: 1
                monthly_amount:
                  type: number
                  example: '12.43'
                monthly_discounted_amount_for_highest_period_quantity:
                  type: number
                  example: '12.43'
                prorated_amount:
                  type: Object
                  example:
                    prorated:
                      type: boolean
                      example: true
                    amount:
                      type: number
                      example: '12.43'
                    end_date:
                      type: String
                      example: '2021-09-01'
                    start_date:
                      type: String
                      example: '2021-09-01'
                is_purchase_allowed:
                  type: boolean
                  example: true
            product_bundles:
              type:
              - Object
              example:
              - id:
                  type: String
                  example: bundle_id
                name:
                  type: String
                  example: bundle_name
                size:
                  type: Integer
                  example: 1
                term:
                  type: String
                  example: monthly
                allow_out_of_bundle:
                  type: boolean
                  example: true
                oob_price:
                  type: number
                  example: '12.43'
                currency:
                  type: String
                  example: EUR
            product_license_bundles:
              type:
              - Object
              example:
              - id:
                  type: String
                  example: license_bundle_id
                name:
                  type: String
                  example: license_bundle_name
                size:
                  type: Integer
                  example: 1
                term:
                  type: String
                  example: monthly
                allow_out_of_bundle:
                  type: boolean
                  example: true
                oob_price:
                  type: number
                  example: '12.43'
                currency:
                  type: String
                  example: EUR
            product_features:
              type:
              - Object
              example:
              - name:
                  type: String
                  example: product_metadata_name
                value:
                  type: String
                  example: free text
                value_type:
                  type: String
                  example: boolean
            template_data:
              type: Object
              example:
                template_id:
                  type: String
                  example: template_id
                template_name:
                  type: String
                  example: template_name
                tiered_bundle_slug:
                  type: String
                  example: tiered_bundle_slug
            add_ons_with_same_template:
              type: Object
              example:
                product_slug:
                  type: String
                  example: product_slug
                tiered_bundle_size:
                  type: String
                  example: tiered_bundle_size
                tiered_bundle_slug:
                  type: String
                  example: tiered_bundle_slug
                prices:
                  type:
                  - Object
                  example:
                  - id:
                      type: String
                      example: price_id
                    amount:
                      type: number
                      example: '12.43'
                    discounted_amount:
                      type: number
                      example: '12.43'
                    discount_end_date:
                      type: String
                      example: '2021-09-01'
                    currency:
                      type: String
                      example: EUR
                    term:
                      type: String
                      example: monthly
                    period_quantity:
                      type: Integer
                      example: 1
                    highest_supported_term:
                      type: Integer
                      example: 1
                    monthly_amount:
                      type: number
                      example: '12.43'
                    monthly_discounted_amount_for_highest_period_quantity:
                      type: number
                      example: '12.43'
                    prorated_amount:
                      type: Object
                      example:
                        prorated:
                          type: boolean
                          example: true
                        amount:
                          type: number
                          example: '12.43'
                        end_date:
                          type: String
                          example: '2021-09-01'
                        start_date:
                          type: String
                          example: '2021-09-01'
                    is_purchase_allowed:
                      type: boolean
                      example: true
            hidden:
              type: boolean
              example: true
            description:
              type: string
              example: description
          items:
            type: object
        customer_active_bundles:
          type: array
          example:
          - id:
              type: String
              example: bundle_id
            name:
              type: String
              example: bundle_name
            size:
              type: Integer
              example: 1
            term:
              type: String
              example: monthly
            allow_out_of_bundle:
              type: boolean
              example: true
            oob_price:
              type: number
              example: '12.43'
            currency:
              type: String
              example: EUR
          items:
            type: object
        customer_active_license_bundles:
          type: array
          example:
          - id:
              type: String
              example: license_bundle_id
            name:
              type: String
              example: license_bundle_name
            size:
              type: Integer
              example: 1
            term:
              type: String
              example: monthly
            allow_out_of_bundle:
              type: boolean
              example: true
            oob_price:
              type: number
              example: '12.43'
            currency:
              type: String
              example: EUR
          items:
            type: object
        customer_active_features:
          type: array
          example:
          - name:
              type: String
              example: product_metadata_name
            value:
              type: String
              example: free text
            value_type:
              type: String
              example: boolean
          items:
            type: object
        available_quantities:
          type: array
          example:
          - value:
              type: Integer
              example: 1
          items:
            type: object
        active_quantity_term:
          type: integer
          example: 1
        next_renewal_date:
          type: string
          example: '2021-09-01'
        description:
          type: string
          example: description
      additionalProperties: false
    FetchPlanDetailsResponse:
      type: object
      properties:
        id:
          type: string
          example: product_slug
        name:
          type: string
          example: product_name
        active:
          type: boolean
          example: true
        purchase_details:
          type: object
          example:
            purchase_id:
              type: String
              example: active_purchase_slug
            start_date:
              type: String
              example: '2021-08-15'
            renewal_date:
              type: String
              example: '2021-09-01'
            end_date:
              type: String
              example: '2021-08-31'
            different_owner:
              type: boolean
              example: true
            owner_name:
              type: String
              example: owner_name
            period_quantity:
              type: Integer
              example: 1
            deletable:
              type: boolean
              example: false
            renewable:
              type: boolean
              example: true
            cancelable:
              type: boolean
              example: true
            expirable:
              type: boolean
              example: true
            paid_by_client:
              type: boolean
              example: false
            paid_by_other_partner:
              type: boolean
              example: true
          additionalProperties: false
        prices:
          type: object
          example:
            id:
              type: String
              example: price_id
            amount:
              type: String
              example: '12.43'
            discounted_amount:
              type: String
              example: '12.43'
            discount_end_date:
              type: String
              example: '2021-09-01'
            currency:
              type: String
              example: EUR
            term:
              type: String
              example: monthly
            period_quantity:
              type: Integer
              example: 1
            highest_supported_term:
              type: Integer
              example: 1
            monthly_amount:
              type: string
              example: '12.43'
            monthly_discounted_amount_for_highest_period_quantity:
              type: string
              example: '12.43'
            is_purchase_allowed:
              type: boolean
              example: true
            prorated_amount:
              type: object
              example:
                prorated:
                  type: boolean
                  example: true
                amount:
                  type: string
                  example: 12,43
                end_date:
                  type: String
                  example: '2021-09-01'
                start_date:
                  type: String
                  example: '2021-09-01'
        product_bundles:
          type: array
          example:
          - id:
              type: String
              example: bundle_id
            name:
              type: String
              example: bundle_name
            size:
              type: Integer
              example: 1
            term:
              type: String
              example: monthly
            allow_out_of_bundle:
              type: boolean
              example: true
            oob_price:
              type: number
              example: '12.43'
            currency:
              type: String
              example: EUR
          items:
            type: object
        product_license_bundles:
          type: array
          example:
          - id:
              type: String
              example: license_bundle_id
            name:
              type: String
              example: license_bundle_name
            size:
              type: Integer
              example: 1
            term:
              type: String
              example: monthly
            allow_out_of_bundle:
              type: boolean
              example: true
            oob_price:
              type: number
              example: '12.43'
            currency:
              type: String
              example: EUR
          items:
            type: object
        product_fees:
          type: array
          example:
          - item:
              type: String
              example: cards
            translated_name:
              type: String
              example: Cards
            percentage:
              type: number
              example: '2.43'
          items:
            type: object
        product_features:
          type: array
          example:
          - name:
              type: String
              example: product_metadata_name
            value:
              type: String
              example: free text
            value_type:
              type: String
              example: boolean
          items:
            type: object
        template_data:
          type: object
          example:
            template_id:
              type: String
              example: template_id
            template_name:
              type: String
              example: template_name
            tiered_bundle_slug:
              type: String
              example: tiered_bundle_slug
          additionalProperties: false
        products_with_same_template:
          type: array
          example:
          - product_slug:
              type: String
              example: product_slug
            tiered_bundle_slug:
              type: String
              example: tiered_bundle_slug
            tiered_bundle_size:
              type: Integer
              example: 100
            prices:
              type:
              - Object
              example:
              - id:
                  type: String
                  example: price_id
                amount:
                  type: number
                  example: '12.43'
                discounted_amount:
                  type: number
                  example: '12.43'
                discount_end_date:
                  type: String
                  example: '2021-09-01'
                currency:
                  type: String
                  example: EUR
                term:
                  type: String
                  example: monthly
                period_quantity:
                  type: Integer
                  example: 1
                highest_supported_term:
                  type: Integer
                  example: 1
                monthly_amount:
                  type: number
                  example: '12.43'
                monthly_discounted_amount_for_highest_period_quantity:
                  type: number
                  example: '12.43'
                prorated_amount:
                  type: Object
                  example:
                    prorated:
                      type: boolean
                      example: true
                    amount:
                      type: number
                      example: '12.43'
                    end_date:
                      type: String
                      example: '2021-09-01'
                    start_date:
                      type: String
                      example: '2021-09-01'
                is_purchase_allowed:
                  type: boolean
                  example: true
          items:
            type: object
        add_ons:
          type: array
          example:
          - template_id:
              type: String
              example: template_id
            template_records:
              type: array
              example:
              - id:
                  type: String
                  example: add_on_slug
                name:
                  type: String
                  example: add_on_name
                active:
                  type: boolean
                  example: true
                purchase_details:
                  type: Object
                  example:
                    purchase_id:
                      type: String
                      example: active_purchase_slug
                    start_date:
                      type: String
                      example: '2021-08-15'
                    renewal_date:
                      type: String
                      example: '2021-09-01'
                    end_date:
                      type: String
                      example: '2021-08-31'
                    different_owner:
                      type: boolean
                      example: true
                    owner_name:
                      type: String
                      example: owner_name
                    period_quantity:
                      type: Integer
                      example: 1
                    deletable:
                      type: boolean
                      example: false
                    renewable:
                      type: boolean
                      example: true
                    cancelable:
                      type: boolean
                      example: true
                    paid_by_client:
                      type: boolean
                      example: false
                    paid_by_other_partner:
                      type: boolean
                      example: true
                prices:
                  type:
                  - Object
                  example:
                  - id:
                      type: String
                      example: price_id
                    amount:
                      type: number
                      example: '12.43'
                    discounted_amount:
                      type: number
                      example: '12.43'
                    discount_end_date:
                      type: String
                      example: '2021-09-01'
                    currency:
                      type: String
                      example: EUR
                    term:
                      type: String
                      example: monthly
                    period_quantity:
                      type: Integer
                      example: 1
                    highest_supported_term:
                      type: Integer
                      example: 1
                    monthly_amount:
                      type: number
                      example: '12.43'
                    monthly_discounted_amount_for_highest_period_quantity:
                      type: number
                      example: '12.43'
                    prorated_amount:
                      type: Object
                      example:
                        prorated:
                          type: boolean
                          example: true
                        amount:
                          type: number
                          example: '12.43'
                        end_date:
                          type: String
                          example: '2021-09-01'
                        start_date:
                          type: String
                          example: '2021-09-01'
                    is_purchase_allowed:
                      type: boolean
                      example: true
                product_bundles:
                  type:
                  - Object
                  example:
                  - id:
                      type: String
                      example: bundle_id
                    name:
                      type: String
                      example: bundle_name
                    size:
                      type: Integer
                      example: 1
                    term:
                      type: String
                      example: monthly
                    allow_out_of_bundle:
                      type: boolean
                      example: true
                    oob_price:
                      type: number
                      example: '12.43'
                    currency:
                      type: String
                      example: EUR
                product_license_bundles:
                  type:
                  - Object
                  example:
                  - id:
                      type: String
                      example: license_bundle_id
                    name:
                      type: String
                      example: license_bundle_name
                    size:
                      type: Integer
                      example: 1
                    term:
                      type: String
                      example: monthly
                    allow_out_of_bundle:
                      type: boolean
                      example: true
                    oob_price:
                      type: number
                      example: '12.43'
                    currency:
                      type: String
                      example: EUR
                product_features:
                  type:
                  - Object
                  example:
                  - name:
                      type: String
                      example: product_metadata_name
                    value:
                      type: String
                      example: free text
                    value_type:
                      type: String
                      example: boolean
                template_data:
                  type: Object
                  example:
                    template_id:
                      type: String
                      example: template_id
                    template_name:
                      type: String
                      example: template_name
                    tiered_bundle_slug:
                      type: String
                      example: tiered_bundle_slug
                hidden:
                  type: boolean
                  example: true
                description:
                  type: string
                  example: description
          items:
            type: object
        customer_active_bundles:
          type: array
          example:
          - id:
              type: String
              example: bundle_id
            name:
              type: String
              example: bundle_name
            size:
              type: Integer
              example: 1
            term:
              type: String
              example: monthly
            allow_out_of_bundle:
              type: boolean
              example: true
            oob_price:
              type: number
              example: '12.43'
            currency:
              type: String
              example: EUR
          items:
            type: object
        customer_active_license_bundles:
          type: array
          example:
          - id:
              type: String
              example: license_bundle_id
            name:
              type: String
              example: license_bundle_name
            size:
              type: Integer
              example: 1
            term:
              type: String
              example: monthly
            allow_out_of_bundle:
              type: boolean
              example: true
            oob_price:
              type: number
              example: '12.43'
            currency:
              type: String
              example: EUR
          items:
            type: object
        customer_active_features:
          type: array
          example:
          - name:
              type: String
              example: product_metadata_name
            value:
              type: String
              example: free text
            value_type:
              type: String
              example: boolean
          items:
            type: object
        available_quantities:
          type: array
          example:
          - value:
              type: Integer
              example: 1
          items:
            type: object
        active_quantity_term:
          type: integer
          example: 1
        next_renewal_date:
          type: string
          example: '2021-09-01'
        description:
          type: string
          example: description
      additionalProperties: false
    FetchPlanDetailsForClientsResponse:
      type: object
      properties:
        id:
          type: string
          example: product_slug
        name:
          type: string
          example: product_name
        prices:
          type: object
          example:
            id:
              type: String
              example: price_id
            amount:
              type: String
              example: '12.43'
            discounted_amount:
              type: String
              example: '12.43'
            discount_end_date:
              type: String
              example: '2021-09-01'
            currency:
              type: String
              example: EUR
            term:
              type: String
              example: monthly
            period_quantity:
              type: Integer
              example: 1
        product_bundles:
          type: array
          example:
          - id:
              type: String
              example: bundle_id
            name:
              type: String
              example: bundle_name
            size:
              type: Integer
              example: 1
            term:
              type: String
              example: monthly
            allow_out_of_bundle:
              type: boolean
              example: true
            oob_price:
              type: number
              example: '12.43'
            currency:
              type: String
              example: EUR
          items:
            type: object
        product_license_bundles:
          type: array
          example:
          - id:
              type: String
              example: license_bundle_id
            name:
              type: String
              example: license_bundle_name
            size:
              type: Integer
              example: 1
            term:
              type: String
              example: monthly
            allow_out_of_bundle:
              type: boolean
              example: true
            oob_price:
              type: number
              example: '12.43'
            currency:
              type: String
              example: EUR
          items:
            type: object
        product_features:
          type: array
          example:
          - name:
              type: String
              example: product_metadata_name
            value:
              type: String
              example: free text
            value_type:
              type: String
              example: boolean
          items:
            type: object
        template_data:
          type: object
          example:
            template_id:
              type: String
              example: template_id
            template_name:
              type: String
              example: template_name
            tiered_bundle_slug:
              type: String
              example: tiered_bundle_slug
          additionalProperties: false
        products_with_same_template:
          type: array
          example:
          - product_slug:
              type: String
              example: product_slug
            tiered_bundle_slug:
              type: String
              example: tiered_bundle_slug
            tiered_bundle_size:
              type: Integer
              example: 100
            prices:
              type:
              - Object
              example:
              - id:
                  type: String
                  example: price_id
                amount:
                  type: number
                  example: '12.43'
                discounted_amount:
                  type: number
                  example: '12.43'
                discount_end_date:
                  type: String
                  example: '2021-09-01'
                currency:
                  type: String
                  example: EUR
                term:
                  type: String
                  example: monthly
                period_quantity:
                  type: Integer
                  example: 1
          items:
            type: object
        add_ons:
          type: array
          example:
          - template_id:
              type: String
              example: template_id
            template_records:
              type: array
              example:
              - id:
                  type: String
                  example: add_on_slug
                name:
                  type: String
                  example: add_on_name
                prices:
                  type:
                  - Object
                  example:
                  - id:
                      type: String
                      example: price_id
                    amount:
                      type: number
                      example: '12.43'
                    discounted_amount:
                      type: number
                      example: '12.43'
                    discount_end_date:
                      type: String
                      example: '2021-09-01'
                    currency:
                      type: String
                      example: EUR
                    term:
                      type: String
                      example: monthly
                    period_quantity:
                      type: Integer
                      example: 1
                product_bundles:
                  type:
                  - Object
                  example:
                  - id:
                      type: String
                      example: bundle_id
                    name:
                      type: String
                      example: bundle_name
                    size:
                      type: Integer
                      example: 1
                    term:
                      type: String
                      example: monthly
                    allow_out_of_bundle:
                      type: boolean
                      example: true
                    oob_price:
                      type: number
                      example: '12.43'
                    currency:
                      type: String
                      example: EUR
                product_license_bundles:
                  type:
                  - Object
                  example:
                  - id:
                      type: String
                      example: license_bundle_id
                    name:
                      type: String
                      example: license_bundle_name
                    size:
                      type: Integer
                      example: 1
                    term:
                      type: String
                      example: monthly
                    allow_out_of_bundle:
                      type: boolean
                      example: true
                    oob_price:
                      type: number
                      example: '12.43'
                    currency:
                      type: String
                      example: EUR
                product_features:
                  type:
                  - Object
                  example:
                  - name:
                      type: String
                      example: product_metadata_name
                    value:
                      type: String
                      example: free text
                    value_type:
                      type: String
                      example: boolean
                template_data:
                  type: Object
                  example:
                    template_id:
                      type: String
                      example: template_id
                    template_name:
                      type: String
                      example: template_name
                    tiered_bundle_slug:
                      type: String
                      example: tiered_bundle_slug
                hidden:
                  type: boolean
                  example: true
                description:
                  type: string
                  example: description
          items:
            type: object
        available_quantities:
          type: array
          example:
          - value:
              type: Integer
              example: 1
          items:
            type: object
        description:
          type: string
          example: description
      additionalProperties: false
    FetchSubscriptionsForCustomerResponse:
      type: object
      properties:
        id:
          type: string
          example: product_slug
        name:
          type: string
          example: product_name
        active:
          type: boolean
          example: true
        purchase_details:
          type: object
          example:
            purchase_id:
              type: String
              example: active_purchase_slug
            start_date:
              type: String
              example: '2021-08-15'
            renewal_date:
              type: String
              example: '2021-09-01'
            end_date:
              type: String
              example: '2021-08-31'
            different_owner:
              type: boolean
              example: true
            owner_name:
              type: String
              example: owner_name
            period_quantity:
              type: Integer
              example: 1
          additionalProperties: false
        prices:
          type: array
          example:
          - id:
              type: String
              example: price_id
            amount:
              type: number
              example: '12.43'
            discounted_amount:
              type: number
              example: '12.43'
            discount_end_date:
              type: String
              example: '2021-09-01'
            currency:
              type: String
              example: EUR
            term:
              type: String
              example: monthly
            period_quantity:
              type: Integer
              example: 1
            highest_supported_term:
              type: Integer
              example: 1
            monthly_amount:
              type: number
              example: '12.43'
            monthly_discounted_amount_for_highest_period_quantity:
              type: number
              example: '12.43'
          items:
            type: object
        bundles:
          type: array
          example:
          - id:
              type: String
              example: bundle_id
            name:
              type: String
              example: bundle_name
            size:
              type: Integer
              example: 1
            term:
              type: String
              example: monthly
            allow_out_of_bundle:
              type: boolean
              example: true
            oob_price:
              type: number
              example: '12.43'
            currency:
              type: String
              example: EUR
          items:
            type: object
        license_bundles:
          type: array
          example:
          - id:
              type: String
              example: license_bundle_id
            name:
              type: String
              example: license_bundle_name
            size:
              type: Integer
              example: 1
            term:
              type: String
              example: monthly
            allow_out_of_bundle:
              type: boolean
              example: true
            oob_price:
              type: number
              example: '12.43'
            currency:
              type: String
              example: EUR
          items:
            type: object
        fees:
          type: array
          example:
          - item:
              type: String
              example: cards
            translated_name:
              type: String
              example: Cards
            percentage:
              type: number
              example: '2.43'
          items:
            type: object
        features:
          type: array
          example:
          - name:
              type: String
              example: product_metadata_name
            value:
              type: String
              example: free text
            value_type:
              type: String
              example: boolean
          items:
            type: object
        allows_add_ons:
          type: boolean
          example: true
        template_data:
          type: object
          example:
            template_id:
              type: String
              example: template_id
            template_name:
              type: String
              example: template_name
            tiered_bundle_slug:
              type: String
              example: tiered_bundle_slug
            prices:
              type:
              - Object
              example:
              - id:
                  type: String
                  example: price_id
                amount:
                  type: number
                  example: '12.43'
                discounted_amount:
                  type: number
                  example: '12.43'
                discount_end_date:
                  type: String
                  example: '2021-09-01'
                currency:
                  type: String
                  example: EUR
                term:
                  type: String
                  example: monthly
                period_quantity:
                  type: Integer
                  example: 1
                highest_supported_term:
                  type: Integer
                  example: 1
                monthly_amount:
                  type: number
                  example: '12.43'
                monthly_discounted_amount_for_highest_period_quantity:
                  type: number
                  example: '12.43'
                prorated_amount:
                  type: Object
                  example:
                    prorated:
                      type: boolean
                      example: true
                    amount:
                      type: number
                      example: '12.43'
                    end_date:
                      type: String
                      example: '2021-09-01'
                    start_date:
                      type: String
                      example: '2021-09-01'
                is_purchase_allowed:
                  type: boolean
                  example: true
          additionalProperties: false
        description:
          type: string
          example: description
      additionalProperties: false
    FetchPlansForCustomerResponse:
      type: object
      properties:
        template_id:
          type: string
          example: template_id
        template_data:
          type: object
          example:
            template_name:
              type: String
              example: template_name
            tiered_bundle_slug:
              type: String
              example: tiered_bundle_slug
          additionalProperties: false
        template_products_data:
          type: array
          example:
          - id:
              type: String
              example: product_slug
            name:
              type: String
              example: product_name
            active:
              type: boolean
              example: true
            purchase_details:
              type: Object
              example:
                purchase_id:
                  type: String
                  example: active_purchase_slug
                start_date:
                  type: String
                  example: '2021-08-15'
                renewal_date:
                  type: String
                  example: '2021-09-01'
                end_date:
                  type: String
                  example: '2021-08-31'
                different_owner:
                  type: boolean
                  example: true
                owner_name:
                  type: String
                  example: owner_name
                period_quantity:
                  type: Integer
                  example: 1
            prices:
              type:
              - Object
              example:
              - id:
                  type: String
                  example: price_id
                amount:
                  type: number
                  example: '12.43'
                discounted_amount:
                  type: number
                  example: '12.43'
                discount_end_date:
                  type: String
                  example: '2021-09-01'
                currency:
                  type: String
                  example: EUR
                term:
                  type: String
                  example: monthly
                period_quantity:
                  type: Integer
                  example: 1
                highest_supported_term:
                  type: Integer
                  example: 1
                monthly_amount:
                  type: number
                  example: '12.43'
                monthly_discounted_amount_for_highest_period_quantity:
                  type: number
                  example: '12.43'
            product_bundles:
              type: array
              example:
              - id:
                  type: String
                  example: bundle_id
                name:
                  type: String
                  example: bundle_name
                size:
                  type: Integer
                  example: 1
                term:
                  type: String
                  example: monthly
                allow_out_of_bundle:
                  type: boolean
                  example: true
                oob_price:
                  type: number
                  example: '12.43'
                currency:
                  type: String
                  example: EUR
              items:
                type: object
            product_license_bundles:
              type: array
              example:
              - id:
                  type: String
                  example: license_bundle_id
                name:
                  type: String
                  example: license_bundle_name
                size:
                  type: Integer
                  example: 1
                term:
                  type: String
                  example: monthly
                allow_out_of_bundle:
                  type: boolean
                  example: true
                oob_price:
                  type: number
                  example: '12.43'
                currency:
                  type: String
                  example: EUR
              items:
                type: object
            product_features:
              type: array
              example:
              - name:
                  type: String
                  example: product_metadata_name
                value:
                  type: String
                  example: free text
                value_type:
                  type: String
                  example: boolean
              items:
                type: object
            template_bundle:
              type: Object
              example:
                id:
                  type: String
                  example: bundle_id
                name:
                  type: String
                  example: bundle_name
                size:
                  type: Integer
                  example: 1
                term:
                  type: String
                  example: monthly
                allow_out_of_bundle:
                  type: boolean
                  example: true
                oob_price:
                  type: number
                  example: '12.43'
                currency:
                  type: String
                  example: EUR
            allows_add_ons:
              type: boolean
              example: true
            description:
              type: String
              example: Description
          items:
            type: object
      additionalProperties: false
    FetchPlansForCustomerClientsResponse:
      type: object
      properties:
        template_id:
          type: string
          example: template_id
        template_data:
          type: object
          example:
            template_name:
              type: String
              example: template_name
            tiered_bundle_slug:
              type: String
              example: tiered_bundle_slug
          additionalProperties: false
        template_products_data:
          type: array
          example:
          - id:
              type: String
              example: product_slug
            name:
              type: String
              example: product_name
            prices:
              type:
              - Object
              example:
              - id:
                  type: String
                  example: price_id
                amount:
                  type: number
                  example: '12.43'
                discounted_amount:
                  type: number
                  example: '12.43'
                discount_end_date:
                  type: String
                  example: '2021-09-01'
                currency:
                  type: String
                  example: EUR
                term:
                  type: String
                  example: monthly
                period_quantity:
                  type: Integer
                  example: 1
                highest_supported_term:
                  type: Integer
                  example: 1
                monthly_amount:
                  type: number
                  example: '12.43'
                monthly_discounted_amount_for_highest_period_quantity:
                  type: number
                  example: '12.43'
            template_bundle:
              type: Object
              example:
                id:
                  type: String
                  example: bundle_id
                name:
                  type: String
                  example: bundle_name
                size:
                  type: Integer
                  example: 1
                term:
                  type: String
                  example: monthly
                currency:
                  type: String
                  example: EUR
            allows_add_ons:
              type: boolean
              example: true
            description:
              type: String
              example: Description
          items:
            type: object
      additionalProperties: false
    FetchPlansInfoResponse:
      type: array
      items:
        type: object
        properties:
          name:
            type: string
            example: product_name
          currency:
            type: string
            example: EUR
          period_quantity:
            type: integer
            example: 1
          full_price:
            type: number
            example: '12.43'
          discounted_amount:
            type: number
            example: '12.43'
    ActiveCustomerTermResponse:
      type: object
      properties:
        period_quantity:
          type: integer
          example: 1
      additionalProperties: false
    CustomersForOrdersWithDifferentOwnersResponse:
      type: object
      properties:
        customers:
          type: array
          items:
            type: string
            example: spaceId
      additionalProperties: false
    FetchSubscriptionsWithFeatureResponse:
      type: object
      properties:
        product_slug:
          type: string
          example: product_slug
        add_on_slug:
          type: string
          example: add_on_slug
      additionalProperties: false
    FetchSubscriptionsWithFeaturesResponse:
      type: object
      properties:
        product_slug:
          type: string
          example: product_slug
        add_on_slugs:
          type: array
          items:
            type: string
            example: add_on_slug
        available_for_client:
          type: boolean
          example: false
      additionalProperties: false
    FetchCustomerActiveSubscriptions:
      type: object
      properties:
        main_subscriptions:
          type: array
          example:
          - order_id:
              type: Integer
              example: 1
            purchase_slug:
              type: String
              example: purchase_slug
            product_slug:
              type: String
              example: product_slug
            different_owner:
              type: boolean
              example: true
            product_name:
              type: String
              example: product_name
            free_price:
              type: boolean
              example: true
            start_date:
              type: String
              example: '2021-08-14'
            end_date:
              type: String
              example: '2021-08-15'
            renewal_date:
              type: String
              example: '2021-09-14'
            term:
              type: String
              example: monthly
            future_order:
              type: boolean
              example: true
            deletable:
              type: boolean
              example: true
            renewable:
              type: boolean
              example: false
            cancelable:
              type: boolean
              example: true
          items:
            type: object
        add_ons:
          type: array
          example:
          - order_id:
              type: String
              example: order_id
            purchase_slug:
              type: String
              example: purchase_slug
            product_slug:
              type: String
              example: product_slug
            different_owner:
              type: boolean
              example: true
            product_name:
              type: String
              example: product_name
            free_price:
              type: boolean
              example: true
            start_date:
              type: String
              example: '2021-08-14'
            end_date:
              type: String
              example: '2021-08-15'
            renewal_date:
              type: String
              example: '2021-09-14'
            term:
              type: String
              example: monthly
            future_order:
              type: boolean
              example: true
            deletable:
              type: boolean
              example: true
            renewable:
              type: boolean
              example: false
            cancelable:
              type: boolean
              example: true
          items:
            type: object
        allow_future_order:
          type: boolean
          example: true
      required:
      - main_subscriptions
      - add_ons
      additionalProperties: false
    FetchCustomerFailedInvoices:
      type: object
      properties:
        billing_period_start:
          type: string
          example: '2021-08-15'
        billing_period_end:
          type: string
          example: '2021-08-15'
        date:
          type: string
          example: '2021-08-15'
        due_date:
          type: string
          example: '2021-08-15'
        amount:
          type: string
          example: '12.43'
        exclusive_amount:
          type: string
          example: '12.43'
        vat_amount:
          type: string
          example: '12.43'
        vat_percentage:
          type: integer
          example: 1
        payment_link:
          type: string
          example: payment_link
        details:
          type: object
          properties:
            purchases:
              type: array
              items:
                type: object
                properties:
                  quantity:
                    type: integer
                    example: 1
                  price:
                    type: string
                    example: '12.43'
                  start_date:
                    type: string
                    example: '2021-08-15'
                  end_date:
                    type: string
                    example: '2021-08-15'
                  item_name:
                    type: string
                    example: item_name
                  item_description:
                    type: string
                    example: item_description
                  currency:
                    type: string
                    example: EUR
                  translated_name:
                    type: string
                    example: translated_name
            oob:
              type: array
              items:
                type: object
                properties:
                  quantity:
                    type: integer
                    example: 1
                  price:
                    type: string
                    example: '12.43'
                  start_date:
                    type: string
                    example: '2021-08-15'
                  end_date:
                    type: string
                    example: '2021-08-15'
                  item_name:
                    type: string
                    example: item_name
                  item_description:
                    type: string
                    example: item_description
                  currency:
                    type: string
                    example: EUR
                  translated_name:
                    type: string
                    example: translated_name
            license_purchases:
              type: array
              items:
                type: object
                properties:
                  quantity:
                    type: integer
                    example: 1
                  price:
                    type: string
                    example: '12.43'
                  start_date:
                    type: string
                    example: '2021-08-15'
                  end_date:
                    type: string
                    example: '2021-08-15'
                  item_name:
                    type: string
                    example: item_name
                  item_description:
                    type: string
                    example: item_description
                  currency:
                    type: string
                    example: EUR
                  translated_name:
                    type: string
                    example: translated_name
            customer_coupons:
              type: array
              items:
                type: object
                properties:
                  quantity:
                    type: integer
                    example: 1
                  price:
                    type: string
                    example: '12.43'
                  start_date:
                    type: string
                    example: '2021-08-15'
                  end_date:
                    type: string
                    example: '2021-08-15'
                  item_name:
                    type: string
                    example: item_name
                  item_description:
                    type: string
                    example: item_description
                  currency:
                    type: string
                    example: EUR
                  translated_name:
                    type: string
                    example: translated_name
            applied_invoice_discount:
              type: array
              items:
                type: object
                properties:
                  quantity:
                    type: integer
                    example: 1
                  price:
                    type: string
                    example: '12.43'
                  start_date:
                    type: string
                    example: '2021-08-15'
                  end_date:
                    type: string
                    example: '2021-08-15'
                  item_name:
                    type: string
                    example: item_name
                  item_description:
                    type: string
                    example: item_description
                  currency:
                    type: string
                    example: EUR
                  translated_name:
                    type: string
                    example: translated_name
      additionalProperties: false
    FetchClientsInvoicesDetailsResponse:
      type: object
      properties:
        total_amount_excl_vat:
          type: string
          example: '12.43'
        currency:
          type: string
          example: EUR
        invoices_data:
          type: object
          properties:
            purchases:
              type: array
              items:
                type: object
                properties:
                  quantity:
                    type: integer
                    example: 1
                  price:
                    type: string
                    example: '12.43'
                  currency:
                    type: string
                    example: EUR
                  translated_name:
                    type: string
                    example: translated_name
                  renewable:
                    type: boolean
                    example: true
                  add_on:
                    type: boolean
                    example: true
            oob_purchases:
              type: array
              items:
                type: object
                properties:
                  quantity:
                    type: integer
                    example: 1
                  price:
                    type: string
                    example: '12.43'
                  currency:
                    type: string
                    example: EUR
                  translated_name:
                    type: string
                    example: translated_name
            license_purchases:
              type: array
              items:
                type: object
                properties:
                  quantity:
                    type: integer
                    example: 1
                  price:
                    type: string
                    example: '12.43'
                  currency:
                    type: string
                    example: EUR
                  translated_name:
                    type: string
                    example: translated_name
            applied_invoice_discounts:
              type: array
              items:
                type: object
                properties:
                  quantity:
                    type: integer
                    example: 1
                  price:
                    type: string
                    example: '12.43'
                  currency:
                    type: string
                    example: EUR
                  translated_name:
                    type: string
                    example: translated_name
      additionalProperties: false
    FetchClientActiveSubscriptionsResponse:
      type: object
      properties:
        period_start:
          type: string
          example: '2024-04-01'
        period_end:
          type: string
          example: '2024-04-31'
        total_amount:
          type: string
          example: '100.0'
        purchases:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
                example: 1
              amount:
                type: string
                example: '12.43'
              discount_amount:
                type: string
                example: '2.43'
              calculated_amount:
                type: string
                example: '10.00'
              currency:
                type: string
                example: EUR
              translated_name:
                type: string
                example: translated_name
              paid_by_client:
                type: boolean
                example: false
              paid_by_other_partner:
                type: boolean
                example: true
              add_on:
                type: boolean
                example: true
              product_slug:
                type: string
                example: product_slug
              term:
                type: string
                example: monthly
              end_date:
                type: string
                example: '2024-04-01'
        future_orders:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
                example: 1
              order_id:
                type: integer
                example: 1
              amount:
                type: string
                example: '12.43'
              discount_amount:
                type: string
                example: '2.43'
              calculated_amount:
                type: string
                example: '10.0'
              currency:
                type: string
                example: EUR
              translated_name:
                type: string
                example: translated_name
              paid_by_client:
                type: boolean
                example: true
              paid_by_other_partner:
                type: boolean
                example: true
              add_on:
                type: boolean
                example: true
              product_slug:
                type: string
                example: product_slug
              term:
                type: string
                example: monthly
              end_date:
                type: string
                example: '2024-04-01'
              start_date:
                type: string
                example: '2024-04-01'
              deletable:
                type: boolean
                example: false
        oob_purchases:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
                example: 1
              quantity:
                type: integer
                example: 1
              price:
                type: string
                example: '2.0'
              calculated_amount:
                type: string
                example: '2.0'
              currency:
                type: string
                example: EUR
              translated_name:
                type: string
                example: translated_name
        license_purchases:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
                example: 1
              quantity:
                type: integer
                example: 1
              price:
                type: string
                example: '2.0'
              calculated_amount:
                type: string
                example: '2.0'
              currency:
                type: string
                example: EUR
              translated_name:
                type: string
                example: translated_name
      additionalProperties: false
    FetchClientMonthlyPurchasesResponse:
      type: object
      properties:
        period_start:
          type: string
          example: '2024-04-01'
        period_end:
          type: string
          example: '2024-04-31'
        total_amount:
          type: string
          example: '100.0'
        purchases:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
                example: 1
              amount:
                type: string
                example: '12.43'
              discount_amount:
                type: string
                example: '2.43'
              calculated_amount:
                type: string
                example: '10.00'
              currency:
                type: string
                example: EUR
              translated_name:
                type: string
                example: translated_name
              paid_by_client:
                type: boolean
                example: true
              add_on:
                type: boolean
                example: true
        oob_purchases:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
                example: 1
              quantity:
                type: integer
                example: 1
              price:
                type: string
                example: '2.0'
              calculated_amount:
                type: string
                example: '2.0'
              currency:
                type: string
                example: EUR
              translated_name:
                type: string
                example: translated_name
        license_purchases:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
                example: 1
              quantity:
                type: integer
                example: 1
              price:
                type: string
                example: '2.0'
              calculated_amount:
                type: string
                example: '2.0'
              currency:
                type: string
                example: EUR
              translated_name:
                type: string
                example: translated_name
        applied_invoice_discounts:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
                example: 1
              quantity:
                type: integer
                example: 1
              calculated_amount:
                type: string
                example: '2.0'
              currency:
                type: string
                example: EUR
              translated_name:
                type: string
                example: translated_name
      additionalProperties: false
    FetchClientBillingHistoryResponse:
      type: object
      properties:
        currency:
          type: string
          example: EUR
        billing_history:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
                example: 1
              amount:
                type: string
                example: '12.43'
              date:
                type: string
                example: 01.04.2024
      additionalProperties: false
    FetchClientActiveUsagesResponse:
      type: object
      properties:
        currency:
          type: string
          example: EUR
        bundle_usages:
          type: array
          items:
            type: object
            properties:
              hash_id:
                type: integer
                example: 10
              item:
                type: string
                example: documents
              total_used:
                type: integer
                example: 10
              total_remaining:
                type: integer
                example: 90
              total_size:
                type: integer
                example: 100
              min_oob_price:
                type: string
                example: '12.43'
              min_reset_date:
                type: string
                example: 19-05-2024
        license_bundle_usages:
          type: array
          items:
            type: object
            properties:
              hash_id:
                type: integer
                example: 10
              item:
                type: string
                example: users
              total_used:
                type: integer
                example: 10
              total_remaining:
                type: integer
                example: 90
              total_size:
                type: integer
                example: 100
              min_lb_price:
                type: string
                example: '12.43'
      additionalProperties: false
    FetchClientInvoiceDetailsResponse:
      type: object
      properties:
        total_amount_excl_vat:
          type: string
          example: '12.43'
        currency:
          type: string
          example: EUR
        invoice_data:
          type: object
          properties:
            approved_at:
              type: string
              example: '2021-08-15'
            purchases:
              type: array
              items:
                type: object
                properties:
                  quantity:
                    type: integer
                    example: 1
                  price:
                    type: string
                    example: '12.43'
                  currency:
                    type: string
                    example: EUR
                  translated_name:
                    type: string
                    example: translated_name
                  renewable:
                    type: boolean
                    example: true
                  add_on:
                    type: boolean
                    example: true
            oob_purchases:
              type: array
              items:
                type: object
                properties:
                  quantity:
                    type: integer
                    example: 1
                  price:
                    type: string
                    example: '12.43'
                  currency:
                    type: string
                    example: EUR
                  translated_name:
                    type: string
                    example: translated_name
            license_purchases:
              type: array
              items:
                type: object
                properties:
                  quantity:
                    type: integer
                    example: 1
                  price:
                    type: string
                    example: '12.43'
                  currency:
                    type: string
                    example: EUR
                  translated_name:
                    type: string
                    example: translated_name
            applied_invoice_discount:
              type: array
              items:
                type: object
                properties:
                  quantity:
                    type: integer
                    example: 1
                  price:
                    type: string
                    example: '12.43'
                  currency:
                    type: string
                    example: EUR
                  translated_name:
                    type: string
                    example: translated_name
      additionalProperties: false
    FetchClientsInvoicesResponse:
      type: object
      properties:
        total_amount_excl_vat:
          type: string
          example: '100.10'
        number_of_customers:
          type: integer
          example: 2
        currency:
          type: string
          example: EUR
        invoices_data:
          type: array
          items:
            type: object
            properties:
              assignee_name:
                type: string
                example: Company name
              assignee_slug:
                type: string
                example: assignee_slug
              total_amount_excl_vat:
                type: string
                example: '100.10'
              invoice_slug:
                type: string
                example: invoice_slug
              approved_at:
                type: string
                example: '2021-08-31'
      additionalProperties: false
    FetchCustomerFutureInvoice:
      type: object
      properties:
        total_amount_excl_vat:
          type: string
          example: '12.43'
        total_amount_incl_vat:
          type: string
          example: '12.43'
        vat_percentage:
          type: string
          example: '12.43'
        vat_amount:
          type: string
          example: '12.43'
        currency:
          type: string
          example: EUR
        purchases:
          type: array
          items:
            type: object
            properties:
              quantity:
                type: integer
                example: 1
              price:
                type: string
                example: '12.43'
              discount_amount:
                type: string
                example: '12.43'
              calculated_amount:
                type: string
                example: '12.43'
              start_date:
                type: string
                example: '2021-08-15'
              item_name:
                type: string
                example: item_name
              currency:
                type: string
                example: EUR
              translated_name:
                type: string
                example: translated_name
              renewable:
                type: boolean
                example: true
              add_on:
                type: boolean
                example: true
        oob:
          type: array
          items:
            type: object
            properties:
              quantity:
                type: integer
                example: 1
              price:
                type: string
                example: '12.43'
              start_date:
                type: string
                example: '2021-08-15'
              item_name:
                type: string
                example: item_name
              item_description:
                type: string
                example: item_description
              currency:
                type: string
                example: EUR
              translated_name:
                type: string
                example: translated_name
        license_purchases:
          type: array
          items:
            type: object
            properties:
              quantity:
                type: integer
                example: 1
              price:
                type: string
                example: '12.43'
              start_date:
                type: string
                example: '2021-08-15'
              item_name:
                type: string
                example: item_name
              item_description:
                type: string
                example: item_description
              currency:
                type: string
                example: EUR
              translated_name:
                type: string
                example: translated_name
        fee_purchases:
          type: array
          items:
            type: object
            properties:
              quantity:
                type: integer
                example: 1
              start_date:
                type: string
                example: '2021-08-15'
              item_name:
                type: string
                example: item_name
              item_description:
                type: string
                example: item_description
              currency:
                type: string
                example: EUR
              translated_name:
                type: string
                example: translated_name
              percentage:
                type: string
                example: '2.5'
              total_amount_per_fee:
                type: string
                example: '1000.0'
              calculated_amount:
                type: string
                example: '25.0'
        customer_coupons:
          type: array
          items:
            type: object
            properties:
              quantity:
                type: integer
                example: 1
              price:
                type: string
                example: '12.43'
              start_date:
                type: string
                example: '2021-08-15'
              item_name:
                type: string
                example: item_name
              item_description:
                type: string
                example: item_description
              currency:
                type: string
                example: EUR
              translated_name:
                type: string
                example: translated_name
        applied_invoice_discount:
          type: array
          items:
            type: object
            properties:
              quantity:
                type: integer
                example: 1
              discount_amount:
                type: string
                example: '12.43'
              calculated_amount:
                type: string
                example: '12.43'
              start_date:
                type: string
                example: '2021-08-15'
              item_name:
                type: string
                example: item_name
              item_description:
                type: string
                example: item_description
              currency:
                type: string
                example: EUR
              translated_name:
                type: string
                example: translated_name
      additionalProperties: false
    CustomerExistsResponse:
      type: object
      properties:
        customer_exists:
          type: boolean
      required:
      - customer_exists
      additionalProperties: false
    ForceConsentForCustomerResponse:
      type: object
      properties:
        consent_needed:
          type: boolean
      required:
      - consent_needed
      additionalProperties: false
    FetchBundleUsageTotals:
      type: object
      properties:
        item:
          type: string
          example: archived
        used:
          type: integer
          example: 40
        used_visible:
          type: integer
          example: 15
        remaining:
          type: integer
          example: 110
        remaining_visible:
          type: integer
          example: 85
        total:
          type: integer
          example: 150
        total_visible:
          type: integer
          example: 100
        display_notifications:
          type: boolean
          example: true
        has_bundle:
          type: boolean
          example: true
        oob_price:
          type: number
          example: '1.0'
        currency:
          type: string
          example: EUR
        allow_out_of_bundle:
          type: boolean
          example: true
        min_reset_date:
          type: string
          example: '2021-08-15'
      additionalProperties: false
    FetchLicenseBundleUsageTotals:
      type: object
      properties:
        name:
          type: string
          example: users
        used:
          type: integer
          example: 40
        used_visible:
          type: integer
          example: 15
        remaining:
          type: integer
          example: 110
        remaining_visible:
          type: integer
          example: 85
        total:
          type: integer
          example: 150
        total_visible:
          type: integer
          example: 100
        display_notifications:
          type: boolean
          example: true
        has_bundle:
          type: boolean
          example: true
        oob_price:
          type: number
          example: '1.0'
        currency:
          type: string
          example: EUR
        allow_out_of_bundle:
          type: boolean
          example: true
      additionalProperties: false
    FetchFeeUsageTotals:
      type: object
      properties:
        hash_id:
          type: integer
          example: 10
        item:
          type: string
          example: cards
        translated_name:
          type: string
          example: cards
        percentage:
          type: string
          example: '2.50'
        currency:
          type: string
          example: EUR
        total_amount_per_fee:
          type: string
          example: '100.00'
        calculated_amount:
          type: string
          example: '2.50'
      additionalProperties: false
    CouponsRemaining:
      type: object
      properties:
        currency:
          type: string
          example: EUR
        amount:
          type: number
          example: '1.0'
        referral_coupon_amount:
          type: number
          example: '1.0'
        total_amount_received_coupons:
          type: number
          example: '1.0'
        total_amount_current_month:
          type: number
          example: '1.0'
        total_used_amount:
          type: number
          example: '1.0'
        all_customer_coupons:
          type: array
          example:
            coupon_name:
              type: String
              example: coupon_name
            coupon_amount:
              type: number
              example: '1.0'
            created_at:
              type: String
              example: '2021-08-15'
          items:
            type: object
      additionalProperties: false
    FetchSubscriptionWithFeaturesRequest:
      type: object
      properties:
        features:
          type: array
          example:
          - name: feature_name
            namespace: feature_namespace
          items:
            type: object
        labels:
          type: array
          example:
          - label1
          - label2
          items:
            type: string
      additionalProperties: false
    BundleTotalsRequest:
      type: object
      properties:
        items:
          type: array
          example:
          - archived
          - documents
          items:
            type: string
      additionalProperties: false
    CouponsRequest:
      type: object
      properties:
        coupon_slug:
          type: string
          example: coupon_slug
        limit_usage:
          type: boolean
          example: true
      additionalProperties: false
    CouponsResponse:
      type: object
      properties:
        message:
          type: string
          example: Customer coupon successfully created.
      additionalProperties: false
    GatherPaymentConsentsResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            attributes:
              type: object
              properties:
                payment_consents:
                  type: array
                  example:
                  - consent_id: 1544b08f-9ba6-4c35-aae3-4cbe2f8989be
                    consent_expiry_date: '2021-08-14'
                    details:
                      masked_pan: 1000***********10
                    product: BYPASS
                    default: true
                    logo: https://www.bancontact.com/img/bancontact/logo.svg
                  items:
                    type: object
                dunning_email:
                  type: string
                  example: foobar@up.com
                autopay:
                  type: boolean
                  example: true
                has_wallet:
                  type: boolean
                  example: true
                force_recurring:
                  type: boolean
                  example: true
                auto_promote:
                  type: boolean
              required:
              - payment_consents
              - dunning_email
              - autopay
              - has_wallet
              - force_recurring
              - auto_promote
          required:
          - attributes
      required:
      - data
      additionalProperties: false
    ConsentsRequest:
      type: object
      properties:
        tenant_id:
          type: string
          example: tenant_slug
        description:
          type: string
          example: description
        purchase_id:
          type: string
          example: purchase_slug
        base_url:
          type: string
          example: http://example.com
      additionalProperties: false
    AddToGroupByNameRequest:
      type: object
      properties:
        group_name:
          type: string
          example: group name
        group_names:
          type: array
          items:
            type: string
            description: Requested group names
      additionalProperties: false
    CancelPaymentConsentRequest:
      type: object
      properties:
        consent_attributes:
          type: object
          example:
            consent_id:
              type: String
              example: 52311690-5adb-420f-a154-82e21e46b2c1
            reason:
              type: String
              example: Enterprise stopped using this payment consent for community
                BillToBox
          additionalProperties: false
      additionalProperties: false
    CancelPaymentConsentResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            attributes:
              type: object
              properties:
                cancelled_consent_id:
                  type: string
                  example: consent_id
      additionalProperties: false
    ConsentsResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            attributes:
              type: object
              properties:
                checkout_url:
                  type: string
                  example: 
                    https://tx.test.pay-nxt.com/consent-checkouts/d20d7733-d5d2-4a44-b295-cc80b3232c32
      additionalProperties: false
    CustomerAttributes:
      type: object
      properties:
        company:
          type: string
          example: Baumbach-O'Hara
        first_name:
          type: string
          example: Mark
        last_name:
          type: string
          example: Connelly
        email:
          type: string
          example: brennaherzog@altenwerthbecker.org
        locale:
          type: string
          example: en
        state:
          type: string
          example: Wisconsin
        country:
          type: string
          example: Netherlands
        address:
          type: string
          example: 2598 Taylor Ways
        postal_code:
          type: string
          example: 92449-4702
        city:
          type: string
          example: Amsterdam
        tax_code:
          type: string
          example: NL123456789B10
        other_uen:
          type: string
          example: '213105554'
        wallet_id:
          type: string
          example: f5b5645b3da795a432c97351fb6e6a80c31de394b3ced731d1715e625d5fd0d8
        dunning_email:
          type: string
          example: brennaherzog@altenwerthbecker.org
        netsuite_external_id:
          type: string
          example: Netherlands
        autopay:
          type: boolean
        client_id:
          type: integer
          example: 101010
        accountant_information:
          type: object
          example:
            test: test
          additionalProperties: false
        suspended:
          type: boolean
        subsidiary_name:
          type: string
          example: BilltoBox
        ordered_active_purchases:
          type: string
          example: Autmation 1.47, Autmation 1.47
        invoice_due_date:
          type: integer
          example: 30
        force_recurring:
          type: boolean
      additionalProperties: false
    CustomerRequest:
      type: object
      properties:
        data:
          type: object
          properties:
            type:
              type: string
              enum:
              - customers
            attributes:
              $ref: '#/components/schemas/CustomerAttributes'
            relationships:
              $ref: '#/components/schemas/CustomerRequestRelationship'
          required:
          - type
      required:
      - data
      additionalProperties: false
    ConsumeRequest:
      type: object
      properties:
        item:
          type: string
          example: archived_documents
        count:
          type: string
          example: '2'
        consumed_at:
          type: string
          example: '2021-01-30'
      additionalProperties: false
    CustomerUpdateRequest:
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
              example: baumbach_o_hara-NebZ4LNy1b3k1uYQ
              description: Required for update.Optional for create
            type:
              type: string
              enum:
              - customers
            attributes:
              $ref: '#/components/schemas/CustomerAttributes'
            relationships:
              $ref: '#/components/schemas/CustomerRequestRelationship'
          required:
          - type
      required:
      - data
      additionalProperties: false
    Customer:
      type: object
      properties:
        id:
          type: string
          example: customer-gttFLhzN4Hvcwqjm
        type:
          type: string
          enum:
          - customers
        links:
          type: object
          properties:
            self:
              type: string
              example: 
                http://localhost:3200/api/v1/tenants/my_tenant/customers/baumbach_o_hara-SGVVuiiH6fdXaF1J
            destroy:
              type: string
              example: 
                http://localhost:3200/api/v1/tenants/my_tenant/customers/baumbach_o_hara-SGVVuiiH6fdXaF1J
        attributes:
          $ref: '#/components/schemas/CustomerAttributes'
        relationships:
          $ref: '#/components/schemas/CustomerResponseRelationship'
      required:
      - id
      - type
      - attributes
      additionalProperties: false
    CustomerResponseShow:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Customer'
        included:
          type: array
          items:
            type: object
            properties:
              default:
                type: object
      required:
      - data
      additionalProperties: false
    CustomerRequestRelationship:
      type: object
      properties:
        customer_groups:
          type: object
          properties:
            data:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                    - customer_groups
                  id:
                    type: string
                    example: customers-ae5E4MLN4PKZoJjS
                required:
                - type
                - id
          required:
          - data
      required:
      - customer_groups
      additionalProperties: false
    CheckVasWithTrialAttribute:
      type: object
      properties:
        checked_vas_trial_sub:
          type: object
          example:
            akti_vas_feature: trial_product_id
          additionalProperties: false
      additionalProperties: false
    CheckVasWithTrialResponse:
      type: object
      properties:
        id:
          type: string
          example: customer-gttFLhzN4Hvcwqjm
        type:
          type: string
          enum:
          - customer
        data:
          $ref: '#/components/schemas/CheckVasWithTrialAttribute'
        included:
          type: array
          items:
            type: object
            properties:
              default:
                type: object
      required:
      - id
      - type
      - data
      additionalProperties: false
    CustomerResponseRelationship:
      type: object
      properties:
        customer_metadata_items:
          type: object
          properties:
            links:
              type: object
              properties:
                self:
                  type: string
                  example: 
                    http://localhost:3200/api/v1/tenants/my_tenant/customers/baumbach_o_hara-SGVVuiiH6fdXaF1J/relationships/customer_metadata_items
                related:
                  type: string
                  example: 
                    http://localhost:3200/api/v1/tenants/my_tenant/customers/baumbach_o_hara-SGVVuiiH6fdXaF1J/customer_metadata_items
              required:
              - related
            data:
              type: array
              items:
                type: object
                properties:
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                        - customer_metadata_items
                      id:
                        type: string
                        example: customer_meta-xxQb5D9Rgw1QcE9f
                    required:
                    - type
                    - id
          required:
          - links
        owned_out_of_bundle_purchases:
          type: object
          properties:
            links:
              type: object
              properties:
                self:
                  type: string
                  example: 
                    http://localhost:3200/api/v1/tenants/my_tenant/customers/baumbach_o_hara-SGVVuiiH6fdXaF1J/relationships/owned_out_of_bundle_purchases
                related:
                  type: string
                  example: 
                    http://localhost:3200/api/v1/tenants/my_tenant/customers/baumbach_o_hara-SGVVuiiH6fdXaF1J/owned_out_of_bundle_purchases
              required:
              - related
            data:
              type: array
              items:
                type: object
                properties:
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                        - out_of_bundle_purchases
                      id:
                        type: string
                        example: xxQb5D9Rgw1QcE9f
                    required:
                    - type
                    - id
          required:
          - links
        assigned_out_of_bundle_purchases:
          type: object
          properties:
            links:
              type: object
              properties:
                self:
                  type: string
                  example: 
                    http://localhost:3200/api/v1/tenants/my_tenant/customers/baumbach_o_hara-SGVVuiiH6fdXaF1J/relationships/assigned_out_of_bundle_purchases
                related:
                  type: string
                  example: 
                    http://localhost:3200/api/v1/tenants/my_tenant/customers/baumbach_o_hara-SGVVuiiH6fdXaF1J/assigned_out_of_bundle_purchases
              required:
              - related
            data:
              type: array
              items:
                type: object
                properties:
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                        - out_of_bundle_purchases
                      id:
                        type: string
                        example: xxQb5D9Rgw1QcE9f
                    required:
                    - type
                    - id
          required:
          - links
        active_purchases:
          type: object
          properties:
            links:
              type: object
              properties:
                self:
                  type: string
                  example: 
                    http://localhost:3200/api/v1/tenants/my_tenant/customers/baumbach_o_hara-SGVVuiiH6fdXaF1J/relationships/active_purchases
                related:
                  type: string
                  example: 
                    http://localhost:3200/api/v1/tenants/my_tenant/customers/baumbach_o_hara-SGVVuiiH6fdXaF1J/active_purchases
              required:
              - related
            data:
              type: array
              items:
                type: object
                properties:
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                        - purchases
                      id:
                        type: string
                        example: active_purchase-xxQb5D9Rgw1QcE9f
                    required:
                    - type
                    - id
          required:
          - links
        active_purchases_not_owned:
          type: object
          properties:
            links:
              type: object
              properties:
                self:
                  type: string
                  example: 
                    http://localhost:3200/api/v1/tenants/my_tenant/customers/baumbach_o_hara-SGVVuiiH6fdXaF1J/relationships/active_purchases_not_owned
                related:
                  type: string
                  example: 
                    http://localhost:3200/api/v1/tenants/my_tenant/customers/baumbach_o_hara-SGVVuiiH6fdXaF1J/active_purchases_not_owned
              required:
              - related
            data:
              type: array
              items:
                type: object
                properties:
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                        - purchases
                      id:
                        type: string
                        example: active_purchase_not_owned-xxQb5D9Rgw1QcE9f
                    required:
                    - type
                    - id
          required:
          - links
        customer_groupings:
          type: object
          properties:
            links:
              type: object
              properties:
                self:
                  type: string
                  example: 
                    http://localhost:3200/api/v1/tenants/my_tenant/customers/baumbach_o_hara-SGVVuiiH6fdXaF1J/relationships/customer_groupings
                related:
                  type: string
                  example: 
                    http://localhost:3200/api/v1/tenants/my_tenant/customers/baumbach_o_hara-SGVVuiiH6fdXaF1J/customer_groupings
              required:
              - related
            data:
              type: array
              items:
                type: object
                properties:
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                        - customer_groupings
                      id:
                        type: string
                        example: '1'
                    required:
                    - type
                    - id
          required:
          - links
        tenant:
          type: object
          properties:
            links:
              type: object
              properties:
                self:
                  type: string
                  example: 
                    http://localhost:3200/api/v1/tenants/my_tenant/customers/baumbach_o_hara-SGVVuiiH6fdXaF1J/relationships/tenant
                related:
                  type: string
                  example: 
                    http://localhost:3200/api/v1/tenants/my_tenant/customers/baumbach_o_hara-SGVVuiiH6fdXaF1J/tenant
              required:
              - related
            data:
              type: array
              items:
                type: object
                properties:
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                        - tenants
                      id:
                        type: string
                        example: bill_to_box
                    required:
                    - type
                    - id
          required:
          - links
        customer_groups:
          type: object
          properties:
            links:
              type: object
              properties:
                self:
                  type: string
                  example: 
                    http://localhost:3200/api/v1/tenants/my_tenant/customers/baumbach_o_hara-SGVVuiiH6fdXaF1J/relationships/customer_groups
                related:
                  type: string
                  example: 
                    http://localhost:3200/api/v1/tenants/my_tenant/customers/baumbach_o_hara-SGVVuiiH6fdXaF1J/customer_groups
              required:
              - related
            data:
              type: array
              items:
                type: object
                properties:
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                        - customer_groups
                      id:
                        type: string
                        example: customer_group-v9vffkdKL3o99
                    required:
                    - type
                    - id
          required:
          - links
        owned_purchases:
          type: object
          properties:
            links:
              type: object
              properties:
                self:
                  type: string
                  example: 
                    http://localhost:3200/api/v1/tenants/my_tenant/customers/baumbach_o_hara-SGVVuiiH6fdXaF1J/relationships/owned_purchases
                related:
                  type: string
                  example: 
                    http://localhost:3200/api/v1/tenants/my_tenant/customers/baumbach_o_hara-SGVVuiiH6fdXaF1J/owned_purchases
              required:
              - related
            data:
              type: array
              items:
                type: object
                properties:
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                        - purchases
                      id:
                        type: string
                        example: purchase_123-xTggjlK
                    required:
                    - type
                    - id
          required:
          - links
        assigned_purchases:
          type: object
          properties:
            links:
              type: object
              properties:
                self:
                  type: string
                  example: 
                    http://localhost:3200/api/v1/tenants/my_tenant/customers/baumbach_o_hara-SGVVuiiH6fdXaF1J/relationships/assigned_purchases
                related:
                  type: string
                  example: 
                    http://localhost:3200/api/v1/tenants/my_tenant/customers/baumbach_o_hara-SGVVuiiH6fdXaF1J/assigned_purchases
              required:
              - related
            data:
              type: array
              items:
                type: object
                properties:
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                        - purchases
                      id:
                        type: string
                        example: purchase_123-xTggjlK
                    required:
                    - type
                    - id
          required:
          - links
        products:
          type: object
          properties:
            links:
              type: object
              properties:
                self:
                  type: string
                  example: 
                    http://localhost:3200/api/v1/tenants/my_tenant/customers/baumbach_o_hara-SGVVuiiH6fdXaF1J/relationships/products
                related:
                  type: string
                  example: 
                    http://localhost:3200/api/v1/tenants/my_tenant/customers/baumbach_o_hara-SGVVuiiH6fdXaF1J/products
              required:
              - related
            data:
              type: array
              items:
                type: object
                properties:
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                        - products
                      id:
                        type: string
                        example: basic_200
                    required:
                    - type
                    - id
          required:
          - links
        product_groupings:
          type: object
          properties:
            links:
              type: object
              properties:
                self:
                  type: string
                  example: 
                    http://localhost:3200/api/v1/tenants/my_tenant/customers/baumbach_o_hara-SGVVuiiH6fdXaF1J/relationships/product_groupings
                related:
                  type: string
                  example: 
                    http://localhost:3200/api/v1/tenants/my_tenant/customers/baumbach_o_hara-SGVVuiiH6fdXaF1J/product_groupings
              required:
              - related
            data:
              type: array
              items:
                type: object
                properties:
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                        - product_groupings
                      id:
                        type: string
                        example: '2'
                    required:
                    - type
                    - id
          required:
          - links
        bundle_usages:
          type: object
          properties:
            links:
              type: object
              properties:
                self:
                  type: string
                  example: 
                    http://localhost:3200/api/v1/tenants/my_tenant/customers/baumbach_o_hara-SGVVuiiH6fdXaF1J/relationships/bundle_usages
                related:
                  type: string
                  example: 
                    http://localhost:3200/api/v1/tenants/my_tenant/customers/baumbach_o_hara-SGVVuiiH6fdXaF1J/bundle_usages
              required:
              - related
            data:
              type: array
              items:
                type: object
                properties:
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                        - bundle_usages
                      id:
                        type: string
                        example: '1'
                    required:
                    - type
                    - id
          required:
          - links
      required:
      - customer_metadata_items
      - owned_out_of_bundle_purchases
      - assigned_out_of_bundle_purchases
      - active_purchases
      - active_purchases_not_owned
      - customer_groupings
      - tenant
      - customer_groups
      - owned_purchases
      - assigned_purchases
      - products
      - product_groupings
      - bundle_usages
      additionalProperties: false
    PurchaseAttributes:
      type: object
      properties:
        slug:
          type: string
          example: 6gEB8UDpezro8FJi
        term:
          type: string
          example: monthly
        start_date:
          type: string
          example: '2019-02-18T14:01:07.929Z'
        end_date:
          type: string
          example: '2019-02-15T13:39:32.895Z'
        created_at:
          type: string
          example: '2019-02-18T14:01:07.929Z'
        updated_at:
          type: string
          example: '2019-02-18T14:01:07.929Z'
        calculated_amount:
          type: number
          example: '90.0'
        owner_company_name:
          type: string
          example: IOAN  HARMONIEE
        assignee_company_name:
          type: string
          example: HARMONIEE IOAN
        product_name:
          type: string
          example: Product1
        subscription_price:
          type: number
          example: '90.0'
        subscription_currency:
          type: string
          example: EUR
        invoice_slug:
          type: string
          example: gsr0r9s2ntnhB54g
        purchase_owner_slug:
          type: string
          example: t53ggeb45bW4g3H4
        purchase_assignee_slug:
          type: string
          example: wrg34gt53gGWT34b
        purchase_product_slug:
          type: string
          example: gt53fghge33h4J64
        product_allows_add_ons:
          type: boolean
          example: true
        purchase_status:
          type: string
          example: active
        order_id:
          type: integer
          example: 11
        customer_suspended:
          type: boolean
        netsuite_description:
          type: string
          example: Netsuite description
        applied_discount:
          type: object
          additionalProperties: false
      required:
      - slug
      - term
      - calculated_amount
      - customer_suspended
      additionalProperties: false
    Purchase:
      type: object
      properties:
        id:
          type: string
          example: 6gEB8UDpezro8FJi
        type:
          type: string
          enum:
          - purchases
        attributes:
          $ref: '#/components/schemas/PurchaseAttributes'
        relationships:
          $ref: '#/components/schemas/PurchaseResponseRel'
        links:
          type: object
          properties:
            self:
              type: string
            update_owner:
              type: string
            renew:
              type: string
            expire_purchases:
              type: string
            destroy:
              type: string
      required:
      - id
      - type
      - attributes
      - relationships
      additionalProperties: false
    PurchaseResponse:
      type: object
      default:
        data: {}
      properties:
        data:
          $ref: '#/components/schemas/Purchase'
        included:
          type: array
          items:
            type: object
            properties:
              default:
                type: object
      required:
      - data
      additionalProperties: false
    PurchaseResponseRel:
      type: object
      properties:
        owner:
          type: object
          properties:
            links:
              type: object
              properties:
                self:
                  type: string
                  example: http://localhost:3200/api/v1/purchases/mJsE51gY4X8aZQA5/relationships/owner
                related:
                  type: string
                  example: http://localhost:3200/api/v1/purchases/mJsE51gY4X8aZQA5/owner
            data:
              type: object
              properties:
                type:
                  type: string
                  enum:
                  - customers
                id:
                  type: string
                  example: jacobs_sauer-gRbkumySiv1HLKJv
              required:
              - type
              - id
          required:
          - links
        assignee:
          type: object
          properties:
            links:
              type: object
              properties:
                self:
                  type: string
                  example: http://localhost:3200/api/v1/purchases/mJsE51gY4X8aZQA5/relationships/assignee!
                related:
                  type: string
                  example: http://localhost:3200/api/v1/purchases/mJsE51gY4X8aZQA5/assignee!
            data:
              type: object
              properties:
                type:
                  type: string
                  enum:
                  - customers
                id:
                  type: string
                  example: jacobs_sauer-gRbkumySiv1HLKJv
              required:
              - type
              - id
          required:
          - links
        product:
          type: object
          properties:
            links:
              type: object
              properties:
                self:
                  type: string
                  example: http://localhost:3200/api/v1/purchases/mJsE51gY4X8aZQA5/relationships/product
                related:
                  type: string
                  example: http://localhost:3200/api/v1/purchases/mJsE51gY4X8aZQA5/product
            data:
              type: object
              properties:
                type:
                  type: string
                  enum:
                  - products
                id:
                  type: string
                  example: intelligent_linen_wallet-NiNoW9A4HZYRVfp8
              required:
              - type
              - id
          required:
          - links
        bundle_usages:
          type: object
          properties:
            links:
              type: object
              properties:
                self:
                  type: string
                  example: 
                    http://localhost:3200/api/v1/purchases/mJsE51gY4X8aZQA5/relationships/bundle_usages
                related:
                  type: string
                  example: http://localhost:3200/api/v1/purchases/mJsE51gY4X8aZQA5/bundle_usages
            data:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                    - bundle_usages
                  id:
                    type: string
                    example: '21'
                required:
                - type
                - id
          required:
          - links
        applied_discount:
          type: object
          properties:
            links:
              type: object
              properties:
                self:
                  type: string
                  example: 
                    http://localhost:3200/api/v1/purchases/mJsE51gY4X8aZQA5/relationships/applied_discount
                related:
                  type: string
                  example: http://localhost:3200/api/v1/purchases/mJsE51gY4X8aZQA5/applied_discount
            data:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                    - applied_discount
                  id:
                    type: string
                    example: '21'
                required:
                - type
                - id
          required:
          - links
      required:
      - owner
      - assignee
      - product
      - bundle_usages
      additionalProperties: false
    BulkRequest:
      type: object
      default:
        data: []
      properties:
        owner_id:
          type: string
          example: owner_slug
        assignee_id:
          type: string
          example: assignee_slug
        partner_id:
          type: string
          example: partner_slug
        subscriptions:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: product_slug
              quantity:
                type: number
                example: '1'
              period_quantity:
                type: number
                example: '1'
            required:
            - id
            additionalProperties: false
        base_url:
          type: string
          example: http://example.com
        dolphin_consent_description:
          type: string
          example: Payment details for the Banqup Subscription
      required:
      - owner_id
      - assignee_id
      - subscriptions
      additionalProperties: false
    BulkResponse:
      type: object
      properties:
        checkout_url:
          type: string
          example: checkout_url.com
      additionalProperties: false
    BulkFutureOrderRequest:
      type: object
      properties:
        owner_id:
          type: string
          example: owner_slug
        assignee_id:
          type: string
          example: assignee_slug
        partner_id:
          type: string
          example: partner_slug
        base_url:
          type: string
          example: http://example.com
        dolphin_consent_description:
          type: string
          example: Payment details for Banqup Subscription
        subscriptions:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                example: product_slug
              quantity:
                type: number
                example: '1'
              period_quantity:
                type: number
                example: '1'
            required:
            - id
            additionalProperties: false
      required:
      - assignee_id
      - subscriptions
      additionalProperties: false
  responses:
    '400':
      description: BadRequest
      content:
        application/vnd.api+json:
          schema:
            $ref: '#/components/schemas/BadRequestError'
    '401':
      description: Unauthorized
      content:
        application/vnd.api+json:
          schema:
            $ref: '#/components/schemas/UnauthorizedError'
    '403':
      description: Forbidden
      content:
        application/vnd.api+json:
          schema:
            $ref: '#/components/schemas/ForbiddenError'
    '404':
      description: The specified resource was not found
      content:
        application/vnd.api+json:
          schema:
            $ref: '#/components/schemas/NotFoundError'
    '412':
      description: Precondition failed
      content:
        application/vnd.api+json:
          schema:
            $ref: '#/components/schemas/PreconditionFailedError'
tags:
- name: Common
- name: Coupons
  description: Per tenant coupons management
- name: CustomerLicenseUsages
  description: Endpoint for managing customer license usages
- name: CustomerGroup
  description: Endpoint for managing customer groups
- name: Customers
  description: Per tenant customer management
- name: Order
  description: Endpoint for managing orders
- name: Purchase
  description: Endpoint for managing purchases
- name: InternalInvoice
  description: Endpoint for managing invoices
security:
- oauth2: []
