> For the complete documentation index, see [llms.txt](https://knowledgebase.flaik.com/flaik-knowledge-base/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://knowledgebase.flaik.com/flaik-knowledge-base/archive/example-synchronizing-person-data-with-pos.md).

# Example: Synchronizing Person Data with POS

**Scenario**: A ski resort needs to synchronize the personal details of a customer, John Doe, with their POS system. John recently updated his email address and the resort wants to ensure that the POS system has the latest information.

**API Endpoint**: `/upsertPOSPerson`

**Request Class**: `UpsertPOSPersonRequest`

**Sample Request Payload**

```json
jsonCopy code{
  "personId": "12345",
  "firstName": "John",
  "lastName": "Doe",
  "email": "john.doe@example.com",
  "phoneNumber": "+1234567890",
  "address": {
    "line1": "123 Snowy Lane",
    "line2": "",
    "city": "Snowville",
    "state": "CO",
    "postalCode": "80020",
    "country": "USA"
  },
  "dob": "1980-01-01",
  "gender": "Male"
}
```

**Key Fields Explanation**

* **personId**: A unique identifier for the person in the system.
* **firstName**: The first name of the person.
* **lastName**: The last name of the person.
* **email**: The updated email address of the person.
* **phoneNumber**: The contact number.
* **address**: An object containing the address details of the person.
  * **line1**: The primary street address.
  * **line2**: Additional address information (optional).
  * **city**: The city of residence.
  * **state**: The state or province.
  * **postalCode**: The postal or ZIP code.
  * **country**: The country code.
* **dob**: The date of birth of the person.
* **gender**: The gender of the person.

**Response Example**

After making the `UpsertPOSPersonRequest`, the API will return a response indicating whether the operation was successful.

**Sample Response Payload**:

```json
jsonCopy code{
  "success": true,
  "personId": "12345",
  "message": "Person data synchronized successfully."
}
```

#### API Documentation Page: Synchronize Person Data with POS

This example would be part of the **Synchronize Person Data with POS** section of the Knowledge Base. The documentation would provide:

1. **Overview**: A brief description of the endpoint and its purpose.
2. **Request Structure**: Detailed explanation of each field in the request payload.
3. **Response Structure**: Description of possible responses, including success and error messages.
4. **Examples**: Several practical examples like the one above, showing different scenarios of data synchronization.
5. **Best Practices**: Tips on ensuring data consistency and handling errors effectively.

This kind of example helps users understand how to use the `UpsertPOSPersonRequest` effectively for synchronizing customer data with their POS system.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://knowledgebase.flaik.com/flaik-knowledge-base/archive/example-synchronizing-person-data-with-pos.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
