{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/lynx/json-schema/lynx-post-member-expense-data-doc-schema.json",
  "title": "PostMemberExpenseDataDoc",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/lynx-expense-api-openapi.yml#/components/schemas/PostMemberExpenseDataDoc",
  "type": "object",
  "properties": {
    "data": {
      "$ref": "#/$defs/PostMemberExpenseData"
    },
    "idempotency": {
      "$ref": "#/$defs/Idempotency",
      "description": "Unique identifier that represents the operation"
    }
  },
  "required": [
    "data",
    "idempotency"
  ],
  "$defs": {
    "BaseMember": {
      "type": "object",
      "properties": {
        "clientMemberId": {
          "type": "string",
          "description": "Unique client-side identifier for the member"
        }
      },
      "required": [
        "clientMemberId"
      ]
    },
    "ClientOrgDto": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the client organization"
        }
      },
      "required": [
        "name"
      ]
    },
    "Idempotency": {
      "type": "object",
      "properties": {
        "idempotencyKey": {
          "type": "string",
          "description": "Unique identifier that represents the operation"
        }
      }
    },
    "MemberAccountIdDto": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "Unique identifier of the bank account"
        }
      },
      "required": [
        "id"
      ]
    },
    "PostExpenseData": {
      "type": "object",
      "properties": {
        "merchantName": {
          "type": "string",
          "description": "Name of merchant accepting the original transaction"
        },
        "expenseDate": {
          "type": "string",
          "description": "Date of Expense"
        },
        "amount": {
          "type": "number",
          "description": "Expense Amout"
        },
        "expenseCategory": {
          "type": "string",
          "description": "Expense Category",
          "enum": [
            "Medical",
            "Rx",
            "Dental",
            "Vision",
            "Other"
          ]
        },
        "description": {
          "type": "string",
          "description": "Expense Description"
        }
      },
      "required": [
        "amount",
        "expenseDate"
      ]
    },
    "PostMemberExpenseData": {
      "type": "object",
      "properties": {
        "clientOrg": {
          "$ref": "#/$defs/ClientOrgDto"
        },
        "member": {
          "$ref": "#/$defs/BaseMember"
        },
        "memberAccount": {
          "$ref": "#/$defs/MemberAccountIdDto"
        },
        "expense": {
          "$ref": "#/$defs/PostExpenseData"
        }
      },
      "required": [
        "clientOrg",
        "expense",
        "member",
        "memberAccount"
      ]
    }
  }
}