> ## Documentation Index
> Fetch the complete documentation index at: https://docs.techfootintl.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Terms

> Step 2 of the bill-run flow (and after any step to check status). Retrieve billing terms with optional filtering. The `termID` from this response is required for all subsequent bill-run steps.



## OpenAPI

````yaml POST /billspree/terms/get-terms
openapi: 3.1.0
info:
  title: Billspree API
  description: REST API for Billspree — billing, AR management, and workspace operations.
  version: 1.0.0
servers:
  - url: https://{workspace}.spreesuite.com
    variables:
      workspace:
        default: your-workspace
        description: Your organization's subdomain (e.g. demo → demo.spreesuite.com)
security:
  - apiKeyAuth: []
paths:
  /billspree/terms/get-terms:
    post:
      tags:
        - Bill Run
      summary: Get Terms
      description: >-
        Step 2 of the bill-run flow (and after any step to check status).
        Retrieve billing terms with optional filtering. The `termID` from this
        response is required for all subsequent bill-run steps.
      operationId: getTerms
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetTermsRequest'
            example:
              method: Retrieve
              action: Retrieve Terms
              apiVersion: v2
              serviceCode: DEMO-001
              termID: null
              page: null
              filters: null
              metaData: null
              type: null
              status: null
              billID: null
      responses:
        '200':
          description: Terms retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetTermsResponse'
              example:
                success: true
                statusCode: 200
                message: Request Succeeded.
                error: null
                data:
                  terms:
                    - termID: 5
                      label: JUNE2026
                      startDate: 01/06/2026
                      endDate: 30/06/2026
                      dueDate: 10/07/2026
                      status: Open
                      serviceCode: DEMO-001
                      batchCode: BATCH-001
components:
  schemas:
    GetTermsRequest:
      type: object
      required:
        - method
        - action
        - apiVersion
      properties:
        method:
          type: string
          description: Always `"Retrieve"`
          example: Retrieve
        action:
          type: string
          description: Always `"Retrieve Terms"`
          example: Retrieve Terms
        apiVersion:
          type: string
          example: v2
        serviceCode:
          type: string
          nullable: true
          description: Filter by pricing template — `null` returns all
        termID:
          type: integer
          nullable: true
          description: Filter by specific term ID
        status:
          type: string
          nullable: true
          description: Filter by term status — e.g. `"Open"`, `"Posted"`, `"Published"`
        filters:
          type: object
          nullable: true
        metaData:
          type: object
          nullable: true
        type:
          type: string
          nullable: true
        billID:
          type: integer
          nullable: true
        page:
          type: object
          nullable: true
          description: '`{ "pageNumber": 0, "size": 10 }` — `null` returns all'
    GetTermsResponse:
      type: object
      properties:
        success:
          type: boolean
        statusCode:
          type: integer
        message:
          type: string
        error:
          nullable: true
        data:
          type: object
          properties:
            terms:
              type: array
              items:
                $ref: '#/components/schemas/Term'
    Term:
      type: object
      properties:
        termID:
          type: integer
          description: Internal term ID — required for all subsequent bill-run steps
        label:
          type: string
          description: Term label
        startDate:
          type: string
          description: Period start date
        endDate:
          type: string
          description: Period end date
        dueDate:
          type: string
          description: Payment due date
        status:
          type: string
          description: >-
            Current term status — `"Open"`, `"Processed"`, `"Posted"`,
            `"Published"`
        serviceCode:
          type: string
        batchCode:
          type: string
          nullable: true
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Auth token returned from the login endpoint. Send as: `Authorization:
        <token>` (no Bearer prefix)

````