Togai Accounts API

Account level calls

OpenAPI Specification

togai-accounts-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  version: '1.0'
  title: Togai Apis Accounts API
  contact:
    email: engg@togai.com
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  description: APIs for Togai App
servers:
- description: Api endpoint
  url: https://api.togai.com/
- description: Sandbox api endpoint
  url: https://sandbox-api.togai.com/
security:
- bearerAuth: []
tags:
- name: Accounts
  description: Account level calls
paths:
  /accounts:
    post:
      tags:
      - Accounts
      summary: Create an Account
      description: This API let’s you to create an account for a customer using customer_id.
      operationId: createAccount
      requestBody:
        $ref: '#/components/requestBodies/CreateAccountRequest'
      responses:
        '201':
          $ref: '#/components/responses/AccountResponse'
        '400':
          $ref: '#/components/responses/ErrorResponse'
        '401':
          $ref: '#/components/responses/ErrorResponse'
        '403':
          $ref: '#/components/responses/ErrorResponse'
        '404':
          $ref: '#/components/responses/ErrorResponse'
        '429':
          $ref: '#/components/responses/ErrorResponse'
        default:
          $ref: '#/components/responses/ErrorResponse'
    get:
      tags:
      - Accounts
      summary: List Accounts of Customer
      description: Returns a list of accounts of a customer with pagination and sort.
      operationId: getAccounts
      parameters:
      - $ref: '#/components/parameters/next_token'
      - $ref: '#/components/parameters/page_size'
      responses:
        '200':
          $ref: '#/components/responses/AccountPaginatedResponse'
        '400':
          $ref: '#/components/responses/ErrorResponse'
        '401':
          $ref: '#/components/responses/ErrorResponse'
        '403':
          $ref: '#/components/responses/ErrorResponse'
        '404':
          $ref: '#/components/responses/ErrorResponse'
        '429':
          $ref: '#/components/responses/ErrorResponse'
        default:
          $ref: '#/components/responses/ErrorResponse'
  /accounts/{account_id}:
    get:
      tags:
      - Accounts
      summary: Get an Account
      description: Get account information using customer_id and account_id.
      operationId: getAccount
      parameters:
      - $ref: '#/components/parameters/account_id'
      - $ref: '#/components/parameters/effectiveOn'
      - $ref: '#/components/parameters/includeGroupDetails'
      responses:
        '200':
          $ref: '#/components/responses/AccountResponse'
        '400':
          $ref: '#/components/responses/ErrorResponse'
        '401':
          $ref: '#/components/responses/ErrorResponse'
        '403':
          $ref: '#/components/responses/ErrorResponse'
        '404':
          $ref: '#/components/responses/ErrorResponse'
        '429':
          $ref: '#/components/responses/ErrorResponse'
        default:
          $ref: '#/components/responses/ErrorResponse'
    patch:
      tags:
      - Accounts
      summary: Update an Account
      description: This API let’s you to update an account’s information using customer_id and account_id.
      operationId: updateAccount
      parameters:
      - $ref: '#/components/parameters/account_id'
      requestBody:
        $ref: '#/components/requestBodies/UpdateAccountRequest'
      responses:
        '200':
          $ref: '#/components/responses/AccountResponse'
        '400':
          $ref: '#/components/responses/ErrorResponse'
        '401':
          $ref: '#/components/responses/ErrorResponse'
        '403':
          $ref: '#/components/responses/ErrorResponse'
        '404':
          $ref: '#/components/responses/ErrorResponse'
        '429':
          $ref: '#/components/responses/ErrorResponse'
        default:
          $ref: '#/components/responses/ErrorResponse'
    delete:
      tags:
      - Accounts
      summary: Delete an Account
      description: This API let’s you to delete a customer using customer_id and account_id.
      operationId: deleteAccount
      parameters:
      - $ref: '#/components/parameters/account_id'
      responses:
        '200':
          $ref: '#/components/responses/BaseSuccessResponse'
        '400':
          $ref: '#/components/responses/ErrorResponse'
        '401':
          $ref: '#/components/responses/ErrorResponse'
        '403':
          $ref: '#/components/responses/ErrorResponse'
        '404':
          $ref: '#/components/responses/ErrorResponse'
        '429':
          $ref: '#/components/responses/ErrorResponse'
        default:
          $ref: '#/components/responses/ErrorResponse'
  /accounts/{account_id}/add_aliases:
    post:
      tags:
      - Accounts
      summary: Add Aliases to Account
      description: Add aliases to an account using customer_id and account_id.
      operationId: addAliases
      parameters:
      - $ref: '#/components/parameters/account_id'
      requestBody:
        $ref: '#/components/requestBodies/AddAccountAliasesRequest'
      responses:
        '200':
          $ref: '#/components/responses/AccountResponse'
        '400':
          $ref: '#/components/responses/ErrorResponse'
        '401':
          $ref: '#/components/responses/ErrorResponse'
        '403':
          $ref: '#/components/responses/ErrorResponse'
        '404':
          $ref: '#/components/responses/ErrorResponse'
        '429':
          $ref: '#/components/responses/ErrorResponse'
        default:
          $ref: '#/components/responses/ErrorResponse'
  /accounts/{account_id}/account_aliases:
    get:
      tags:
      - Accounts
      summary: Get All Aliases of an Account
      description: Get all aliases of an account using account_id
      operationId: listAccountAliases
      parameters:
      - $ref: '#/components/parameters/account_id'
      responses:
        '200':
          $ref: '#/components/responses/AccountAliasesPaginatedResponse'
        default:
          $ref: '#/components/responses/ErrorResponse'
  /accounts/{account_id}/remove_aliases:
    post:
      tags:
      - Accounts
      summary: Remove Aliases to Account
      description: Remove existing aliases tagged to an account using this API
      operationId: removeAliases
      parameters:
      - $ref: '#/components/parameters/account_id'
      requestBody:
        $ref: '#/components/requestBodies/RemoveAccountAliasesRequest'
      responses:
        '200':
          $ref: '#/components/responses/AccountResponse'
        '400':
          $ref: '#/components/responses/ErrorResponse'
        '401':
          $ref: '#/components/responses/ErrorResponse'
        '403':
          $ref: '#/components/responses/ErrorResponse'
        '404':
          $ref: '#/components/responses/ErrorResponse'
        '429':
          $ref: '#/components/responses/ErrorResponse'
        default:
          $ref: '#/components/responses/ErrorResponse'
  /accounts/{account_id}/price_plans:
    post:
      tags:
      - Accounts
      summary: Dissociate or Associate a Price Plan with an Account
      description: This API let’s you to detach or attach a price plan with an existing account
      operationId: updatePricingSchedule
      parameters:
      - $ref: '#/components/parameters/account_id'
      requestBody:
        $ref: '#/components/requestBodies/UpdatePricingScheduleRequestWithActions'
      responses:
        '200':
          $ref: '#/components/responses/UpdatePricingScheduleResponse'
        '400':
          $ref: '#/components/responses/ErrorResponse'
        '401':
          $ref: '#/components/responses/ErrorResponse'
        '403':
          $ref: '#/components/responses/ErrorResponse'
        '404':
          $ref: '#/components/responses/ErrorResponse'
        '429':
          $ref: '#/components/responses/ErrorResponse'
        default:
          $ref: '#/components/responses/ErrorResponse'
  /accounts/{account_id}/purchases:
    post:
      tags:
      - Accounts
      summary: Initiate a Purchase
      description: This API let’s you to initiate a purchase for an account
      operationId: initiateOneTimeEntitlementPlan
      parameters:
      - $ref: '#/components/parameters/account_id'
      requestBody:
        $ref: '#/components/requestBodies/CreatePurchaseRequest'
      responses:
        '200':
          $ref: '#/components/responses/CreatePurchaseResponse'
        '400':
          $ref: '#/components/responses/ErrorResponse'
        '401':
          $ref: '#/components/responses/ErrorResponse'
        '403':
          $ref: '#/components/responses/ErrorResponse'
        '404':
          $ref: '#/components/responses/ErrorResponse'
        '429':
          $ref: '#/components/responses/ErrorResponse'
        default:
          $ref: '#/components/responses/ErrorResponse'
    get:
      tags:
      - Accounts
      summary: Get All Purchases for an Account
      description: Get Purchase information for an account using account_id and price_plan_id
      operationId: listAccountPurchases
      parameters:
      - $ref: '#/components/parameters/account_id'
      responses:
        '200':
          $ref: '#/components/responses/PurchasePaginatedResponse'
        '400':
          $ref: '#/components/responses/ErrorResponse'
        '401':
          $ref: '#/components/responses/ErrorResponse'
        '403':
          $ref: '#/components/responses/ErrorResponse'
        '404':
          $ref: '#/components/responses/ErrorResponse'
        '429':
          $ref: '#/components/responses/ErrorResponse'
        default:
          $ref: '#/components/responses/ErrorResponse'
  /purchases/{purchase_id}:
    get:
      tags:
      - Accounts
      summary: Get a Specific Purchase of an Account
      description: Get purchase information of an account for a specific plan using account_id and price_plan_id
      operationId: getPurchase
      parameters:
      - $ref: '#/components/parameters/purchase_id'
      responses:
        '200':
          $ref: '#/components/responses/GetPurchaseResponse'
        '400':
          $ref: '#/components/responses/ErrorResponse'
        '401':
          $ref: '#/components/responses/ErrorResponse'
        '403':
          $ref: '#/components/responses/ErrorResponse'
        '404':
          $ref: '#/components/responses/ErrorResponse'
        '429':
          $ref: '#/components/responses/ErrorResponse'
        default:
          $ref: '#/components/responses/ErrorResponse'
  /accounts/{account_id}/purchase_proposals:
    post:
      tags:
      - Accounts
      summary: Propose a Purchase of a Plan
      description: This API let’s you to create a proposal of a billing/entitlement plan for an account
      operationId: createProposal
      parameters:
      - $ref: '#/components/parameters/account_id'
      requestBody:
        $ref: '#/components/requestBodies/CreateProposalRequest'
      responses:
        '200':
          $ref: '#/components/responses/CreateProposalResponse'
        '400':
          $ref: '#/components/responses/ErrorResponse'
        '401':
          $ref: '#/components/responses/ErrorResponse'
        '403':
          $ref: '#/components/responses/ErrorResponse'
        '404':
          $ref: '#/components/responses/ErrorResponse'
        '429':
          $ref: '#/components/responses/ErrorResponse'
        default:
          $ref: '#/components/responses/ErrorResponse'
    get:
      tags:
      - Accounts
      summary: List All Proposals of an Account
      description: List all proposals of an account
      operationId: listAccountProposals
      parameters:
      - $ref: '#/components/parameters/account_id'
      responses:
        '200':
          $ref: '#/components/responses/ProposalsPaginatedResponse'
        '400':
          $ref: '#/components/responses/ErrorResponse'
        '401':
          $ref: '#/components/responses/ErrorResponse'
        '403':
          $ref: '#/components/responses/ErrorResponse'
        '404':
          $ref: '#/components/responses/ErrorResponse'
        '429':
          $ref: '#/components/responses/ErrorResponse'
        default:
          $ref: '#/components/responses/ErrorResponse'
  /purchase_proposals/{purchase_proposal_id}:
    get:
      tags:
      - Accounts
      summary: Get Proposal Information
      description: Get proposal information
      operationId: getProposal
      parameters:
      - $ref: '#/components/parameters/purchase_proposal_id'
      responses:
        '200':
          $ref: '#/components/responses/GetProposalResponse'
        '400':
          $ref: '#/components/responses/ErrorResponse'
        '401':
          $ref: '#/components/responses/ErrorResponse'
        '403':
          $ref: '#/components/responses/ErrorResponse'
        '404':
          $ref: '#/components/responses/ErrorResponse'
        '429':
          $ref: '#/components/responses/ErrorResponse'
        default:
          $ref: '#/components/responses/ErrorResponse'
  /accounts/{account_id}/edit_schedules:
    post:
      tags:
      - Accounts
      summary: Edit Schedules of an Account
      description: This API let’s you to detach/attach one or more price plans from/to an existing account
      operationId: updatePricingScheduleBatch
      parameters:
      - $ref: '#/components/parameters/account_id'
      - $ref: '#/components/parameters/dry_run'
      requestBody:
        $ref: '#/components/requestBodies/EditPricingScheduleRequest'
      responses:
        '200':
          $ref: '#/components/responses/EditPricingScheduleResponse'
        '400':
          $ref: '#/components/responses/ErrorResponse'
        '401':
          $ref: '#/components/responses/ErrorResponse'
        '403':
          $ref: '#/components/responses/ErrorResponse'
        '404':
          $ref: '#/components/responses/ErrorResponse'
        '429':
          $ref: '#/components/responses/ErrorResponse'
        default:
          $ref: '#/components/responses/ErrorResponse'
  /accounts/{account_id}/pricing_schedules:
    get:
      tags:
      - Accounts
      summary: List Pricing Schedules of an Account
      description: Returns a list of pricing schedules of an account with pagination and sort.
      operationId: getPricingSchedules
      parameters:
      - $ref: '#/components/parameters/next_token'
      - $ref: '#/components/parameters/page_size'
      - $ref: '#/components/parameters/account_id'
      - $ref: '#/components/parameters/start_date'
      - $ref: '#/components/parameters/end_date'
      - $ref: '#/components/parameters/include_price_plan_info'
      - $ref: '#/components/parameters/compact'
      responses:
        '200':
          $ref: '#/components/responses/PricingSchedulePaginatedResponse'
        '400':
          $ref: '#/components/responses/ErrorResponse'
        '401':
          $ref: '#/components/responses/ErrorResponse'
        '403':
          $ref: '#/components/responses/ErrorResponse'
        '404':
          $ref: '#/components/responses/ErrorResponse'
        '429':
          $ref: '#/components/responses/ErrorResponse'
        default:
          $ref: '#/components/responses/ErrorResponse'
  /purchase_proposals/{purchase_proposal_id}/update_status:
    post:
      tags:
      - Accounts
      summary: Approve or Decline a Purchase of a Billing Plan
      description: This API let’s you to approve or decline a proposal of a billing plan for an account
      operationId: updateProposalStatus
      parameters:
      - $ref: '#/components/parameters/purchase_proposal_id'
      requestBody:
        $ref: '#/components/requestBodies/UpdateProposalStatus'
      responses:
        '200':
          $ref: '#/components/responses/UpdateProposalResponse'
        '400':
          $ref: '#/components/responses/ErrorResponse'
        '401':
          $ref: '#/components/responses/ErrorResponse'
        '403':
          $ref: '#/components/responses/ErrorResponse'
        '404':
          $ref: '#/components/responses/ErrorResponse'
        '429':
          $ref: '#/components/responses/ErrorResponse'
        default:
          $ref: '#/components/responses/ErrorResponse'
