{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/getsmileapi/json-schema/getsmileapi-account-payload-get-response-schema.json",
  "title": "Account Get Payload Response",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/getsmileapi-accounts-api-openapi.yml#/components/schemas/AccountPayloadGetResponse",
  "properties": {
    "code": {
      "$ref": "#/$defs/ObjectMetadataRefCode"
    },
    "message": {
      "$ref": "#/$defs/ObjectMetadataRefMessage"
    },
    "requestId": {
      "$ref": "#/$defs/ObjectMetadataRefRequestID"
    },
    "data": {
      "$ref": "#/$defs/AccountPayload"
    }
  },
  "$defs": {
    "AccountPayload": {
      "required": [
        "metadata"
      ],
      "properties": {
        "metadata": {
          "$ref": "#/$defs/ObjectReferenceMetadata2"
        },
        "identity": {
          "$ref": "#/$defs/IdentityPayload"
        },
        "rating": {
          "$ref": "#/$defs/RatingPayload"
        },
        "documents": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DocumentPayload"
          }
        },
        "incomes": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/IncomePayload"
          }
        },
        "transactions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TransactionPayload"
          }
        },
        "employments": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/EmploymentPayload"
          }
        },
        "contributions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ContributionPayload"
          }
        },
        "liabilities": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LiabilityPayload"
          }
        },
        "eincomes": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/EincomePayload"
          }
        },
        "links": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LinkPayload"
          }
        },
        "insight": {
          "$ref": "#/$defs/InsightPayload"
        }
      }
    },
    "ContributionPayload": {
      "type": "object",
      "required": [
        "id",
        "date",
        "currency",
        "amount"
      ],
      "properties": {
        "id": {
          "$ref": "#/$defs/RefObjectID"
        },
        "date": {
          "type": "string",
          "format": "date",
          "description": "Date of the contribution"
        },
        "currency": {
          "$ref": "#/$defs/RefCurrency"
        },
        "amount": {
          "type": "number",
          "description": "Amount of the contribution"
        },
        "referenceId": {
          "type": "string",
          "description": "Reference contribution ID from the data provider"
        }
      }
    },
    "DocumentPayload": {
      "type": "object",
      "required": [
        "id",
        "name"
      ],
      "properties": {
        "id": {
          "$ref": "#/$defs/RefObjectID"
        },
        "name": {
          "type": "string",
          "description": "Document name"
        },
        "docId": {
          "type": [
            "string",
            "null"
          ],
          "description": "Document number"
        },
        "status": {
          "type": [
            "string",
            "null"
          ],
          "description": "Document status，only for NBI verification, It's VALID if the NBI verification status is valid."
        },
        "documentType": {
          "type": "string",
          "description": "Document Type",
          "enum": [
            "IDENTIFICATION",
            "PAYSLIP",
            "CLEARANCE",
            "CERTIFICATE"
          ]
        },
        "issueDate": {
          "type": [
            "string",
            "null"
          ],
          "description": "Issue date",
          "format": "date"
        },
        "expiryDate": {
          "type": [
            "string",
            "null"
          ],
          "description": "Expiry date",
          "format": "date"
        },
        "fileUrl": {
          "type": [
            "string",
            "null"
          ],
          "description": "Publicly available URL reference for the document"
        },
        "remarks": {
          "type": [
            "string",
            "null"
          ],
          "description": "Remarks section"
        }
      }
    },
    "EincomePayload": {
      "type": "object",
      "required": [
        "id",
        "month",
        "currency",
        "baseAmount",
        "amount"
      ],
      "properties": {
        "id": {
          "$ref": "#/$defs/RefObjectID"
        },
        "month": {
          "type": "string",
          "description": "the month"
        },
        "currency": {
          "$ref": "#/$defs/RefCurrency"
        },
        "baseAmount": {
          "type": [
            "number",
            "null"
          ],
          "deprecated": true,
          "description": "income amount, has been renamed to amount, baseAmount will be removed in the future"
        },
        "amount": {
          "type": [
            "number",
            "null"
          ],
          "description": "income amount"
        }
      }
    },
    "EmploymentPayload": {
      "type": "object",
      "required": [
        "id",
        "startDate"
      ],
      "properties": {
        "id": {
          "$ref": "#/$defs/RefObjectID"
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "Work performed"
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "description": "Description of work performed"
        },
        "jobTitle": {
          "type": [
            "string",
            "null"
          ],
          "description": "Job title"
        },
        "department": {
          "type": [
            "string",
            "null"
          ],
          "description": "Department or organization in place of employment"
        },
        "employeeNumber": {
          "type": [
            "string",
            "null"
          ],
          "description": "Employee number in the employment data provider"
        },
        "employerNumber": {
          "type": [
            "string",
            "null"
          ],
          "description": "Employer number in the employment data provider"
        },
        "employer": {
          "$ref": "#/$defs/RefEmployer"
        },
        "status": {
          "type": [
            "string",
            "null"
          ],
          "description": "Status of employment"
        },
        "startDate": {
          "type": "string",
          "description": "Start date",
          "format": "date"
        },
        "endDate": {
          "type": [
            "string",
            "null"
          ],
          "description": "End date",
          "format": "date"
        },
        "reportedDate": {
          "type": [
            "string",
            "null"
          ],
          "description": "Reported date",
          "format": "date"
        }
      }
    },
    "IdentityPayload": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/RefObjectID"
        },
        "fullName": {
          "type": "string",
          "description": "Full name"
        },
        "firstName": {
          "type": [
            "string",
            "null"
          ],
          "description": "First name"
        },
        "middleName": {
          "type": [
            "string",
            "null"
          ],
          "description": "Middle name"
        },
        "lastName": {
          "type": [
            "string",
            "null"
          ],
          "description": "Last name"
        },
        "suffix": {
          "type": [
            "string",
            "null"
          ],
          "description": "Suffix"
        },
        "gender": {
          "$ref": "#/$defs/RefGender"
        },
        "dob": {
          "type": [
            "string",
            "null"
          ],
          "format": "date",
          "description": "Date of birth"
        },
        "maritalStatus": {
          "$ref": "#/$defs/RefMaritalStatus"
        },
        "countryResidence": {
          "$ref": "#/$defs/RefCountry"
        },
        "citizenship": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "Citizen",
            "Resident Alien",
            "Non-resident Alien",
            "Undocumented",
            "Others"
          ],
          "description": "Citizenship"
        },
        "photoUrl": {
          "type": [
            "string",
            "null"
          ],
          "description": "URL to photo or avatar"
        },
        "referenceId": {
          "type": [
            "string",
            "null"
          ],
          "description": "Reference profile ID from the data provider"
        },
        "profileUrl": {
          "type": [
            "string",
            "null"
          ],
          "description": "Public profile URL"
        },
        "latestEmployerName": {
          "type": "string",
          "deprecated": true,
          "description": "The lastest employer name at now, it will be removed in the future."
        },
        "emails": {
          "type": "array",
          "description": "A collection of email addresses",
          "items": {
            "type": "object",
            "title": "email",
            "properties": {
              "address": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "email",
                "description": "Email address"
              },
              "type": {
                "$ref": "#/$defs/RefContactType"
              }
            },
            "required": [
              "address",
              "type"
            ]
          }
        },
        "phones": {
          "type": "array",
          "description": "A collection of phone numbers",
          "items": {
            "type": "object",
            "title": "phone",
            "properties": {
              "number": {
                "$ref": "#/$defs/RefPhoneNumber"
              },
              "type": {
                "$ref": "#/$defs/RefPhoneType"
              }
            },
            "required": [
              "number",
              "type"
            ]
          }
        },
        "socialProfiles": {
          "type": "array",
          "description": "A collection of social media URLs",
          "items": {
            "type": "object",
            "title": "socialProfile",
            "properties": {
              "socialUrl": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "URL to social media page"
              },
              "type": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "Twitter",
                  "Facebook",
                  "LinkedIn",
                  "Others"
                ],
                "description": "Social media type"
              }
            },
            "required": [
              "socialUrl",
              "type"
            ]
          }
        },
        "addresses": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/RefAddress"
          }
        }
      },
      "required": [
        "id",
        "fullName",
        "emails",
        "phones",
        "socialProfiles",
        "addresses"
      ]
    },
    "IncomePayload": {
      "type": "object",
      "required": [
        "id",
        "startDate",
        "currency"
      ],
      "properties": {
        "id": {
          "$ref": "#/$defs/RefObjectID"
        },
        "workItem": {
          "type": [
            "string",
            "null"
          ],
          "description": "Work performed (specially in the case of contract or freelance jobs)"
        },
        "employer": {
          "$ref": "#/$defs/RefEmployer"
        },
        "startDate": {
          "type": "string",
          "description": "Start date",
          "format": "date"
        },
        "endDate": {
          "type": [
            "string",
            "null"
          ],
          "format": "date",
          "description": "End date"
        },
        "currency": {
          "$ref": "#/$defs/RefCurrency"
        },
        "frequency": {
          "$ref": "#/$defs/RefPayPeriod"
        },
        "baseAmount": {
          "type": [
            "number",
            "null"
          ],
          "description": "Base amount"
        },
        "grossAmount": {
          "type": [
            "number",
            "null"
          ],
          "description": "Gross amount"
        },
        "netAmount": {
          "type": [
            "number",
            "null"
          ],
          "description": "Net amount"
        }
      }
    },
    "InsightPayload": {
      "type": "object",
      "required": [
        "id",
        "cutoffTime",
        "features"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "cutoffTime": {
          "type": "string",
          "title": "Cutoff time for feature calculations.",
          "format": "date-time",
          "description": "Date and time"
        },
        "features": {
          "$ref": "#/$defs/ObjectFeature"
        }
      }
    },
    "LiabilityPayload": {
      "type": "object",
      "required": [
        "id",
        "type",
        "startDate",
        "loanAmount",
        "currency",
        "amortizationFrequency"
      ],
      "properties": {
        "id": {
          "$ref": "#/$defs/RefObjectID"
        },
        "type": {
          "type": "string",
          "description": "the loan type"
        },
        "referenceId": {
          "type": "string",
          "description": "the loan referenceId"
        },
        "startDate": {
          "type": "string",
          "format": "date",
          "description": "the loan start date"
        },
        "endDate": {
          "type": "string",
          "format": "date",
          "description": "the loan end date"
        },
        "firstAmortizationDate": {
          "type": "string",
          "format": "date",
          "description": "the loan first amortization date"
        },
        "amortizationFrequency": {
          "$ref": "#/$defs/RefPayPeriod"
        },
        "currency": {
          "$ref": "#/$defs/RefCurrency"
        },
        "loanAmount": {
          "type": "number",
          "description": "loan amount"
        },
        "amortizationAmount": {
          "type": "number",
          "description": "loan amortization amount"
        },
        "outstandingBalance": {
          "type": "number",
          "description": "loan outstanding balance"
        },
        "nextPaymentAmount": {
          "type": "number",
          "description": "loan next payment amount"
        },
        "overduePaymentAmount": {
          "type": "number",
          "description": "loan total overdue amount"
        }
      }
    },
    "LinkPayload": {
      "type": "object",
      "required": [
        "id",
        "endDate"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "Link request ID"
        },
        "startDate": {
          "$ref": "#/$defs/RefDateTime"
        },
        "endDate": {
          "$ref": "#/$defs/RefDateTime"
        },
        "records": {
          "type": "array",
          "description": "Link records",
          "default": [],
          "items": {
            "type": "object",
            "title": "LinkRecord",
            "required": [
              "count"
            ],
            "properties": {
              "count": {
                "type": "integer",
                "description": "The number of times the user has linked at least one account with other participating organizations"
              },
              "linkedAt": {
                "type": "array",
                "default": [],
                "description": "The latest link time of each application",
                "items": {
                  "$ref": "#/$defs/RefDateTime"
                }
              }
            }
          }
        }
      }
    },
    "ObjectFeature": {
      "type": "object",
      "properties": {
        "incomes_count": {
          "type": "integer",
          "description": "The quantity of the estimated incomes"
        },
        "incomes_first_income_month_range": {
          "type": "integer",
          "description": "Calculate the interval from the first income record time to the current time by month"
        },
        "incomes_missing_month_max": {
          "type": "integer",
          "description": "From all estimated incomes, calculate the number of months between the last payment month and the next payment month, and then take the maximum value"
        },
        "incomes_missing_month_count": {
          "type": "integer",
          "description": "From all estimated incomes, calculate the months diff between current income month and the before income month, and count if the diff > 1"
        },
        "incomes_amount_sum": {
          "type": "number",
          "description": "From all estimated incomes, calculate the total of the amount"
        },
        "incomes_amount_average": {
          "type": "number",
          "description": "From all estimated incomes, calculate the average amount of the total amount"
        },
        "incomes_amount_min": {
          "type": "number",
          "description": "From all estimated incomes, get the minimum amount"
        },
        "incomes_amount_max": {
          "type": "number",
          "description": "From all estimated incomes, get the maximum amount"
        },
        "incomes_amount_median": {
          "type": "number",
          "description": "From all estimated incomes, get the median amount"
        },
        "incomes_amount_std": {
          "type": "number",
          "description": "From all estimated incomes, get the median amount"
        },
        "incomes_last3_months_amount_sum": {
          "type": "number",
          "description": "From all estimated incomes in last 3 months, calculate the total of the amount"
        },
        "incomes_last3_months_amount_average": {
          "type": "number",
          "description": "From all estimated incomes in last 3 months, calculate the average amount of the total amount"
        },
        "incomes_last3_months_amount_min": {
          "type": "number",
          "description": "From all estimated incomes in last 3 months, get the minimum amount"
        },
        "incomes_last3_months_amount_max": {
          "type": "number",
          "description": "From all estimated incomes in last 3 months, get the maximum amount"
        },
        "incomes_last3_months_amount_median": {
          "type": "number",
          "description": "From all estimated incomes in last 3 months, get the median amount"
        },
        "incomes_last3_months_amount_std": {
          "type": "number",
          "description": "From all estimated incomes in last 3 months, get the standard deviation of the amount"
        },
        "incomes_last6_months_amount_sum": {
          "type": "number",
          "description": "From all estimated incomes in last 6 months, calculate the total of the amount"
        },
        "incomes_last6_months_amount_average": {
          "type": "number",
          "description": "From all estimated incomes in last 6 months, calculate the average amount of the total amount"
        },
        "incomes_last6_months_amount_min": {
          "type": "number",
          "description": "From all estimated incomes in last 6 months, get the minimum amount"
        },
        "incomes_last6_months_amount_max": {
          "type": "number",
          "description": "From all estimated incomes in last 6 months, get the maximum amount"
        },
        "incomes_last6_months_amount_median": {
          "type": "number",
          "description": "From all estimated incomes in last 6 months, get the median amount"
        },
        "incomes_last6_months_amount_std": {
          "type": "number",
          "description": "From all estimated incomes in last 6 months, get the standard deviation of the amount"
        },
        "incomes_last9_months_amount_sum": {
          "type": "number",
          "description": "From all estimated incomes in last 9 months, calculate the total of the amount"
        },
        "incomes_last9_months_amount_average": {
          "type": "number",
          "description": "From all estimated incomes in last 9 months, calculate the average amount of the total amount"
        },
        "incomes_last9_months_amount_min": {
          "type": "number",
          "description": "From all estimated incomes in last 9 months, get the minimum amount"
        },
        "incomes_last9_months_amount_max": {
          "type": "number",
          "description": "From all estimated incomes in last 9 months, get the maximum amount"
        },
        "incomes_last9_months_amount_median": {
          "type": "number",
          "description": "From all estimated incomes in last 9 months, get the median amount"
        },
        "incomes_last9_months_amount_std": {
          "type": "number",
          "description": "From all estimated incomes in last 9 months, get the standard deviation of the amount"
        },
        "incomes_last12_months_amount_sum": {
          "type": "number",
          "description": "From all estimated incomes in last 12 months, calculate the total of the amount"
        },
        "incomes_last12_months_amount_average": {
          "type": "number",
          "description": "From all estimated incomes in last 12 months, calculate the average amount of the total amount"
        },
        "incomes_last12_months_amount_min": {
          "type": "number",
          "description": "From all estimated incomes in last 12 months, get the minimum amount"
        },
        "incomes_last12_months_amount_max": {
          "type": "number",
          "description": "From all estimated incomes in last 12 months, get the maximum amount"
        },
        "incomes_last12_months_amount_median": {
          "type": "number",
          "description": "From all estimated incomes in last 12 months, get the median amount"
        },
        "incomes_last12_months_amount_std": {
          "type": "number",
          "description": "From all estimated incomes in last 12 months, get the standard deviation of the amount"
        },
        "incomes_last18_months_amount_sum": {
          "type": "number",
          "description": "From all estimated incomes in last 18 months, calculate the total of the amount"
        },
        "incomes_last18_months_amount_average": {
          "type": "number",
          "description": "From all estimated incomes in last 18 months, calculate the average amount of the total amount"
        },
        "incomes_last18_months_amount_min": {
          "type": "number",
          "description": "From all estimated incomes in last 18 months, get the minimum amount"
        },
        "incomes_last18_months_amount_max": {
          "type": "number",
          "description": "From all estimated incomes in last 18 months, get the maximum amount"
        },
        "incomes_last18_months_amount_median": {
          "type": "number",
          "description": "From all estimated incomes in last 18 months, get the median amount"
        },
        "incomes_last18_months_amount_std": {
          "type": "number",
          "description": "From all estimated incomes in last 18 months, get the standard deviation of the amount"
        },
        "incomes_last18_months_max_amount_count": {
          "type": "number",
          "description": "From all estimated incomes in last 18 months, find the maximum amount, and count the number of monthly income equal to the maximum amount"
        },
        "incomes_starting_amount": {
          "type": "number",
          "description": "the estimated income from when the user has started earning income"
        },
        "incomes_current_amount": {
          "type": "number",
          "description": "the amount from the latetest one record"
        },
        "incomes_latest_growth": {
          "type": "number",
          "description": "For the latetest one record, calculate the growth of income from the same month last year"
        },
        "liabilities_loan_count": {
          "type": "integer",
          "description": "For the latetest one record, calculate the count of records"
        },
        "liabilities_loan_amount_min": {
          "type": "number",
          "description": "From all liabilities, calculate the minimum of the amount"
        },
        "liabilities_loan_amount_max": {
          "type": "number",
          "description": "From all liabilities, calculate the maximum of the amount"
        },
        "liabilities_loan_amount_total": {
          "type": "number",
          "description": "From all liabilities, calculate the total of the amount"
        },
        "liabilities_loan_amount_average": {
          "type": "number",
          "description": "From all liabilities, calculate the average of the amount"
        },
        "liabilities_loan_amount_std": {
          "type": "number",
          "description": "From all liabilities, calculate the standard deviation of the amount"
        },
        "liabilities_finished_loan_count": {
          "type": "number",
          "description": "From all liabilities that outstandingBalance <= 0, calculate the count of the records"
        },
        "liabilities_outstanding_loan_count": {
          "type": "integer",
          "description": "From all liabilities that outstandingBalance > 0, calculate the count of the records"
        },
        "liabilities_outstanding_amount_max": {
          "type": "number",
          "description": "From all liabilities that outstandingBalance > 0, calculate the count of the records"
        },
        "liabilities_outstanding_amount_total": {
          "type": "number",
          "description": "From all liabilities that outstandingBalance > 0, calculate the total of the amount"
        },
        "liabilities_outstanding_amount_average": {
          "type": "number",
          "description": "From all liabilities that outstandingBalance > 0, calculate the average of the amount"
        },
        "liabilities_overdue_loan_count": {
          "type": "integer",
          "description": "From all liabilities that overduePaymentAmount > 0, calculate the count of the records"
        },
        "liabilities_overdue_amount_total": {
          "type": "number",
          "description": "From all liabilities that overduePaymentAmount > 0, calculate the total of the amount"
        },
        "liabilities_overdue_amount_average": {
          "type": "number",
          "description": "From all liabilities that overduePaymentAmount > 0, calculate the average of the amount"
        },
        "liabilities_ongoing_amortization_amount_sum": {
          "type": "number",
          "description": "Sum of all amortization amounts for ongoing/current liabilities (not yet fully paid off)"
        },
        "liabilities_ongoing_amortization_amount_min": {
          "type": "number",
          "description": "Smallest of all amortization amounts for ongoing/current liabilities (not yet fully paid off)"
        },
        "liabilities_ongoing_amortization_amount_max": {
          "type": "number",
          "description": "Largest of all amortization amounts for ongoing/current liabilities (not yet fully paid off)"
        },
        "liabilities_ongoing_amortization_amount_average": {
          "type": "number",
          "description": "Average of all amortization amounts for ongoing/current liabilities (not yet fully paid off)"
        },
        "liabilities_ongoing_amortization_amount_median": {
          "type": "number",
          "description": "Median of all amortization amounts for ongoing/current liabilities (not yet fully paid off)"
        },
        "liabilities_ongoing_amortization_amount_std": {
          "type": "number",
          "description": "Standard deviation of all amortization amounts for ongoing/current liabilities (not yet fully paid off)"
        },
        "liabilities_payment_count": {
          "type": "number",
          "description": "Quantity of liability payments made (across all liability records)"
        },
        "liabilities_payment_amount_max": {
          "type": "number",
          "description": "Largest amount of payments made for liabilities (across all liability records)."
        },
        "liabilities_payment_amount_min": {
          "type": "number",
          "description": "Smallest amount of payments made for liabilities (across all liability records)."
        },
        "liabilities_payment_amount_median": {
          "type": "number",
          "description": "Median amount of payments made for liabilities (across all liability records)."
        },
        "liabilities_payment_amount_average": {
          "type": "number",
          "description": "Average amount of payments made for liabilities (across all liability records)."
        },
        "liabilities_payment_amount_sum": {
          "type": "number",
          "description": "Total amount of payments made for liabilities (across all liability records)."
        },
        "liabilities_payment_amount_std": {
          "type": "number",
          "description": "Standard deviation of payments made for liabilities (across all liability records)."
        },
        "employments_current_status": {
          "type": "string",
          "description": "The user's current employment status, may be one of: EMPLOYED, GIG (for gig economy workers), or UNEMPLOYED"
        },
        "employments_employer_count": {
          "type": "integer",
          "description": "Quantity of unique employers"
        },
        "employments_current_tenure": {
          "type": "integer",
          "description": "Quantity of months at current employer"
        },
        "identity_age": {
          "type": "integer",
          "description": "Age of the user based on date of birth"
        },
        "link_days_since_first": {
          "type": "integer",
          "description": "Number of days since the first account connection, if MAW is enabled."
        },
        "link_days_since_last": {
          "type": "integer",
          "description": "Number of days since the last account connection, if MAW is enabled."
        },
        "link_day3_count": {
          "type": "integer",
          "description": "Number of tenants this account has connected to in the last 3 days, if MAW is enabled."
        },
        "link_day7_count": {
          "type": "integer",
          "description": "Number of tenants this account has connected to in the last 7 days, if MAW is enabled."
        },
        "link_day30_count": {
          "type": "integer",
          "description": "Number of tenants this account has connected to in the last 30 days, if MAW is enabled."
        },
        "link_day90_count": {
          "type": "integer",
          "description": "Number of tenants this account has connected to in the last 90 days, if MAW is enabled."
        },
        "link_day180_count": {
          "type": "integer",
          "description": "Number of tenants this account has connected to in the last 180 days, if MAW is enabled."
        },
        "link_day365_count": {
          "type": "integer",
          "description": "Number of tenants this account has connected to in the last 365 days, if MAW is enabled."
        },
        "link_day730_count": {
          "type": "integer",
          "description": "Number of tenants this account has connected to in the last 730 days, if MAW is enabled."
        }
      }
    },
    "ObjectMetadataRefCode": {
      "type": "string",
      "title": "ObjectMetadataRefCode",
      "description": "Request status code",
      "enum": [
        "OK",
        "CREATED",
        "INVALID_CREDENTIALS",
        "INVALID_PARAMETERS",
        "INVALID_TOKEN",
        "UNAUTHORIZED_ACCESS",
        "MISSING_RESOURCE",
        "REQUEST_LIMIT_EXCEEDED",
        "SERVER_ERROR",
        "UNSUPPORTED_METHOD",
        "SERVER_UNAVAILABLE",
        "TIME_LIMIT_EXCEEDED"
      ],
      "x-internal": false
    },
    "ObjectMetadataRefMessage": {
      "type": "string",
      "title": "ObjectMetadataRefMessage",
      "description": "Message response to the request",
      "x-internal": false
    },
    "ObjectMetadataRefRequestID": {
      "type": "string",
      "title": "ObjectMetadataRefRequestID",
      "description": "Unique ID that is added to the body of every response for easy traceability of the request in our logs.",
      "x-internal": false
    },
    "ObjectReferenceMetadata2": {
      "title": "Reference Metadata2",
      "type": "object",
      "description": "Metadata related to account-payload data",
      "properties": {
        "sourceId": {
          "type": "string",
          "description": "The ACCOUNT or ARCHIVE ID associated with this object"
        },
        "sourceType": {
          "$ref": "#/$defs/RefSourceType"
        },
        "userId": {
          "type": "string",
          "description": "The user ID associated with this object"
        },
        "providerId": {
          "type": "string",
          "description": "The provider ID associated with this object"
        }
      },
      "required": [
        "sourceId",
        "sourceType",
        "userId",
        "providerId"
      ]
    },
    "RatingPayload": {
      "type": "object",
      "required": [
        "id"
      ],
      "properties": {
        "id": {
          "$ref": "#/$defs/RefObjectID"
        },
        "currentRating": {
          "type": [
            "number",
            "null"
          ],
          "description": "Current rating"
        },
        "maxRating": {
          "type": [
            "number",
            "null"
          ],
          "description": "Maximum possible rating"
        },
        "calculatedPercentage": {
          "type": [
            "number",
            "null"
          ],
          "description": "Current rating expressed as percentage, calculated by currentRating/maxRating x 100"
        },
        "reviewsReceived": {
          "type": [
            "number",
            "null"
          ],
          "description": "Number of reviews the employee received, which is the basis for the current rating"
        },
        "likesReceived": {
          "type": [
            "number",
            "null"
          ],
          "description": "Recommendations or kudos received"
        },
        "jobsCompleted": {
          "type": [
            "number",
            "null"
          ],
          "description": "Jobs actually completed in the employment platform"
        }
      }
    },
    "RefAddress": {
      "title": "Address Object",
      "type": "object",
      "description": "Address object",
      "properties": {
        "fullAddress": {
          "type": [
            "string",
            "null"
          ],
          "description": "Full address"
        },
        "line1": {
          "type": [
            "string",
            "null"
          ],
          "description": "Line 1 of street address"
        },
        "line2": {
          "type": [
            "string",
            "null"
          ],
          "description": "Line 2 of street address"
        },
        "city": {
          "type": [
            "string",
            "null"
          ],
          "description": "City"
        },
        "region": {
          "type": [
            "string",
            "null"
          ],
          "description": "Geographic region such as state or province"
        },
        "zip": {
          "type": [
            "string",
            "null"
          ],
          "description": "Post code"
        },
        "country": {
          "$ref": "#/$defs/RefCountry"
        },
        "latitude": {
          "type": [
            "string",
            "null"
          ],
          "pattern": "^(\\+|-)?(?:90(?:(?:\\.0{1,6})?)|(?:[0-9]|[1-8][0-9])(?:(?:\\.[0-9]{1,6})?))$",
          "description": "Latitude coordinates"
        },
        "longitude": {
          "type": [
            "string",
            "null"
          ],
          "pattern": "^(\\+|-)?(?:180(?:(?:\\.0{1,6})?)|(?:[0-9]|[1-9][0-9]|1[0-7][0-9])(?:(?:\\.[0-9]{1,6})?))$",
          "description": "Longitude coordinates"
        },
        "type": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "Primary",
            "Secondary",
            null
          ],
          "description": "Whether address is primary or secondary"
        },
        "tags": {
          "type": "array",
          "default": [],
          "items": {
            "type": "string",
            "enum": [
              "Primary",
              "Secondary",
              "Home",
              "Work",
              "Mailing",
              "Foreign",
              "Billing",
              "Permanent",
              "Shipping",
              null
            ]
          },
          "description": "Address tags, such as primary or secondary, home or work, etc."
        }
      },
      "required": [
        "type"
      ]
    },
    "RefContactType": {
      "type": [
        "string",
        "null"
      ],
      "title": "Contact Types",
      "enum": [
        "Primary",
        "Secondary",
        "Work",
        "Personal",
        null
      ],
      "description": "Primary contact, with secondary marked as either 'Work' or 'Personal'"
    },
    "RefCountry": {
      "type": [
        "string",
        "null"
      ],
      "title": "Country ISO Codes",
      "enum": [
        "AF",
        "AX",
        "AL",
        "DZ",
        "AS",
        "AD",
        "AO",
        "AI",
        "AQ",
        "AG",
        "AR",
        "AM",
        "AW",
        "AU",
        "AT",
        "AZ",
        "BS",
        "BH",
        "BD",
        "BB",
        "BY",
        "BE",
        "BZ",
        "BJ",
        "BM",
        "BT",
        "BO",
        "BQ",
        "BA",
        "BW",
        "BV",
        "BR",
        "IO",
        "BN",
        "BG",
        "BF",
        "BI",
        "KH",
        "CM",
        "CA",
        "CV",
        "KY",
        "CF",
        "TD",
        "CL",
        "CN",
        "CX",
        "CC",
        "CO",
        "KM",
        "CG",
        "CD",
        "CK",
        "CR",
        "CI",
        "HR",
        "CU",
        "CW",
        "CY",
        "CZ",
        "DK",
        "DJ",
        "DM",
        "DO",
        "EC",
        "EG",
        "SV",
        "GQ",
        "ER",
        "EE",
        "ET",
        "FK",
        "FO",
        "FJ",
        "FI",
        "FR",
        "GF",
        "PF",
        "TF",
        "GA",
        "GM",
        "GE",
        "DE",
        "GH",
        "GI",
        "GR",
        "GL",
        "GD",
        "GP",
        "GU",
        "GT",
        "GG",
        "GN",
        "GW",
        "GY",
        "HT",
        "HM",
        "VA",
        "HN",
        "HK",
        "HU",
        "IS",
        "IN",
        "ID",
        "IR",
        "IQ",
        "IE",
        "IM",
        "IL",
        "IT",
        "JM",
        "JP",
        "JE",
        "JO",
        "KZ",
        "KE",
        "KI",
        "KP",
        "KR",
        "XK",
        "KW",
        "KG",
        "LA",
        "LV",
        "LB",
        "LS",
        "LR",
        "LY",
        "LI",
        "LT",
        "LU",
        "MO",
        "MK",
        "MG",
        "MW",
        "MY",
        "MV",
        "ML",
        "MT",
        "MH",
        "MQ",
        "MR",
        "MU",
        "YT",
        "MX",
        "FM",
        "MD",
        "MC",
        "MN",
        "ME",
        "MS",
        "MA",
        "MZ",
        "MM",
        "NA",
        "NR",
        "NP",
        "NL",
        "AN",
        "NC",
        "NZ",
        "NI",
        "NE",
        "NG",
        "NU",
        "NF",
        "MP",
        "NO",
        "OM",
        "PK",
        "PW",
        "PS",
        "PA",
        "PG",
        "PY",
        "PE",
        "PH",
        "PN",
        "PL",
        "PT",
        "PR",
        "QA",
        "RS",
        "RE",
        "RO",
        "RU",
        "RW",
        "BL",
        "SH",
        "KN",
        "LC",
        "MF",
        "PM",
        "VC",
        "WS",
        "SM",
        "ST",
        "SA",
        "SN",
        "CS",
        "SC",
        "SL",
        "SG",
        "SX",
        "SK",
        "SI",
        "SB",
        "SO",
        "ZA",
        "GS",
        "SS",
        "ES",
        "LK",
        "SD",
        "SR",
        "SJ",
        "SZ",
        "SE",
        "CH",
        "SY",
        "TW",
        "TJ",
        "TZ",
        "TH",
        "TL",
        "TG",
        "TK",
        "TO",
        "TT",
        "TN",
        "TR",
        "XT",
        "TM",
        "TC",
        "TV",
        "UG",
        "UA",
        "AE",
        "GB",
        "US",
        "UM",
        "UY",
        "UZ",
        "VU",
        "VE",
        "VN",
        "VG",
        "VI",
        "WF",
        "EH",
        "YE",
        "ZM",
        "ZW",
        null
      ],
      "description": "2 character alpha ISO-3166 codes"
    },
    "RefCurrency": {
      "type": "string",
      "title": "Currency ISO Codes",
      "description": "Currency in 3 character alpha ISO 4217",
      "enum": [
        "AFN",
        "DZD",
        "ARS",
        "AMD",
        "AWG",
        "AUD",
        "AZN",
        "BSD",
        "BHD",
        "THB",
        "PAB",
        "BBD",
        "BYN",
        "BZD",
        "BMD",
        "VES",
        "BOB",
        "BRL",
        "BND",
        "BGN",
        "BIF",
        "CAD",
        "CVE",
        "KYD",
        "GHS",
        "XOF",
        "XAF",
        "XPF",
        "CLP",
        "COP",
        "KMF",
        "CDF",
        "BAM",
        "NIO",
        "CRC",
        "HRK",
        "CZK",
        "GMD",
        "DKK",
        "MKD",
        "DJF",
        "STD",
        "DOP",
        "VND",
        "XCD",
        "EGP",
        "SVC",
        "ETB",
        "EUR",
        "FKP",
        "FJD",
        "HUF",
        "GIP",
        "HTG",
        "PYG",
        "GNF",
        "GYD",
        "HKD",
        "UAH",
        "ISK",
        "INR",
        "IRR",
        "IQD",
        "JMD",
        "JOD",
        "KES",
        "PGK",
        "LAK",
        "EEK",
        "KWD",
        "MWK",
        "AOA",
        "MMK",
        "GEL",
        "LVL",
        "LBP",
        "ALL",
        "HNL",
        "SLL",
        "LRD",
        "LYD",
        "SZL",
        "LTL",
        "LSL",
        "MGA",
        "MYR",
        "TMT",
        "MUR",
        "MZN",
        "MXN",
        "MDL",
        "MAD",
        "NGN",
        "ERN",
        "NAD",
        "NPR",
        "ANG",
        "ILS",
        "RON",
        "TWD",
        "NZD",
        "BTN",
        "KPW",
        "NOK",
        "PEN",
        "MRO",
        "TOP",
        "PKR",
        "MOP",
        "UYU",
        "PHP",
        "GBP",
        "BWP",
        "QAR",
        "GTQ",
        "ZAR",
        "OMR",
        "KHR",
        "MVR",
        "IDR",
        "RUB",
        "RWF",
        "SHP",
        "SAR",
        "RSD",
        "SCR",
        "SGD",
        "SBD",
        "KGS",
        "SOS",
        "TJS",
        "LKR",
        "SDG",
        "SRD",
        "SEK",
        "CHF",
        "SYP",
        "BDT",
        "WST",
        "TZS",
        "KZT",
        "TTD",
        "MNT",
        "TND",
        "TRY",
        "AED",
        "UGX",
        "CLF",
        "USD",
        "UZS",
        "VUV",
        "KRW",
        "YER",
        "JPY",
        "CNY",
        "ZMW",
        "ZWL",
        "PLN"
      ]
    },
    "RefDateTime": {
      "type": "string",
      "title": "Date and Time string",
      "format": "date-time",
      "description": "Date and time"
    },
    "RefEmployer": {
      "type": [
        "string",
        "null"
      ],
      "title": "Employer",
      "description": "Employer name"
    },
    "RefGender": {
      "type": "string",
      "title": "GenderEnum",
      "enum": [
        "Male",
        "Female",
        "Non-binary",
        null
      ],
      "description": "Gender"
    },
    "RefMaritalStatus": {
      "type": "string",
      "title": "RefMaritalStatus",
      "enum": [
        "Divorced",
        "Married",
        "Separated",
        "Single",
        "Widowed",
        "Lifetime Partner",
        null
      ],
      "description": "Marital status"
    },
    "RefObjectID": {
      "type": "string",
      "title": "Object ID",
      "description": "Unique ID of this object"
    },
    "RefPayPeriod": {
      "type": [
        "string",
        "null"
      ],
      "title": "Pay Period",
      "description": "Pay period",
      "enum": [
        "Hourly",
        "Daily",
        "Weekly",
        "Semimonthly",
        "Monthly",
        "Bimonthly",
        "Quarterly",
        "Annually",
        "Variable",
        "Unspecified",
        null
      ]
    },
    "RefPhoneNumber": {
      "type": [
        "string",
        "null"
      ],
      "title": "International Phone Number",
      "pattern": "^\\+[1-9]\\d{1,14}$",
      "description": "Phone numbers in international E.164 format"
    },
    "RefPhoneType": {
      "type": [
        "string",
        "null"
      ],
      "title": "Ref-Phone-Type",
      "enum": [
        "Mobile",
        "Fixed",
        "Unspecified",
        null
      ],
      "description": "Phone type"
    },
    "RefSourceType": {
      "type": [
        "string",
        "null"
      ],
      "title": "Ref-Source-Type",
      "enum": [
        "ACCOUNT",
        "UPLOAD",
        "ARCHIVE",
        "SOCIAL_SECURITY"
      ],
      "description": "Source Type"
    },
    "TransactionPayload": {
      "type": "object",
      "required": [
        "id",
        "date",
        "currency",
        "amount"
      ],
      "properties": {
        "id": {
          "$ref": "#/$defs/RefObjectID"
        },
        "date": {
          "type": "string",
          "format": "date",
          "description": "Date of transaction"
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "description": "Description of the transaction"
        },
        "currency": {
          "$ref": "#/$defs/RefCurrency"
        },
        "amount": {
          "type": "number",
          "description": "Transaction amount"
        },
        "referenceId": {
          "type": [
            "string",
            "null"
          ],
          "description": "Reference transaction ID from data provider"
        }
      }
    }
  }
}