# Offline Member Create

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

#### **Input:** <a href="#offlinemembercreate-v2-input" id="offlinemembercreate-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                                                                                                                               |
| households                | String   | Yes           | Households details                                                                                                                      |
| householdMembers          | String   | Yes           | Household Members details                                                                                                               |
| createdAt                 | Date     | Yes           | Created At                                                                                                                              |
| dateOfBirth               | Date     | Yes           | DateOfBirth of member                                                                                                                   |
| gender                    | String   | Yes           | Gender of Household member                                                                                                              |
| householdHeadRelationship | String   | Yes           | Household Head Relationship                                                                                                             |
| householdReferenceId      | Bigint   | Yes           | Household Reference Id                                                                                                                  |
| isActive                  | Boolean  | Yes           | Is Active                                                                                                                               |
| isChild                   | Boolean  | Yes           | Is Child validation                                                                                                                     |
| isPregnant                | Boolean  | Yes           | Is Pregnant check                                                                                                                       |
| 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 household member                                                                                                       |
| village                   | String   | Yes           | Village name                                                                                                                            |
| villageId                 | Bigint   | Yes           | Village id for household                                                                                                                |

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

{\
"requestId": "62e9bb0f-d846-42e7-8455-2746ddf35e60",\
"appVersionName": "2.0.2",\
"appVersionCode": 8,\
"deviceId": "45e58d37-d521-4cda-8e3f-999a7939967a",\
"syncMode": "AutomaticSync",\
"households": \[],\
"householdMembers": {\
"assessments": \[],\
"createdAt": 1737960096718,\
"dateOfBirth": "1993-01-27T00:00:00+00:00",\
"gender": "female",\
"householdHeadRelationship": "Wife / Husband",\
"householdId": "1",\
"householdReferenceId": "2",\
"isActive": true,\
"isChild": false,\
"isPregnant": true,\
"latitude": 37.4219983,\
"longitude": -122.084,\
"name": "lili",\
"phoneNumber": "21XXXX231",\
"phoneNumberCategory": "Personal",\
"provenance": {\
"modifiedDate": "2025-101-27T06:41:36.718Z",\
"organizationId": "1",\
"spiceUserId": 2,\
"userId": "3"\
},\
"referenceId": "4",\
"updatedAt": 1737960096718,\
"village": "Clergy",\
"villageId": 5\
},\
"assessments": \[],\
"followUps": \[],\
"householdMemberLinks": \[]\
}

#### **Output:** <a href="#offlinemembercreate-v2-output" id="offlinemembercreate-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="#offlinemembercreate-v2-sampleoutput" id="offlinemembercreate-v2-sampleoutput"></a>

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://spice.docs.medtroniclabs.org/engineering/api-documentation/spice-service/offline-sync/offline-member-create.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
