{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/mri-software/json-schema/mri-software-contractor-membership-request-schema.json",
  "title": "ContractorMembershipRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/mri-software-contractor-membership-api-openapi.yml#/components/schemas/ContractorMembershipRequest",
  "properties": {
    "org_id": {
      "description": "ID of a contractor organisation",
      "type": "integer",
      "format": "int32"
    },
    "member_id": {
      "type": "integer",
      "format": "int32"
    },
    "roles": {
      "type": "array",
      "items": {
        "format": "int32"
      }
    },
    "locations": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ContractorMembershipLocation"
      }
    }
  },
  "type": "object",
  "$defs": {
    "ContractorMembershipLocation": {
      "properties": {
        "id": {
          "type": "integer",
          "format": "int32"
        },
        "start": {
          "description": "Describes when the contractor's membership for this location starts. Only needs to be provided if an expiration date is provided.",
          "type": "string",
          "format": "date"
        },
        "expires": {
          "description": "Describes when the contractor's membership for this location expires. If this is left out it is assumed that the membership does not expire.",
          "type": "string",
          "format": "date"
        }
      },
      "type": "object"
    }
  }
}