DoiT Contract Templates API

Manage contract templates for PartnerOps resellers (T1/T2).

Operations 6

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /billing/v1/contract-templates List contract templates · List contract templates #
Ask an LLM
“Which contract templates does our tenant own?”
“Where can I see all our reusable contract templates?”
Tell an agent
List our contract templates.
Show every contract template for this tenant.
POST /billing/v1/contract-templates Create a contract template · Create contract template #
Ask an LLM
“How do I create a reusable contract template?”
“Can I include price books and billing rules in a template?”
Tell an agent
Create template {name} for {platform} eligible from {eligibleFrom}.
Create contract template {name} on {platform} from {eligibleFrom} with price books {priceBooks}.
GET /billing/v1/contract-templates/{templateID} Retrieve a contract template · Get contract template #
Ask an LLM
“How do I see the terms in one contract template?”
“Can I fetch a template by its ID?”
Tell an agent
Get contract template {templateID}.
Show the billing rules in template {templateID}.
PUT /billing/v1/contract-templates/{templateID} Update a contract template · Update contract template #
Ask an LLM
“How do I change the eligibility dates on a template?”
“Can I edit an existing template's billing rules?”
Tell an agent
Update template {templateID}: name {name}, platform {platform}, eligible from {eligibleFrom}.
Set template {templateID} eligibility end to {eligibleTo}, keeping {name}, {platform}, {eligibleFrom}.
DELETE /billing/v1/contract-templates/{templateID} Archive a contract template · Archive contract template #
Ask an LLM
“Does archiving a template affect contracts already created from it?”
“How do I retire a contract template?”
Tell an agent destructive · confirm first
Archive contract template {templateID}.
Retire template {templateID}.
POST /billing/v1/contract-templates/{templateID}/actions/assign Assign contract template #

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/doit:doit-contract-templates-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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

doit-contract-templates-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: DoiT Contract Templates API
  description: Programmatic access to DoiT Platform
  version: v1
servers:
- url: https://api.doit.com
security:
- api_key: []
- tenantId: []
  api_key: []
tags:
- name: Contract Templates
  description: Manage contract templates for PartnerOps resellers (T1/T2).
paths:
  /billing/v1/contract-templates:
    get:
      tags:
      - Contract Templates
      summary: List contract templates
      description: Lists contract templates owned by the authenticated tenant (from the bearer token). Requires ContractTemplatesAdmin, DoiT API access (`platform:externalApi`), and the `channelops:contracts:templates` entitlement.
      operationId: listContractTemplates
      responses:
        '200':
          description: OK - Contract templates returned.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ContractTemplateResponse'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '500':
          $ref: '#/components/responses/500'
    post:
      tags:
      - Contract Templates
      summary: Create contract template
      description: Creates a contract template for the authenticated tenant (from the bearer token). Requires ContractTemplatesAdmin, DoiT API access (`platform:externalApi`), and the `channelops:contracts:templates` entitlement.
      operationId: createContractTemplate
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContractTemplateInput'
      responses:
        '201':
          description: Created - Contract template created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractTemplateResponse'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '409':
          $ref: '#/components/responses/409'
        '500':
          $ref: '#/components/responses/500'
  /billing/v1/contract-templates/{templateID}:
    get:
      tags:
      - Contract Templates
      summary: Get contract template
      description: Returns a single contract template owned by the authenticated tenant (from the bearer token). Requires ContractTemplatesAdmin, DoiT API access (`platform:externalApi`), and the `channelops:contracts:templates` entitlement.
      operationId: getContractTemplate
      parameters:
      - name: templateID
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK - Contract template returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractTemplateResponse'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '500':
          $ref: '#/components/responses/500'
    put:
      tags:
      - Contract Templates
      summary: Update contract template
      description: Updates a contract template owned by the authenticated tenant (from the bearer token). Requires ContractTemplatesAdmin, DoiT API access (`platform:externalApi`), and the `channelops:contracts:templates` entitlement.
      operationId: updateContractTemplate
      parameters:
      - name: templateID
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContractTemplateInput'
      responses:
        '200':
          description: OK - Contract template updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractTemplateResponse'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '409':
          $ref: '#/components/responses/409'
        '500':
          $ref: '#/components/responses/500'
    delete:
      tags:
      - Contract Templates
      summary: Archive contract template
      description: Soft-deletes (archives) a contract template owned by the authenticated tenant (from the bearer token). Instantiated contracts are unaffected. Requires ContractTemplatesAdmin, DoiT API access (`platform:externalApi`), and the `channelops:contracts:templates` entitlement.
      operationId: archiveContractTemplate
      parameters:
      - name: templateID
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK - Contract template archived.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContractTemplateResponse'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '409':
          $ref: '#/components/responses/409'
        '500':
          $ref: '#/components/responses/500'
  /billing/v1/contract-templates/{templateID}/actions/assign:
    post:
      tags:
      - Contract Templates
      summary: Assign contract template
      description: Applies a contract template owned by the authenticated tenant (from the bearer token) to child customers, creating a draft contract for each. Drafts have no billing effect until each one is completed and activated. The template must not be archived, and the current date must fall within its eligibility window. Requires ContractTemplatesAdmin, DoiT API access (`platform:externalApi`), and the `channelops:contracts:templates` entitlement.
      operationId: assignContractTemplate
      parameters:
      - name: templateID
        in: path
        required: true
        description: Identifier of the contract template to apply.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssignContractTemplateInput'
      responses:
        '201':
          description: Created - Draft contracts created for the specified customers.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssignContractTemplateResponse'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '409':
          $ref: '#/components/responses/409'
        '500':
          $ref: '#/components/responses/500'
