{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/good-grants/json-schema/good-grants-allocation-schema.json",
  "title": "Allocation",
  "description": "Award of funds from a fund's budget to an application, the grant slot that allocation payments draw against.",
  "x-generated": "2026-10-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/good-grants-openapi.yaml#/components/schemas/Allocation",
  "type": "object",
  "properties": {
    "amount": {
      "type": "number",
      "description": "Total amount allocated to the application from the fund, in the fund's currency."
    },
    "applicant": {
      "type": [
        "object",
        "null"
      ],
      "description": "Applicant who owns the application, `null` when there is none.",
      "properties": {
        "slug": {
          "type": "string",
          "description": "URL-safe identifier of the applicant."
        },
        "link": {
          "type": "string",
          "format": "uri",
          "description": "Canonical URL of the applicant resource."
        },
        "name": {
          "type": "string",
          "description": "Full display name of the applicant."
        },
        "first_name": {
          "type": "string",
          "description": "Given name of the applicant."
        },
        "last_name": {
          "type": "string",
          "description": "Family name of the applicant."
        }
      }
    },
    "application": {
      "type": [
        "object",
        "null"
      ],
      "description": "Application the allocation belongs to, `null` when there is none.",
      "properties": {
        "slug": {
          "type": "string",
          "description": "URL-safe identifier of the application."
        },
        "id": {
          "type": "integer",
          "description": "Internal numeric identifier of the application."
        },
        "title": {
          "type": "string",
          "description": "Title of the application as submitted by the applicant."
        },
        "link": {
          "type": "string",
          "format": "uri",
          "description": "Canonical URL of the application resource."
        }
      }
    },
    "chapter": {
      "type": [
        "object",
        "null"
      ],
      "description": "Chapter the application belongs to, `null` when there is none.",
      "properties": {
        "slug": {
          "type": "string",
          "description": "URL-safe identifier of the chapter."
        },
        "link": {
          "type": "string",
          "format": "uri",
          "description": "Canonical URL of the chapter resource."
        },
        "name": {
          "type": "object",
          "description": "Name of the chapter.",
          "additionalProperties": {
            "type": "string"
          }
        }
      }
    },
    "created": {
      "type": "string",
      "format": "date-time",
      "description": "Date and time when the allocation was created."
    },
    "currency": {
      "type": "string",
      "description": "ISO 4217 currency code of the allocation's amounts, drawn from the fund's currency."
    },
    "fund": {
      "type": "object",
      "description": "Fund the allocation draws from.",
      "properties": {
        "slug": {
          "type": "string",
          "description": "URL-safe identifier of the fund."
        },
        "link": {
          "type": "string",
          "format": "uri",
          "description": "Canonical URL of the fund resource."
        },
        "name": {
          "type": "object",
          "description": "Name of the fund.",
          "additionalProperties": {
            "type": "string"
          }
        }
      }
    },
    "paid": {
      "type": "number",
      "description": "Outstanding amount due on the allocation, in the fund's currency."
    },
    "season": {
      "type": "object",
      "description": "Season the allocation belongs to.",
      "properties": {
        "slug": {
          "type": "string",
          "description": "URL-safe identifier of the season."
        },
        "link": {
          "type": "string",
          "format": "uri",
          "description": "Canonical URL of the season resource."
        },
        "name": {
          "type": "object",
          "description": "Name of the season.",
          "additionalProperties": {
            "type": "string"
          }
        }
      }
    },
    "slug": {
      "type": "string",
      "description": "URL-safe identifier of the allocation."
    },
    "updated": {
      "type": "string",
      "format": "date-time",
      "description": "Date and time when the allocation was last updated."
    }
  }
}