{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aiven/json-schema/aiven-project-credits-claim-response-schema.json",
  "title": "ProjectCreditsClaimResponse",
  "description": "ProjectCreditsClaimResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aiven-project-billing-api-openapi.yml#/components/schemas/ProjectCreditsClaimResponse",
  "type": "object",
  "properties": {
    "credit": {
      "type": "object",
      "description": "Assigned credit",
      "properties": {
        "code": {
          "type": "string",
          "maxLength": 1024,
          "description": "Credit code"
        },
        "expire_time": {
          "type": "string",
          "maxLength": 36,
          "description": "Timestamp in ISO 8601 format, always in UTC"
        },
        "remaining_value": {
          "type": "string",
          "description": "Remaining credit value"
        },
        "start_time": {
          "type": "string",
          "maxLength": 36,
          "description": "Timestamp in ISO 8601 format, always in UTC"
        },
        "type": {
          "type": "string",
          "description": "Credit type",
          "enum": [
            "discount",
            "employee",
            "evaluation",
            "internal",
            "other",
            "outage",
            "partner",
            "promotion",
            "purchase",
            "referral",
            "sponsorship",
            "trial",
            "trial_over"
          ]
        },
        "value": {
          "type": "string",
          "description": "Original credit value, or for expired credits, the consumed credit value"
        }
      }
    },
    "errors": {
      "type": "array",
      "description": "List of errors occurred during request processing",
      "items": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "Printable error message"
          },
          "more_info": {
            "type": "string",
            "description": "URL to the documentation of the error"
          },
          "status": {
            "type": "integer",
            "description": "HTTP error status code"
          }
        },
        "required": [
          "message",
          "status"
        ]
      }
    },
    "message": {
      "type": "string",
      "description": "Printable result of the request"
    }
  },
  "required": [
    "credit"
  ]
}