Query the List of Residents

Last Updated on : 2023-06-15 06:05:28

Get the list of residents by community ID and display the list on multiple pages. You can also query the residents by mobile phone number of more than four digits, name, or other attributes.

API address

GET: /v1.0/iot-02/community/householders

Request parameter

Parameter nameTypeINRequiredDescription
block_idStringquerytrueThe ID of the community in which the resident lives.
page_noIntegerquerytrueThe current page.
page_sizeIntegerquerytrueThe paging size.
mobile_or_nameStringqueryfalseThe resident's mobile phone number or name. A mobile phone number must be four or more digits in length.
sexStringqueryfalseGender.
  • 1: Male.
  • 2: Female.
if_identifyStringqueryfalseIndicates whether the residents' identity is verified.
  • 0: No.
  • 1: Yes.
apply_sourceStringqueryfalseThe origin of the request.
  • 0: enrolled by the property management company.
  • 1: registered on the app.
  • 2: invited by an owner.
if_upload_faceStringqueryfalseIndicates whether the resident's face is enrolled.
  • 0: No.
  • 1: Yes.
field_order_byStringqueryfalseSort the results by creation time.
  • CREATE_TIME_DESC: in descending order.
  • CREATE_TIME_ASC: in ascending order.

Return parameter

Parameter nameTypeDescription
resultHighwayHouseholderListResponseThe list of returned residents.

Description of result

Parameter nameTypeDescription
total_recordLongThe total items.
dataListThe list of residents.

Description of data

Parameter nameTypeDescription
user_idStringThe user ID.
householder_idStringThe ID of a resident.
real_nameStringThe name of a resident.
sexIntegerGender.
  • 1: Male.
  • 2: Female.
mobileStringThe mobile phone number.
card_typeIntegerThe type of certificate. 1: ID card.
card_noStringThe certificate number.
if_identifyIntegerIndicates whether the residents' identity is verified.
  • 0: No.
  • 1: Yes.
apply_sourceIntegerThe origin of the request.
  • 0: enrolled by the property management company.
  • 1: registered on the app.
  • 2: invited by an owner.
if_upload_faceIntegerIndicates whether the resident's face is enrolled.
  • 0: No.
  • 1: Yes.
gmt_createLongThe timestamp when the resident record was created.
block_idStringThe identification of the community under the project.
household_registry_typeIntegerThe type of household registration.
  • 1: agricultural household.
  • 2: non-agricultural household.
household_registry_addressStringHousehold registration address.
marital_statusIntegerMarital status.
  • 0: unknown.
  • 1: unmarried.
  • 2: married.
  • 3: divorced.
  • 4: separated.
  • 5: widowed.
employerStringWork unit.
political_statusIntegerPolitical status.
  • 1: member of Communist Party of China.
  • 2: member of Communist Youth League.
  • 3: masses.
emergency_contactStringThe emergency contact.
emergency_contact_numberStringThe emergency contact information, such as a mobile phone number.

Request example

GET: /v1.0/iot-02/community/householders?block_id=136767399153950xxxx&page_no=1&page_size=20

Return example

{
    "data": [
        {
            "apply_source": 0,
            "gmt_create": 1620735665276,
            "sex": 2,
            "householder_id": "13920923942660xxxx",
            "mobile": "1814956xxxx",
            "real_name": "Jane",
            "card_type": 1,
            "if_identify": 0,
            "card_no": "34412319901200xxxx",
            "if_upload_face": 0,
            "user_id": "138550527242797xxxx"
        }
    ],
    "total_record": 1
}

Error code

For more information, see error code.