components:
  schemas:
    AssignContractTemplateInput:
      type: object
      description: The customers a contract template is applied to.
      required:
      - customerIds
      properties:
        customerIds:
          type: array
          description: 'Identifiers of the customers to create a draft contract for. Each identifier must name a tenant within the authenticated tenant''s own hierarchy, of the tier one level below it: a distributor supplies resellers, a reseller supplies end customers. Repeated identifiers are ignored, and a customer already holding a contract from this template receives another draft.'
          minItems: 1
          maxItems: 250
          items:
            type: string
    ContractTemplatePriceBook:
      type: object
      properties:
        name:
          type: string
        managementAccounts:
          type: array
          items:
            type: string
        rules:
          type: array
          items:
            $ref: '#/components/schemas/ContractTemplatePriceBookRule'
    Error:
      type: object
      description: Standard error response structure.
      properties:
        error:
          type: string
          description: Detailed error message.
    ContractTemplateResponse:
      type: object
      description: Contract template returned by the PartnerOps external API.
      properties:
        templateId:
          type: string
        name:
          type: string
        platform:
          type: string
        status:
          type: string
          enum:
          - active
          - archived
        structure:
          type: string
        eligibleFrom:
          type: string
          format: date-time
        eligibleTo:
          type: string
          format: date-time
        billingRules:
          type: array
          items:
            $ref: '#/components/schemas/ContractTemplateBillingRule'
        priceBooks:
          type: array
          items:
            $ref: '#/components/schemas/ContractTemplatePriceBook'
        customLineItems:
          type: array
          items:
            type: object
            additionalProperties: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        archivedAt:
          type: string
          format: date-time
    AssignedContract:
      type: object
      description: A draft contract created from a contract template.
      properties:
        customerId:
          type: string
          description: Identifier of the customer the draft contract was created for.
        contractId:
          type: string
          description: Identifier of the created draft contract.
    ContractTemplatePriceBookRule:
      type: object
      properties:
        name:
          type: string
        percentageChange:
          type: number
          format: double
        unitPrice:
          type: number
          format: double
        filters:
          type: array
          items:
            type: object
            additionalProperties: true
        formula:
          type: string
        cloud:
          type: string
        lineItemDescription:
          type: string
        applyInLine:
          type: boolean
        includeCredits:
          type: boolean
        applyAWSEligibleDiscount:
          type: boolean
    ContractTemplateBillingRule:
      type: object
      properties:
        name:
          type: string
        managementAccounts:
          type: array
          items:
            type: string
        filters:
          type: array
          items:
            type: object
            additionalProperties: true
        formula:
          type: string
    ContractTemplateInput:
      type: object
      description: Payload for creating or updating a contract template.
      required:
      - name
      - platform
      - eligibleFrom
      properties:
        name:
          type: string
        platform:
          type: string
        structure:
          description: Which preset the template started from. Optional — an omitted or blank value is recorded as "blank".
          type: string
        eligibleFrom:
          type: string
          format: date-time
        eligibleTo:
          type: string
          format: date-time
        billingRules:
          type: array
          items:
            $ref: '#/components/schemas/ContractTemplateBillingRule'
        priceBooks:
          type: array
          items:
            $ref: '#/components/schemas/ContractTemplatePriceBook'
        customLineItems:
          type: array
          items:
            type: object
            additionalProperties: true
    AssignContractTemplateResponse:
      type: object
      description: The draft contracts created by applying a contract template.
      properties:
        count:
          type: integer
          description: Number of draft contracts created.
        createdContracts:
          type: array
          description: One entry per created draft contract, in the order the customers were supplied.
          items:
            $ref: '#/components/schemas/AssignedContract'
  responses:
    '404':
      description: Not Found - The requested resource does not exist.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '401':
      description: Unauthorized - Invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '403':
      description: Forbidden - The client is not authorized to perform the request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '409':
      description: Conflict - The request conflicts with the current state of the resource.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '500':
      description: Internal Server Error - Something went wrong with the DoiT API server.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '400':
      description: Bad Request - The server cannot process the request, often due to a malformed request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    api_key:
      type: apiKey
      name: Authorization
      description: Use the "Bearer <API_KEY>" format or sign in for autofill
      in: header
    tenantId:
      type: apiKey
      name: X-Tenant-Id
      description: 'Customer (tenant) ID for the request. Separate from your API token: always authenticate with `Authorization: Bearer <token>` (personal or service account). See [Get Started](https://developer.doit.com/docs/start). Omit when your token is scoped to a single customer (resolved automatically). A service account can select an active direct or nested descendant of its home customer; the endpoint''s normal permissions, entitlements, and resource-ownership checks still apply. A service-account target outside that customer subtree returns `403 Forbidden`. Prefer this header over the legacy `customerContext` query parameter, which only applies to legacy API keys and is ignored by personal and service account tokens.'
      in: header
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://console.doit.com/sign-in/oauth
          tokenUrl: https://console.doit.com/api/auth/token
          scopes:
            dci: Access All Data
x-samples-languages:
- curl
- go
- node
- python
x-cli-config:
  security: oauth2
  params:
    client_id: cli
x-provenance:
  method: harvested
  publisher: DoiT
  source: https://api.doit.com/openapi.yaml
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)