DHIS2 Credit API

The credit API from DHIS2 — 7 operation(s) for credit.

GitHub OpenAPI

Operations 10

GET /credit/v1/courses/ Credit v1 courses list #
POST /credit/v1/courses/ Credit v1 courses create #
GET /credit/v1/courses/{course_key}/ Credit v1 courses read #
PUT /credit/v1/courses/{course_key}/ Credit v1 courses update #
PATCH /credit/v1/courses/{course_key}/ Credit v1 courses partial update #
GET /credit/v1/eligibility/ Credit v1 eligibility list #
GET /credit/v1/providers/ Credit v1 providers list #
GET /credit/v1/providers/{provider_id}/ Credit v1 providers read #
POST /credit/v1/providers/{provider_id}/callback/ Credit v1 providers callback create #
POST /credit/v1/providers/{provider_id}/request/ Credit v1 providers request create #

Specifications

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/dhis2:dhis2-credit-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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

dhis2-credit-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Open edX Credit API
  description: APIs for access to Open edX information
  contact:
    email: contact@academy.dhis2.org
  version: v1
servers:
- url: https://academy.dhis2.org/api
security:
- Basic: []
tags:
- name: Credit
paths:
  /credit/v1/courses/:
    parameters: []
    get:
      operationId: credit_v1_courses_list
      description: CreditCourse endpoints.
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CreditCourse'
      tags:
      - Credit
      summary: Credit v1 courses list
      x-summary-source: derived
    post:
      operationId: credit_v1_courses_create
      description: CreditCourse endpoints.
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreditCourse'
      tags:
      - Credit
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreditCourse'
        required: true
      summary: Credit v1 courses create
      x-summary-source: derived
  /credit/v1/courses/{course_key}/:
    parameters:
    - name: course_key
      in: path
      required: true
      schema:
        type: string
        pattern: (?:[^/+]+(/|\+)[^/+]+(/|\+)[^/?]+)
    get:
      operationId: credit_v1_courses_read
      description: CreditCourse endpoints.
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreditCourse'
      tags:
      - Credit
      summary: Credit v1 courses read
      x-summary-source: derived
    put:
      operationId: credit_v1_courses_update
      description: Create/update course modes for a course.
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreditCourse'
      tags:
      - Credit
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreditCourse'
        required: true
      summary: Credit v1 courses update
      x-summary-source: derived
    patch:
      operationId: credit_v1_courses_partial_update
      description: CreditCourse endpoints.
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreditCourse'
      tags:
      - Credit
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreditCourse'
        required: true
      summary: Credit v1 courses partial update
      x-summary-source: derived
  /credit/v1/eligibility/:
    parameters: []
    get:
      operationId: credit_v1_eligibility_list
      description: Returns eligibility for a user-course combination.
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CreditEligibility'
      tags:
      - Credit
      summary: Credit v1 eligibility list
      x-summary-source: derived
  /credit/v1/providers/:
    parameters: []
    get:
      operationId: credit_v1_providers_list
      description: Credit provider endpoints.
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CreditProvider'
      tags:
      - Credit
      summary: Credit v1 providers list
      x-summary-source: derived
  /credit/v1/providers/{provider_id}/:
    parameters:
    - name: provider_id
      in: path
      description: Unique identifier for this credit provider. Only alphanumeric characters and hyphens (-) are allowed. The identifier is case-sensitive.
      required: true
      schema:
        type: string
        pattern: '[a-z,A-Z,0-9,\-]+'
    get:
      operationId: credit_v1_providers_read
      description: Credit provider endpoints.
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreditProvider'
      tags:
      - Credit
      summary: Credit v1 providers read
      x-summary-source: derived
  /credit/v1/providers/{provider_id}/callback/:
    parameters:
    - name: provider_id
      in: path
      required: true
      schema:
        type: string
    post:
      operationId: credit_v1_providers_callback_create
      description: POST handler.
      responses:
        '201':
          description: ''
      tags:
      - Credit
      summary: Credit v1 providers callback create
      x-summary-source: derived
  /credit/v1/providers/{provider_id}/request/:
    parameters:
    - name: provider_id
      in: path
      required: true
      schema:
        type: string
    post:
      operationId: credit_v1_providers_request_create
      description: POST handler.
      responses:
        '201':
          description: ''
      tags:
      - Credit
      summary: Credit v1 providers request create
      x-summary-source: derived
components:
  schemas:
    CreditEligibility:
      required:
      - username
      type: object
      properties:
        username:
          title: Username
          type: string
          maxLength: 255
          minLength: 1
        course_key:
          title: Course key
          type: string
          readOnly: true
        deadline:
          title: Deadline
          description: Deadline for purchasing and requesting credit.
          type: string
          format: date-time
    CreditProvider:
      required:
      - id
      - display_name
      - url
      - status_url
      - description
      type: object
      properties:
        id:
          title: Id
          type: string
          minLength: 1
        display_name:
          title: Display name
          description: Name of the credit provider displayed to users
          type: string
          maxLength: 255
          minLength: 1
        url:
          title: Url
          type: string
          format: uri
          minLength: 1
        status_url:
          title: Status url
          type: string
          format: uri
          minLength: 1
        description:
          title: Description
          type: string
          minLength: 1
        enable_integration:
          title: Enable integration
          description: When true, automatically notify the credit provider when a user requests credit. In order for this to work, a shared secret key MUST be configured for the credit provider in secure auth settings.
          type: boolean
        fulfillment_instructions:
          title: Fulfillment instructions
          description: Plain text or html content for displaying further steps on receipt page *after* paying for the credit to get credit for a credit course against a credit provider.
          type:
          - string
          - 'null'
        thumbnail_url:
          title: Thumbnail url
          description: Thumbnail image url of the credit provider.
          type: string
          format: uri
          maxLength: 255
          minLength: 1
    CreditCourse:
      required:
      - course_key
      type: object
      properties:
        course_key:
          title: Course key
          type: string
        enabled:
          title: Enabled
          type: boolean
  securitySchemes:
    Basic:
      type: http
      scheme: basic