> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bindbee.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Sync Census Data for Quoting

> Pull a census carrying the fields a quote is priced on.

A census is the list of people you send out for quoting. You need enough on each of them to get a price: how old they are, where they live, and who they would cover. Anything past that is data you did not need to share.

## What you'll use

**Models** - [employee](/hris/employee/get-employees), [dependent](/hris/dependents/get-dependents), [location](/hris/locations/get-locations)

**Events** - `connector_synced`

<Info>
  **Before you start**

  * You know which fields the quote needs. Changing scope later means a resync.
  * You've agreed with the customer which employees are being quoted, including anyone on leave or retired.
  * The connector has synced. A census read mid-sync is quietly short, so gate the extract on `connector_synced` rather than a timer - see [Triggering a job on completion](/guides/reading-writing/syncing#triggering-a-job-on-completion).
</Info>

## Steps

<Steps>
  <Step title="Confirm the scope carries every rating factor">
    Read one employee and check that `date_of_birth`, `home_location`, `gender` and `tobacco_use` come back populated. Map `marital_status` too, as a cross-check against the dependent roster.

    Scope out `ssn`, bank info and `ethnicity` as well, since a quote prices on none of them. Widening scope later triggers a resync, so settle it now - see [Scoping](/get-started/scoping).

    **Result:** Every rating factor confirmed present.
  </Step>

  <Step title="Fetch the population">
    Expand `home_location`. The rate follows where someone lives, while work location sets your customer's situs.

    ```bash theme={null}
    curl --request GET \
      --url 'https://api.bindbee.dev/api/hris/v1/employees?page_size=200&expand=home_location' \
      --header 'Authorization: Bearer <BINDBEE_API_KEY>' \
      --header 'X-Connector-Token: <CONNECTOR_TOKEN>'
    ```

    Filter to the population you agreed with the customer. `employment_status=ACTIVE` on its own drops people who still belong on the census: `LEAVE` is still enrolled and still rated, `RETIRED` is often quoted as its own population, and `PENDING` covers new hires inside the waiting period.

    Where your customer spans more than one legal entity, filter on `company_id`. Full-time and part-time split on `employment_type`, which sits on [employments](/hris/employments/get-employments) rather than the employee record.

    Follow the cursor to the end - see [Pagination](/api-reference/basics/pagination). A census that stops at page one looks like a success.

    **Result:** The population being quoted.
  </Step>

  <Step title="Add dependents">
    ```bash theme={null}
    curl --request GET \
      --url 'https://api.bindbee.dev/api/hris/v1/dependents?page_size=200' \
      --header 'Authorization: Bearer <BINDBEE_API_KEY>' \
      --header 'X-Connector-Token: <CONNECTOR_TOKEN>'
    ```

    `relationship` is what builds the tier - employee only, employee plus spouse, employee plus children, or family. Date of birth alone cannot tell a 24-year-old spouse from a 24-year-old child. `is_student` keeps a child eligible past the plan's age limit.

    Send the eligible roster rather than current enrollment, or the population comes out short. `DOMESTIC_PARTNER`, `SIBLING` and `PARENT` are all valid values, and not every carrier accepts them as dependents - confirm before mapping them into a tier.

    **Result:** The dependents each employee could cover.
  </Step>
</Steps>

## Frequently Asked Questions

<AccordionGroup>
  <Accordion title="The headcount doesn't match the customer's">
    Reconcile against the connector's own counts before re-reading - see [Record counts](/guides/troubleshooting/record-counts).
  </Accordion>

  <Accordion title="A field you need is missing">
    Either scope excluded it, or the customer's credentials cannot read it - see [Scoping](/get-started/scoping).
  </Accordion>
</AccordionGroup>

## Related

* [Filtering](/guides/reading-writing/reading-data) - how filters, `expand` and `modified_after` narrow a read
* [Record counts](/guides/troubleshooting/record-counts) - when the headcount doesn't match the customer's
* [Benefits](/guides/data-models/benefits) - the four benefit models, and how dependents are counted
