{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/getsmileapi/json-schema/getsmileapi-income-get-response-schema.json",
  "title": "Income Get Response",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/getsmileapi-incomes-api-openapi.yml#/components/schemas/IncomeGetResponse",
  "type": "object",
  "properties": {
    "code": {
      "$ref": "#/$defs/ObjectMetadataRefCode"
    },
    "message": {
      "$ref": "#/$defs/ObjectMetadataRefMessage"
    },
    "requestId": {
      "$ref": "#/$defs/ObjectMetadataRefRequestID"
    },
    "data": {
      "$ref": "#/$defs/Income"
    }
  },
  "$defs": {
    "Income": {
      "title": "Income",
      "type": "object",
      "description": "The stored income information of the user from an employment data provider.",
      "x-internal": false,
      "x-tags": [
        "Incomes"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/IncomePayload"
        },
        {
          "properties": {
            "metadata": {
              "$ref": "#/$defs/ObjectReferenceMetadata"
            }
          }
        }
      ],
      "required": [
        "id",
        "startDate",
        "currency",
        "metadata"
      ]
    },
    "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"
        }
      }
    },
    "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
    },
    "ObjectReferenceMetadata": {
      "title": "Reference Metadata",
      "type": "object",
      "description": "Metadata related to account-specific data",
      "properties": {
        "itemCreatedAt": {
          "$ref": "#/$defs/RefDateTime"
        },
        "createdAt": {
          "$ref": "#/$defs/RefDateTime"
        },
        "accountId": {
          "type": "string",
          "deprecated": true,
          "description": "The accountId of this object"
        },
        "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": [
        "createdAt",
        "itemCreatedAt",
        "sourceId",
        "sourceType",
        "userId",
        "providerId"
      ]
    },
    "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"
    },
    "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
      ]
    },
    "RefSourceType": {
      "type": [
        "string",
        "null"
      ],
      "title": "Ref-Source-Type",
      "enum": [
        "ACCOUNT",
        "UPLOAD",
        "ARCHIVE",
        "SOCIAL_SECURITY"
      ],
      "description": "Source Type"
    }
  }
}