{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/lynx/json-schema/lynx-get-member-substantiation-response-schema.json",
  "title": "GetMemberSubstantiationResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/lynx-substantiation-api-openapi.yml#/components/schemas/GetMemberSubstantiationResponse",
  "type": "object",
  "properties": {
    "clientOrg": {
      "$ref": "#/$defs/ClientOrgDto",
      "description": "The name of the client organization"
    },
    "substantiation": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/MemberSubstantiationDetail"
      }
    }
  },
  "required": [
    "clientOrg"
  ],
  "$defs": {
    "ClientOrgDto": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the client organization"
        }
      },
      "required": [
        "name"
      ]
    },
    "MemberSubstantiationDetail": {
      "type": "object",
      "properties": {
        "clientMemberId": {
          "type": "string",
          "description": "Unique client-side identifier for the member"
        },
        "firstName": {
          "type": "string",
          "description": "First name"
        },
        "lastName": {
          "type": "string",
          "description": "Last name"
        },
        "transactionDate": {
          "type": "string",
          "format": "date-time",
          "description": "Date of service that triggered this transaction"
        },
        "partnerTransactionId": {
          "type": "string",
          "format": "uuid",
          "description": "Card processor uuid for the transaction"
        },
        "mcc": {
          "type": "integer",
          "format": "int32",
          "description": "Code representing the merchant's line of business"
        },
        "merchantName": {
          "type": "string",
          "description": "Name of merchant accepting the original transaction"
        },
        "amount": {
          "type": "number",
          "description": "Dollar transaction amount"
        },
        "direction": {
          "type": "string",
          "description": "Debit vs Credit"
        },
        "referenceIdentifier": {
          "type": "string",
          "description": "Transaction reference identifier"
        },
        "stage": {
          "type": "string",
          "description": "Substantiation stage of the member transaction",
          "enum": [
            "PNDS1",
            "PNDS2",
            "PNDS3",
            "PNDS4",
            "PMIS1",
            "PMIS2",
            "PMIS3",
            "PMIS4",
            "IELS1",
            "IELS2",
            "IELS3",
            "IELS4",
            "PNDAR",
            "PMIAR",
            "IELPR",
            "AUTO"
          ]
        },
        "stageName": {
          "type": "string",
          "description": "Substantiation stage name"
        },
        "nextStage": {
          "type": "string",
          "description": "Next substantiation stage the member transaction will be moved to if no other manual activities occur",
          "enum": [
            "PNDS1",
            "PNDS2",
            "PNDS3",
            "PNDS4",
            "PMIS1",
            "PMIS2",
            "PMIS3",
            "PMIS4",
            "IELS1",
            "IELS2",
            "IELS3",
            "IELS4",
            "PNDAR",
            "PMIAR",
            "IELPR",
            "AUTO"
          ]
        },
        "nextStatusDate": {
          "type": "string",
          "format": "date-time",
          "description": "Date the member transaction will be moved to the next substantiation stage if no other manual activities occur"
        },
        "status": {
          "type": "string",
          "description": "Status of the member transaction substantiation.",
          "enum": [
            "PENDING",
            "NOT_SUBSTANTIATED",
            "SUBSTANTIATED",
            "BLOCKED",
            "BLOCKED_WITH_ERROR"
          ]
        },
        "receipts": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ReceiptData"
          }
        }
      },
      "required": [
        "amount",
        "clientMemberId",
        "direction",
        "firstName",
        "lastName",
        "mcc",
        "merchantName",
        "nextStage",
        "nextStatusDate",
        "partnerTransactionId",
        "referenceIdentifier",
        "stage",
        "stageName",
        "status",
        "transactionDate"
      ]
    },
    "ReceiptData": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "Id"
        },
        "s3Path": {
          "type": "string",
          "description": "s3 path to the file"
        }
      },
      "required": [
        "id",
        "s3Path"
      ]
    }
  }
}