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

# Residency in the SPF API

> Determine resident and non-resident withholding flows for home and work locations using the SPF API's guided-flows endpoint.

Residency is the act of establishing or maintaining a residence in a given place.

Residency is a critical component of form determination for residents and non-residents. Below is a sample request and response from our [guided-flows (POST) endpoint](/spf/api-reference/forms/return-applicable-guided-flows-for-given-home-and-work-addresses)

### Request

```json United States Request theme={null}
{
	"homeAddress": {
	    "streetAddress1": "11 S Union St",
		"city": "Montgomery",
		"state": "AL",
		"zipCode": "36130"
	},
	"workAddresses": [
		{
            "streetAddress1": "11 S Union St",
            "city": "Montgomery",
            "state": "AL",
            "zipCode": "36130"
		},
        {
            "streetAddress1": "455 North Galvin Parkway",
            "city": "Phoenix",
            "state": "AZ",
            "zipCode": "85008"
		},
        {
            "streetAddress1": "111 MAPLE STREET",
            "city": "Farmingdale",
            "state": "ME",
            "zipCode": "04344"
		}
	]
}
```

### Response

In the response below, you'll see the Federal flow, Resident flow, and multiple Non-resident flows. It is important to note that if you are a resident of a state that you cannot be a non-resident of the same state and vice versa. Therefore in the above example you will never receive `AL_RESIDENT` and `AL_NONRESIDENT` in the same response from the SPF API as residency is mutually exclusive.

```json United States Response theme={null}
"flows": [
        {
            "id": "FEDERAL",
            "locality": "FEDERAL",
            "hasFlowQuestions": true,
            "initialQuestionSetId": "QS1",
            "localityFullName": "Federal"
        },
        {
            "id": "AL_RESIDENT",
            "locality": "AL",
            "residencyStatus": "RESIDENT",
            "hasFlowQuestions": true,
            "initialQuestionSetId": "QS1",
            "localityFullName": "Alabama"
        },
        {
            "id": "AZ_NONRESIDENT",
            "locality": "AZ",
            "residencyStatus": "NONRESIDENT",
            "hasFlowQuestions": true,
            "initialQuestionSetId": "QS1",
            "localityFullName": "Arizona"
        },
        {
            "id": "ME_NONRESIDENT",
            "locality": "ME",
            "residencyStatus": "NONRESIDENT",
            "hasFlowQuestions": true,
            "initialQuestionSetId": "QS1",
            "localityFullName": "Maine"
        }
    ]
```

## Residency Demo

<iframe src="https://player.vimeo.com/video/851348330?h=930412f849" title="Embedded content" width="100%" height="360" style={{ border: 0, width: "100%", aspectRatio: "16 / 9" }} allowFullScreen />
