# Offline Household Create

| **API URL**     | {{url}}/offline-service/offline-sync/create |
| --------------- | ------------------------------------------- |
| **Method**      | POST                                        |
| **Description** | Creation of household in offline sync.      |

#### **Input:** <a href="#offlinehouseholdcreate-v2-input" id="offlinehouseholdcreate-v2-input"></a>

| **Field Name**                   | **Type** | **Mandatory** | **Example**                                                                                                                             |
| -------------------------------- | -------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| Authorization (Header)           | String   | Yes           | Bearer 1ba363a1edf54402b51f58060aa52b11d30f99a490295adec900fdabf2b472181c0bfb165be18f4f5c430c7218a244bd29b9300d3471acc08197ccfb996118f6 |
| client                           | String   | Yes           | mob                                                                                                                                     |
| requestId                        | String   | Yes           | Offline sync request                                                                                                                    |
| appVersionName                   | String   | Yes           | App Version Name                                                                                                                        |
| appVersionCode                   | Bigint   | Yes           | App Version Code                                                                                                                        |
| deviceId                         | Bigint   | Yes           | Device Id                                                                                                                               |
| syncMode                         | String   | Yes           | Sync Mode                                                                                                                               |
| household                        | String   | Yes           | Households details                                                                                                                      |
| createdAt                        | Date     | Yes           | Created At                                                                                                                              |
| headPhoneNumber                  | Bigint   | Yes           | Head Phone Number                                                                                                                       |
| headPhoneNumberCategory          | String   | Yes           | Head Phone Number Category                                                                                                              |
| householdMembers                 | String   | Yes           | Household Members details                                                                                                               |
| latitude                         | Double   | Yes           | Location details                                                                                                                        |
| longitude                        | Double   | Yes           | longitude details                                                                                                                       |
| name                             | String   | Yes           | Household name                                                                                                                          |
| phoneNumber                      | Bigint   | Yes           | Phone Number                                                                                                                            |
| phoneNumberCategory              | String   | Yes           | PhoneNumber Category                                                                                                                    |
| provenance                       | String   | Yes           | Provenance details                                                                                                                      |
| referenceId                      | Bigint   | Yes           | Reference ID for the household member                                                                                                   |
| village                          | String   | Yes           | Village name                                                                                                                            |
| villageId                        | Bigint   | Yes           | Village ID for household                                                                                                                |
| landmark                         | String   | Yes           | Landmark for household                                                                                                                  |
| name                             | string   | Yes           | Household Name                                                                                                                          |
| noOfPeople                       | Bigint   | Yes           | Number of People in Household                                                                                                           |
| ownedAnImprovedLatrine           | Boolean  | Yes           | Owned An Improved Latrine                                                                                                               |
| ownedHandWashingFacilityWithSoap | Boolean  | Yes           | Had owned a HandWashing Facility With Soap                                                                                              |
| ownedTreatedBedNet               | Boolean  | Yes           | Owned Treated BedNet                                                                                                                    |

#### **Sample Input:** <a href="#offlinehouseholdcreate-v2-sampleinput" id="offlinehouseholdcreate-v2-sampleinput"></a>

{\
"requestId": "62e9bb0f-d846-42e7-8455-2746ddf35e60",\
"appVersionName": "2.0.2",\
"appVersionCode": 8,\
"deviceId": "45e58d37-d521-4cda-8e3f-999a7939967a",\
"syncMode": "AutomaticSync",\
"household": {\
"createdAt": 1737959828939,\
"headPhoneNumber": "22XXXX12",\
"headPhoneNumberCategory": "Personal",\
"householdMembers": \[],\
"landmark": "Sdasd",\
"latitude": 37.4219983,\
"longitude": -122.084,\
"name": "XXXem",\
"noOfPeople": 2,\
"ownedAnImprovedLatrine": true,\
"ownedHandWashingFacilityWithSoap": true,\
"ownedTreatedBedNet": false,\
"provenance": {\
"modifiedDate": "2025-01-27T06:37:32.565Z",\
"organizationId": "1",\
"spiceUserId": 2,\
"userId": "3"\
},\
"referenceId": "4",\
"updatedAt": 1737959852565,\
"village": "Clergy",\
"villageId": 5\
},\
"householdMembers": \[],\
"assessments": \[],\
"followUps": \[],\
"householdMemberLinks": \[]\
}

#### **Output:** <a href="#offlinehouseholdcreate-v2-output" id="offlinehouseholdcreate-v2-output"></a>

| **Field Name**     | **Type** | **Comments**                                       |
| ------------------ | -------- | -------------------------------------------------- |
| <p>Message<br></p> | String   | Successfully, the request was pushed to the queue. |
| status             | Boolean  | Queue pushed status                                |

#### **Sample Output:** <a href="#offlinehouseholdcreate-v2-sampleoutput" id="offlinehouseholdcreate-v2-sampleoutput"></a>

```
{
  "message": "Successfully request pushed to queue.",
  "entity": null,
  "status": true,
  "entityList": null,
  "responseCode": 201,
  "totalCount": null
}
```