components:
  responses:
    BaseSuccessResponse:
      description: OK
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BaseSuccessResponse'
    AccountResponse:
      description: Response for Create and Get account requests
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Account'
          examples:
            Account:
              $ref: '#/components/examples/Account'
    UpdateProposalResponse:
      description: Response to update proposal status request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Proposal'
          examples:
            CreateProposalResponse:
              $ref: '#/components/examples/Proposal'
    AccountAliasesPaginatedResponse:
      description: Response for list account aliases request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AccountAliasesPaginatedResponse'
          examples:
            AccountAliasesPaginatedResponse:
              $ref: '#/components/examples/AccountAliasesPaginatedResponse'
    UpdatePricingScheduleResponse:
      description: Response for dis/associate price plan request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UpdatePricingScheduleResponse'
          examples:
            UpdatePricingScheduleResponse:
              $ref: '#/components/examples/UpdatePricingScheduleResponse'
    ErrorResponse:
      description: Error response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            ErrorResponse:
              summary: Error Message
              value:
                message: <Reason message>
    CreatePurchaseResponse:
      description: Response for initiation of a purchase of entitlement plan for an account
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Purchase'
          examples:
            CreatePurchaseResponse:
              $ref: '#/components/examples/CreatePurchaseResponse'
    EditPricingScheduleResponse:
      description: Response for edit pricing schedule request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UpdatePricingScheduleResponse'
          examples:
            UpdatePricingScheduleResponse:
              $ref: '#/components/examples/UpdatePricingScheduleResponse'
    GetProposalResponse:
      description: Response for getting a specific proposal
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetProposalResponse'
          examples:
            GetProposalResponse:
              $ref: '#/components/examples/GetProposalResponse'
    CreateProposalResponse:
      description: Response to create proposal request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Proposal'
          examples:
            CreateProposalResponse:
              $ref: '#/components/examples/Proposal'
    PurchasePaginatedResponse:
      description: Response for list Purchase for an account request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PurchasePaginatedListData'
          examples:
            PurchasePaginatedResponse:
              $ref: '#/components/examples/PurchasePaginatedResponse'
    GetPurchaseResponse:
      description: Response for getting a specific purchase detail of an account
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetPurchaseResponse'
          examples:
            GetPurchaseForPurchasePlanResponse:
              $ref: '#/components/examples/GetPurchaseForPurchasePlanResponse'
    AccountPaginatedResponse:
      description: Response for list customers request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AccountPaginatedResponse'
          examples:
            AccountPaginatedResponse:
              $ref: '#/components/examples/AccountPaginatedResponse'
    PricingSchedulePaginatedResponse:
      description: Response for list pricing schedules request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PricingSchedulePaginatedResponse'
          examples:
            PricingSchedulePaginatedResponse:
              $ref: '#/components/examples/PricingSchedulePaginatedResponse'
    ProposalsPaginatedResponse:
      description: Response for list proposals of an account request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ProposalsPaginatedResponse'
          examples:
            ProposalsPaginatedResponse:
              $ref: '#/components/examples/ProposalsPaginatedResponse'
  parameters:
    includeGroupDetails:
      in: query
      name: includeGroupDetails
      required: false
      schema:
        type: boolean
        example: true
    end_date:
      in: query
      name: end_date
      required: false
      schema:
        type: string
        example: '2099-03-30T10:41:10.088499'
    purchase_proposal_id:
      in: path
      name: purchase_proposal_id
      required: true
      schema:
        type: string
        maxLength: 512
        example: purchase.20rqjgFJf2O.ejl25
    account_id:
      in: path
      description: account_id corresponding to an account
      name: account_id
      required: true
      schema:
        type: string
        maxLength: 50
        example: ACC00001
    next_token:
      in: query
      name: nextToken
      required: false
      schema:
        type: string
        example: eyJsYXN0SXRlbUlkIjogInN0cmluZyIsICJwYWdlU2l6ZSI6IDEwMCwgInNvcnRPcmRlciI6ICJhc2MifQ==
    purchase_id:
      in: path
      name: purchase_id
      required: true
      schema:
        type: string
        maxLength: 50
        example: purchase.1zYnCiM9Bpg.lv25y
    start_date:
      in: query
      name: start_date
      required: false
      schema:
        type: string
        example: '2023-03-30T10:41:10.088499'
    include_price_plan_info:
      in: query
      name: include_price_plan_info
      required: false
      schema:
        type: boolean
        example: true
    dry_run:
      in: query
      name: dry_run
      required: false
      schema:
        type: boolean
        example: false
    effectiveOn:
      in: query
      name: effectiveOn
      required: false
      schema:
        type: string
        format: date-time
        example: '2020-03-30T10:41:10.088499'
    compact:
      in: query
      name: compact
      required: false
      schema:
        type: boolean
        example: false
    page_size:
      in: query
      name: pageSize
      required: false
      schema:
        type: number
        example: 10
  schemas:
    GetPurchaseResponse:
      allOf:
      - $ref: '#/components/schemas/Purchase'
      - type: object
        additionalProperties: false
        properties:
          purchasePlan:
            $ref: '#/components/schemas/PricePlanDetails'
          features:
            type: array
            items:
              title: PurchaseFeatureDetails
              type: object
              additionalProperties: false
              required:
              - id
              - name
              - creditsGranted
              - creditsAvailable
              - updatedAt
              - effectiveFrom
              - effectiveUntil
              properties:
                id:
                  type: string
                name:
                  type: string
                creditsGranted:
                  type: number
                creditsAvailable:
                  type: number
                updatedAt:
                  type: string
                  format: date-time
                effectiveFrom:
                  type: string
                  format: date-time
                effectiveUntil:
                  type: string
                  format: date-time
    LicenseRateCardConfig:
      title: LicenseRateCardConfig
      type: object
      properties:
        maxQuantity:
          description: Max allowed quantity for a particular license in a price plan
          type: integer
          format: int64
          example: 100
        maxQuantityBreachAction:
          $ref: '#/components/schemas/MaxQuantityBreachAction'
    FixedFeeRateCard:
      title: FixedFeeRateCard
      type: object
      required:
      - id
      - rateValues
      - enableProration
      properties:
        id:
          description: Unique Identifier of the attached AddOn
          type: string
          maxLength: 50
        displayName:
          type: string
          description: Name of the attached AddOn
        tag:
          type: string
          description: A tag string to group fixedFeeRateCards
        invoiceTiming:
          $ref: '#/components/schemas/InvoiceTiming'
        type:
          $ref: '#/components/schemas/FixedFeeType'
        rateValues:
          type: array
          items:
            $ref: '#/components/schemas/CurrencyRateValue'
        enableProration:
          type: boolean
          example: false
        recurrenceConfig:
          $ref: '#/components/schemas/RecurrenceConfig'
    InvoiceGroupDetails:
      description: Invoice group details
      type: object
      additionalProperties: false
      required:
      - id
      - name
      - email
      - dailyInvoiceConsolidation
      - invoiceCurrency
      - billingAddress
      properties:
        id:
          type: string
        name:
          type: string
        email:
          type: string
          maxLength: 320
        dailyInvoiceConsolidation:
          type: boolean
        netTermDays:
          type: integer
          format: int32
        invoiceCurrency:
          type: string
        billingAddress:
          $ref: '#/components/schemas/Address'
    PricePlanDetailsOverride:
      allOf:
      - $ref: '#/components/schemas/CreatePricePlanDetailsOverride'
      - type: object
        properties:
          fixedFeeRateCards:
            type: array
            minItems: 1
            items:
              $ref: '#/components/schemas/FixedFeeRateCard'
    ProposalsPaginatedResponse:
      type: object
      additionalProperties: false
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ProposalsListResponse'
        nextToken:
          type: string
        context:
          $ref: '#/components/schemas/PaginationOptions'
    CreatePricingRule:
      type: object
      additionalProperties: false
      required:
      - order
      - name
      - computation
      - action
      properties:
        name:
          description: Name of the pricing rule
          type: string
        order:
          description: Order of the pricing rule
          type: integer
          format: int32
        invoiceTiming:
          $ref: '#/components/schemas/PricingRuleTiming'
        condition:
          description: JSON logic condition deciding whether to compute this pricing rule or not
          type: string
        computation:
          description: JSON logic to be computed
          type: string
        action:
          description: JSON logic to be computed
          title: action
          $ref: '#/components/schemas/PricingRuleAction'
    UpdateAccountRequest:
      description: Payload to update account
      type: object
      additionalProperties: false
      properties:
        name:
          description: Name of the Account
          type: string
          maxLength: 255
          minLength: 3
          example: ACME Enterprise
        status:
          type: string
          enum:
          - ACTIVE
          - DRAFT
        invoiceCurrency:
          description: '[ISO_4217](https://en.wikipedia.org/wiki/ISO_4217) code of the currency in which the account must be invoiced

            Defaults to Base currency.

            '
          type: string
          minLength: 3
          maxLength: 3
          example: USD
        netTermDays:
          type: integer
          format: int32
        primaryEmail:
          description: Primary email of the account
          type: string
          maxLength: 320
          example: admin@example.com
        address:
          $ref: '#/components/schemas/Address'
        metadata:
          description: "Additional information associated with the account.\nExample: GSTN, VATN\nNOTE: This replaces the existing metadata if the metadata in the request is not null. \nTo remove all existing metadata, use empty object\n"
          type: object
          additionalProperties:
            type: string
        tags:
          description: Tag for accounts are stored in lowercase
          type: array
          uniqueItems: true
          items:
            type: string
    FixedFeeType:
      type: string
      enum:
      - ONE_TIME
      - RECURRING
      description: Fixed fee applies either for a one-time occurrence or for each cycle.
    RemoveAccountAliasesRequest:
      description: Payload to remove account aliases
      type: object
      additionalProperties: false
      properties:
        aliases:
          type: array
          items:
            type: string
        accountAliases:
          type: array
          items:
            title: RemoveAccountAliasRequest
            type: object
            additionalProperties: false
            required:
            - id
            properties:
              id:
                type: string
                description: Alias identifier (UUID)
              from:
                type: string
                format: date-time
                description: Alias will be deleted from this date, If not provided, it will be deleted from now
    BillingConfig:
      type: object
      properties:
        interval:
          description: Represents the number of pricing cycles after which the rate card will be billed
          type: integer
          format: int64
          example: 3
        startOffset:
          description: Represents the offset for pricing cycles after which the rate card will be billed
          type: integer
          format: int64
          example: 5
    PricingScheduleWithPricePlanId:
      allOf:
      - $ref: '#/components/schemas/PricingSchedule'
      - type: object
        required:
        - pricePlanId
        properties:
          pricePlanId:
            type: string
          pricePlanName:
            type: string
          pricePlanInfo:
            type: object
            title: PricePlanInfo
            additionalProperties: false
            required:
            - name
            properties:
              name:
                type: string
              description:
                type: string
    SlabDetail:
      type: object
      description: The details of a slab
      additionalProperties: false
      required:
      - startAfter
      - priceType
      - rate
      properties:
        startAfter:
          type: number
        priceType:
          $ref: '#/components/schemas/PriceType'
        slabConfig:
          type: object
          additionalProperties:
            type: string
        rate:
          type: number
        slabRateConfig:
          type: object
          additionalProperties:
            type: string
    CreateEntitySetting:
      type: object
      description: Represents a setting
      additionalProperties: false
      required:
      - id
      - value
      - namespace
      - name
      - dataType
      properties:
        id:
          type: string
        value:
          type: string
        namespace:
          type: string
        name:
          type: string
        dataType:
          $ref: '#/components/schemas/SettingDataType'
    CreateProposalRequest:
      allOf:
      - $ref: '#/components/schemas/CreatePurchaseRequest'
      - type: object
        required:
        - paymentMode
        - type
        properties:
          paymentMode:
            type: string
            enum:
            - PREPAID
            - POSTPAID
    UpdatePricingScheduleResponse:
      type: object
      additionalProperties: false
      required:
      - accountId
      - accountName
      - pricingSchedules
      properties:
        accountId:
          description: Identifier of the account
          type: string

# --- truncated at 32 KB (103 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/togai/refs/heads/main/openapi/togai-accounts-api-openapi.yml