# Remote Integration Guide

##### Learn how to integrate Remote’s contractor management platform with 1099Policy to automate fractional insurance, validate COIs, and keep global contractor compliance in sync with every engagement.

## 1. Overview

Connect Remote contractor data to 1099Policy to ensure every engagement is insured or validated before work begins. This integration allows you to automate policy binding, COI validation, and webhook-driven compliance tracking.

You can:

- Offer **fractional, on-demand coverage** aligned to contractor engagements.
- Automatically validate or upload Certificates of Insurance (COIs).
- Keep compliance in sync through 1099Policy webhooks (`policy.*`, `certificate.*`).
- Map Remote contractor pay to 1099Policy `job.wage` (cents) and `wage_type`.
- Persist Remote contractor and agreement IDs in `custom_metadata` for reconciliation.

## 2. Integration Flow

Coverage should activate as soon as a contractor agreement is finalized in Remote and before the official start date. This ensures insurance binds before any deliverables or payments occur.

- **Primary trigger:** Contractor agreement finalized or signed.
- **Alternative triggers:** Invoice schedule created or updated; contractor start date confirmed.
- **Event delivery:** Remote Webhooks (`contract.finalized`, `invoice_schedule.created`, etc.)
- **Required data:**`contract.id`, `contractor.id`, `rate.amount`, `rate.type`, `start_date`, `end_date`.
- **Authentication:** Remote API uses bearer tokens for all requests.

## 3. Core Concepts

Each Remote object maps to a corresponding 1099Policy resource, ensuring consistent coverage and validation.

| Remote Object            | 1099Policy Resource       | Description                                               |
|--------------------------|---------------------------|-----------------------------------------------------------|
| Contractor Agreement      | Job + Assignment          | Defines work scope, rate, and coverage window            |
| Contractor               | Contractor                | Represents the insured individual                          |
| Document (COI upload)   | Certificate               | Validates uploaded insurance certificates                   |
| Contract IDs             | `custom_metadata.*`      | Used for reconciliation only                                |

## 4. End-to-End Implementation

Follow these steps to integrate Remote and 1099Policy for contractor insurance compliance.

### 4.1 Create Contractor

Each Remote contractor must exist in 1099Policy before creating quotes or assignments. Every Contractor requires a unique `contact.email` to ensure tenant-level uniqueness. Generate a proxy (e.g., `<contractor_id>@relay.yourdomain.com`) if Remote does not expose an email.

| Remote Field                | 1099Policy Contractor      | Notes                                                    |
|-----------------------------|-----------------------------|----------------------------------------------------------|
| `contractor.id`            | `custom_metadata.remote_contractor_id` | Reconciliation key                         |
| `first_name`, `last_name`  | `contact.first_name`, `contact.last_name` | Required                                          |
| `email`                     | `contact.email`            | **Required**; use proxy if missing                       |
| `country`                   | `address.country`          | Optional                                                |
| `region` / `city`          | `address.region` / `address.city` | Optional                                          |

**Source: Remote (REST)**

```http
GET https://api.remote.com/v1/contractors/{contractor_id}
Authorization: Bearer remote_live_***
```

**Destination: 1099Policy (POST /contractors)**

```http
POST https://api.1099policy.com/api/v1/contractors
Authorization: Bearer t9k_test_***
Content-Type: application/json
Idempotency-Key: remote-contractor-<CONTRACTOR_ID>
```

```json
{
  "contact": {
    "first_name": "Jordan",
    "last_name": "Cruz",
    "email": "ctr_8831@relay.yourdomain.com"
  },
  "address": {
    "country": "US",
    "region": "CA"
  },
  "custom_metadata": {
    "remote_contractor_id": "ctr_8831"
  }
}
```

### 4.2 Create Job

Jobs represent the engagement’s scope, category, and compensation. Create a Job when a Remote agreement is finalized or ready to begin.

| 1099Policy Job Field      | Remote Source              | Notes                                                    |
|----------------------------|-----------------------------|----------------------------------------------------------|
| `name`                     | Agreement title or engagement name | Role name                                          |
| `description`              | Contract/SOW description   | Scope                                                  |
| `entity`                   | Internal client/account ID  | Must exist in 1099Policy                               |
| `category_code`            | Role → mapped 1099Policy category | Maintain mapping                                |
| `wage` (cents)            | `agreement.rate.amount × 100` | Required                                 |
| `wage_type`                | Derived from compensation basis | `hourly` or `flatfee`                          |
| `region`                   | Engagement region           | Defaults to contractor region                           |
| `custom_metadata.contract_id` | Agreement ID                  | Reconciliation                                        |
| `custom_metadata.contractor_id` | Contractor ID                 | Reconciliation                                        |
| `custom_metadata.invoice_schedule_id` | Invoice schedule ID        | Optional                                              |

**Source: Remote (REST)**

```http
GET https://api.remote.com/v1/contracts/{contract_id}
Authorization: Bearer remote_live_***
```

**Destination: 1099Policy (POST /jobs)**

```http
POST https://api.1099policy.com/api/v1/jobs
Authorization: Bearer t9k_test_***
Content-Type: application/json
```

