# Integration Approach

Before you build anything, decide who shows the job board screens: eQuest or your app. This choice shapes most of your integration, so it's worth settling first.

## The two approaches

| Approach | How it works |
| --- | --- |
| **Interactive** (recommended) | Your app creates the job in eQuest, then sends the user to eQuest's job posting screens. They pick boards, fill in any board specific data, and schedule postings there. When they're done, eQuest sends them back to your app. |
| **Non-interactive** | Your app builds its own board selection screens and posts through the API. The user stays in your app, except when a board needs board specific data. Then they still have to visit an eQuest page to fill it in. |

> **We strongly recommend the interactive approach.** It's much less to build and maintain, and you'd need to send users to an eQuest page for board specific data anyway. Most partners who go non-interactive still end up showing that eQuest page.

## Why interactive is easier

|   | Interactive | Non-interactive |
| --- | --- | --- |
| Board selection screen | eQuest provides it | You build it |
| Board specific data | Handled in the same eQuest screens | You detect it and send the user to a separate eQuest page |
| Scheduling and end dates | eQuest provides it | You build it |
| Inventory checks | eQuest shows them | You read and show them |
| New boards and board changes | Picked up automatically | You may need to update your screens |
| Customers who pay by credit card (eQuestXpress) | Supported | Not supported. Card payments can't go through the API. |
| User stays in your app the whole time | No | Mostly, except for board specific data |

Everything else works the same either way: creating the job, tracking delivery, webhooks, updating, and closing.

## Interactive integration

1.  **Create a draft.** Call `POST /drafts` with the job data. Set `return_url` to the page in your app where the user should land when they're done in eQuest. Set `requisition_number` so you can find the job later.
2.  **Send the user to eQuest.** The response's `_links` has a `board:select-form` link. Open it for the user, in the same window or a new one.
3.  **The user finishes in eQuest.** They pick boards, fill in any board specific data, and schedule postings. eQuest then sends them back to your `return_url`.
4.  **Find the job.** Look it up by requisition number with `GET /jobs?requisition_number=REQ-20418`. The response has the job ID.
5.  **Track, update, and close** it the same way as any other job. See [Workflow](https://connect.equest.com/joblauncher-api/docs/workflow), steps 5 to 7.

If the customer uses Force Review, the draft comes back with a `draft:edit-form` link instead. Send the user there and the rest works the same. See [Workflow](https://connect.equest.com/joblauncher-api/docs/workflow).

## Non-interactive integration

Here's how a non-interactive integration usually goes. [Workflow](https://connect.equest.com/joblauncher-api/docs/workflow) covers each step in detail.

1.  **Get the boards.** Call `GET /boards` and show the list to the user so they can pick boards. Note any with `bsd_required: true`.
2.  **Confirm the choice.** Show the user which boards they picked before posting, and keep their picks for the next steps.
3.  **Create a draft.** Call `POST /drafts` with the job data. Save the draft ID.
4.  **Collect board specific data,** if any picked board needs it. See the next section.
5.  **Post.** Call `POST /drafts/{draft_id}/postings` with the picked boards. A `202` means it worked.
6.  **Show status.** Use webhooks or `GET /jobs/{job_id}/postings` to show each board's status and live link, a bit like a package tracker.

## Board specific data in non-interactive integrations

Some boards need information that isn't part of the standard job. For example, the API takes a state and city, but a board might also require a neighborhood. eQuest calls this **board specific data**. Without it, the board may not accept the job.

In an interactive integration, eQuest's screens collect it for you. In a non-interactive one, you have to send the user to an eQuest page to fill it in.

### 1\. Find boards that need it

Boards that need board specific data show `bsd_required: true` in `GET /boards`:

```text
[
  {
    "name": "Demo Board 1",
    "pipeline_id": "demo_board_1",
    "media_type": "AUTOMATIC",
    "bsd_required": true,
    "id": 5447,
    "inventory": { "type": "REGULAR" }
  },
  {
    "name": "Demo Board 2",
    "pipeline_id": "demo_board_2",
    "media_type": "AUTOMATIC",
    "bsd_required": false,
    "id": 6621,
    "inventory": { "type": "REGULAR" }
  }
]
```

Here, Demo Board 1 needs board specific data and Demo Board 2 doesn't.

### 2\. Get the link

After you create the draft, call `GET /drafts/{draft_id}/bsd` with:

| Parameter | What to send |
| --- | --- |
| `boards[]` | The ID of each picked board that has `bsd_required: true`. Repeat it for each board. |
| `return_url` | The page in your app where the user should land after they click Next on the eQuest page. |

```text
curl -G https://joblauncher.testing.equest.com/api/drafts/671267/bsd \
  -u 'USERNAME:PASSWORD' \
  -H 'Accept: application/json' \
  -H 'X-Accept-Version: 1.12.0' \
  --data-urlencode 'boards[]=5447' \
  --data-urlencode 'return_url=https://ats.example.com/jobs/20418/boards'
```

In this example, the draft ID is `671267`, board `5447` needs board specific data, and the user goes back to `https://ats.example.com/jobs/20418/boards` when they're done.

The response is a link to the eQuest page. It only works once, and only for this draft.

### 3\. Send the user there

Show the link with a short note that the board needs a bit more information. The user fills in the fields on the eQuest page, clicks Next, and lands back on your `return_url`.

### 4\. Post as usual

Call `POST /drafts/{draft_id}/postings` with all the picked boards, including the ones that needed board specific data.

## A note on authentication

Both approaches use the same authentication. Send one of these headers on every request:

| Method | Header |
| --- | --- |
| Basic auth | `Authorization: Basic` followed by your Base64 encoded username and password |
| OAuth 2.0 | `Authorization: Bearer` followed by the user's access token |

Examples in these docs use Basic auth to keep them short. See [Authentication](https://connect.equest.com/joblauncher-api/docs/authentication) for both.
