Docupilot subscription API

The subscription API from Docupilot — 10 operation(s) for subscription.

OpenAPI Specification

docupilot-subscription-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Docupilot accounts APIs ai subscription API
  version: '1.0'
  description: Docupilot accounts APIs
  termsOfService: https://docupilot.app/terms-and-conditions/
  contact:
    name: Team Docupilot
    email: support@docupilot.app
tags:
- name: subscription
paths:
  /dashboard/accounts/v2/subscription/addon_pricing_info/:
    get:
      operationId: addon_pricing_info
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - name: ordering
        required: false
        in: query
        description: Which field to use when ordering the results.
        schema:
          type: string
      - name: search
        required: false
        in: query
        description: A search term.
        schema:
          type: string
      tags:
      - subscription
      security:
      - SessionAuthentication: []
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AddonPricingInfo'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
  /dashboard/accounts/v2/subscription/buy_addon/:
    post:
      operationId: purchase_addon
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      tags:
      - subscription
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddonPurchase'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/AddonPurchase'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/AddonPurchase'
        required: true
      security:
      - SessionAuthentication: []
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
  /dashboard/accounts/v2/subscription/details/:
    get:
      operationId: get_subscription_details
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      tags:
      - subscription
      security:
      - SessionAuthentication: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChargebeeSubscription'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
  /dashboard/accounts/v2/subscription/extend_trial/:
    post:
      operationId: extend_trial
      summary: Extend trial
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      tags:
      - subscription
      security:
      - SessionAuthentication: []
      responses:
        '204':
          description: No response body
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
  /dashboard/accounts/v2/subscription/hosted_page/:
    get:
      operationId: get_chargebee_hosted_page
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      - in: query
        name: plan_id
        schema:
          type: string
      tags:
      - subscription
      security:
      - SessionAuthentication: []
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
  /dashboard/accounts/v2/subscription/portal_session/:
    get:
      operationId: get_chargebee_portal_session
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      tags:
      - subscription
      security:
      - SessionAuthentication: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChargebeeSubscription'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
  /dashboard/accounts/v2/subscription/remaining_months/:
    get:
      operationId: get_subscription_remaining_months
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      tags:
      - subscription
      security:
      - SessionAuthentication: []
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
  /dashboard/accounts/v2/subscription/renew_request/:
    post:
      operationId: subscription_renew_request_create
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      tags:
      - subscription
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RenewSubscription'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/RenewSubscription'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/RenewSubscription'
      security:
      - SessionAuthentication: []
      responses:
        '204':
          description: No response body
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
  /dashboard/accounts/v2/subscription/resume/:
    post:
      operationId: resume_subscription
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      tags:
      - subscription
      security:
      - SessionAuthentication: []
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
  /dashboard/accounts/v2/subscription/unpaid_invoices/:
    get:
      operationId: get_chargebee_unpaid_invoices
      parameters:
      - in: header
        name: X-Workspace
        schema:
          type: string
        description: Workspace unique_key
        required: true
      tags:
      - subscription
      security:
      - SessionAuthentication: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HostedPage'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          description: ''
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: ''
components:
  schemas:
    UnauthenticatedError:
      type: object
      properties:
        detail:
          type: string
      required:
      - detail
      description: ''
    ValidationError:
      type: object
      properties:
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
        non_field_errors:
          type: array
          items:
            type: string
      required:
      - errors
      - non_field_errors
      description: ''
    RenewSubscription:
      type: object
      properties:
        upgrade_message:
          type: string
          maxLength: 200
      description: ''
    ForbiddenError:
      type: object
      properties:
        detail:
          type: string
      required:
      - detail
      description: ''
    ChargebeeSubscription:
      type: object
      properties:
        plan_id:
          type: string
          readOnly: true
          nullable: true
        status:
          enum:
          - a
          - t
          - e
          - c
          - p
          type: string
          readOnly: true
        trial_end:
          type: string
          format: date-time
          readOnly: true
        billing_period_unit:
          type: string
          readOnly: true
          nullable: true
        current_term_start:
          type: string
          readOnly: true
        current_term_end:
          type: string
          readOnly: true
        unpaid_invoices:
          type: integer
          readOnly: true
        max_allowed_unpaid_invoices:
          type: integer
          readOnly: true
        overage_enabled:
          type: boolean
        documents_allowed:
          type: integer
          readOnly: true
        documents_created:
          type: integer
          readOnly: true
        can_extend_trial:
          type: boolean
          readOnly: true
        subscribed_on:
          type: string
          readOnly: true
        signnow_credits_allowed:
          type: integer
          readOnly: true
        signnow_credits_used:
          type: integer
          readOnly: true
        trial_signatures_allowed:
          type: integer
          readOnly: true
        trial_signatures_used:
          type: integer
          readOnly: true
        signatures_allowed:
          type: integer
          readOnly: true
        signatures_used:
          type: integer
          readOnly: true
      required:
      - billing_period_unit
      - can_extend_trial
      - current_term_end
      - current_term_start
      - documents_allowed
      - documents_created
      - max_allowed_unpaid_invoices
      - overage_enabled
      - plan_id
      - signatures_allowed
      - signatures_used
      - signnow_credits_allowed
      - signnow_credits_used
      - status
      - subscribed_on
      - trial_end
      - trial_signatures_allowed
      - trial_signatures_used
      - unpaid_invoices
      description: ''
    HostedPage:
      type: object
      properties:
        url:
          type: string
          format: uri
      required:
      - url
      description: ''
    AddonTier:
      type: object
      properties:
        upto:
          type: string
        price:
          type: number
          format: double
      required:
      - price
      - upto
      description: ''
    AddonPricingInfo:
      type: object
      properties:
        addon_id:
          type: string
        type:
          enum:
          - recurring
          - one_time
          type: string
        allowed_quantities:
          type: array
          items:
            type: integer
        tiers:
          type: array
          items:
            $ref: '#/components/schemas/AddonTier'
      required:
      - addon_id
      - allowed_quantities
      - tiers
      - type
      description: ''
    AddonPurchase:
      type: object
      properties:
        addon_id:
          enum:
          - esignature
          - signnow
          type: string
        quantity:
          type: integer
      required:
      - addon_id
      - quantity
      description: ''
  securitySchemes:
    OAuthAuthentication:
      type: http
      scheme: bearer
      description: OAuth2 Bearer Token Authentication
    SessionAuthentication:
      type: apiKey
      in: cookie
      name: sessionid
      description: browser based login takes care of this
externalDocs:
  description: Help docs on how to use API
  url: https://help.docupilot.app/developers/api-overview