```json
{
  "name": "Q4 Launch Assets — Contractor Agreement",
  "description": "Deliver landing page, ad set, and brand kit",
  "entity": "en_12AbC3",
  "category_code": "MARKETING_DESIGN",
  "wage": 500000,
  "wage_type": "flatfee",
  "region": "US",
  "custom_metadata": {
    "contract_id": "ct_8f21",
    "contractor_id": "ctr_9a81",
    "invoice_schedule_id": "cis_44fd"
  }
}
```

### 4.3 Create Quote

Quotes define the coverage duration and insurance type for each engagement.

| 1099Policy Quote Field     | Remote Source              | Notes                                                    |
|----------------------------|-----------------------------|----------------------------------------------------------|
| `contractor`               | Contractor mapped from Remote | Required                                          |
| `job`                      | Returned Job ID             | Required                                          |
| `coverage_type[]`          | Coverage requirements        | e.g., `["general","workers-comp"]`                |
| `effective_date`           | Contract start date (epoch UTC) | Required                                 |
| `end_date`                 | Contract end date (epoch UTC) | Required                                 |
| `custom_metadata.*`        | Remote IDs                  | Reconciliation                                        |

**Destination: 1099Policy (POST /quotes)**

```http
POST https://api.1099policy.com/api/v1/quotes
Authorization: Bearer t9k_test_***
Content-Type: application/json
```

```json
{
  "contractor": "cn_Kh18Qs",
  "job": "jb_Dl9n42",
  "coverage_type": ["general","workers-comp"],
  "effective_date": 1764300000,
  "end_date": 1766892000,
  "custom_metadata": { "contract_id": "ct_8f21" }
}
```

### 4.4 Create Insurance Application Session

Contractors complete this session once to activate their first policy.

**Destination: 1099Policy (POST /apply/sessions)**

```http
POST https://api.1099policy.com/api/v1/apply/sessions
Authorization: Bearer t9k_test_***
Content-Type: application/json
```

```json
{
  "quote": "qt_Pf5LmA",
  "success_url": "https://dashboard.remote.com/contractors/ctr_9a81/contracts/ct_8f21?coverage=active",
  "cancel_url": "https://dashboard.remote.com/contractors/ctr_9a81/contracts/ct_8f21?coverage=canceled",
  "custom_metadata": { "invoice_schedule_id": "cis_44fd" }
}
```

### 4.5 Create Assignment

Assignments apply coverage automatically for returning contractors who have already completed their opt-in.

**Destination: 1099Policy (POST /assignments)**

```http
POST https://api.1099policy.com/api/v1/assignments
Authorization: Bearer t9k_test_***
Content-Type: application/json
```

```json
{
  "contractor": "cn_Kh18Qs",
  "job": "jb_Dl9n42",
  "effective_date": 1764300000,
  "end_date": 1766892000,
  "coverage_type": ["general","workers-comp"],
  "custom_metadata": { "contract_id": "ct_8f21" }
}
```

### 4.6 Upload Certificate (BYO-COI)

If a contractor provides their own COI through Remote, upload it to 1099Policy for validation.

**Destination: 1099Policy (POST /files/certificates)**

(multipart upload)

Fields:

- `certificate=@file.pdf`
- `contractor=cn_Kh18Qs`
- `custom_metadata[contract_id]=ct_8f21`

### 4.7 Record Invoice (Optional)

If the contractor’s final pay differs from the original estimate, record the actual remuneration for reconciliation and audit. This step is optional and does not affect insurance coverage.

**Destination: 1099Policy (POST /invoices)**

```http
POST https://api.1099policy.com/api/v1/invoices
Authorization: Bearer t9k_test_***
Content-Type: application/json
```

```json
{
  "contractor": "cn_ti8eXviE4A",
  "job": "jb_rajdrwMUKi",
  "gross_pay": 1200,
  "paycycle_startdate": 1714419793,
  "paycycle_enddate": 1714419793
}
```

Unix timestamp

Use Unix seconds (UTC) for `paycycle_startdate` and `paycycle_enddate`. See full API reference: [https://docs.1099policy.com/group/endpoint-invoice](https://docs.1099policy.com/group/endpoint-invoice)

## 5. Webhooks

Remote and 1099Policy both rely on webhooks for real-time updates.

| Source                     | Event                          | Action                              |
|----------------------------|--------------------------------|-------------------------------------|
| Remote                     | Agreement finalized/signed     | Create Job and Quote                |
| Remote                     | Invoice schedule updated       | Adjust coverage dates               |
| 1099Policy                 | `policy.active`                | Mark contractor insured              |
| 1099Policy                 | `policy.canceled` / `policy.expired` | Mark unprotected; prompt re-bind  |
| 1099Policy                 | `certificate.validated`       | Mark COI valid                      |
| 1099Policy                 | `certificate.flagged`         | Flag for review                     |

## 6. Testing Checklist

Run these checks to verify that coverage is created, bound, and synchronized correctly.

- Contractor created (proxy email if missing)
- Job created with correct wage and category mapping
- Quote created with proper coverage window
- Application Session launches successfully
- Assignment aligns with engagement term
- COI uploads validated and webhook verified
- Optional invoice recorded if final pay differs

## 7. References

- Remote Developer Docs (Contractors, Contracts, Invoice Schedules, Webhooks)
