PolicyEngine / policyengine-api

PolicyEngine's REST API for computing policy impacts.
GNU Affero General Public License v3.0
11 stars 24 forks source link

Test sample MyFriendBen API request #869

Open MaxGhenis opened 1 year ago

MaxGhenis commented 1 year ago

Per @calebpena this is a sample request:

{
    "snap_earned_income_deduction": 0,
    "household": {
        "people": {
            "7449": {
                "employment_income": {"2023": 23489, "2022": 23489},
                "age": {"2023": 44, "2022": 44},
                "is_pregnant": {"2023": False},
                "is_tax_unit_head": {"2023": True, "2022": True},
                "wic_category": {"2023": None},
                "wic": {"2023": None},
                "medicaid": {"2023": None},
                "ssi": {"2023": None},
                "ssi_earned_income": {"2023": 23489},
                "ssi_unearned_income": {"2023": 0},
                "is_ssi_disabled": {"2023": False},
                "ssi_countable_resources": {"2023": 1000},
                "ssi_amount_if_eligible": {"2023": None},
                "co_state_supplement": {"2023": None},
                "co_oap": {"2023": None},
                "pell_grant": {"2023": None},
                "pell_grant_dependent_available_income": {"2023": 23489},
                "pell_grant_countable_assets": {"2023": 2000},
                "cost_of_attending_college": {"2023": 0},
                "pell_grant_months_in_school": {"2023": 9},
                "co_chp_eligible": {"2023": None},
            },
            "7450": {
                "employment_income": {"2023": 0, "2022": 0},
                "age": {"2023": 45, "2022": 45},
                "is_pregnant": {"2023": True},
                "is_tax_unit_head": {"2023": False, "2022": False},
                "wic_category": {"2023": None},
                "wic": {"2023": None},
                "medicaid": {"2023": None},
                "ssi": {"2023": None},
                "ssi_earned_income": {"2023": 0},
                "ssi_unearned_income": {"2023": 0},
                "is_ssi_disabled": {"2023": False},
                "ssi_countable_resources": {"2023": 1000},
                "ssi_amount_if_eligible": {"2023": None},
                "co_state_supplement": {"2023": None},
                "co_oap": {"2023": None},
                "pell_grant": {"2023": None},
                "pell_grant_dependent_available_income": {"2023": 0},
                "pell_grant_countable_assets": {"2023": 2000},
                "cost_of_attending_college": {"2023": 0},
                "pell_grant_months_in_school": {"2023": 9},
                "co_chp_eligible": {"2023": None},
            },
            "7451": {
                "employment_income": {"2023": 0, "2022": 0},
                "age": {"2023": 5, "2022": 5},
                "is_pregnant": {"2023": False},
                "is_tax_unit_head": {"2023": False, "2022": False},
                "wic_category": {"2023": None},
                "wic": {"2023": None},
                "medicaid": {"2023": None},
                "ssi": {"2023": None},
                "ssi_earned_income": {"2023": 0},
                "ssi_unearned_income": {"2023": 0},
                "is_ssi_disabled": {"2023": False},
                "ssi_countable_resources": {"2023": 0},
                "ssi_amount_if_eligible": {"2023": None},
                "co_state_supplement": {"2023": None},
                "co_oap": {"2023": None},
                "pell_grant": {"2023": None},
                "pell_grant_dependent_available_income": {"2023": 0},
                "pell_grant_countable_assets": {"2023": 2000},
                "cost_of_attending_college": {"2023": 0},
                "pell_grant_months_in_school": {"2023": 9},
                "co_chp_eligible": {"2023": None},
            },
            "7452": {
                "employment_income": {"2023": 0, "2022": 0},
                "age": {"2023": 1, "2022": 1},
                "is_pregnant": {"2023": False},
                "is_tax_unit_head": {"2023": False, "2022": False},
                "wic_category": {"2023": None},
                "wic": {"2023": None},
                "medicaid": {"2023": None},
                "ssi": {"2023": None},
                "ssi_earned_income": {"2023": 0},
                "ssi_unearned_income": {"2023": 0},
                "is_ssi_disabled": {"2023": False},
                "ssi_countable_resources": {"2023": 0},
                "ssi_amount_if_eligible": {"2023": None},
                "co_state_supplement": {"2023": None},
                "co_oap": {"2023": None},
                "pell_grant": {"2023": None},
                "pell_grant_dependent_available_income": {"2023": 0},
                "pell_grant_countable_assets": {"2023": 2000},
                "cost_of_attending_college": {"2023": 0},
                "pell_grant_months_in_school": {"2023": 9},
                "co_chp_eligible": {"2023": None},
            },
        },
        "tax_units": {
            "tax_unit": {
                "members": ["7449", "7450", "7451", "7452"],
                "earned_income_tax_credit": {"2023": None},
                "co_eitc": {"2023": None},
                "ctc": {"2023": None},
                "tax_unit_is_joint": {"2023": True},
                "pell_grant_primary_income": {"2023": 23489},
                "pell_grant_dependents_in_college": {"2023": 0},
            }
        },
        "families": {"family": {"members": ["7449", "7450", "7451", "7452"]}},
        "households": {
            "household": {
                "state_code_str": {"2023": "CO"},
                "members": ["7449", "7450", "7451", "7452"],
            }
        },
        "spm_units": {
            "spm_unit": {
                "members": ["7449", "7450", "7451", "7452"],
                "snap_child_support_deduction": {"2023": 0},
                "snap_dependent_care_deduction": {"2023": 6000},
                "snap_earned_income": {"2023": None},
                "snap_earned_income_deduction": {"2023": 4697.8},
                "snap_standard_deduction": {"2023": None},
                "snap_net_income_pre_shelter": {"2023": None},
                "snap_excess_shelter_expense_deduction": {"2023": None},
                "housing_cost": {"2023": 18000},
                "snap_assets": {"2023": 2000},
                "snap_gross_income": {"2023": 23489},
                "snap_net_income": {"2023": None},
                "snap_deductions": {"2023": None},
                "meets_snap_net_income_test": {"2023": None},
                "meets_snap_gross_income_test": {"2023": True},
                "meets_snap_asset_test": {"2023": True},
                "is_snap_eligible": {"2023": None},
                "meets_snap_categorical_eligibility": {"2023": False},
                "snap_utility_allowance": {"2023": None},
                "has_heating_cooling_expense": {"2023": False},
                "has_phone_expense": {"2023": False},
                "utility_expense": {"2023": 0},
                "snap_emergency_allotment": {"2023": 0},
                "snap": {"2023": None},
                "acp": {"2023": None},
                "school_meal_daily_subsidy": {"2023": None},
                "school_meal_tier": {"2023": None},
                "meets_school_meal_categorical_eligibility": {"2023": None},
                "lifeline": {"2023": None},
                "co_tanf_countable_gross_earned_income": {"2023": 23489},
                "co_tanf_countable_gross_unearned_income": {"2023": 0},
                "co_tanf": {"2023": None},
                "co_tanf_grant_standard": {"2023": None},
                "co_tanf_countable_earned_income_grant_standard": {"2023": None},
                "broadband_cost": {"2023": 500},
            }
        },
    },
}

Let's add to CI.

anth-volk commented 3 months ago

@MaxGhenis Is there still a desire to do this?

MaxGhenis commented 3 months ago

Yes