Togai Accounts API

Account level calls

Operations 18

POST /accounts Create an Account #
GET /accounts List Accounts of Customer #
GET /accounts/{account_id} Get an Account #
PATCH /accounts/{account_id} Update an Account #
DELETE /accounts/{account_id} Delete an Account #
POST /accounts/{account_id}/add_aliases Add Aliases to Account #
GET /accounts/{account_id}/account_aliases Get All Aliases of an Account #
POST /accounts/{account_id}/remove_aliases Remove Aliases to Account #
POST /accounts/{account_id}/price_plans Dissociate or Associate a Price Plan with an Account #
POST /accounts/{account_id}/purchases Initiate a Purchase #
GET /accounts/{account_id}/purchases Get All Purchases for an Account #
GET /purchases/{purchase_id} Get a Specific Purchase of an Account #
POST /accounts/{account_id}/purchase_proposals Propose a Purchase of a Plan #
GET /accounts/{account_id}/purchase_proposals List All Proposals of an Account #
GET /purchase_proposals/{purchase_proposal_id} Get Proposal Information #
POST /accounts/{account_id}/edit_schedules Edit Schedules of an Account #
GET /accounts/{account_id}/pricing_schedules List Pricing Schedules of an Account #
POST /purchase_proposals/{purchase_proposal_id}/update_status Approve or Decline a Purchase of a Billing Plan #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/togai-accounts-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

