---
# System prepended metadata

title: 'API USAGE:'

---

# API USAGE:




## get households from USER_ID

GET /api/user-household/user/20342

Response:
```
{
  "id_user_household": 47,
  "ds_firstname": "Julian",
  "ds_lastname": "Figueroas",
  "cd_user": 20342,
  "nr_household_size": 0,
  "nr_annual_income": 0,
  "ic_head_female": false,
  "ic_head_of_household": true,
  "cd_household": 4,
  "cd_income_type": 1,
  "cd_income_frequency": 4,
  "nr_income_amount": 2500,
  "ic_active": true,
  "ic_notifications": null,
  "Household": {
    "id_household": 4,
    "dt_created": null,
    "dt_updated": null,
    "ic_active": true,
    "nr_members_under_18": 41,
    "nr_members": 10,
    "nr_income_earners": 2,
    "cd_community_entity": 13150
  }
}
```
## get income
/api/user-household?filter={"where":{"cd_household":ID_HOUSEHOLD}}

Response:
```
[
  {
    "id_user_household": 47,
    "ds_firstname": "Julian",
    "ds_lastname": "Figueroas",
    "cd_user": 20342,
    "nr_household_size": 0,
    "nr_annual_income": 0,
    "ic_head_female": false,
    "ic_head_of_household": true,
    "cd_household": 4,
    "cd_income_type": 1,
    "cd_income_frequency": 4,
    "nr_income_amount": 2500,
    "ic_active": true,
    "ic_notifications": null
  },
  {
    "id_user_household": 95,
    "ds_firstname": "adsad",
    "ds_lastname": "asdasda",
    "cd_user": null,
    "nr_household_size": null,
    "nr_annual_income": null,
    "ic_head_female": null,
    "ic_head_of_household": true,
    "cd_household": 4,
    "cd_income_type": 3,
    "cd_income_frequency": 1,
    "nr_income_amount": 231,
    "ic_active": true,
    "ic_notifications": null
  }
]
```


## CREATE A NEW INCOME
POST /api/user-household
body:
```
{"ds_firstname":"pepe","ds_lastname":"pepe","cd_income_type":1,"cd_income_frequency":4,"nr_income_amount":300,"cd_household":4}
```

## UPDATE INCOME

PATCH /api/user-household/user/20342
body
```
{"ds_firstname":"pepe","ds_lastname":"jose","cd_income_type":1,"cd_income_frequency":4,"nr_income_amount":300,"cd_household":4}
```

## DELETE INCOME:
PATCH/api/user-household/user/20342
body:

`{"ic_active":false}`