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

# Deel

## Initial Integration Set Up

In order to integrate with Deel, you will need to create a Deel account and OAuth application, and connect your Deel OAuth application to Finch. See the [our full guide](https://developer.tryfinch.com/integrations/guides/Deel) for more details.

## Request Forwarding

The Deel integration supports [request forwarding](https://developer.tryfinch.com/developer-resources/Request-Forwarding.md) for connections made with the `oauth` authentication method. Use it to read Deel data that Finch's standard API doesn't return, such as a worker's work location.

Finch sends your request to the [Deel API](https://developer.deel.com/api/introduction) using the connection's OAuth token and returns Deel's response unchanged.

* `method` is the HTTP method Deel expects. Finch's Deel connection has read-only access (people, contracts, organizations and users), so use `GET`. Deel returns a `403` for writes and for routes outside those permissions.
* `route` is the full Deel API path, including `/rest` and the version, for example `/rest/v2/people`.
* `params` holds query parameters, such as `limit` and `offset`.
* No `headers` or `data` are required for `GET` requests.
* Deel's response body is returned as a string in the `data` field of the Finch response, so parse it as JSON.

### Example: get a worker's work location

Finch's [/employment](https://developer.tryfinch.com/api-reference/organization/employment.md) endpoint doesn't include a work location for Deel workers, because Deel only exposes it as a free-text label (for example `Remote - California`) and not as a structured address. To read it with request forwarding:

**Step 1:** Get the worker's `source_id` from Finch's `/employment` endpoint. For Deel, this is the worker's Deel person ID.

**Step 2:** Request the worker from Deel with that ID. In the example below, replace `0b1c2d3e-4f50-4a6b-8c7d-9e0f1a2b3c4d` with the worker's `source_id`.

Request:

```bash theme={null}
curl --location 'https://api.tryfinch.com/forward' \
--header 'Authorization: Bearer {{FINCH_ACCESS_TOKEN}}' \
--header 'Content-Type: application/json' \
--header 'Finch-API-Version: 2020-09-17' \
--data '{
  "method": "GET",
  "route": "/rest/v2/people/0b1c2d3e-4f50-4a6b-8c7d-9e0f1a2b3c4d",
  "headers": null,
  "params": null,
  "data": null
}'
```

Response (trimmed to the relevant fields):

```json theme={null}
{
  "statusCode": 200,
  "data": "{\"data\":{\"id\":\"0b1c2d3e-4f50-4a6b-8c7d-9e0f1a2b3c4d\",\"country\":\"US\",\"state\":\"CA\",\"work_location\":\"Remote - California\"}}",
  "request": {
    "method": "GET",
    "route": "/rest/v2/people/0b1c2d3e-4f50-4a6b-8c7d-9e0f1a2b3c4d"
  }
}
```

`work_location` is `null` when no work location is set for the worker in Deel. For the other fields Deel returns, see the Deel [Get person by ID](https://developer.deel.com/api/stable/reference/endpoints/people/get-person-by-id) documentation.
