{
  "opencollection": "1.0.0",
  "info": {
    "name": "Forithmus Challenge Platform 2fa credits API",
    "version": "1.0.0"
  },
  "items": [
    {
      "info": {
        "name": "credits",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List Transactions",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/admin/credits/transactions",
            "params": [
              {
                "name": "limit",
                "value": "",
                "type": "query"
              }
            ]
          },
          "docs": "List recent credit transactions across all users."
        },
        {
          "info": {
            "name": "List Pools",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/admin/credits"
          },
          "docs": "List Pools"
        },
        {
          "info": {
            "name": "Create Pool",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{{baseUrl}}/admin/credits",
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Create Pool"
        },
        {
          "info": {
            "name": "Update Pool",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "{{baseUrl}}/admin/credits/:pool_id",
            "params": [
              {
                "name": "pool_id",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Update Pool"
        },
        {
          "info": {
            "name": "Delete Pool",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "{{baseUrl}}/admin/credits/:pool_id",
            "params": [
              {
                "name": "pool_id",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Delete Pool"
        },
        {
          "info": {
            "name": "Grant Credits",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{{baseUrl}}/admin/credits/grant",
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Grant credits to a user: platform or challenge level."
        },
        {
          "info": {
            "name": "Transfer Credits",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{{baseUrl}}/admin/credits/transfer",
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Transfer a user's platform credits to a challenge pool."
        },
        {
          "info": {
            "name": "Get User Credits",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/admin/credits/user/:user_id",
            "params": [
              {
                "name": "user_id",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Get a user's full credit picture: platform + all challenge credits."
        },
        {
          "info": {
            "name": "Deduct Credits",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{{baseUrl}}/admin/credits/deduct",
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Deduct credits from a user: platform or challenge level."
        },
        {
          "info": {
            "name": "Revoke Grant",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{{baseUrl}}/admin/credits/revoke/:transaction_id",
            "params": [
              {
                "name": "transaction_id",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Revoke a previous credit grant: creates a negative transaction and deducts the balance."
        },
        {
          "info": {
            "name": "List Rules",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/admin/credits/rules"
          },
          "docs": "List Rules"
        },
        {
          "info": {
            "name": "Create Rule",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{{baseUrl}}/admin/credits/rules",
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Create Rule"
        },
        {
          "info": {
            "name": "Update Rule",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "{{baseUrl}}/admin/credits/rules/:rule_id",
            "params": [
              {
                "name": "rule_id",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Update Rule"
        },
        {
          "info": {
            "name": "Delete Rule",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "{{baseUrl}}/admin/credits/rules/:rule_id",
            "params": [
              {
                "name": "rule_id",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Delete Rule"
        },
        {
          "info": {
            "name": "Refund Pool",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{{baseUrl}}/admin/credits/pools/:pool_id/refund",
            "params": [
              {
                "name": "pool_id",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Refund remaining pool balance to the host's wallet. Superadmin only."
        },
        {
          "info": {
            "name": "Get My Platform Credits",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/users/me/credits"
          },
          "docs": "Get platform credit balance + recent transactions."
        },
        {
          "info": {
            "name": "Get Pool Stats",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/challenges/:slug/credits/pool",
            "params": [
              {
                "name": "slug",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Get sponsor pool stats for a challenge. Admin only."
        },
        {
          "info": {
            "name": "Update Pool Settings",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "{{baseUrl}}/challenges/:slug/credits/pool",
            "params": [
              {
                "name": "slug",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Update pool settings (e.g. num_users). Challenge admin only."
        },
        {
          "info": {
            "name": "Get My Balance",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/challenges/:slug/credits/me",
            "params": [
              {
                "name": "slug",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Get user's effective balance for this challenge: wallet + sponsor amount."
        },
        {
          "info": {
            "name": "Get Pool Funding History",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/challenges/:slug/credits/pool/history",
            "params": [
              {
                "name": "slug",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Get all funding transactions for this challenge's pool. Admin only."
        },
        {
          "info": {
            "name": "Get Collection Child Pool Stats",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/collections/:slug/credits/pool",
            "params": [
              {
                "name": "slug",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Get a read-only summary of all child challenge pools in this collection.\n\nReturns a list of child challenge pools with their total funded, used, and remaining\namounts. Collections no longer manage pools directly: each challenge manages its own.\nAuth: collection admin or superadmin."
        }
      ]
    }
  ],
  "bundled": true
}