{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/lynx/json-schema/lynx-member-authorization-detail-response-schema.json",
  "title": "MemberAuthorizationDetailResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/lynx-transactions-api-openapi.yml#/components/schemas/MemberAuthorizationDetailResponse",
  "type": "object",
  "properties": {
    "member": {
      "$ref": "#/$defs/MemberDTO"
    },
    "clientOrg": {
      "$ref": "#/$defs/ClientOrgDTO"
    },
    "memberAuthorization": {
      "$ref": "#/$defs/MemberAuthorizationDetailDTO"
    }
  },
  "required": [
    "clientOrg",
    "member",
    "memberAuthorization"
  ],
  "$defs": {
    "ClientOrgDTO": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the client organization"
        }
      },
      "required": [
        "name"
      ]
    },
    "MemberAccountDTO": {
      "type": "object",
      "properties": {
        "accountName": {
          "type": "string",
          "description": "A name for this account"
        },
        "accountType": {
          "type": "string",
          "description": "Type of account"
        },
        "productName": {
          "type": "string",
          "description": "The name of the product"
        },
        "lastFourAccountNumber": {
          "type": "string",
          "description": "The last four digits of the bank account number"
        }
      }
    },
    "MemberAuthorizationDetailDTO": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "Internal unique identifier for the monetary transaction"
        },
        "authorizationDate": {
          "type": "string",
          "format": "date-time",
          "description": "Date and time the transaction occurred"
        },
        "direction": {
          "type": "string",
          "description": "Debit vs. Credit"
        },
        "amount": {
          "type": "number",
          "description": "Dollar transaction amount"
        },
        "localAmount": {
          "type": "number",
          "description": "The actual dollar amount of the transaction.  The local amount may differ from amount when there are ineligible items purchased or a split purse transaction."
        },
        "status": {
          "type": "string",
          "description": "Status of this transaction"
        },
        "statusReason": {
          "type": "string",
          "description": "The reason for a particular status"
        },
        "partnerPurseNumber": {
          "type": "integer",
          "format": "int32",
          "description": "An internal number assigned to each of the purses that an account can have"
        },
        "partnerReasonCode": {
          "type": "string",
          "description": "Reason code generated by the authorization system when the transaction fails"
        },
        "partnerReasonCodeDescription": {
          "type": "string",
          "description": "Reason for a failed transaction "
        },
        "merchant": {
          "$ref": "#/$defs/MerchantDetailDTO"
        },
        "category": {
          "type": "string",
          "description": "Describes the transaction category"
        },
        "type": {
          "type": "string",
          "description": "Additional transaction type. Some possible values are listed below; to view the full list refer to the documentation. MemberContribution, ClientOrgContribution, Incentive, Payroll, Cashback, Refund, Reimbursement, MemberPurchase, TransferPointsToDollars, MemberTransfer, Closed, ReceivedAchTransaction, ReceivedWireTransaction."
        },
        "clientTransactionIdentifier": {
          "type": "string",
          "description": "Unique client-defined identifier for the transaction"
        },
        "partnerTransactionId": {
          "type": "string",
          "format": "uuid",
          "description": "Card processor uuid for the transaction"
        },
        "partnerReferenceId": {
          "type": "string",
          "description": "Unique card processor identifier for the transaction that is human readable"
        },
        "transactionTypeDescription": {
          "type": "string",
          "description": "Transaction type description"
        },
        "responseCode": {
          "type": "string",
          "description": "Code for the response to the authorization request"
        },
        "responseCodeDescription": {
          "type": "string",
          "description": "Card processor uuid for the transaction"
        },
        "authorizationCode": {
          "type": "string",
          "description": "The system-generated authorization code that is given at the time of purchase"
        },
        "cardPresentIndicator": {
          "type": "boolean",
          "description": "Indicates whether the card was present for the transaction"
        },
        "authorizationReversalIndicator": {
          "type": "boolean",
          "description": "Indicates whether the authorization has been reversed"
        },
        "sourceDescription": {
          "type": "string",
          "description": "Description of the source of the transaction"
        },
        "requestCode": {
          "type": "string",
          "description": "Unique card processor identifier for the type of monetary transaction"
        },
        "requestName": {
          "type": "string",
          "description": "Card processor description for the type of monetary transaction"
        },
        "partnerSpendCategory": {
          "type": "string",
          "description": "Reason code generated by the authorization system when the transaction fails"
        },
        "partnerLogId": {
          "type": "string",
          "description": "Transaction Log ID"
        },
        "memberCard": {
          "$ref": "#/$defs/MemberCardDetailDTO"
        },
        "memberAccount": {
          "$ref": "#/$defs/MemberAccountDTO"
        },
        "creationDate": {
          "type": "string",
          "format": "date-time",
          "description": "Date when the record was created"
        },
        "updateDate": {
          "type": "string",
          "format": "date-time",
          "description": "Date when the record was last updated"
        }
      }
    },
    "MemberCardDetailDTO": {
      "type": "object",
      "properties": {
        "cardProxy": {
          "type": "string",
          "description": "Proxy id of the card"
        },
        "cardLastFour": {
          "type": "string",
          "description": "Last four digits of the card number"
        },
        "cardId": {
          "type": "string",
          "description": "Card processor assigned unique identifier for the car"
        }
      }
    },
    "MemberDTO": {
      "type": "object",
      "properties": {
        "clientMemberId": {
          "type": "string",
          "description": "Unique client-side identifier for the member"
        }
      },
      "required": [
        "clientMemberId"
      ]
    },
    "MerchantDetailDTO": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of merchant accepting the original transaction"
        },
        "mcc": {
          "type": "integer",
          "format": "int32",
          "description": "Code representing the merchant's line of business"
        },
        "id": {
          "type": "string",
          "description": "Merchant ID number"
        },
        "originalMerchantId": {
          "type": "string",
          "description": "Merchant ID Number as received in the authorization message"
        }
      }
    }
  }
}