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

# Argyle Open Network (Beta)

> Learn how to integrate your payroll platform with Argyle.

## Initiate integration

To integrate your payroll platform with Argyle Open Network, provide:

1. How users authenticate to your payroll platform.
2. The mappings and location of income and employment data.

You can submit this information by sending a POST request to `https://integrations.argyle.com/api/v1/spec` with this information in the request body as the “specification payload”:

<Accordion title="Example specification payoload:">
  ```json theme={}
  {
      "integration": "ABC Payroll",
      "auth": {
          "request": {
              "url": "https://api.abcpayroll.com/auth",
              "method": "post",
              "comment": "Provide JSON with `username` and `password`"
          },
          "method": "bearer_token",
          "comment": "Accepts _TOKEN cookie as well"
      },
      "mappings": [
          {
              "url": "https://api.datacustodianx.com/profiles.json",
              "provides": [
                  "profiles.full_name",
                  "profiles.dob",
                  "..."
              ],
              "comment": "Extract first and last name from profiles.full_name"
          },
          {
              "url": "api.datacustodianx.com/paystubs.json",
              "provides": [
                  "paystubs.gross_pay",
                  "paystubs.net_pay",
                  "..."
              ]
          }
      ]
  }
  ```
</Accordion>

```curl theme={}
curl --request POST \
     --url https://integrations.argyle.com/api/v1/spec \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
      {
          "specification payload goes here"
      }
      '
```

You will receive the below notification when you have successfully submitted your specification:

```text theme={}
Specification received. Thank you.
```

You can submit an updated specification as many times as needed. We will incorporate the most recent version that has been submitted.

<Note>
  [Contact us](https://argyle.com/contact-sales) after successfully submitting your integration, or to let us know if you have any questions.
</Note>

## Specification payload

Include a name for your payroll `integration` in the specification payload:

| Attribute     | Type   | Description              | Requirement |
| ------------- | ------ | ------------------------ | ----------- |
| `integration` | string | Name of the integration. | required    |

### User authentication

Include information on how users authenticate to your payroll platform in an `auth` object in the specification payload. Argyle will authenticate users on their behalf to your payroll platform with this information. Use the comment fields to provide additional information if needed.

| Attribute              | Type   | Description                                                                                                                                                                                                                                                                | Requirement |
| ---------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
| `auth.request.url`     | string | URL to submit user credentials for authentication.                                                                                                                                                                                                                         | required    |
| `auth.request.method`  | string | HTTP request method for submitting user credentials (typically POST, GET, PUT, or PATCH).                                                                                                                                                                                  | required    |
| `auth.request.comment` | string | Further information advising how to make HTTP requests on your platform.                                                                                                                                                                                                   | optional    |
| `auth.method`          | string | HTTP authentication method for submitting user credentials. Common methods: `basic_auth` (Basic access authentication), `api_key` (API key in query/header/cookie), `bearer_token` (Bearer token), `digest_auth` (Digest access authentication), `oauth_1.0`, `oauth_2.0`. | required    |
| `auth.comment`         | string | Further information advising how to authenticate HTTP requests on your platform.                                                                                                                                                                                           | optional    |

### Data mapping

Include information on the mappings and location of income and employment data in a `mappings` object in the specification payload. The `mappings` object should contain an array of objects, each of which should include:

| Attribute           | Type   | Description                                                                   | Requirement |
| ------------------- | ------ | ----------------------------------------------------------------------------- | ----------- |
| `mappings.url`      | string | URL of the endpoint where the income and employment data fields are provided. | required    |
| `mappings.provides` | object | An array of data field names provided at the endpoint.                        | required    |
| `mappings.comment`  | string | Further information you can provide about your data schema.                   | optional    |

We will map your data fields to Argyle's data schema, which consists of 160+ income and employment data fields. Upon user consent, Argyle will retrieve requested income and employment data from your payroll platform.

If your security policy limits outgoing traffic, ensure that your conditions allow for API calls by whitelisting all outgoing traffic from Argyle. These two content sources would need to be included at minimum:

```html theme={}
<meta http-equiv="Content-Security-Policy"
        content="connect-src https://*.argyle.com; worker-src 'self' blob: "/>
```

## Next steps

<Note>
  Argyle will contact you in connection with completing the integration with your platform. You can also [contact us](https://argyle.com/contact-sales) if you have any questions.
</Note>
