{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/chrome-river/main/json-schema/chrome-river-apistatement-line-schema.json",
  "title": "APIStatementLine",
  "x-generated": "2026-10-08",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/chrome-river-openapi.json#/components/schemas/APIStatementLine",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "readOnly": true
    },
    "url": {
      "type": "string",
      "readOnly": true
    },
    "amount": {
      "type": "number",
      "multipleOf": 0.01,
      "maximum": 100000000000000,
      "minimum": -100000000000000,
      "readOnly": true
    },
    "foreign_amount": {
      "type": "number",
      "multipleOf": 0.001,
      "maximum": 10000000000000,
      "minimum": -10000000000000,
      "readOnly": true
    },
    "foreign_currency_code": {
      "type": "string",
      "readOnly": true
    },
    "description": {
      "type": "string",
      "readOnly": true
    },
    "card": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "readOnly": true
        },
        "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"
      ],
      "readOnly": true
    },
    "member": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "readOnly": true
        },
        "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"
      ],
      "readOnly": true
    },
    "bank_account": {
      "type": "string",
      "readOnly": true
    },
    "merchant": {
      "type": "string",
      "readOnly": true
    },
    "vendor": {
      "type": "string",
      "readOnly": true
    },
    "origin": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "readOnly": true
        },
        "url": {
          "type": "string",
          "readOnly": true
        },
        "amount": {
          "type": "string",
          "readOnly": true
        },
        "state": {
          "type": "string",
          "readOnly": true
        },
        "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"
          ],
          "readOnly": true
        },
        "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"
          ],
          "readOnly": true
        },
        "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"
          ],
          "readOnly": true
        },
        "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"
          ],
          "readOnly": true
        },
        "note": {
          "type": "string",
          "readOnly": true,
          "maxLength": 1000
        },
        "purchase_details": {
          "type": "object",
          "readOnly": true
        },
        "receipt": {
          "type": "string",
          "readOnly": true
        },
        "time": {
          "type": "string",
          "format": "date-time",
          "readOnly": true
        },
        "review_status": {
          "enum": [
            "pending",
            "approved",
            "denied",
            "out_of_policy",
            "exempt"
          ],
          "type": [
            "string",
            "null"
          ],
          "readOnly": true
        },
        "type": {
          "type": "string",
          "readOnly": true
        }
      },
      "required": [
        "purchase_details",
        "time"
      ],
      "readOnly": true
    },
    "number": {
      "type": "integer",
      "readOnly": true
    },
    "date": {
      "type": "string",
      "format": "date",
      "readOnly": true
    },
    "time": {
      "type": "string",
      "format": "date-time",
      "readOnly": true
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "readOnly": true
    }
  },
  "required": [
    "amount",
    "foreign_amount",
    "foreign_currency_code",
    "date",
    "time",
    "created_at"
  ]
}