CompTeam Discount Codes API

The Discount Codes API from CompTeam — 3 operation(s) for discount codes.

GitHub OpenAPI

Operations 4

GET /api/v1/discount-codes List Discount Codes #
POST /api/v1/discount-codes Create Discount Code #
POST /api/v1/discount-codes/validate Validate Discount Code #
PATCH /api/v1/discount-codes/{code_id} Update Discount Code #

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/compteam-io:compteam-io-discount-codes-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

compteam-io-discount-codes-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Compteam Io Discount Codes API
  version: 0.1.0
  description: 'Operations tagged Discount Codes across 2 of this provider''s published API definitions: compteam-io-openapi.json, compteam-io-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.compteam.io
  description: C-TEAM API host serving this spec and its Swagger UI at /docs
tags:
- name: Discount Codes
paths:
  /api/v1/discount-codes:
    get:
      tags:
      - Discount Codes
      summary: List Discount Codes
      operationId: list_discount_codes_api_v1_discount_codes_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
      - HTTPBearer: []
    post:
      tags:
      - Discount Codes
      summary: Create Discount Code
      operationId: create_discount_code_api_v1_discount_codes_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DiscountCodeCreate'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /api/v1/discount-codes/validate:
    post:
      tags:
      - Discount Codes
      summary: Validate Discount Code
      operationId: validate_discount_code_api_v1_discount_codes_validate_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DiscountCodeValidation'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /api/v1/discount-codes/{code_id}:
    patch:
      tags:
      - Discount Codes
      summary: Update Discount Code
      operationId: update_discount_code_api_v1_discount_codes__code_id__patch
      security:
      - HTTPBearer: []
      parameters:
      - name: code_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Code Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DiscountCodeUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    DiscountCodeCreate:
      properties:
        code:
          type: string
          maxLength: 64
          minLength: 1
          title: Code
        category:
          type: string
          enum:
          - membership
          - gear
          - seminar
          title: Category
        discount_type:
          type: string
          enum:
          - fixed
          - percentage
          title: Discount Type
        discount_value:
          anyOf:
          - type: number
            exclusiveMinimum: 0.0
          - type: string
          title: Discount Value
        membership_duration_months:
          anyOf:
          - type: integer
            exclusiveMinimum: 0.0
          - type: 'null'
          title: Membership Duration Months
        membership_fee_coverage:
          anyOf:
          - type: string
            enum:
            - recurring
            - signup_fee
            - both
          - type: 'null'
          title: Membership Fee Coverage
        valid_from:
          anyOf:
          - type: string
          - type: 'null'
          title: Valid From
        valid_until:
          anyOf:
          - type: string
          - type: 'null'
          title: Valid Until
        max_redemptions:
          anyOf:
          - type: integer
            exclusiveMinimum: 0.0
          - type: 'null'
          title: Max Redemptions
        target_ids:
          items:
            type: string
            format: uuid
          type: array
          title: Target Ids
        is_active:
          type: boolean
          title: Is Active
          default: true
      type: object
      required:
      - code
      - category
      - discount_type
      - discount_value
      title: DiscountCodeCreate
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    DiscountCodeValidation:
      properties:
        code:
          type: string
          title: Code
        category:
          type: string
          enum:
          - membership
          - gear
          - seminar
          title: Category
        target_ids:
          items:
            type: string
            format: uuid
          type: array
          title: Target Ids
        gross_amount:
          anyOf:
          - type: number
            minimum: 0.0
          - type: string
          title: Gross Amount
        currency:
          type: string
          title: Currency
        existing_discount_amount:
          anyOf:
          - type: number
            minimum: 0.0
          - type: string
          title: Existing Discount Amount
          default: '0'
      type: object
      required:
      - code
      - category
      - gross_amount
      - currency
      title: DiscountCodeValidation
    DiscountCodeUpdate:
      properties:
        code:
          anyOf:
          - type: string
            maxLength: 64
            minLength: 1
          - type: 'null'
          title: Code
        discount_type:
          anyOf:
          - type: string
            enum:
            - fixed
            - percentage
          - type: 'null'
          title: Discount Type
        discount_value:
          anyOf:
          - type: number
            exclusiveMinimum: 0.0
          - type: string
          - type: 'null'
          title: Discount Value
        membership_duration_months:
          anyOf:
          - type: integer
            exclusiveMinimum: 0.0
          - type: 'null'
          title: Membership Duration Months
        membership_fee_coverage:
          anyOf:
          - type: string
            enum:
            - recurring
            - signup_fee
            - both
          - type: 'null'
          title: Membership Fee Coverage
        valid_from:
          anyOf:
          - type: string
          - type: 'null'
          title: Valid From
        valid_until:
          anyOf:
          - type: string
          - type: 'null'
          title: Valid Until
        max_redemptions:
          anyOf:
          - type: integer
            exclusiveMinimum: 0.0
          - type: 'null'
          title: Max Redemptions
        is_active:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Is Active
        target_ids:
          anyOf:
          - items:
              type: string
              format: uuid
            type: array
          - type: 'null'
          title: Target Ids
      type: object
      title: DiscountCodeUpdate
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer
x-refined-from:
- compteam-io-openapi.json
- compteam-io-openapi.yml