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

# Snapshot & Tracking

> Track the outstanding updates from a snapshot, along with any discrepancies that result

Here we explore a simplified sample workflow for identifying the status of a snapshot's changes using the tracking endpoint(s).

<Steps>
  <Step title="Send Snapshot">
    First, send a snapshot to Noyo:

    ```sh Request theme={"system"}
    curl --request POST \
         --url https://fulfillment.noyo.com/api/v1/groups/{group_id}/member_snapshots
    ```

    You'll receive the ID of the created snapshot:

    ```json Response {2} theme={"system"}
    {
      "id": "7bea80ac-499d-560b-5512-60be9e2349cb",
      "created": 1656030390,
      ...
    }
    ```

    If you use webhooks, you'll receive `difference.created` events for every change or update in the snapshot.

    <br />
  </Step>

  <Step title="Retrieve differences">
    We then call the tracking endpoint to retrieve a field-level list of differences associated with the snapshot. These differences will either be pending changes introduced by the snapshot, or discrepancies raised during round-trip confirmation. They can be pulled at any time and will always reflect their real-time status.

    For this example, we'll assume your snapshot included one new item– enrolling a dependent in vision coverage.

    Call the differences endpoint using the snapshot ID as a query parameter:

    ```sh Request theme={"system"}
    curl --request GET \
         --url https://tracking.noyo.com/api/v1/differences?member_snapshot_id=7bea80ac-499d-560b-5512-60be9e2349cb
    ```

    The response returns one difference (pending change)– the carrier doesn't have an enrollment in the snapshot *(that's what is being processed)*

    ```json Response lines theme={"system"}
    [
        {
            "id": "da5ec83e-450f-4eee-ad6c-8b6d60d41b88",
            "resolved": null,
            "discrepancy_time": null,
            "group_id": "a1b6fe36-ccc5-41e3-bcc0-e6488d7e031e",
            "carrier_id": "2d370e0e-fd73-45e0-8828-796d2cacaeef",
            "employee_id": "a9c01d76-019c-4c44-b414-a832246c014d",
            "object_type": "dependent",
            "object_id": "d0e180e6-fafc-441e-8ac4-08d9a9fe4657",
            "impact_score": 5,
            "difference_classification": "missing_from_carrier",
            "difference_type": "missing_ie",
            "sources": [],
            "fields": [
                {
                    "key": "object",
                    "platform_value": {
                        "individual_id": "d0e180e6-fafc-441e-8ac4-08d9a9fe4657",
                        "line_of_coverage": "vision",
                        "member_first_name": "Jade",
                        "member_last_name": "Cornwall",
                        "member_type": "dependent",
                        "plan_id": "9302a1db-bed5-4be6-96f5-c51371cc96a3"
                    },
                    "carrier_value": null
                }
            ]
        }
    ]
    ```
  </Step>

  <Step title="Track over time">
    Fast forward a day or two. The carrier has enrolled the dependent successfully, but with a later effective date due to their rules and limitations. The tracking endpoint will surface this information. Let's call it again:

    ```sh Request theme={"system"}
    curl --request GET \
         --url https://tracking.noyo.com/api/v1/differences?member_snapshot_id=7bea80ac-499d-560b-5512-60be9e2349cb
    ```

    We now get an updated response. The original difference is now marked as resolved, meaning the carrier successfully enrolled the dependent. There's a new discrepancy raised noting the difference in effective start date. *(some payload fields omitted for brevity)*

    ```json Response lines theme={"system"}
    [
        {
            "id": "da5ec83e-450f-4eee-ad6c-8b6d60d41b88",
            "resolved": 1708295864,
            "discrepancy_time": null,
            "impact_score": 5,
            "difference_classification": "missing_from_carrier",
            "difference_type": "missing_ie",
            "fields": [
                {
                    "key": "object",
                    "platform_value": {
                        "individual_id": "d0e180e6-fafc-441e-8ac4-08d9a9fe4657",
                        "line_of_coverage": "vision",
                        "member_first_name": "Jade",
                        "member_last_name": "Cornwall",
                        "member_type": "dependent",
                        "plan_id": "9302a1db-bed5-4be6-96f5-c51371cc96a3"
                    },
                    "carrier_value": null
                }
            ]
        },
        {
            "id": "95b8611b-15f6-46c6-8bb1-353dcd52e3fb",
            "resolved": null,
            "discrepancy_time": 1703098579,
            "impact_score": 4,
            "difference_classification": "field_mismatch",
            "difference_type": "ie_effective_start_date",
            "fields": [
                {
                    "key": "effective_start_date",
                    "platform_value": "2024-08-22",
                    "carrier_value": "2024-09-01"
                }
            ]
        }
    ]
    ```
  </Step>
</Steps>

If you use webhooks, you will have received a few events along the way:

* For the dependent enrollment, a `difference.resolved`event (in addition to the original creation event)
* For the effective date discrepancy, both a `difference.created` and `difference.discrepancy` event
* For the snapshot, both a `member_snapshot.status_change` event and a `member_snapshot_carrier_fulfillment_status.status_change` event
