{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/chrome-river/main/json-schema/chrome-river-apirequisition-schema.json",
  "title": "APIRequisition",
  "x-generated": "2026-10-08",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/chrome-river-openapi.json#/components/schemas/APIRequisition",
  "type": "object",
  "properties": {
    "amount": {
      "type": "number",
      "multipleOf": 0.01,
      "maximum": 100000000000000,
      "minimum": 0.01
    },
    "approved_at": {
      "type": "string",
      "format": "date-time",
      "readOnly": true
    },
    "balance": {
      "type": "number",
      "multipleOf": 0.01,
      "maximum": 100000000000000,
      "minimum": -100000000000000,
      "readOnly": true
    },
    "card": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "url": {
          "type": "string",
          "readOnly": true
        },
        "state": {
          "type": "string",
          "readOnly": true
        },
        "description": {
          "type": "string",
          "readOnly": true,
          "maxLength": 255
        },
        "last_four": {
          "type": "string",
          "readOnly": true,
          "pattern": "^[0-9]{4}$",
          "maxLength": 4
        }
      },
      "required": [
        "description",
        "last_four"
      ]
    },
    "category": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "name": {
          "type": "string",
          "readOnly": true,
          "maxLength": 255
        },
        "code": {
          "type": [
            "string",
            "null"
          ],
          "readOnly": true,
          "pattern": "^[0-9A-z\\.\\-]+$",
          "maxLength": 36,
          "minLength": 1
        },
        "parent": {
          "type": "object",
          "properties": {},
          "readOnly": true
        },
        "is_archived": {
          "type": "boolean",
          "readOnly": true
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "readOnly": true
        },
        "url": {
          "type": "string",
          "readOnly": true
        }
      },
      "required": [
        "name",
        "parent"
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "readOnly": true
    },
    "days_of_week": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "integer",
        "maximum": 6
      },
      "maxItems": 7
    },
    "department": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "name": {
          "type": "string",
          "readOnly": true,
          "maxLength": 255
        },
        "code": {
          "type": [
            "string",
            "null"
          ],
          "readOnly": true,
          "pattern": "^[0-9A-z\\.\\-]+$",
          "maxLength": 36,
          "minLength": 1
        },
        "parent": {
          "type": "object",
          "properties": {},
          "readOnly": true
        },
        "is_archived": {
          "type": "boolean",
          "readOnly": true
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "readOnly": true
        },
        "url": {
          "type": "string",
          "readOnly": true
        }
      },
      "required": [
        "name",
        "parent"
      ]
    },
    "description": {
      "type": "string",
      "maxLength": 1000
    },
    "end_hour": {
      "type": [
        "integer",
        "null"
      ],
      "maximum": 23,
      "minimum": 0
    },
    "end_time": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "id": {
      "type": "string",
      "format": "uuid",
      "readOnly": true
    },
    "interval": {
      "type": [
        "string",
        "null"
      ]
    },
    "label": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "name": {
          "type": "string",
          "readOnly": true,
          "maxLength": 255
        },
        "code": {
          "type": [
            "string",
            "null"
          ],
          "readOnly": true,
          "pattern": "^[0-9A-z\\.\\-]+$",
          "maxLength": 36,
          "minLength": 1
        },
        "parent": {
          "type": "object",
          "properties": {},
          "readOnly": true
        },
        "is_archived": {
          "type": "boolean",
          "readOnly": true
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "readOnly": true
        },
        "url": {
          "type": "string",
          "readOnly": true
        }
      },
      "required": [
        "name",
        "parent"
      ]
    },
    "location": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "name": {
          "type": "string",
          "readOnly": true,
          "maxLength": 255
        },
        "code": {
          "type": [
            "string",
            "null"
          ],
          "readOnly": true,
          "pattern": "^[0-9A-z\\.\\-]+$",
          "maxLength": 36,
          "minLength": 1
        },
        "parent": {
          "type": "object",
          "properties": {},
          "readOnly": true
        },
        "is_archived": {
          "type": "boolean",
          "readOnly": true
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "readOnly": true
        },
        "url": {
          "type": "string",
          "readOnly": true
        }
      },
      "required": [
        "name",
        "parent"
      ]
    },
    "member": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "url": {
          "type": "string",
          "readOnly": true
        },
        "email": {
          "type": "string",
          "readOnly": true
        },
        "code": {
          "type": [
            "string",
            "null"
          ],
          "readOnly": true,
          "pattern": "^[0-9A-z\\.\\-]+$",
          "maxLength": 36,
          "minLength": 1
        },
        "first_name": {
          "type": "string",
          "readOnly": true,
          "maxLength": 255
        },
        "last_name": {
          "type": "string",
          "readOnly": true,
          "maxLength": 255
        }
      },
      "required": [
        "first_name",
        "last_name"
      ]
    },
    "note": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 1000
    },
    "reviewed_by": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "url": {
          "type": "string",
          "readOnly": true
        },
        "email": {
          "type": "string",
          "readOnly": true
        },
        "code": {
          "type": [
            "string",
            "null"
          ],
          "readOnly": true,
          "pattern": "^[0-9A-z\\.\\-]+$",
          "maxLength": 36,
          "minLength": 1
        },
        "first_name": {
          "type": "string",
          "readOnly": true,
          "maxLength": 255
        },
        "last_name": {
          "type": "string",
          "readOnly": true,
          "maxLength": 255
        }
      },
      "required": [
        "first_name",
        "last_name"
      ]
    },
    "scope": {
      "type": "array",
      "items": {
        "type": "integer",
        "maximum": 9223372036854775807,
        "minimum": 1,
        "format": "int64"
      },
      "maxItems": 10
    },
    "start_hour": {
      "type": [
        "integer",
        "null"
      ],
      "maximum": 23,
      "minimum": 0
    },
    "start_time": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "status": {
      "type": "string"
    },
    "url": {
      "type": "string",
      "readOnly": true
    }
  },
  "required": [
    "amount",
    "approved_at",
    "balance",
    "created_at",
    "description",
    "member"
  ]
}