DealHub Subskribe API

The subscription management, usage-based billing and revenue recognition API DealHub acquired with Subskribe — accounts, orders, subscriptions, plans and rate plans, charge types, usage records and aggregation, invoices and credit memos, payments and payment methods, taxation, accounting periods, ERP and revenue-recognition integration, ledger and journal entries, entitlements, approvals, documents and tenant administration.

OpenAPI Specification

dealhub-subskribe-api-openapi.yml Raw ↑
openapi: 3.0.0
security:
- ApiKeyAuth: []
info:
  version: 1.0.0
  title: Subskribe API
tags:
- name: Billing
- name: Accounts
- name: Intelligent Sales Room
- name: Accounting
- name: AI Agent
- name: Experimental
- name: AI Summary
- name: Integrations
- name: Authentication
- name: Approvals
- name: Attachments
- name: Usage
- name: BankTransactions
- name: Product Catalog
- name: Orders
- name: Credit Memo
- name: CRM field mapping
- name: Custom Field
- name: Customization
- name: Deal Pulse
- name: Discounts
- name: Documents
- name: Email
- name: Entities
- name: ERP
- name: Import
- name: MetricsReporting
- name: Notifications
- name: Opportunity
- name: Payments
- name: Health
- name: Platform Feature
- name: Settings
- name: Prismatic
- name: RateCard
- name: Refunds
- name: Reports
- name: Revenue Enablement
- name: Revenue Recognition
- name: Subscriptions
- name: TemplateScript
- name: Jobs
- name: Foreign Exchange
- name: Users
- name: Order
- name: Search
- name: Account
- name: Invoice
- name: Product Provisioning
- name: Tenant
paths:
  /accountReceivableContact:
    get:
      tags:
      - Billing
      summary: Get the contact for accounts receivable
      description: Returns the details of the account receivable contact for your tenant
      operationId: getAccountReceivableContact
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountReceivableContactJson'
    put:
      tags:
      - Billing
      summary: Set the contact for accounts receivable
      description: Sets the details of the account receivable contact for your tenant
      operationId: putAccountReceivableContact
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountReceivableContactJson'
        description: contact details
      responses:
        default:
          description: successful operation
  /accounts:
    get:
      tags:
      - Accounts
      summary: Get all accounts
      description: Returns a paginated list of accounts
      operationId: getAccounts
      parameters:
      - name: cursor
        in: query
        description: A string token is used to fetch next set of results. If not provided, the first page of results will
          be returned. Use the 'next_cursor' value from the previous response to fetch the next page.
        required: false
        schema:
          type: string
          format: uuid
      - name: limit
        in: query
        description: An integer specifying the maximum number of results to return per page. Defaults to 10 if not provided.
        required: false
        schema:
          type: integer
          format: int32
      - name: type
        in: query
        description: 'The type of accounts to retrieve. Allowed values are:  ALL: Includes all account types. RESELLER: Includes
          only reseller accounts. NON_RESELLER: Includes only non-reseller accounts.'
        required: false
        schema:
          type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedAccountsResponse'
    post:
      tags:
      - Accounts
      summary: Add a new account
      description: Create an account with the specified parameters. On success, the id of the newly created account is returned
      operationId: addAccount
      requestBody:
        $ref: '#/components/requestBodies/AccountJson'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountJson'
  /accounts/{id}:
    get:
      tags:
      - Accounts
      summary: Get an account by id
      description: Retrieves detailed information about a specific account using its unique identifier. It could be Account_ID,
        CRM_ID or External_ID. This endpoint provides comprehensive data for a particular account, enabling users to access
        full account details.
      operationId: getAccount
      parameters:
      - name: id
        in: path
        description: Uniquely identifies the Account
        required: true
        schema:
          type: string
      - name: idType
        in: query
        description: 'Specifies the type of ID being used. Allowed values are account_id: The default account ID. crm_id:
          The CRM (Customer Relationship Management) ID external_id: An external system''s ID for the account. Default is
          account_id'
        required: false
        schema:
          type: string
          enum:
          - ACCOUNT_ID
          - CRM_ID
          - EXTERNAL_ID
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountJson'
    put:
      tags:
      - Accounts
      summary: Update an account
      description: Updates an existing account with the specified parameters
      operationId: updateAccount
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        $ref: '#/components/requestBodies/AccountJson'
      responses:
        default:
          description: successful operation
    delete:
      tags:
      - Accounts
      summary: Delete an account
      description: Deletes the account associated with the passed ID
      operationId: deleteAccount
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        default:
          description: successful operation
  /accounts/{accountId}/contacts:
    get:
      tags:
      - Accounts
      summary: Get contacts for an account
      description: Returns a list of contacts associated with the specified account id
      operationId: getAccountContacts
      parameters:
      - name: accountId
        in: path
        description: Uniquely identifies the account for which contacts are being retrieved.
        required: true
        schema:
          type: string
      - name: expand
        in: query
        description: When set to true, expands the response to include additional details about each contact, such as address,
          external id, erp id, fullName. Default is false.
        required: false
        schema:
          type: boolean
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AccountContactJson'
    post:
      tags:
      - Accounts
      summary: Add a contact for an account
      description: Creates and adds a new contact for the specified account and returns the new contact ID.
      operationId: addAccountContact
      parameters:
      - name: accountId
        in: path
        description: value = Uniquely identifies the account
        required: true
        schema:
          type: string
      - name: skipAddressValidation
        in: query
        description: value = perform basic address validation
        required: false
        schema:
          type: boolean
      - name: strictValidation
        in: query
        description: value = require the address to match a canonical address, if it exists
        required: false
        schema:
          type: boolean
      requestBody:
        $ref: '#/components/requestBodies/AccountContactJson'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountContactJson'
  /accounts/{accountId}/crmId:
    put:
      tags:
      - Accounts
      summary: Update CRM ID
      description: API to update CRM ID for an account
      operationId: updateAccountCrmId
      parameters:
      - name: accountId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: string
        description: Unique CRM account / company identifier to associate to a Subskribe account.
      responses:
        default:
          description: successful operation
  /accounts/{id}/metrics:
    get:
      tags:
      - Accounts
      summary: Returns metrics for the specified account
      description: Fetches metrics such as ARR, TCV, etc for the specified account as of the specified target date
      operationId: getAccountMetrics
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      - name: targetDate
        in: query
        required: false
        schema:
          type: integer
          format: int64
      - name: forceRecalculate
        in: query
        required: false
        schema:
          type: boolean
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsJson'
  /accounts/{accountId}/paymentMethods/{id}:
    get:
      tags:
      - Accounts
      summary: Get the details of a payment method
      description: Returns the details of the payment method for the specified account id and payment method id
      operationId: getPaymentMethod
      parameters:
      - name: accountId
        in: path
        required: true
        schema:
          type: string
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountPaymentMethodJson'
  /accounts/salesRoom/{shareLink}/contacts:
    get:
      tags:
      - Intelligent Sales Room
      summary: Get account contacts via sales room share link
      description: Gets account contacts via sales room share link
      operationId: getAccountContactViaShareLink
      parameters:
      - name: shareLink
        in: path
        required: true
        schema:
          type: string
      responses:
        default:
          description: successful operation
    post:
      tags:
      - Intelligent Sales Room
      summary: Create account contact via share link
      description: Creates account contact via share link
      operationId: addAccountContactViaShareLink
      parameters:
      - name: shareLink
        in: path
        required: true
        schema:
          type: string
      - name: skipAddressValidation
        in: query
        description: value = perform basic address validation
        required: false
        schema:
          type: boolean
      - name: strictValidation
        in: query
        description: value = require the address to match a canonical address, if it exists
        required: false
        schema:
          type: boolean
      - name: addToReseller
        in: query
        description: value = Whether or not to add the contact for the reseller
        required: false
        schema:
          type: boolean
      requestBody:
        $ref: '#/components/requestBodies/AccountContactJson'
      responses:
        default:
          description: successful operation
  /accounts/{accountId}/erp:
    put:
      tags:
      - Accounts
      summary: Update account ERP details
      description: Update ERP details for an account specified by the account id
      operationId: addErpDetails
      parameters:
      - name: accountId
        in: path
        description: value = Uniquely identifies the account
        required: true
        schema:
          type: string
      - name: override
        in: query
        required: false
        schema:
          type: boolean
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ErpInputJson'
      responses:
        default:
          description: successful operation
  /accounts/{accountId}/contacts/{contactId}:
    get:
      tags:
      - Accounts
      summary: Gets contact details
      description: Returns the details of the specified contact
      operationId: getAccountContact
      parameters:
      - name: accountId
        in: path
        description: Uniquely identifies the account for which contacts are being retrieved.
        required: true
        schema:
          type: string
      - name: contactId
        in: path
        description: Uniquely identifies the contact.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountContactJson'
    put:
      tags:
      - Accounts
      summary: Update a contact
      description: Updates the contact specified by the account id and contact id with the passed information
      operationId: updateAccountContact
      parameters:
      - name: accountId
        in: path
        required: true
        schema:
          type: string
      - name: contactId
        in: path
        required: true
        schema:
          type: string
      - name: skipAddressValidation
        in: query
        required: false
        schema:
          type: boolean
      - name: strictValidation
        in: query
        required: false
        schema:
          type: boolean
      requestBody:
        $ref: '#/components/requestBodies/AccountContactJson'
      responses:
        default:
          description: successful operation
    delete:
      tags:
      - Accounts
      summary: Delete a contact
      description: Deletes the contact specified by the account id and contact id
      operationId: deleteAccountContact
      parameters:
      - name: contactId
        in: path
        required: true
        schema:
          type: string
      - name: accountId
        in: path
        required: true
        schema:
          type: string
      responses:
        default:
          description: successful operation
  /accounts/salesRoom/{shareLink}/contacts/{contactId}:
    put:
      tags:
      - Intelligent Sales Room
      summary: Update account contact via share link
      description: Updates account contact via share link
      operationId: updateAccountContactViaShareLink
      parameters:
      - name: shareLink
        in: path
        required: true
        schema:
          type: string
      - name: contactId
        in: path
        required: true
        schema:
          type: string
      - name: skipAddressValidation
        in: query
        description: value = perform basic address validation
        required: false
        schema:
          type: boolean
      - name: strictValidation
        in: query
        description: value = require the address to match a canonical address, if it exists
        required: false
        schema:
          type: boolean
      - name: updateReseller
        in: query
        description: value = Whether or not to update the contact for the reseller
        required: false
        schema:
          type: boolean
      requestBody:
        $ref: '#/components/requestBodies/AccountContactJson'
      responses:
        default:
          description: successful operation
  /accounts/crm/import:
    post:
      tags:
      - Accounts
      summary: Import an account from a CRM
      description: Ensures an account exists which matches the passed details.If an account exists that has a matching CRM
        Id, it will be updated, if not, it will be created
      operationId: importCrmAccount
      requestBody:
        $ref: '#/components/requestBodies/AccountJson'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CrmAccountImportResponse'
  /accounts/{accountId}/paymentConfig:
    get:
      tags:
      - Accounts
      summary: Get account payment configuration
      description: Retrieves the payment configuration for the specified account
      operationId: getAccountPaymentConfig
      parameters:
      - name: accountId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountPaymentConfigurationJson'
    post:
      tags:
      - Accounts
      summary: Upsert account payment configuration
      description: Creates or updates the payment configuration for the specified account
      operationId: upsertAccountPaymentConfig
      parameters:
      - name: accountId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountPaymentConfigurationJson'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountPaymentConfigurationJson'
  /accountingPeriods:
    post:
      tags:
      - Accounting
      summary: Specify the current accounting period
      description: Specify the start date of and open an accounting period, making it current
      operationId: specifyCurrentAccountingPeriod
      requestBody:
        content:
          application/json:
            schema:
              type: integer
              format: int64
        description: Start date of new period in seconds since Epoch (GMT)
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountingPeriod'
  /accountingPeriods/current:
    get:
      tags:
      - Accounting
      summary: Get the current accounting period
      description: ''
      operationId: getCurrentAccountingPeriod
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountingPeriod'
  /ai/zeppa/gen:
    post:
      tags:
      - AI Agent
      - Experimental
      summary: Generate zeppa artifact based on the description provided
      description: Generate zeppa code or documentation based on the input provided
      operationId: generateZeppaArtifact
      requestBody:
        $ref: '#/components/requestBodies/generateZeppaArtifactBody'
      responses:
        '200':
          description: successful operation
          content:
            text/event-stream:
              schema:
                type: string
            application/json:
              schema:
                type: string
  /ai/explain/proration/async/{orderId}/{orderLineItemId}:
    get:
      tags:
      - AI Summary
      - Experimental
      summary: Generate an explanation of the proration calculation
      description: Generate an explanation of the proration calculation for the given order line item.
      operationId: explainProrationAsync
      parameters:
      - name: orderId
        in: path
        description: id of the order
        required: true
        schema:
          type: string
      - name: orderLineItemId
        in: path
        description: id of the order line item
        required: true
        schema:
          type: string
      responses:
        '200':
          description: successful operation
          content:
            text/event-stream:
              schema:
                type: string
            application/json:
              schema:
                type: string
  /ai/explain/proration/{orderId}/{orderLineItemId}:
    get:
      tags:
      - AI Summary
      - Experimental
      summary: Generate an explanation of the proration calculation
      description: Generate an explanation of the proration calculation for the given order line item.
      operationId: explainProration
      parameters:
      - name: orderId
        in: path
        description: id of the order
        required: true
        schema:
          type: string
      - name: orderLineItemId
        in: path
        description: id of the order line item
        required: true
        schema:
          type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: string
  /ai/agents/session/{sessionId}:
    get:
      tags:
      - AI Agent
      - Experimental
      summary: 'Get the agent session given the id, NOTE: at the moment there is no response body'
      description: 'Get the agent session given the id, NOTE: at the moment there is no response body, if 200 is returned
        then session exists'
      operationId: getAgentSession
      parameters:
      - name: sessionId
        in: path
        description: id of the session to be fetched
        required: true
        schema:
          type: string
      responses:
        default:
          description: successful operation
  /ai/summary/subscription/{subscriptionId}:
    get:
      tags:
      - AI Agent
      - Experimental
      summary: Generate a summary of the subscription in plain english in markdown format
      description: Generate a complete summary of the subscription with the given id, a full detailed summary will be generated
        including metrics
      operationId: generateSubscriptionSummary
      parameters:
      - name: subscriptionId
        in: path
        description: id of the subscription
        required: true
        schema:
          type: string
      responses:
        '200':
          description: successful operation
          content:
            text/event-stream:
              schema:
                type: string
            application/json:
              schema:
                type: string
  /ai/summary/order/{orderId}:
    get:
      tags:
      - AI Summary
      - Experimental
      summary: Generate a summary of the order in plain english in markdown format
      description: Generate a complete summary of the order with the given id, a full detailed summary will be generated including
        metrics
      operationId: generateOrderSummary
      parameters:
      - name: orderId
        in: path
        description: id of the order
        required: true
        schema:
          type: string
      - name: type
        in: query
        description: Force regeneration of the PDF document even if there has been no changes. Defaults to false.
        required: false
        schema:
          type: string
      responses:
        '200':
          description: successful operation
          content:
            text/event-stream:
              schema:
                type: string
            application/json:
              schema:
                type: string
  /ai/agents/session:
    post:
      tags:
      - AI Agent
      - Experimental
      summary: Create new conversational AI agent session
      description: Create a new conversation session with Subskribe AI agent, this resource will return a session id which
        will be used for future conversations
      operationId: createAgentSession
      responses:
        default:
          description: successful operation
  /ai/agents/session/{sessionId}/chat:
    put:
      tags:
      - AI Agent
      - Experimental
      summary: Chat with a given session id and get back a response for a given message
      description: The API responds user message, a session id is required to identify the session this message needs to be
        posted
      operationId: chatResponse
      parameters:
      - name: sessionId
        in: path
        description: id of the session with which the conversation needs to happen
        required: true
        schema:
          type: string
      requestBody:
        $ref: '#/components/requestBodies/generateZeppaArtifactBody'
      responses:
        '200':
          description: successful operation
          content:
            text/plain:
              schema:
                type: string
            application/json:
              schema:
                type: string
  /ai/agents/session/{sessionId}/chatAsync:
    get:
      tags:
      - AI Agent
      - Experimental
      summary: Chat with a given session id and get back a response for a given message in a async manner in the form of server
        side events
      description: The API responds to user message, a session id is required to identify the session this message needs to
        be posted
      operationId: chatResponseAsync
      parameters:
      - name: sessionId
        in: path
        description: id of the session with which the conversation needs to happen
        required: true
        schema:
          type: string
      - name: userMessage
        in: query
        description: the user message to which the AI can respond
        required: false
        schema:
          type: string
      responses:
        '200':
          description: successful operation
          content:
            text/event-stream:
              schema:
                $ref: '#/components/schemas/OutboundEvent'
            application/json:
              schema:
                $ref: '#/components/schemas/OutboundEvent'
  /ai/agents/session/{sessionId}/messages:
    get:
      tags:
      - AI Agent
      - Experimental
      summary: List the messages belong to this session
      description: The message will be returned in the most recent order, with the latest being the first
      operationId: chatMessages
      parameters:
      - name: sessionId
        in: path
        description: id of the session with which the conversation needs to happen
        required: true
        schema:
          type: string
      - name: limit
        in: query
        description: the number of message to fetch should be a number between 1 to 100 if present
        required: false
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Message'
  /alias/subscriptionCharge/{aliasId}:
    get:
      tags:
      - Billing
      summary: Get the details of an alias
      description: Returns the details of the specified alias id including the subscription id and the charge id it is mapped
        to.
      operationId: getSubscriptionChargeAlias
      parameters:
      - name: aliasId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionChargeAlias'
    put:
      tags:
      - Billing
      summary: Create an alias for a subscription id/charge id pair
      description: This allows you to specify a string alias for a subscription id and a charge id. This can be useful when,
        for example, you want to upload usage statistics and would rather specify your own id (or another external id), rather
        than referring to Subskribe's internal ids.
      operationId: addSubscriptionChargeAlias
      parameters:
      - name: aliasId
        in: path
        description: alias to map to create the mapping for
        required: true
        schema:
          type: string
      - name: subscriptionId
        in: query
        description: the subscription id
        required: false
        schema:
          type: string
      - name: chargeId
        in: query
        description: the charge id
        required: false
        schema:
          type: string
      responses:
        default:
          description: successful operation
    delete:
      tags:
      - Billing
      summary: Delete the specified alias
      description: Deletes the specified alias mapping
      operationId: deleteSubscriptionChargeAlias
      parameters:
      - name: aliasId
        in: path
        required: true
        schema:
          type: string
      responses:
        default:
          description: successful operation
  /alias/subscriptionCharge:
    get:
      tags:
      - Billing
      summary: Get aliases for a subscription
      description: Returns all aliases for the specified subscription id.
      operationId: listAliasesForSubscription
      parameters:
      - name: subscriptionId
        in: query
        description: id of the subscription
        required: false
        schema:
          type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SubscriptionChargeAlias'
  /anrok:
    post:
      tags:
      - Integrations
      summary: Add a Anrok integration
      description: Returns the integration ID if successful
      operationId: addIntegration
      requestBody:
        $ref: '#/components/requestBodies/AnrokIntegrationInput'
      responses:
        default:
          description: successful operation
  /anrok/test:
    put:
      tags:
      - Integrations
      summary: Test an integration is valid
      description: ''
      operationId: testIntegration
      requestBody:
        $ref: '#/components/requestBodies/AnrokIntegrationInput'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: string
  /anrok/validate:
    post:
      tags:
      - Integrations
      summary: Validate an address with Anrok
      description: ''
      operationId: validateAddress
      requestBody:
        $ref: '#/components/requestBodies/AccountAddress'
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountAddress'
  /anrok/{integrationId}:
    get:
      tags:
      - Integrations
      summary: Get integration details
      description: Gets the integration details of the specified integration id
      operationId: getIntegration
      parameters:
      - name: integrationId
        in: path
        description: integration id
        required: true
        schema:
          type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Integration'
  /apikey/revoke:
    delete:
      tags:
      - Authentication
      summary: revoke all keys
      description: Revokes all keys for your tenant
      operationId: revokeApiKey
      responses:
        default:
          description: successful operation
  /apikey/{id}:
    get:
      tags:
      - Authentication
      summary: Retrieve an API key by id
      description: Retrieve an api key referenced by its id
      operationId: getApiKeyById
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        default:
          description: successful operation
  /apikey:
    get:
      tags:
      - Authentication
      summary: Retrieves all API keys
      description: Retrieves a list of (maximum 500 items) all API keys (including expired and deactivated keys)
      operationId: getAllApiKeys
      responses:
        default:
          description: successful operation
    post:
      tags:
      - Authentication
      summary: Create a new api key
      description: Create a new api key with the specified parameters. The new key is returned
      operationId: createApiKey
      parameters:
      - name: role
        in: query
        

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