togai-accounts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: '1.0'
  title: Togai 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:
  schemas:
    CreditRateDetails:
      type: object
      description: Amount to be credited
      additionalProperties: false
      required:
      - pricingModel
      - currencySlabRateDetails
      properties:
        pricingModel:
          $ref: '#/components/schemas/PricingModel'
        currencySlabRateDetails:
          type: array
          items:
            $ref: '#/components/schemas/CurrencySlabRateDetail'
    EntitlementOverageRateCard:
      type: object
      required:
      - ratePlan
      - rateValues
      - featureId
      properties:
        featureId:
          type: string
          description: Unique Identifier of the attached Feature
          maxLength: 50
        displayName:
          type: string
          description: Name to be displayed during invoice
        tag:
          type: string
          description: A tag string to group rate cards
        maxQuantity:
          type: number
          description: Maximum quantity allowed for the feature, if not specified, unlimited quantity is allowed
        ratePlan:
          $ref: '#/components/schemas/RatePlan'
        rateValues:
          type: array
          items:
            $ref: '#/components/schemas/RateValue'
        billingConfig:
          $ref: '#/components/schemas/BillingConfig'
          description: Represents the billing config of the entitlement overage rate card. If not specified interval:1 and startOffset:0 is taken as default value
    PurchaseType:
      type: string
      description: Specifies whether this purchase is for granting entitlements or for an association or for wallet topup or prepaid purchase. If left null, ENTITLEMENT_GRANT is taken as default
      enum:
      - ENTITLEMENT_GRANT
      - ASSOCIATION
      - WALLET_TOPUP
      - PREPAID
    PricingRuleTiming:
      type: string
      enum:
      - IN_ADVANCE
      - IN_ARREARS
      x-enum-varnames:
      - IN_ADVANCE
      - IN_ARREARS
      description: 'If IN_ADVANCE, the rule will be applied on rate cards with invoice timing IN_ADVANCE .

        If IN_ARREARS, the rule will be applied on rate cards with invoice timing IN_ARREARS .

        '
    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
    PurchasePlanOverride:
      description: entitlements override options for purchase of a price plan for an account
      type: object
      additionalProperties: false
      properties:
        fixedFeeRateCards:
          type: array
          maxItems: 50
          items:
            $ref: '#/components/schemas/FixedFeeRateCard'
        billingEntitlementRateCards:
          type: array
          maxItems: 50
          items:
            $ref: '#/components/schemas/BillingEntitlementRateCard'
        creditGrantRateCards:
          type: array
          maxItems: 50
          items:
            $ref: '#/components/schemas/CreditGrantRateCard'
    Address:
      description: billing address of the customer
      type: object
      additionalProperties: false
      properties:
        phoneNumber:
          description: Contact number
          type: string
        line1:
          description: Address line 1 (eg. Street, PO Box, Company Name)
          type: string
        line2:
          description: Address line 2 (eg. apartment, suite, unit or building)
          type: string
        postalCode:
          description: ZIP or postal code
          type: string
        city:
          description: City, district, suburb, town or village
          type: string
        state:
          description: State, county, province or region
          type: string
        country:
          description: Two letter country code [ISO-3166-1 Alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
          type: string
    InvoiceTiming:
      type: string
      enum:
      - IN_ADVANCE
      - IN_ARREARS
      - PREPAID
      x-enum-varnames:
      - IN_ADVANCE
      - IN_ARREARS
      - PREPAID
      description: 'If IN_ADVANCE, the rate card will be invoiced in the previous billing cycle.

        If IN_ARREARS, the rate card will be invoiced in the current billing cycle.

        If PREPAID, credits/entitlements will be granted only after invoice is paid

        '
    MinimumCommitment:
      title: MinimumCommitment
      type: object
      required:
      - displayName
      - rateValues
      properties:
        displayName:
          type: string
        rateValues:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/CurrencyRateValue'
    CreatePricePlanDetailsOverride:
      type: object
      properties:
        pricingCycleConfig:
          $ref: '#/components/schemas/PricingCycleConfig'
        supportedCurrencies:
          type: array
          uniqueItems: true
          minItems: 1
          items:
            type: string
        usageRateCards:
          type: array
          items:
            $ref: '#/components/schemas/UsageRateCard'
        billingEntitlementRateCards:
          type: array
          items:
            $ref: '#/components/schemas/BillingEntitlementRateCard'
        entitlementOverageRateCards:
          type: array
          items:
            $ref: '#/components/schemas/EntitlementOverageRateCard'
        fixedFeeRateCards:
          type: array
          items:
            $ref: '#/components/schemas/FixedFeeRateCard'
        licenseRateCards:
          type: array
          items:
            $ref: '#/components/schemas/LicenseRateCard'
        minimumCommitment:
          $ref: '#/components/schemas/MinimumCommitment'
        creditGrantRateCards:
          type: array
          items:
            $ref: '#/components/schemas/CreditGrantRateCard'
    ExpiryType:
      type: string
      description: Expiry type of grant
      enum:
      - PRICING_CYCLE
      - NO_EXPIRY
      - CUSTOM
    PricingRule:
      type: object
      description: Represents pricing rules of a price plan. i.e, price plan bound by time.
      additionalProperties: false
      required:
      - id
      - name
      - version
      - order
      - computation
      - action
      properties:
        id:
          type: string
        name:
          type: string
        version:
          type: integer
          format: int32
          minimum: 1
        invoiceTiming:
          $ref: '#/components/schemas/PricingRuleTiming'
        order:
          type: integer
          format: int32
          minimum: 1
        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'
    SlabRate:
      type: object
      description: Represents a rate for a slab
      required:
      - order
      - rate
      properties:
        order:
          type: integer
          format: int32
        rate:
          type: number
        slabRateConfig:
          type: object
          additionalProperties:
            type: string
    Slab:
      type: object
      description: Represents a pricing priceType (rates + slabs) for usage price plan
      required:
      - order
      - startAfter
      - priceType
      properties:
        order:
          type: integer
          format: int32
          minimum: 1
          maximum: 10
        startAfter:
          type: number
        priceType:
          $ref: '#/components/schemas/PriceType'
        slabConfig:
          type: object
          additionalProperties:
            type: string
    PreAction:
      type: object
      title: PreAction
      description: Pre action to be performed before association or disassociation
      required:
      - type
      properties:
        type:
          type: string
          enum:
          - GRANT_LICENSE
          description: Type of pre action to be performed
        config:
          type: object
          description: "Configuration required for performing pre action\n- `GRANT_LICENSE`: grant one time licenses to an account before association\n  - `licenseId` [Required]: Id of the license to be granted\n  - `updateType` [Required]: Type of update to be performed on the license (RELATIVE or ABSOLUTE)\n  - `quantity` [Required]: Quantity of license to be granted\n  - `effectiveFrom` [Optional]: Effective date from which the license will be granted\n"
          additionalProperties:
            type: string
    Account:
      description: Structure of an account
      type: object
      additionalProperties: false
      required:
      - name
      - id
      - togaiAccountId
      - togaiCustomerId
      - status
      - customerId
      properties:
        id:
          description: Identifier of the account
          type: string
          maxLength: 50
        togaiAccountId:
          description: Unique identifier of the account
          type: string
        togaiCustomerId:
          description: Unique identifier of the customer
          type: string
        name:
          description: Name of the Account
          type: string
          maxLength: 255
          minLength: 3
        customerId:
          description: Identifier of the customer
          type: string
        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
        aliases:
          description: list of aliases of the account
          type: array
          maxItems: 10
          minItems: 0
          items:
            title: AccountAliases
            type: object
            properties:
              alias:
                type: string
                maxLength: 50
        netTermDays:
          type: integer
          format: int32
        address:
          $ref: '#/components/schemas/Address'
        primaryEmail:
          description: Primary email of the customer
          type: string
          maxLength: 320
          example: admin@example.com
        status:
          description: Status of the account
          type: string
          enum:
          - ACTIVE
          - DRAFT
          - ARCHIVED
          example: ACTIVE
        settings:
          type: array
          maxItems: 10
          minItems: 0
          items:
            $ref: '#/components/schemas/CreateEntitySetting'
        invoiceGroupDetails:
          $ref: '#/components/schemas/InvoiceGroupDetails'
        metadata:
          description: 'Additional information associated with the account.

            Example: GSTN, VATN

            '
          type: object
          additionalProperties:
            type: string
        tags:
          description: Tag for accounts are stored in lowercase
          type: array
          uniqueItems: true
          items:
            type: string
    PriceType:
      type: string
      enum:
      - FLAT
      - PER_UNIT
      - PACKAGE
    UpdatePricingScheduleResponse:
      type: object
      additionalProperties: false
      required:
      - accountId
      - accountName
      - pricingSchedules
      properties:
        accountId:
          description: Identifier of the account
          type: string
          maxLength: 50
        accountName:
          description: Name of the Account
          type: string
        pricingSchedules:
          type: array
          items:
            $ref: '#/components/schemas/PlanOverride'
    ProratedRefundMode:
      type: string
      enum:
      - NONE
      - CREDITS
      - PAYMENT
      - WALLET
    CreateAccountRequestWithoutCustomerId:
      description: Payload to create account
      type: object
      additionalProperties: false
      required:
      - name
      - id
      properties:
        id:
          description: Identifier of the account
          type: string
          maxLength: 50
          example: ACC00001
        name:
          description: Name of the Account
          type: string
          maxLength: 255
          minLength: 3
          example: Primary Account
        invoiceCurrency:
          description: "Use [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code in which the account must be invoiced.  \nFor example: AED is the currency code for United Arab Emirates dirham.\n"
          type: string
          minLength: 3
          maxLength: 3
        aliases:
          description: Aliases are tags that are associated with an account. Multiple aliases are allowed for a single account.
          type: array
          maxItems: 10
          minItems: 0
          items:
            type: string
            maxLength: 50
            minLength: 3
          example: acme_primary
        accountAliases:
          description: Aliases which effective range
          type: array
          items:
            $ref: '#/components/schemas/CreateAccountAliasRequest'
        address:
          $ref: '#/components/schemas/Address'
        primaryEmail:
          description: Primary email of the account
          type: string
          maxLength: 320
          example: admin@example.com
        settings:
          type: array
          maxItems: 10
          minItems: 0
          items:
            $ref: '#/components/schemas/CreateEntitySetting'
        netTermDays:
          description: Net term for the invoices of the account
          type: integer
          format: int32
          example: 45
        metadata:
          description: 'Additional information associated with the account.

            Example: GSTN, VATN

            '
          type: object
          additionalProperties:
            type: string
        tags:
          description: Tag for accounts are stored in lowercase
          type: array
          uniqueItems: true
          items:
            type: string
        status:
          description: Status of the created account defaults to ACTIVE
          type: string
          enum:
          - ACTIVE
          - DRAFT
    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
    PlanOverride:
      type: object
      description: Represents effectiveness period and config of a price plan. i.e, price plan bound by time.
      additionalProperties: false
      required:
      - id
      - pricePlanId
      - pricePlanName
      - startDate
      - endDate
      properties:
        id:
          type: string
        pricePlanId:
          type: string
        pricePlanName:
          type: string
        pricePlanDetailsOverride:
          $ref: '#/components/schemas/PricePlanDetailsOverride'
        pricingRulesOverride:
          type: array
          items:
            $ref: '#/components/schemas/PricingRule'
        startDate:
          type: string
          format: date-time
        endDate:
          type: string
          format: date-time
    PricePlanType:
      type: string
      description: Type of price plan
      enum:
      - BILLING
      - PURCHASE
    SettingDataType:
      type: string
      enum:
      - STRING
      - NUMERIC
      - JSON
      - JSON_LOGIC
    CreditGrantRateCard:
      description: Credit grant rate card
      type: obje

# --- 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