# Truework Developer Documentation
Truework makes it easy to verify income and employment for up to 95% of the U.S. workforce.
Explore our developer documentation to learn more about Truework and to plan and build your Truework integration.
Start here if you're new to Truework. Learn core concepts and follow quickstart guides to build familiarity.
Want to get technical? Dive deep with Truework's comprehensive docs.
Try the Truework API from the comfort of your browser.
Visit our website to learn more about Truework and our products.
Order verifications right away from an easy-to-use website, no technical resources required.
Schedule a call to learn about Truework’s income verification solutions. We’ll tailor the meeting to your needs to keep it short and effective.
# Guides
## Start building your Truework integration
Truework Direct and the Truework API are the best way to add automated income and employment verification to your application.
Embed a customizable income and employment verification workflow in your
online application or web portal.
Integrate automated verifications anywhere in your workflow with just a
few lines of code.
## Start learning about verification methods
Truework offers a number of verification methods to maximize coverage and flexibility with a single integration.
Over 48 million active employee records returned in seconds.
Allow applicants to share payroll data directly in your application.
[beta] Automate income document parsing and fraud review.
Save time on manual verifications with automated outreach.
You can also [start learning](/docs/guides/terminology) key concepts that are used throughout the documentation.
## Start verifying without code
Truework offers no-code solutions to help you get started with income and employment verification.
Order verifications right away from an easy-to-use website, no technical
resources required.
Leverage direct integrations with mortgage loan origination systems
(LOSs), including Encompass® by ICE Mortgage Technology, to reduce
manual work and increase productivity without changing your workflow.
# Getting started
Truework's API allows you to integrate our powerful verification capabilities directly with your application, and automate the process of creating verification requests and handling the results.
For this tutorial, we will be making requests to the [Truework Sandbox](/docs/api-reference/sandbox). The sandbox is a parallel environment which can be used to manipulate requests and test your integration without affecting production data or being charged.
The base URL for the Truework Sandbox is `https://api.truework-sandbox.com`.
## Prerequisites
To make requests to the Truework API, you will need to [create an API key](/docs/api-reference/authentication) for the sandbox environment. It is also recommended that you [configure a webhook](/docs/api-reference/webhooks) to get notified when your order has been completed, although doing so is not required for this tutorial.
## Creating an order
To create an order with the API, we will need to make an HTTP POST request to the `/orders/target-employer` endpoint. You can do this using curl, Postman, or via our built-in [API Explorer](/docs/api-reference/versions/2023-10-30/create-new-target-employer-verification/~explorer).
Once your order is created, copy the string returned in the `id` field, as we'll need it for the next step.
## Getting an order
Now that we've created an order and copied its ID, we can get it from the API to see its current state and other data. To do so, we will need to make an HTTP GET request to the `/orders/{order_id}` endpoint.
Once you've fetched your order, you should notice a few things:
- The order's list of `verification_requests` should include one verification with a state of `completed`
- The verification's `reports` field is populated with a verification of Employment and Income (VOI) report
- If you configured a webhook logger, you should see that the `order.completed` webhook has fired.
- These actions occurred because we used a special SSN value (`000-00-0000`) in the sandbox environment, which caused the verification to be automatically processed and completed. Learn more about the SSNs that can be used in the sandbox [here](/docs/api-reference/sandbox/test-cases).
## Moving to production
To start sending orders to production, you only need to change the base URL to `api.truework.com`, and change the API key to a production key.
Prior to moving to production, reach out to implementations@truework.com and
notify the Truework team you are ready to go live with your integration. Due
to the sensitive nature of the data we will need to grant your account
permission to make these requests outside of the sandbox environment.
## Creating an employer search order
It's possible to create an order that provides results synchronously, instead of requiring you to fetch results later. To do so, we'll make an HTTP POST request to the `/orders/employer-search` endpoint:
You'll notice that the request body is largely the same, with one key difference - we did not include the `target.company` field. This is because employer search orders do not support verifying a specific employment. Rather, they search the Truework Instant network to find any employments that match the provided consumer.
When making requests in this fashion, you will not need to fetch the results in a separate step - any completed verifications will be included in the HTTP response. You will not receive webhooks for this type of request, since it will always be either completed or canceled by the time the response is returned.
## Fetching different types of orders
While orders are created via different endpoint (`POST /orders/target-employer`, `POST /orders/employer-search`, etc.), they can all be fetched at the same base endpoint (`GET /orders` and `GET /orders/`) regardless of the the endpoint used to create the order.
# Verification targets
The Truework API supports verification requests for two types of targets:
- **Target employer:** Verification requests targeting a specific applicant at a specified employer.
- **Employer search:** Verification requests targeting a specific applicant at any employer.
## Target employer
A target employer order will verify the target's employment only at the employer that is specified as the target when the order is created. This order type supports all verification methods, and will return results asynchronously.

To verify a specific employer, use the target employer order endpoint [`POST /orders/target-employer`](/docs/api-reference/versions/2023-10-30/create-new-target-employer-verification).
## Employer search
An employer search order can find multiple employment records for a given applicant. It only supports Truework Instant, and will return results synchronously. Results can be filtered to include any employers, current employers only, or previous employers only.

To find employments for an applicant without specifying an employer, use the employer search order endpoint [`POST /orders/employer-search`](/docs/api-reference/versions/2023-10-30/create-new-order-employer-search-verification).
# What is Truework Direct?
[Truework Direct](https://www.truework.com/products/direct) allows verifiers to verify consumer income directly in their online application or web portal, maximizing coverage and speed while providing the most effortless experience for your customers. By interacting with the Truework Direct widget, applicants can provide information to more quickly and easily verify their income and employment.

Truework Direct can be embedded in your application workflow using Truework.js or leveraged through an email- or text-messaging-based workflow for verifications created via the [API](/docs/guides/api/getting-started) or [web app](https://app.truework.com/requester/dashboard).
## What is Truework.js?
Truework.js is a JavaScript library that enables verifiers to embed the Truework Direct widget into their website, easily adding Truework Direct into their application workflow.
## A visual explanation
## Conclusion
We recommend leveraging Truework Credentials after [Instant](https://www.truework.com/docs/instant) to optimize for Instant coverage before leveraging a borrower-in-the-loop workflow.
You can integrate Credentials using Truework Direct with Truework.js by following the steps outlined in the API docs [here](/docs/guides/direct/getting-started).
If any questions arise, or you need support in getting set up, our team is here to help: [Get help](/docs/help).
# Getting started
[Truework Direct](https://www.truework.com/products/direct) allows an employee to log into their payroll platform and share their income/employment data directly via [Truework Credentials](https://www.truework.com/products/credentials).
The Truework.js widget allows you to embed this employee-driven verification workflow directly in your
user-facing application. If the employee cannot login to their payroll provider for any reason, you have the option to still verify any employee in the US with a fallback that leverages [Truework Smart Outreach](https://www.truework.com/products/smart-outreach).
Now let's show you how to get up and running with Truework Direct with Truework.js and Truework
Credentials.
This tutorial uses code snippets from the [Truework.js
examples](https://github.com/truework/truework.js-examples/) repository. The
Truework.js examples repository contains fully functioning Credentials demo
applications using various platforms that you can use to bootstrap your own
deployment.
## Tutorial
This tutorial will walk you through the following steps to get a basic Truework Direct integration set up:
Adding Truework.js to your siteCreating a Truework Direct session and initializing Truework.jsListening for updates with webhooks and retrieving report data
This tutorial will use Truework's [sandbox
environment](/docs/api-reference/sandbox). There are a few key differences
between Truework's sandbox and production environments: - The sandbox
environment does not support [co-branding](#co-branding). - Credentials
verifications in the sandbox environment supports the use of [special test
SSNs](/docs/api-reference/sandbox/test-cases#trueworkjs-fixture-reference)
to simulate different scenarios. - Credentials verifications in the sandbox
environment uses a sign-in screen which accepts any username/password
combination.
### Adding Truework.js to your site
Add the Truework.js script tag to your application's HTML page(s) as shown below. On page load, Truework.js will be available on the global `window.Truework` object.
```html
```
### Creating a Truework Direct session and initializing Truework.js
Truework.js must be initialized with a Truework Direct session token that you create on your backend service with the Truework API. This session token will associate the applicant-provided information with your Truework account for later retrieval and use. The process of requesting and retrieving a session token and initializing Truework.js with the token is shown in the diagram below:
```mermaid
sequenceDiagram
autonumber
Web Browser->>Application Server: Get Credentials Session
Application Server->>Truework API: Create Credentials Session
Truework API->>Application Server: Credentials Session
Application Server->>Web Browser: Credentials Session Token
Note left of Web Browser: Pass Session Token to Truework.js
```
Now let's implement this process.
If you haven't already created a sandbox API key, use [Developer Settings](https://app.truework.com/requester/developer-settings) to create a new sandbox API key. Your sandbox API key should begin with `tw_sk_test_`.
On your backend, create an API endpoint that calls [`POST /orders/truework-direct`](/docs/api-reference/versions/2023-10-30/create-new-truework-direct-order) to initialize a Credentials session. The Session Create API generates a token which is returned to your front end client and is used to instantiate Truework.js
```javascript maxLines=40
let jsonRequestBodyPayLoad = `
{
"targets": [{
"first_name": "Joe",
"last_name": "Smith",
"social_security_number": "000-20-0000",
"contact_email": "joesmith@example.org",
"date_of_birth": "1980-01-01",
"companies": [{
"name": "Example Inc."
}],
"permissible_purpose": "risk-assessment",
"use_case": "mortgage",
"type": "employment",
"metadata": {
"internal_id": "12454"
}
}]
}
`;
app.get("/token", async (req, res) => {
const response = await fetch(
"https://api.truework-sandbox.com/orders/truework-direct",
{
method: "POST",
headers: {
Authorization: `Bearer tw_sk_test_e508eb797edb95ade85284bcb54dd49ed45db1be`,
"Content-Type": "application/json",
},
body: JSON.parse(jsonRequestBodyPayLoad),
}
);
res.json(await response.json().truework_direct.targets[0].truework_direct_session_token);
});
```
If you haven't already created a sandbox publishable key, use [Developer Settings](https://app.truework.com/requester/developer-settings) to create a new sandbox publishable key. Your sandbox publishable key should begin with `tw_pk_test_`.
Call the API endpoint created earlier from your frontend and use the returned token to instantiate the Credentials flow.
```html
```
The Truework.js widget will activate when the button is clicked and the user will be guided through the Credentials flow.
Once the user successfully completes the Credentials flow, you will **asynchronously** receive updates on the Credentials
session through webhooks and fetch the related report data when the data is ready.
### Listening for updates with webhooks and retrieving report data
Truework uses [webhooks](/docs/api-reference/webhooks) to notify you when a Truework Direct session changes state and successfully completes:
- You'll receive a `credentials_session.state.change` webhook when the session successfully completes and a
verification report is created.
- You'll receive a `order.completed` webhook when all verifications associated with the order have been completed or canceled.
You can then use the webhook notification of a completed report to fetch the report data, as shown in the diagram below:
```mermaid
sequenceDiagram
autonumber
participant Application Server
participant Truework API
Truework API->>Application Server: order.completed webhook emitted
Application Server->>Truework API: Use webhook data to fetch completed Verification report
Truework API-->>Application Server: Completed report returned
```
Now let's implement this process.
Create an endpoint in your app to receive webhooks sent by Truework.
```javascript
app.post("/webhook", require("body-parser").json(), async (req, res) => {
if (
req.get("X-Truework-Token") === "YOUR_WEBHOOK_TOKEN"
) {
console.log("webhook received: ", req.body.hook.event)
}
}
```
Create a new sandbox webhook in [Developer Settings](https://app.truework.com/requester/developer-settings), targeting the webhook endpoint you just created. Take note of the token associated with the new sandbox webhook and insert it where `YOUR_WEBHOOK_TOKEN` is in the example code
Once configured, try testing the webhook handler by clicking the "Test" button on the Developer Settings page.
Update the webhook handler to fetch the completed report data from the Truework API when the
`order.completed` webhook is received.
We will retrieve the order based on the `order_id` field of the webhook, and the employment report will
be in the `verification_requests[].reports` list in the API response.
```javascript
app.post("/webhook", require("body-parser").json(), async (req, res) => {
if (
req.get("X-Truework-Token") === "YOUR_WEBHOOK_TOKEN" &&
req.body.hook.event === "order.completed"
) {
const verification_request_id = req.body.data.order_id;
const response = await fetch(
`https://api.truework-sandbox.com/orders/${order_id}`,
{
method: "GET",
headers: {
Authorization: `Bearer ${YOUR_TRUEWORK_API_KEY}`,
"Content-Type": "application/json",
},
}
);
console.log(await response.json());
}
res.send("Ok!");
});
```
## Moving to production
To promote your sandbox application to production, take the following steps:
Create a production-mode API key and use this key for all Truework API calls from your backend server.Create a production-mode Publishable key and use this key to initialize all Truework.js on your website.
Change the base URL for all backend API calls to Truework from `https://api.truework-sandbox.com` to `https://api.truework.com`.
```javascript {3,7}
app.get("/token", async (req, res) => {
const response = await fetch(
"https://api.truework.com/orders/truework-direct",
{
method: "POST",
headers: {
Authorization: `Bearer tw_sk_e508eb797edb95ade85284bcb54dd49ed45db1be`, // example key
"Content-Type": "application/json",
},
body: JSON.parse(jsonRequestBodyPayLoad),
});
res.json(await response.json().truework_direct.targets[0].truework_direct_session_token);
});
```
Pass the `production` environment value when instantiating the Credentials session. If the environment value is omitted, the library will default to `production`.
```html {6,8}
```
## Additional features
### Callbacks
Callbacks can be configured so that your frontend application can learn about
events occurring inside the Credentials flow.
Tracking data can be attached to the request so that your system can associate the verification with the user.
#### Example of callbacks
```html
```
### Co-branding
Enterprise customers can use Truework Direct co-branding to customize the logo and theme color for each publishable key. Go to your Truework application -> Developer -> Truework.js keys and edit to customize.

## Fallback methods
If the employee doesn't remember their payroll credentials or is unable to login to their payroll account, Truework.js
can be configured to kickstart a verification automatically via [Smart Outreach](https://www.truework.com/products/smart-outreach).
The setting to toggle the fallback method on or off can be set when your production access is granted.
# Truework.js library reference
The Truework.js JavaScript library allows Truework Direct to be embedded directly into your frontend application.
## `Truework.credentials.init(config)`
Initializes the Truework Direct widget. Accepts one required argument, a `config` object. Returns a `Truework.credentials` object
```html
...
```
### `config` object
Publishable key that provides the configuration of this instance of the
Truework Direct widget.
Applicant-specific token referencing the Truework Direct session created
using the backend API.
Environment the session should be initialized in, one of: | Value | Enum
object property | Description | | ------------ |
--------------------------------------|
------------------------------------------------------ | | `production` |
`Truework.credentials.Env.production` | For production publishable keys
(`tw_pk_`), and session tokens created by api.truework.com | | `sandbox` |
`Truework.credentials.Env.sandbox` | For test publishable keys
(`tw_pk_test_`), and session tokens created by api.truework-sandbox.com |
### `Truework.credentials` object
Represents an initialized instance of the Truework Direct widget. This object has a number of methods to control the widget and subscribe to widget events.
```javascript
var credentials = Truework.credentials.init(...);
//...
credentials.onOpen(function () { console.log("The widget is open!"); })
credentials.onClose(function () { console.log("The widget is closed."); })
credentials.onSuccess(function () { console.log("The widget succeeded!"); })
credentials.onError(function (e) { console.log("The widget encountered an error.", e); })
credentials.open();
// some other application logic here...
credentials.close()
```
#### `Truework.credentials.open()`
Opens the widget modal window over the current page.
#### `Truework.credentials.close()`
Closes the widget modal window.
#### `Truework.credentials.onOpen(fn)`
Registers a callback function to be called after the modal window is opened.
#### `Truework.credentials.onClose(fn)`
Registers a callback function to be called after the modal window is closed.
#### `Truework.credentials.onSuccess(fn)`
Registers a callback function to be called after valid user credentials have successfully been collected. This does not necessarily mean the verification has completed.
#### `Truework.credentials.onError(fn)`
Registers a callback function that accepts an `ErrorCode` enum value, to be called after an error occurs.
## Error handling
`Truework.credentials.onError` callbacks will be called when the following events occur:
- Any API errors coming from our API
- Any handled/unhandled errors from our credentials partners
- Any Truework.js internal errors (e.g. session creation, react errors, etc)
There are two types of Truework Direct errors:
- **Critical errors**: where the widget closes, and then the `onError` callbacks are called.
- **Errors**: where the widget remains open while the `onError` callbacks are called.
The `ErrorCode` enum value passed to the callback obscures the root cause and details of the error (preventing PII exposure) while enabling integrators to handle errors as gracefully as possible.
| Value | Enum object property | Description | | ----- |
----------------------------------------- |
--------------------------------------------- | | 0 |
`Truework.credentials.ErrorCode.Critical` | Critical error | | 1 |
`Truework.credentials.ErrorCode.Error` | Error |
For example:
```javascript
credentials.onError(function (e) {
if (e.code === Truework.credentials.ErrorCode.Critical) {
console.log("A critical Truework Direct error occurred");
// do something
}
});
```
## Browser support
We do our best to support all recent versions of major browsers.
For the sake of security and providing the best experience to the majority of
customers, we do not support browsers that are no longer receiving security
updates and represent a small minority of traffic.
- We support the latest three versions of the following desktop and mobile browsers: Chrome, Firefox, Safari, and Edge.
- Internet Explorer 11 (IE11) support ended on May 15, 2022.
Visit [our Help
Center](https://help.truework.com/hc/en-us/articles/5549968612759-Supported-Internet-Browsers)
for more information.
# Instant
[Truework Instant](https://www.truework.com/products/instant) returns income and employment verification results for over 40 million employees within seconds, all while maintaining consumer privacy and consent.
Using Instant in your workflow creates an efficient mechanism for verifying a consumer’s income and employment, in real time, through our API partnership network that includes dozens of the biggest payroll providers and hundreds of employers. Verifications are submitted by sending the appropriate employee information and authorization through Truework’s verification API. Once a verification is submitted, Truework automatically queries our Instant data network and can immediately return up to three years of income and employment data along with a standardized report. Every report returned is [Fannie Mae Day 1 Certainty (D1C)](https://help.truework.com/hc/en-us/articles/4410768782999-What-is-Day-1-Certainty-and-how-do-I-know-if-my-Truework-request-is-eligible-) eligible.
Truework Instant is speedy, cost-effective, and reduces workflow friction for use cases, such as:
- Pre-approvals
- Auto lending
- Consumer lending
- Credit card
- Other price or time sensitive applications
Getting started on your implementation is quick, easy, and, best of all, self-serve! All you need to do is [create a Truework Account](https://app.truework.com/requester/signup), and [generate an API key](/docs/api-reference/authentication) to use the [Truework Sandbox](/docs/api-reference/sandbox). When you are ready to move to Production simply reach out to implementations@truework.com. Now, let’s get started!
As a best practice, create an API service account (e.g.
`truework@yourcompany.com`) for your organization to manage your integration
from one central dashboard.
## How to implement
Integrating with Truework Instant is quick and easy, only requiring a few steps to send out your first verification! As a reminder, you will need to [create a Truework Account](https://app.truework.com/requester/signup), and [generate an API key](/docs/api-reference/authentication) for the [Truework Sandbox](/docs/api-reference/sandbox) in order to begin development.
There are **three steps** to implement Truework Instant:
### Step 1: Create an employer search order
To start, you'll need to create an [employer search order](/docs/api-reference/versions/2023-10-30/create-new-order-employer-search-verification). This will conduct a synchronous search of all our instantly available data. You may choose to add parameters to customize your request and choose different specifications and/or filters related to Automated Underwriting System (AUS) eligibility or relevant employments (e.g. current employers, previous employers, etc.)
### Step 2: Check your results
When the request comes back from the employer search order endpoint, it will have any results that were found right in the response.
- With Truework Instant, there are only two outcomes – `completed` or `canceled`. If the request is canceled, it means there was not a hit on our Instant network, and you will not be charged for the call. If there was a confirmed hit on the consumer identity, then one or more reports will be returned back to you.
- If the request is canceled, you may opt to move to [Truework Credentials](https://www.truework.com/products/credentials), [Truework Documents](https://www.truework.com/products/documents), or [Truework Smart Outreach](https://www.truework.com/products/smart-outreach) to complete the verification.
_Note: Both Credentials and Smart Outreach require you to provide an employer to Truework to submit the request._
Truework Instant may return multiple reports for a single request if there
are multiple matches on our network.
### Fannie Mae Day 1 Certainty
On eligible reports, the Truework Instant network includes a `du_reference_id`. If you are interested in taking advantage of D1C, submit the `du_reference_id` to Fannie Mae’s Desktop Underwriter system to get collateral rep and warranty relief, which provides the lender with information about eligibility for relief from reps and warranties related to property value, reducing a lender's risk of repurchase due to collateral-related defects.
## Conclusion
That’s it! You’re ready to implement Truework Instant to power your workflows. Head over to the [Truework Sandbox](/docs/api-reference/sandbox) and get started! With these tips you should be able to get up and running in less than a day.
Need some help? Not a problem, our team is here to help: [Get help](/docs/help).
# Credentials
[Truework Credentials](https://www.truework.com/products/credentials) lets verifiers customize the consumer experience and verify income and employment for almost any US employer, all while increasing trust, accelerating transactions and improving the verification experience with access to source-of-truth payroll data.
Using Credentials in your workflow provides a variety of benefits, including faster turnaround times, increased conversions and the ability to verify more consumers – 85% of the US workforce, including gig-economy and other non-W2 workers. Verifications are submitted by sending the appropriate employee / employer information and authorization through an embedded Truework.js widget via [Truework Direct](/docs/guides/truework-direct/getting-started) or through an email-based workflow created via the [verification API](/docs/guides/api/getting-started). After confirming authorization, consumers can directly log into their payroll provider(s). Once there is a successful connection, employment and income data is shared directly from the payroll provider to Truework, where it is automatically checked for quality and accuracy. The data is then transformed and standardized into a Truework verification report, compliant with the [Fannie Mae's 1005 form](https://singlefamily.fanniemae.com/media/13861/display).
Truework Credentials extends verification coverage beyond the [Instant](https://www.truework.com/products/instant) network providing verifications within minutes without the added cost or turn-around time associated with [Smart Outreach](https://www.truework.com/products/smart-outreach) (manual) verifications for use cases, such as:
- Mortgage
- Auto loans
- Tenant screening
- Background checks
- Consumer lending
Getting started on your implementation is quick, easy, and, best of all, self-serve! All you need to do is [create a Truework Account](https://app.truework.com/requester/signup), and [generate an API key](/docs/api-reference/authentication) to use the [Truework Sandbox](/docs/api-reference/sandbox). When you are ready to move to Production simply reach out to implementations@truework.com. Now, let’s get started!
As a best practice, create an API service account (e.g.
`truework@yourcompany.com`) for your organization to manage your integration
from one central dashboard.
## Choosing a Credentials integration method
Depending on your needs you may choose to integrate Credentials directly into your frontend application using [Truework.js](/docs/guides/truework-direct/getting-started), or use the [target employer order API](/docs/guides/api/getting-started) to trigger the Credentials workflow via an email to the consumer. Both options allow you to leverage Truework’s powerful consumer-driven verification capabilities. Below is some guidance to ensure you pick the right method to maximize conversion based on your workflow.
### Truework.js
Truework.js allows you to embed a consumer-driven verification workflow directly into your consumer-facing frontend application. If you have the ability to do so, using this approach is recommended as it causes less friction for the consumer, and results in higher conversion.
### Verification API
The verification API allows you to integrate Credentials into a workflow that doesn't have any consumer-facing component, by automating the process of emailing verification requests to the consumer, and making the results available via our API. Consumers receive an initial email to complete their verification upon creation, as well as reminders at a periodic cadence. We’ll send an email reminder every 3 days, as well as the day before the request expires.
You can also can leverage Credentials via the [Truework Web
App](https://app.truework.com/) with no development work required.
## How to implement Credentials with Truework Direct with the Truework.js widget
A detailed guide on how to integrate Truework.js into your frontend application can be found [here](/docs/guides/truework-direct/getting-started)
### Truework.js co-branding (enterprise only)
The Truework.js widget supports co-branding with custom logos and theme colors for each Publishable Key. To customize, navigate to your [developer settings](https://app.truework.com/requester/developer-settings) page, scroll down to the Truework.js section, and modify the co-branding settings on the publishable key you created in the linked guide.
## How to implement Credentials with Truework’s verification API
Integrating with the [verification API](/docs/guides/api/getting-started) allows you to easily integrate the Truework Credentials into your existing workflow by automating the process of emailing verification requests to the consumer.
There are **three steps** to sending a request to the verification API:
### Step 1: Create a target employer order
To create a [target employer order](/docs/api-reference/versions/2023-10-30/create-new-target-employer-verification) with the API, you will need to make a POST request to the `/orders/target-employer` endpoint with `credentials` included in `allowed_verification_methods` under the `request_config` attribute. Make note of the `id` field that is returned from this endpoint, you'll need it to retrieve the results of the order.
### Step 2: Consumer completes verification via Credentials email
Next, the consumer will receive an email requesting that they complete their verification via Credentials. They will need to click the link contained within, and provide their payroll details.
### Step 3: Retrieve your results
Once the consumer has completed the Credentials flow, you can retrieve the order using the ID from step 1 by making a GET request to `/orders/{id}`. The order returned will have a verification request that contains a report of the information we gathered from the consumer's payroll system.
You can also configure a [webhook](/docs/api-reference/webhooks) to be notified when the order is complete, and results are available.
### Email co-branding (enterprise only)
You can customize the email sent to consumers to show your company’s logo, name in the “From” field and support text. To customize, [login to Truework](https://app.truework.com/login) and navigate to Team > Team Settings > Company Co-branding and Email Customization to set up the feature.
## Conclusion
That’s it! You’re ready to implement Truework Credentials in your verification workflows.
Need some help? Not a problem, our team is here to help: [Get help](/docs/help).
# Documents
Truework Documents is currently available in **beta only** and the API
documentation is not yet publicly available. To see if your organization
qualifies, [schedule a demo](https://www.truework.com/request-demo) to get
the conversation started.
[Truework Documents](https://www.truework.com/products/documents) allows verifiers to save time and reduce fraud by automatically converting income documents into structured data and reports.
Using Truework Documents in your workflow allows you to easily catch suspicious documents. If a consumer cannot be verified as part of [Truework Instant](https://www.truework.com/products/instant) or [Truework Credentials](https://www.truework.com/products/credentials), Truework Documents can parse a consumer’s income documents for automated income calculations and decisions.
Truework Documents is cost effective, reduces risk of fraud, and allows you to combine multiple methods for use cases, such as:
- Tenant screening
- Auto lending
- Consumer lending
- Credit card
# Smart Outreach
[Truework Smart Outreach](https://www.truework.com/products/smart-outreach) can verify income and employment for 95% of consumers in the US by leveraging our intelligent routing system, ensuring the fastest turnaround times possible, even for hard-to-reach employers, with half of all requests complete in less than 24 hours.
Using Smart Outreach saves verifiers up to an hour of time for every non-instant verification, all while ensuring comprehensive fraud prevention. Powered by a growing database of over 150,000 employers, each verification is automatically directed to the fastest route possible based on historical completion data from millions of verifications. If a request cannot be automated, hands on support is provided to handle the verification through completion. Each verification goes through a comprehensive quality control process to ensure accuracy, and if not completed, your team will never be charged for the request.
While Truework Smart Outreach covers verifications beyond the [Instant](https://www.truework.com/products/instant) and [Credentials](https://www.truework.com/products/credentials) networks, it is recommended to use all three methods in your workflow to provide the best end-to-end coverage for use cases, such as:
- Mortgage
- Auto loans
- Tenant screening
- Background checks
- Consumer lending
Getting started on your implementation is quick, easy, and, best of all, self-serve! All you need to do is [create a Truework Account](https://app.truework.com/requester/signup), and [generate an API key](/docs/api-reference/authentication) to use the [Truework Sandbox](/docs/api-reference/sandbox). When you are ready to move to Production simply reach out to implementations@truework.com. Now, let’s get started!
As a best practice, create an API service account (e.g.
`truework@yourcompany.com`) for your organization to manage your integration
from one central dashboard.
## How to implement
Integrating with Truework Smart Outreach is quick and easy, only requiring a few steps to send out your first verification! As a reminder, you will need to [create a Truework Account](https://app.truework.com/requester/signup), and [generate an API key](/docs/api-reference/authentication) for the [Truework Sandbox](/docs/api-reference/sandbox) in order to begin development.
There are **two steps** required to initialize Smart Outreach:
### Step 1: Create an order
Create an order using Smart Outreach. To do so, simply create a [target employer order](/docs/api-reference/versions/2023-10-30/create-new-target-employer-verification), and use the `request_config` field to enable the Smart Outreach verification method.
### Step 2: Obtain results
Obtain the results of the request by listening for an [`order.completed` webhook](/docs/api-reference/webhooks/events/order-completed) indicating that the request has reached a completed state, and then retrieve the order to view the reports.
[//]: # (FIXME) 90% of verifications executed through Smart Outreach get
completed within 3 days or less, with 50% completed within 24 hours.
## Webhooks
[Webhooks](/docs/api-reference/webhooks) are generated when requests transition between different states. Smart Outreach requests may generate one of four webhooks, corresponding to the three possible terminal states, and the `processing` state:
- `processing` (verification is currently being worked on)
- `action-required` (verification requires additional information to continue processing)
- `completed` (verification was successfully completed)
- `canceled` (verification was unable to be completed)
Smart Outreach requests can go through the following state transition flows:
- `processing` to `completed`
- `processing` to `canceled`
- `processing` to `action-required`, then to `completed` or `canceled`
In the case of `action-required`, provide Truework with the additional information needed via the [dashboard](https://app.truework.com/) to complete the verification. Action required states don’t occur often, but when they do it’s because additional information is needed regarding the employer, such as franchise or branch location.
## Terminal states
Within the Smart Outreach workflow, there are two terminal states that may occur: `completed` or `canceled`.
## Conclusion
That’s it! You’re ready to implement Truework Smart Outreach to power your workflows. Head over to the [Truework Sandbox](/docs/api-reference/sandbox) and get started! With these tips you should be able to get up and running in less than a day.
Need some help? Not a problem, our team is here to help: [Get help](/docs/help).
# API reference
The Truework API is a JSON REST API that enables verifiers to quickly and programmatically order income and employment verifications and retrieve verification reports from Truework.
This reference guide provides detailed information about the Truework API, including the available endpoints, request and response formats, authentication, and other considerations. The guide is organized into the following sections:
- **Using the API**: An overview of key aspects of the API, including authentication, versioning, and testing.
- **API reference**: Detailed information about each API endpoint, including the request and response formats, query parameters, and examples.
- **Previous API versions**: Detailed information about previous versions of the Truework API.
## API Explorer
The API Explorer allows you to interact with the Truework API directly from your browser. You can use it to explore available endpoints, view request and response structures, and submit test API requests.
You can access the API Explorer below or by clicking the "Try It" button on any endpoint reference page.
Try the Truework API from the comfort of your browser.
## Feedback
We welcome your feedback at implementations@truework.com. Please let us know about any errors you discover in this guide, or anything that would make this guide better.
# Authentication
Truework authenticates requests to our API using API keys. If an API key is not included with a request or the API key has been revoked, the request will return an error.
API keys can be used to create verification requests on your behalf, and to
view the results of completed verifications. As such, they should be kept
secret, and should not be checked into version control. If you suspect an
API key has been published or compromised, you should revoke that API key
and create a new one.
## API key prefixes
Truework API keys begin with a mnemonic prefix to help you identify the purpose of a given key, and to avoid confusion between sandbox and production environments. The key prefixes are as follows:
| Environment | API key (secret key) prefix | Publishable key (Truework.js key) prefix |
| ----------- | --------------------------- | ---------------------------------------- |
| Production | `tw_sk_` | `tw_pk_` |
| Sandbox | `tw_sk_test_` | `tw_pk_test_` |
## Bearer tokens
The Truework API expects users to pass their API keys as bearer tokens ([RFC 6750](https://datatracker.ietf.org/doc/html/rfc6750#section-2.1)) to authenticate requests. The API key should be included in the Authorization header of the request, prefixed with the string "Bearer" and a space. For example, to correctly authenticate a request using the API key `tw_sk_test_e508eb797edb95ade85284bcb54dd49ed45db1be`, the HTTP request must contain the following header:
```txt
Authorization: Bearer tw_sk_test_e508eb797edb95ade85284bcb54dd49ed45db1be
```
## Creating an API key
To create an API key, navigate to your [developer settings page](https://app.truework.com/requester/developer-settings).
Under the "API" header scroll down to the "Production" card, and expand the API key section by clicking the "Edit" button. Then, optionally enter a description for the key, and click "Generate". The API key you created will appear in the card above. It will be a urlsafe string that begins with the prefix `tw_sk_`.

## Revoking an API key
To revoke an API Key, simply click the "Revoke" button next to the key you wish to revoke. Make sure your key is not in use before revoking it as any request using the key will return errors once it is revoked. **There is no way to undo this action.**
## Sandbox API keys
To create or revoke an API key for the sandbox environment, find the "Sandbox" card and follow the above instructions. Sandbox keys will have the prefix `tw_sk_test_` to differentiate them from production keys.
## How API keys are generated
API Keys are generated using Python's built-in [secrets](https://docs.python.org/3/library/secrets.html) library, which ensures cryptographic randomness of the produced bytes used in the API key. The number of bytes used in generating the API key is guaranteed to be at least 32 random bytes, though this number may increase without notice in the future.
# API versioning
The current version of the Truework API is
[2023-10-30](/docs/api-reference/versions/2023-10-30).
The API version you specify controls the API and webhook behavior, request schemas, and response schemas. When a breaking change is introduced to the Truework API, a new dated version is released. To avoid breaking your code, we don’t change your version until you’re ready to upgrade.
All Truework API keys are provisioned with a "pinned" API version, which is set to the latest version available at the time the API key was created. This becomes your default API version. To override, provide an HTTP `Accept` header with a another _valid_ API version.
```shell
curl 'https://api.truework.com/orders/ \
-X GET \
-H 'Accept: application/json; version=2023-10-30'
```
The version passed via the `Accept` header must be greater than or equal to your API key version. Downgrading is not permitted, and will result in an HTTP 406 response.
## Adjusting pinned API key version
To view or upgrade the pinned versions of your API key, head to your [developer settings page](https://app.truework.com/requester/developer-settings) and look for Production and Sandbox API keys.
Once an API key's pinned version has been upgraded, it _cannot_ be downgraded. If a downgrade is essential, please contact implementations@truework.com.
## Backwards-compatible changes
Truework will not make a backwards incompatible change on an existing version, but will often make backwards compatible changes. All clients should be ready to handle backwards compatible changes. Truework considers the following changes to be backwards-compatible:
- Adding new API resources.
- Adding new optional request parameters to existing API methods.
- Adding new properties to existing API responses.
- Changing the order of properties in existing API responses.
- Changing the length or format of opaque strings, such as object IDs, error messages, and other human-readable strings.
- This includes adding or removing fixed prefixes.
- You can safely assume object IDs we generate will never exceed 255 characters, but you should be able to handle IDs of up to that length. If for example you’re using MySQL, you should store IDs in a `VARCHAR(255) COLLATE utf8_bin column` (the `COLLATE` configuration ensures case-sensitivity in lookups).
- Adding new event types.
Your webhook listener should gracefully handle unfamiliar event types.
# Current API version (2023-10-30)
This is the latest version of the Truework API.
The API response resource hierarchy has been revised such that orders will be introduced as the highest-level resource, acting as a container for Verifications.
Verification management (create, read, cancel, reverify, etc.) will move from the verification top-level resource (`/verification-requests`) to the order top-level resource (`/orders`). Verification reports will have their own top-level resource (`/reports`) for read requests.
Verification _creation_ will be split into two modes: one for handling employer search requests (no target company), one for handling target company requests. The verification response objects for each mode will be nested inside of a newly created order.
## Income analytics
Income analytics is a collection of data points derived from verified current and historical income data that allows lenders to make more precise underwriting and pricing decisions. This feature is available for endpoints that have an `include_income_analytics` query field on the request object.
## Unverified Information and report annotations
Unverified information represents data that has been added by a verifier or applicant to supplement a verification, but has not been verified. If this information is added to a verification with reports, the information is stored as report annotations on the report. This information is now available for endpoints that have an `include_report_annotations` query field in the request object.
The order top-level resource will have 4 different “modes”, each representing a different endpoint: `employer-search`, `target-employer`, `truework-direct`, and `reverification`.
## `employer-search` order mode
- New endpoint: `/orders/employer-search`
- Supersedes verification creation requests to `/verification-requests` (i.e. “Create a Verification”) and has the following attributes:
- No target company.
- Is executed synchronously (results will come back from the POST request).
- `instant` is the only verification method.
- `date_of_birth` is a required attribute for targets.
- Filters employers by one of the following: `all-employers`, `current-employer`, `previous-employers` via a config field on the request.
- Returns one verification resource for each employer found. If no employers are found, returns zero verification resources.
## `target-employer` order mode
- New endpoint: `/orders/target-employer`
- Supersedes verification creation requests to `/verification-requests` (i.e. “Create a Verification”) and has the following attributes:
- A target company is required (i.e. the equivalent of `employer-filter = target-company` on the existing endpoint).
- Is executed asynchronously (you will be notified via webhook when results are available).
- Activates specific verification methods (i.e. `instant`, `credentials`, etc.) via a config field on the request.
- Returns one verification resource.
## `reverification` order mode
- New endpoint: `/orders/reverification`
- Supersedes requests to existing `/verification-requests/{verification_request_id}/reverify` (i.e. “Reverify a Verification”) endpoint.
- Very similar to existing reverification functionality.
- Returns a verification resource on a new order object (matches the existing order response schema with minor changes).
## `truework-direct` order mode
- New endpoint: `/orders/truework-direct`
- Creates an order and a Truework Direct session for teams with Truework Direct enabled.
- Supersedes requests to existing `/credentials/session` (i.e. "Create a Credentials Session") endpoint for teams without Truework Direct enabled.
## Endpoint modifications and replacements
- `/orders/{order_id}/cancel`
- Cancels all verifications associated with an order.
- Supersedes `/verification-requests/{verification_request_id}/cancel`
- `/reports/{verification_report_id}`
- Detail endpoint for reading reports.
- Supersedes `/verification-requests/{verification_request_id}/reports/{verification_report_id}`
- `/orders/{order_id}`
- Detail endpoint for reading orders.
- Supersedes `/verification-requests/{verification_request_id}`
- `/orders`
- List endpoint for reading all orders.
- Supersedes `/verification-requests`
### Verification resources have the following changes for all endpoints
- The `price` field has been removed.
- The `applicant_documents` field has been added to represent applicant-uploaded information.
- The `unverified_information` field is now available for endpoints that have an `include_report_annotations` query field on the request object.
### Verification report resources have the following changes for all endpoints
- The `pricing_tier` field has been replaced by `completed_by_method`.
- The `pricing_tier_detail` field has been replaced by `completed_by_source`.
- The `du_reference_id` and `d1c_eligible` fields have been replaced by `eligibilities`.
- The `applicant_documents` field has been added to represent applicant-uploaded information.
- The `annotations` field is now available for endpoints that have an `include_report_annotations` query field in the request object.
- The `income_analytics` field is now available for endpoints that have an `include_income_analytics` query field on the request object.
# Webhooks
Webhooks can be used to act on certain events that occur while Truework is processing your verifications. Once configured, Truework will make a POST request to a specified HTTPS endpoint to notify you when those events occur.
As verifications get processed, they pass through a number of states. Each time a state transition occurs, Truework can generate a webhook to notify you of the new state. This can be used to trigger any processing that depends on the verification having reached a certain state.
There is a limit to ten (10) webhooks total. Webhook handlers should be idempotent as is possible for us send the same webhook event multiple times.
We will retry failed webhooks periodically over a period of 48 hours. You will receive notifications by email for any webhooks that fail to send.
## Creating a webhook
To create webhook, navigate to your [developer settings page](https://app.truework.com/requester/developer-settings).
Under the "API " header find the "Production" card, and expand the webhook section by clicking the "Edit"
button. Then, select the desired events from the subscriptions dropdown, enter the URL where the webhook should be sent, and optionally a description to differentiate this webhook from others. Click "Create" to configure the webhook.
## Webhook subscriptions
Webhooks support subscribing to multiple event types. You can add and remove subscriptions in the webhooks panel, above the creation form.
Your webhook handler should ignore any events that it doesn't know how to
handle, but still respond with an HTTP 200, before using this functionality.
Otherwise adding a subscription may cause errors, webhook retries, and/or
failed webhook notifications.
### Subscription versioning
Subscriptions are made to specific versions of each event. The version of a subscription can be upgraded, but cannot be downgraded. Additionally, new subscriptions may only be made to the latest version. The only field that is sure to be consistent across versions is the top-level version field.
## Deleting a webhook
To delete a webhook, simply press the "Delete" button next to the webhook you wish to delete in the [developer settings page](https://app.truework.com/requester/developer-settings). Ensure any webhook you delete is not in use, as you can create a new webhook with the same URL, but the token value will differ.
## Sandbox webhooks
To create or delete webhooks in the sandbox environment, find the "Sandbox" card and follow the above instructions. You
can use a webhook logger like [Webhook.site](https://webhook.site/) to inspect the webhook payload.
## Webhook events
You can find a current list of webhook events and their payloads in the [API reference](/docs/api-reference/webhooks/events).
# Webhook security
## Webhook authentication
Each webhook you create is associated with an authentication token, which can
be found in the webhook settings. This token is included in all requests made
by that webhook, and can be used to authenticate that the webhook originated
from your Truework account. You should check the `X-Truework-Token` header
included with each webhook request and reject any request whose token does not
match the corresponding webhook token.
## Webhook source IP addresses
If your environment requires external traffic sources to be allowlisted in a
firewall or other network access control device, you can allowlist the
IP addresses below to further ensure that webhooks you receive are
originating from Truework.
These addresses are subject to change. Truework will make a best effort to
communicate changes to these addresses ahead of time.
### Production
| Webhook source IP addresses |
| --------------------------- |
| 18.218.101.165 |
| 3.133.214.186 |
| 3.23.196.239 |
### Sandbox
| Webhook source IP addresses |
| --------------------------- |
| 3.22.163.100 |
# Test environment (Sandbox)
The Truework Sandbox is a test environment intended to replicate most of the behavior of the Production environment, allowing you to test your integration without affecting live data, accessing private data, or incurring costs.
The base URL for the Truework Sandbox is `https://api.truework-sandbox.com`. The endpoints detailed in [API Reference](/docs/api-reference) are available in both the sandbox environment and the production environment.
The sandbox environment will only accept requests with test SSNs
corresponding to [defined test cases](./sandbox-test-cases). Requests with
any other SSNs will not be accepted in the sandbox environment.
## Questions about testing your integration?
Our team is here to help: [Get help](/docs/help).
# Sandbox test cases
Truework provides a number of fixture references, to help develop and test customized loan application scenarios, specific to your business needs. While some fixture reference SSNs are Truework specific, we also support several SSNs that are also supported by [Fannie Mae](https://www.fanniemae.com/). (**Note**: A DU Reference ID will not be returned, but you can use the Fannie Mae associated SSNs to test your end-to-end integration to include Truework.)
Test values in the Truework Sandbox are set with the `targets[].social_security_number` field. Test values will always fit within the [Social Security Administration's defined "Invalid" range](https://secure.ssa.gov/poms.nsf/lnx/0110201035).
A verification created in the sandbox that does not use a supported test SSN will return an HTTP 400 error, and will not be completed.
## Terminal states
The terminal state column in the tables below indicates if a test SSN will return a report. If the terminal state is listed as _completed_ a report will be returned. If the terminal state is _canceled_ or _action-required_, a report will not be returned. For example, a verification request for (value 000-00-0004) will result in a completed response with a report for a _Customer Service Representative_.
## Multiple reports
Verification requests may return multiple reports. For example, the _Engineering Manager_ report (value 000-00-0007) contains multiple reports, and can be used to test parsing multiple reports.
# Truework Fixture Reference
[//]: # "/* cSpell:disable */"
| SSN | Terminal state | Test applicant & title | Status | Type | Start date | End date | Paystubs |
| ----------- | --------------- | --------------------------------------------------- | -------- | --------- | ---------- | ---------- | :-------------------: |
| 000-00-0000 | completed | Taylor Curtis - Software Engineer | Active | Full Time | 2019-01-01 | | |
| 000-00-0001 | completed | Sarah Cortez - Program Manager | Inactive | Full Time | 2015-05-01 | 2022-01-01 | |
| 000-00-0002 | completed | Jerome Fischer - Accountant | On Leave | Part Time | 2017-02-03 | |
| 000-00-0003 | completed | Kyle Baker - Product Manager | Active | Full Time | 2022-01-01 | | |
| 000-00-0004 | completed | Brianna Hernandez - Customer Service Representative | Active | Part Time | 2021-05-19 | |
| 000-00-0005 | completed | Diane Parker - Account Executive | Inactive | Full Time | 2019-03-01 | 2020-12-28 |
| 000-00-0006 | completed | Olivia Dunham - Recruiter | Inactive | Full Time | 2018-03-01 | 2021-03-10 |
| 000-00-0007 | completed | Aiden Henderson - Engineering Manager [1/2 Reports] | Active | Full Time | 2022-01-01 | | |
| 000-00-0007 | completed | Aiden Henderson - Engineering Manager [2/2 Reports] | Inactive | Full Time | 2018-03-01 | 2021-12-01 | |
| 000-01-0000 | canceled | N/A | N/A | N/A | N/A | N/A | N/A |
| 000-03-0000 | action-required | N/A | N/A | N/A | N/A | N/A | N/A |
[//]: # "/* cSpell:enable */"
# Truework.js Fixture Reference
[//]: # "/* cSpell:disable */"
| SSN | Terminal state | Test applicant & title | Status | Type | Start date | End date | Paystubs | Permits successful login |
| ----------- | -------------- | --------------------------------- | ------ | --------- | ---------- | -------- | -------- | ------------------------ |
| 000-20-0000 | completed | Taylor Curtis - Software Engineer | Active | Full Time | 03-16-2020 | | | |
| 000-21-0000 | canceled | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
[//]: # "/* cSpell:enable */"
# Fannie Mae Fixture Reference
[//]: # "/* cSpell:disable */"
| SSN | Terminal state | Test applicant & title | Status | Type | Start date | End date | Paystubs |
| ----------- | -------------- | ---------------------- | -------- | --------- | ---------- | ---------- | :------: |
| 999-40-5000 | completed | John Homeowner | Active | Full Time | 03-16-2020 | |
| 999-60-3333 | completed | Andy America | Active | Part Time | 01-03-2022 | |
| 999-60-6666 | completed | Suzi Builder | Active | Full Time | 01-03-2023 | |
| 991-91-9991 | completed | Alice Firstimer | Inactive | Full Time | 02-01-2023 | 02-02-2024 |
[//]: # "/* cSpell:enable */"
# Monitoring
Truework provides an API Dashboard that allows developers to monitor the health and performance of their production API integration, and to debug any issues that may arise in production.
The API Dashboard is currently only available in production. It is not yet
available for the sandbox environment.
The API Dashboard provides developers several different types of data to gain insights about the health of their production Truework integration:
- Distribution of successful and failed API request over time, including failure type.
- Distribution of API response latency over time, including p50/90/95/99 latencies.
- Logs of each API request made by the account, including request and response headers and body.
### Accessing the API dashboard
The API Dashboard is available on the [Developer Settings](https://app.truework.com/requester/developer-settings) page of the Truework Web App.
Monitor the health and performance of your production API integration.
## Using the API dashboard
The API Dashboard displays metrics and logs for your production API integration over a customizable timeframe. Users can select from preset relative date ranges, or specify their own custom date ranges.
### API Dashboard metrics

Two graphs are available to visualize API metrics over time:
- Production API Activity: A line chart of the number of API requests per day, broken down by response status: success (HTTP 2xx), client error (HTTP 4xx) or server error (HTTP 5xx).
- Production API Latency: A line chart of API response latency distribution per day, with indicators for the latency of the 50th- (median), 90th-, 95th- and 99th-percentile of all API requests for the day. The latency is calculated as the time between when Truework receives the request and when it sends the response.
### API Dashboard logs

Production API Logs provides a record of all API requests made by the account. The request log can be filtered by date and also by request-specific filters such as HTTP status code, HTTP method, or the request Trace ID or URL. Individual requests can be selected to view all available details about the logged request, including the request and response headers and body.
# Limits
## Rate Limits
The Truework API safeguards itself from bursts of incoming traffic by employing API limits on each endpoint. Users who send many requests in quick succession may begin to see 429 error responses from the API. We recommend retrying requests using exponential backoff after receiving a 429 response.
### Default rate limits
The following table outlines the default rate limits for the Truework API:
| Limit type | Limit |
| ---------- | ---------------------- |
| IP address | 10 requests per second |
| Account | 10 requests per second |
IP address limits apply to all requests made by the same IP address. Account limits apply to all requests made by the same account.
If these limits do not meet your integration requirements, please [contact us](mailto:implementations@truework.com).
# Create a target employer order
```http
POST https://api.truework-sandbox.com/orders/target-employer
Content-Type: application/json
```
Creates a new order and verification. Returns a JSON object representing the newly created order and verification.
A target employer verification is distinct in that it _requires_ a target employer in the request body for processing.
## Verification processing
Target employer verifications are processed _asynchronously_: they will be created and returned in the response body without any [reports](api.yaml/paths/~1verification-requests~1{verification_id}~1report/get). Truework will then send a webhook when the request has finished processing, and the reports can be retrieved.
This creates a verification request with the following attributes:
- Target employer required
- Is processed asynchronously
- Can be any client-defined combination of Instant, Credentials, and Smart Outreach verification methods
- Returns the verification on a new order object
### Controlling Processing with request config
The request config object allows you to configure how you use Truework by selecting only the verification methods and features you need.
## Request Headers
- Accept (required): Specify the content type and version that the API should use. It's recommended to include this to avoid breaking changes.
## Response Body
- 201: Order Request Created.
- 400: Bad Request
- 401: The request's authorization is missing, invalid, or expired
- 403: Forbidden
- 406: An invalid API version was requested
- 429: Too Many Requests
- 451: Frozen SSN
- 500: Internal Server Error
- 501: Not Implemented
## Examples
```shell
curl -X POST https://api.truework-sandbox.com/orders/target-employer \
-H "Accept: application/json" \
-H "Authorization: Bearer " \
-H "Content-Type: application/json" \
-d '{
"permissible_purpose": "child-support",
"target": {
"company": {
"name": "Acme Inc"
},
"first_name": "Jane",
"last_name": "Doe",
"social_security_number": "000-00-0000"
},
"type": "employment-income",
"use_case": "mortgage"
}'
```
```python
import requests
url = "https://api.truework-sandbox.com/orders/target-employer"
payload = {
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
}
headers = {
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
```
```javascript
const url = 'https://api.truework-sandbox.com/orders/target-employer';
const options = {
method: 'POST',
headers: {
Accept: 'application/json',
Authorization: 'Bearer ',
'Content-Type': 'application/json'
},
body: '{"permissible_purpose":"child-support","type":"employment-income","use_case":"mortgage"}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
```
```go
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truework-sandbox.com/orders/target-employer"
payload := strings.NewReader("{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Bearer ")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
```
```ruby
require 'uri'
require 'net/http'
url = URI("https://api.truework-sandbox.com/orders/target-employer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer '
request["Content-Type"] = 'application/json'
request.body = "{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}"
response = http.request(request)
puts response.read_body
```
```java
HttpResponse response = Unirest.post("https://api.truework-sandbox.com/orders/target-employer")
.header("Accept", "application/json")
.header("Authorization", "Bearer ")
.header("Content-Type", "application/json")
.body("{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}")
.asString();
```
```php
request('POST', 'https://api.truework-sandbox.com/orders/target-employer', [
'body' => '{
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
}',
'headers' => [
'Accept' => 'application/json',
'Authorization' => 'Bearer ',
'Content-Type' => 'application/json',
],
]);
echo $response->getBody();
```
```csharp
var client = new RestClient("https://api.truework-sandbox.com/orders/target-employer");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer ");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```
```swift
import Foundation
let headers = [
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
]
let parameters = [
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api.truework-sandbox.com/orders/target-employer")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
```
```shell
curl -X POST https://api.truework-sandbox.com/orders/target-employer \
-H "Accept: application/json" \
-H "Authorization: Bearer " \
-H "Content-Type: application/json" \
-d '{
"permissible_purpose": "child-support",
"target": {
"company": {
"name": "string"
},
"first_name": "string",
"last_name": "string",
"social_security_number": "string"
},
"type": "employment-income",
"use_case": "mortgage"
}'
```
```python
import requests
url = "https://api.truework-sandbox.com/orders/target-employer"
payload = {
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
}
headers = {
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
```
```javascript
const url = 'https://api.truework-sandbox.com/orders/target-employer';
const options = {
method: 'POST',
headers: {
Accept: 'application/json',
Authorization: 'Bearer ',
'Content-Type': 'application/json'
},
body: '{"permissible_purpose":"child-support","type":"employment-income","use_case":"mortgage"}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
```
```go
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truework-sandbox.com/orders/target-employer"
payload := strings.NewReader("{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Bearer ")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
```
```ruby
require 'uri'
require 'net/http'
url = URI("https://api.truework-sandbox.com/orders/target-employer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer '
request["Content-Type"] = 'application/json'
request.body = "{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}"
response = http.request(request)
puts response.read_body
```
```java
HttpResponse response = Unirest.post("https://api.truework-sandbox.com/orders/target-employer")
.header("Accept", "application/json")
.header("Authorization", "Bearer ")
.header("Content-Type", "application/json")
.body("{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}")
.asString();
```
```php
request('POST', 'https://api.truework-sandbox.com/orders/target-employer', [
'body' => '{
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
}',
'headers' => [
'Accept' => 'application/json',
'Authorization' => 'Bearer ',
'Content-Type' => 'application/json',
],
]);
echo $response->getBody();
```
```csharp
var client = new RestClient("https://api.truework-sandbox.com/orders/target-employer");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer ");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```
```swift
import Foundation
let headers = [
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
]
let parameters = [
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api.truework-sandbox.com/orders/target-employer")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
```
```shell
curl -X POST https://api.truework-sandbox.com/orders/target-employer \
-H "Accept: application/json" \
-H "Authorization: Bearer " \
-H "Content-Type: application/json" \
-d '{
"permissible_purpose": "child-support",
"target": {
"company": {
"name": "string"
},
"first_name": "string",
"last_name": "string",
"social_security_number": "string"
},
"type": "employment-income",
"use_case": "mortgage"
}'
```
```python
import requests
url = "https://api.truework-sandbox.com/orders/target-employer"
payload = {
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
}
headers = {
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
```
```javascript
const url = 'https://api.truework-sandbox.com/orders/target-employer';
const options = {
method: 'POST',
headers: {
Accept: 'application/json',
Authorization: 'Bearer ',
'Content-Type': 'application/json'
},
body: '{"permissible_purpose":"child-support","type":"employment-income","use_case":"mortgage"}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
```
```go
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truework-sandbox.com/orders/target-employer"
payload := strings.NewReader("{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Bearer ")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
```
```ruby
require 'uri'
require 'net/http'
url = URI("https://api.truework-sandbox.com/orders/target-employer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer '
request["Content-Type"] = 'application/json'
request.body = "{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}"
response = http.request(request)
puts response.read_body
```
```java
HttpResponse response = Unirest.post("https://api.truework-sandbox.com/orders/target-employer")
.header("Accept", "application/json")
.header("Authorization", "Bearer ")
.header("Content-Type", "application/json")
.body("{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}")
.asString();
```
```php
request('POST', 'https://api.truework-sandbox.com/orders/target-employer', [
'body' => '{
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
}',
'headers' => [
'Accept' => 'application/json',
'Authorization' => 'Bearer ',
'Content-Type' => 'application/json',
],
]);
echo $response->getBody();
```
```csharp
var client = new RestClient("https://api.truework-sandbox.com/orders/target-employer");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer ");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```
```swift
import Foundation
let headers = [
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
]
let parameters = [
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api.truework-sandbox.com/orders/target-employer")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
```
```shell
curl -X POST https://api.truework-sandbox.com/orders/target-employer \
-H "Accept: application/json" \
-H "Authorization: Bearer " \
-H "Content-Type: application/json" \
-d '{
"permissible_purpose": "child-support",
"target": {
"company": {
"name": "string"
},
"first_name": "string",
"last_name": "string",
"social_security_number": "string"
},
"type": "employment-income",
"use_case": "mortgage"
}'
```
```python
import requests
url = "https://api.truework-sandbox.com/orders/target-employer"
payload = {
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
}
headers = {
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
```
```javascript
const url = 'https://api.truework-sandbox.com/orders/target-employer';
const options = {
method: 'POST',
headers: {
Accept: 'application/json',
Authorization: 'Bearer ',
'Content-Type': 'application/json'
},
body: '{"permissible_purpose":"child-support","type":"employment-income","use_case":"mortgage"}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
```
```go
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truework-sandbox.com/orders/target-employer"
payload := strings.NewReader("{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Bearer ")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
```
```ruby
require 'uri'
require 'net/http'
url = URI("https://api.truework-sandbox.com/orders/target-employer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer '
request["Content-Type"] = 'application/json'
request.body = "{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}"
response = http.request(request)
puts response.read_body
```
```java
HttpResponse response = Unirest.post("https://api.truework-sandbox.com/orders/target-employer")
.header("Accept", "application/json")
.header("Authorization", "Bearer ")
.header("Content-Type", "application/json")
.body("{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}")
.asString();
```
```php
request('POST', 'https://api.truework-sandbox.com/orders/target-employer', [
'body' => '{
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
}',
'headers' => [
'Accept' => 'application/json',
'Authorization' => 'Bearer ',
'Content-Type' => 'application/json',
],
]);
echo $response->getBody();
```
```csharp
var client = new RestClient("https://api.truework-sandbox.com/orders/target-employer");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer ");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```
```swift
import Foundation
let headers = [
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
]
let parameters = [
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api.truework-sandbox.com/orders/target-employer")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
```
```shell
curl -X POST https://api.truework-sandbox.com/orders/target-employer \
-H "Accept: application/json" \
-H "Authorization: Bearer " \
-H "Content-Type: application/json" \
-d '{
"permissible_purpose": "child-support",
"target": {
"company": {
"name": "string"
},
"first_name": "string",
"last_name": "string",
"social_security_number": "string"
},
"type": "employment-income",
"use_case": "mortgage"
}'
```
```python
import requests
url = "https://api.truework-sandbox.com/orders/target-employer"
payload = {
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
}
headers = {
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
```
```javascript
const url = 'https://api.truework-sandbox.com/orders/target-employer';
const options = {
method: 'POST',
headers: {
Accept: 'application/json',
Authorization: 'Bearer ',
'Content-Type': 'application/json'
},
body: '{"permissible_purpose":"child-support","type":"employment-income","use_case":"mortgage"}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
```
```go
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truework-sandbox.com/orders/target-employer"
payload := strings.NewReader("{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Bearer ")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
```
```ruby
require 'uri'
require 'net/http'
url = URI("https://api.truework-sandbox.com/orders/target-employer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer '
request["Content-Type"] = 'application/json'
request.body = "{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}"
response = http.request(request)
puts response.read_body
```
```java
HttpResponse response = Unirest.post("https://api.truework-sandbox.com/orders/target-employer")
.header("Accept", "application/json")
.header("Authorization", "Bearer ")
.header("Content-Type", "application/json")
.body("{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}")
.asString();
```
```php
request('POST', 'https://api.truework-sandbox.com/orders/target-employer', [
'body' => '{
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
}',
'headers' => [
'Accept' => 'application/json',
'Authorization' => 'Bearer ',
'Content-Type' => 'application/json',
],
]);
echo $response->getBody();
```
```csharp
var client = new RestClient("https://api.truework-sandbox.com/orders/target-employer");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer ");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```
```swift
import Foundation
let headers = [
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
]
let parameters = [
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api.truework-sandbox.com/orders/target-employer")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
```
```shell
curl -X POST https://api.truework-sandbox.com/orders/target-employer \
-H "Accept: application/json" \
-H "Authorization: Bearer " \
-H "Content-Type: application/json" \
-d '{
"permissible_purpose": "child-support",
"target": {
"company": {
"name": "string"
},
"first_name": "string",
"last_name": "string",
"social_security_number": "string"
},
"type": "employment-income",
"use_case": "mortgage"
}'
```
```python
import requests
url = "https://api.truework-sandbox.com/orders/target-employer"
payload = {
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
}
headers = {
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
```
```javascript
const url = 'https://api.truework-sandbox.com/orders/target-employer';
const options = {
method: 'POST',
headers: {
Accept: 'application/json',
Authorization: 'Bearer ',
'Content-Type': 'application/json'
},
body: '{"permissible_purpose":"child-support","type":"employment-income","use_case":"mortgage"}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
```
```go
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truework-sandbox.com/orders/target-employer"
payload := strings.NewReader("{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Bearer ")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
```
```ruby
require 'uri'
require 'net/http'
url = URI("https://api.truework-sandbox.com/orders/target-employer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer '
request["Content-Type"] = 'application/json'
request.body = "{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}"
response = http.request(request)
puts response.read_body
```
```java
HttpResponse response = Unirest.post("https://api.truework-sandbox.com/orders/target-employer")
.header("Accept", "application/json")
.header("Authorization", "Bearer ")
.header("Content-Type", "application/json")
.body("{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}")
.asString();
```
```php
request('POST', 'https://api.truework-sandbox.com/orders/target-employer', [
'body' => '{
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
}',
'headers' => [
'Accept' => 'application/json',
'Authorization' => 'Bearer ',
'Content-Type' => 'application/json',
],
]);
echo $response->getBody();
```
```csharp
var client = new RestClient("https://api.truework-sandbox.com/orders/target-employer");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer ");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```
```swift
import Foundation
let headers = [
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
]
let parameters = [
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api.truework-sandbox.com/orders/target-employer")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
```
```shell
curl -X POST https://api.truework-sandbox.com/orders/target-employer \
-H "Accept: application/json" \
-H "Authorization: Bearer " \
-H "Content-Type: application/json" \
-d '{
"permissible_purpose": "child-support",
"target": {
"company": {
"name": "string"
},
"first_name": "string",
"last_name": "string",
"social_security_number": "string"
},
"type": "employment-income",
"use_case": "mortgage"
}'
```
```python
import requests
url = "https://api.truework-sandbox.com/orders/target-employer"
payload = {
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
}
headers = {
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
```
```javascript
const url = 'https://api.truework-sandbox.com/orders/target-employer';
const options = {
method: 'POST',
headers: {
Accept: 'application/json',
Authorization: 'Bearer ',
'Content-Type': 'application/json'
},
body: '{"permissible_purpose":"child-support","type":"employment-income","use_case":"mortgage"}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
```
```go
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truework-sandbox.com/orders/target-employer"
payload := strings.NewReader("{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Bearer ")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
```
```ruby
require 'uri'
require 'net/http'
url = URI("https://api.truework-sandbox.com/orders/target-employer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer '
request["Content-Type"] = 'application/json'
request.body = "{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}"
response = http.request(request)
puts response.read_body
```
```java
HttpResponse response = Unirest.post("https://api.truework-sandbox.com/orders/target-employer")
.header("Accept", "application/json")
.header("Authorization", "Bearer ")
.header("Content-Type", "application/json")
.body("{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}")
.asString();
```
```php
request('POST', 'https://api.truework-sandbox.com/orders/target-employer', [
'body' => '{
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
}',
'headers' => [
'Accept' => 'application/json',
'Authorization' => 'Bearer ',
'Content-Type' => 'application/json',
],
]);
echo $response->getBody();
```
```csharp
var client = new RestClient("https://api.truework-sandbox.com/orders/target-employer");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer ");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```
```swift
import Foundation
let headers = [
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
]
let parameters = [
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api.truework-sandbox.com/orders/target-employer")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
```
```shell
curl -X POST https://api.truework-sandbox.com/orders/target-employer \
-H "Accept: application/json" \
-H "Authorization: Bearer " \
-H "Content-Type: application/json" \
-d '{
"permissible_purpose": "child-support",
"target": {
"company": {
"name": "string"
},
"first_name": "string",
"last_name": "string",
"social_security_number": "string"
},
"type": "employment-income",
"use_case": "mortgage"
}'
```
```python
import requests
url = "https://api.truework-sandbox.com/orders/target-employer"
payload = {
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
}
headers = {
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
```
```javascript
const url = 'https://api.truework-sandbox.com/orders/target-employer';
const options = {
method: 'POST',
headers: {
Accept: 'application/json',
Authorization: 'Bearer ',
'Content-Type': 'application/json'
},
body: '{"permissible_purpose":"child-support","type":"employment-income","use_case":"mortgage"}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
```
```go
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truework-sandbox.com/orders/target-employer"
payload := strings.NewReader("{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Bearer ")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
```
```ruby
require 'uri'
require 'net/http'
url = URI("https://api.truework-sandbox.com/orders/target-employer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer '
request["Content-Type"] = 'application/json'
request.body = "{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}"
response = http.request(request)
puts response.read_body
```
```java
HttpResponse response = Unirest.post("https://api.truework-sandbox.com/orders/target-employer")
.header("Accept", "application/json")
.header("Authorization", "Bearer ")
.header("Content-Type", "application/json")
.body("{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}")
.asString();
```
```php
request('POST', 'https://api.truework-sandbox.com/orders/target-employer', [
'body' => '{
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
}',
'headers' => [
'Accept' => 'application/json',
'Authorization' => 'Bearer ',
'Content-Type' => 'application/json',
],
]);
echo $response->getBody();
```
```csharp
var client = new RestClient("https://api.truework-sandbox.com/orders/target-employer");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer ");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```
```swift
import Foundation
let headers = [
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
]
let parameters = [
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api.truework-sandbox.com/orders/target-employer")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
```
```shell
curl -X POST https://api.truework-sandbox.com/orders/target-employer \
-H "Accept: application/json" \
-H "Authorization: Bearer " \
-H "Content-Type: application/json" \
-d '{
"permissible_purpose": "child-support",
"target": {
"company": {
"name": "string"
},
"first_name": "string",
"last_name": "string",
"social_security_number": "string"
},
"type": "employment-income",
"use_case": "mortgage"
}'
```
```python
import requests
url = "https://api.truework-sandbox.com/orders/target-employer"
payload = {
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
}
headers = {
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
```
```javascript
const url = 'https://api.truework-sandbox.com/orders/target-employer';
const options = {
method: 'POST',
headers: {
Accept: 'application/json',
Authorization: 'Bearer ',
'Content-Type': 'application/json'
},
body: '{"permissible_purpose":"child-support","type":"employment-income","use_case":"mortgage"}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
```
```go
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truework-sandbox.com/orders/target-employer"
payload := strings.NewReader("{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Bearer ")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
```
```ruby
require 'uri'
require 'net/http'
url = URI("https://api.truework-sandbox.com/orders/target-employer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer '
request["Content-Type"] = 'application/json'
request.body = "{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}"
response = http.request(request)
puts response.read_body
```
```java
HttpResponse response = Unirest.post("https://api.truework-sandbox.com/orders/target-employer")
.header("Accept", "application/json")
.header("Authorization", "Bearer ")
.header("Content-Type", "application/json")
.body("{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}")
.asString();
```
```php
request('POST', 'https://api.truework-sandbox.com/orders/target-employer', [
'body' => '{
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
}',
'headers' => [
'Accept' => 'application/json',
'Authorization' => 'Bearer ',
'Content-Type' => 'application/json',
],
]);
echo $response->getBody();
```
```csharp
var client = new RestClient("https://api.truework-sandbox.com/orders/target-employer");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer ");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```
```swift
import Foundation
let headers = [
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
]
let parameters = [
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api.truework-sandbox.com/orders/target-employer")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
```
# Create an employer search order
```http
POST https://api.truework-sandbox.com/orders/employer-search
Content-Type: application/json
```
POST requests create both an order and a verification. Returns a JSON object representing the newly created order and verification.
## Verification processing
Employer search verifications are processed _synchronously_: Truework will attempt to process the verification during the initial POST request. If successful, the `201` response will include a `reports` key, which will contain the requested data.
It is recommended to set a timeout on synchronous requests, to account for potential latency when calling our
partners. Synchronous requests generally take only a few seconds to complete, but in rare cases they may take longer.
This creates a verification request with the following attributes:
- No target company
- Is processed synchronously
- Is Instant verification method only
- Filter employers by one of the following: any-employers, current-employers, previous-employers
- Returns the verification on a new order object
## Request Headers
- Accept (required): Specify the content type and version that the API should use. It's recommended to include this to avoid breaking changes.
## Query Parameters
- Fields (optional): Comma-separated names of fields to include in the response. Separate multiple fields with commas, and denote subfields with parentheses. Multiple subfields from the same type can be listed within parentheses. In case of a list, subfields apply to each individual object. If omitted, all fields are included.
- IncludeIncomeAnalytics (optional): Whether to calculate income analytics for the nested reports in each verification.
- IncludeReportAnnotations (optional): Include potentially unverified data in the response, including report annotations and unparsed documents.
## Response Body
- 201: Order and Verification Request Created.
- 400: Bad Request
- 401: The request's authorization is missing, invalid, or expired
- 403: Forbidden
- 406: An invalid API version was requested
- 429: Too Many Requests
- 451: Frozen SSN
- 500: Internal Server Error
- 501: Not Implemented
## Examples
```shell
curl -X POST "https://api.truework-sandbox.com/orders/employer-search?fields=id%2Cverification_requests(id%2Creports(employee(positions(start_date)%2Csocial_security_number)))&include_income_analytics=true&include_report_annotations=true" \
-H "Accept: application/json" \
-H "Authorization: Bearer " \
-H "Content-Type: application/json" \
-d '{
"permissible_purpose": "child-support",
"target": {
"date_of_birth": "1995-08-25",
"first_name": "Jane",
"last_name": "Doe",
"social_security_number": "000-00-0000"
},
"type": "employment-income",
"use_case": "mortgage"
}'
```
```python
import requests
url = "https://api.truework-sandbox.com/orders/employer-search"
querystring = {"fields":"id,verification_requests(id,reports(employee(positions(start_date),social_security_number)))","include_income_analytics":"true","include_report_annotations":"true"}
payload = {
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
}
headers = {
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers, params=querystring)
print(response.json())
```
```javascript
const url = 'https://api.truework-sandbox.com/orders/employer-search?fields=id%2Cverification_requests%28id%2Creports%28employee%28positions%28start_date%29%2Csocial_security_number%29%29%29&include_income_analytics=true&include_report_annotations=true';
const options = {
method: 'POST',
headers: {
Accept: 'application/json',
Authorization: 'Bearer ',
'Content-Type': 'application/json'
},
body: '{"permissible_purpose":"child-support","type":"employment-income","use_case":"mortgage"}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
```
```go
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truework-sandbox.com/orders/employer-search?fields=id%2Cverification_requests%28id%2Creports%28employee%28positions%28start_date%29%2Csocial_security_number%29%29%29&include_income_analytics=true&include_report_annotations=true"
payload := strings.NewReader("{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Bearer ")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
```
```ruby
require 'uri'
require 'net/http'
url = URI("https://api.truework-sandbox.com/orders/employer-search?fields=id%2Cverification_requests%28id%2Creports%28employee%28positions%28start_date%29%2Csocial_security_number%29%29%29&include_income_analytics=true&include_report_annotations=true")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer '
request["Content-Type"] = 'application/json'
request.body = "{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}"
response = http.request(request)
puts response.read_body
```
```java
HttpResponse response = Unirest.post("https://api.truework-sandbox.com/orders/employer-search?fields=id%2Cverification_requests%28id%2Creports%28employee%28positions%28start_date%29%2Csocial_security_number%29%29%29&include_income_analytics=true&include_report_annotations=true")
.header("Accept", "application/json")
.header("Authorization", "Bearer ")
.header("Content-Type", "application/json")
.body("{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}")
.asString();
```
```php
request('POST', 'https://api.truework-sandbox.com/orders/employer-search?fields=id%2Cverification_requests%28id%2Creports%28employee%28positions%28start_date%29%2Csocial_security_number%29%29%29&include_income_analytics=true&include_report_annotations=true', [
'body' => '{
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
}',
'headers' => [
'Accept' => 'application/json',
'Authorization' => 'Bearer ',
'Content-Type' => 'application/json',
],
]);
echo $response->getBody();
```
```csharp
var client = new RestClient("https://api.truework-sandbox.com/orders/employer-search?fields=id%2Cverification_requests%28id%2Creports%28employee%28positions%28start_date%29%2Csocial_security_number%29%29%29&include_income_analytics=true&include_report_annotations=true");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer ");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```
```swift
import Foundation
let headers = [
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
]
let parameters = [
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api.truework-sandbox.com/orders/employer-search?fields=id%2Cverification_requests%28id%2Creports%28employee%28positions%28start_date%29%2Csocial_security_number%29%29%29&include_income_analytics=true&include_report_annotations=true")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
```
```shell
curl -X POST "https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true" \
-H "Accept: application/json" \
-H "Authorization: Bearer " \
-H "Content-Type: application/json" \
-d '{
"permissible_purpose": "child-support",
"target": {
"date_of_birth": "string",
"first_name": "string",
"last_name": "string",
"social_security_number": "string"
},
"type": "employment-income",
"use_case": "mortgage"
}'
```
```python
import requests
url = "https://api.truework-sandbox.com/orders/employer-search"
querystring = {"fields":"string","include_income_analytics":"true"}
payload = {
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
}
headers = {
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers, params=querystring)
print(response.json())
```
```javascript
const url = 'https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true';
const options = {
method: 'POST',
headers: {
Accept: 'application/json',
Authorization: 'Bearer ',
'Content-Type': 'application/json'
},
body: '{"permissible_purpose":"child-support","type":"employment-income","use_case":"mortgage"}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
```
```go
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true"
payload := strings.NewReader("{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Bearer ")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
```
```ruby
require 'uri'
require 'net/http'
url = URI("https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer '
request["Content-Type"] = 'application/json'
request.body = "{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}"
response = http.request(request)
puts response.read_body
```
```java
HttpResponse response = Unirest.post("https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true")
.header("Accept", "application/json")
.header("Authorization", "Bearer ")
.header("Content-Type", "application/json")
.body("{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}")
.asString();
```
```php
request('POST', 'https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true', [
'body' => '{
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
}',
'headers' => [
'Accept' => 'application/json',
'Authorization' => 'Bearer ',
'Content-Type' => 'application/json',
],
]);
echo $response->getBody();
```
```csharp
var client = new RestClient("https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer ");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```
```swift
import Foundation
let headers = [
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
]
let parameters = [
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
```
```shell
curl -X POST "https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true" \
-H "Accept: application/json" \
-H "Authorization: Bearer " \
-H "Content-Type: application/json" \
-d '{
"permissible_purpose": "child-support",
"target": {
"date_of_birth": "string",
"first_name": "string",
"last_name": "string",
"social_security_number": "string"
},
"type": "employment-income",
"use_case": "mortgage"
}'
```
```python
import requests
url = "https://api.truework-sandbox.com/orders/employer-search"
querystring = {"fields":"string","include_income_analytics":"true"}
payload = {
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
}
headers = {
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers, params=querystring)
print(response.json())
```
```javascript
const url = 'https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true';
const options = {
method: 'POST',
headers: {
Accept: 'application/json',
Authorization: 'Bearer ',
'Content-Type': 'application/json'
},
body: '{"permissible_purpose":"child-support","type":"employment-income","use_case":"mortgage"}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
```
```go
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true"
payload := strings.NewReader("{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Bearer ")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
```
```ruby
require 'uri'
require 'net/http'
url = URI("https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer '
request["Content-Type"] = 'application/json'
request.body = "{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}"
response = http.request(request)
puts response.read_body
```
```java
HttpResponse response = Unirest.post("https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true")
.header("Accept", "application/json")
.header("Authorization", "Bearer ")
.header("Content-Type", "application/json")
.body("{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}")
.asString();
```
```php
request('POST', 'https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true', [
'body' => '{
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
}',
'headers' => [
'Accept' => 'application/json',
'Authorization' => 'Bearer ',
'Content-Type' => 'application/json',
],
]);
echo $response->getBody();
```
```csharp
var client = new RestClient("https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer ");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```
```swift
import Foundation
let headers = [
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
]
let parameters = [
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
```
```shell
curl -X POST "https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true" \
-H "Accept: application/json" \
-H "Authorization: Bearer " \
-H "Content-Type: application/json" \
-d '{
"permissible_purpose": "child-support",
"target": {
"date_of_birth": "string",
"first_name": "string",
"last_name": "string",
"social_security_number": "string"
},
"type": "employment-income",
"use_case": "mortgage"
}'
```
```python
import requests
url = "https://api.truework-sandbox.com/orders/employer-search"
querystring = {"fields":"string","include_income_analytics":"true"}
payload = {
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
}
headers = {
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers, params=querystring)
print(response.json())
```
```javascript
const url = 'https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true';
const options = {
method: 'POST',
headers: {
Accept: 'application/json',
Authorization: 'Bearer ',
'Content-Type': 'application/json'
},
body: '{"permissible_purpose":"child-support","type":"employment-income","use_case":"mortgage"}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
```
```go
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true"
payload := strings.NewReader("{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Bearer ")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
```
```ruby
require 'uri'
require 'net/http'
url = URI("https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer '
request["Content-Type"] = 'application/json'
request.body = "{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}"
response = http.request(request)
puts response.read_body
```
```java
HttpResponse response = Unirest.post("https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true")
.header("Accept", "application/json")
.header("Authorization", "Bearer ")
.header("Content-Type", "application/json")
.body("{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}")
.asString();
```
```php
request('POST', 'https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true', [
'body' => '{
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
}',
'headers' => [
'Accept' => 'application/json',
'Authorization' => 'Bearer ',
'Content-Type' => 'application/json',
],
]);
echo $response->getBody();
```
```csharp
var client = new RestClient("https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer ");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```
```swift
import Foundation
let headers = [
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
]
let parameters = [
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
```
```shell
curl -X POST "https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true" \
-H "Accept: application/json" \
-H "Authorization: Bearer " \
-H "Content-Type: application/json" \
-d '{
"permissible_purpose": "child-support",
"target": {
"date_of_birth": "string",
"first_name": "string",
"last_name": "string",
"social_security_number": "string"
},
"type": "employment-income",
"use_case": "mortgage"
}'
```
```python
import requests
url = "https://api.truework-sandbox.com/orders/employer-search"
querystring = {"fields":"string","include_income_analytics":"true"}
payload = {
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
}
headers = {
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers, params=querystring)
print(response.json())
```
```javascript
const url = 'https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true';
const options = {
method: 'POST',
headers: {
Accept: 'application/json',
Authorization: 'Bearer ',
'Content-Type': 'application/json'
},
body: '{"permissible_purpose":"child-support","type":"employment-income","use_case":"mortgage"}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
```
```go
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true"
payload := strings.NewReader("{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Bearer ")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
```
```ruby
require 'uri'
require 'net/http'
url = URI("https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer '
request["Content-Type"] = 'application/json'
request.body = "{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}"
response = http.request(request)
puts response.read_body
```
```java
HttpResponse response = Unirest.post("https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true")
.header("Accept", "application/json")
.header("Authorization", "Bearer ")
.header("Content-Type", "application/json")
.body("{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}")
.asString();
```
```php
request('POST', 'https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true', [
'body' => '{
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
}',
'headers' => [
'Accept' => 'application/json',
'Authorization' => 'Bearer ',
'Content-Type' => 'application/json',
],
]);
echo $response->getBody();
```
```csharp
var client = new RestClient("https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer ");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```
```swift
import Foundation
let headers = [
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
]
let parameters = [
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
```
```shell
curl -X POST "https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true" \
-H "Accept: application/json" \
-H "Authorization: Bearer " \
-H "Content-Type: application/json" \
-d '{
"permissible_purpose": "child-support",
"target": {
"date_of_birth": "string",
"first_name": "string",
"last_name": "string",
"social_security_number": "string"
},
"type": "employment-income",
"use_case": "mortgage"
}'
```
```python
import requests
url = "https://api.truework-sandbox.com/orders/employer-search"
querystring = {"fields":"string","include_income_analytics":"true"}
payload = {
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
}
headers = {
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers, params=querystring)
print(response.json())
```
```javascript
const url = 'https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true';
const options = {
method: 'POST',
headers: {
Accept: 'application/json',
Authorization: 'Bearer ',
'Content-Type': 'application/json'
},
body: '{"permissible_purpose":"child-support","type":"employment-income","use_case":"mortgage"}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
```
```go
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true"
payload := strings.NewReader("{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Bearer ")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
```
```ruby
require 'uri'
require 'net/http'
url = URI("https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer '
request["Content-Type"] = 'application/json'
request.body = "{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}"
response = http.request(request)
puts response.read_body
```
```java
HttpResponse response = Unirest.post("https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true")
.header("Accept", "application/json")
.header("Authorization", "Bearer ")
.header("Content-Type", "application/json")
.body("{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}")
.asString();
```
```php
request('POST', 'https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true', [
'body' => '{
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
}',
'headers' => [
'Accept' => 'application/json',
'Authorization' => 'Bearer ',
'Content-Type' => 'application/json',
],
]);
echo $response->getBody();
```
```csharp
var client = new RestClient("https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer ");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```
```swift
import Foundation
let headers = [
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
]
let parameters = [
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
```
```shell
curl -X POST "https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true" \
-H "Accept: application/json" \
-H "Authorization: Bearer " \
-H "Content-Type: application/json" \
-d '{
"permissible_purpose": "child-support",
"target": {
"date_of_birth": "string",
"first_name": "string",
"last_name": "string",
"social_security_number": "string"
},
"type": "employment-income",
"use_case": "mortgage"
}'
```
```python
import requests
url = "https://api.truework-sandbox.com/orders/employer-search"
querystring = {"fields":"string","include_income_analytics":"true"}
payload = {
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
}
headers = {
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers, params=querystring)
print(response.json())
```
```javascript
const url = 'https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true';
const options = {
method: 'POST',
headers: {
Accept: 'application/json',
Authorization: 'Bearer ',
'Content-Type': 'application/json'
},
body: '{"permissible_purpose":"child-support","type":"employment-income","use_case":"mortgage"}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
```
```go
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true"
payload := strings.NewReader("{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Bearer ")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
```
```ruby
require 'uri'
require 'net/http'
url = URI("https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer '
request["Content-Type"] = 'application/json'
request.body = "{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}"
response = http.request(request)
puts response.read_body
```
```java
HttpResponse response = Unirest.post("https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true")
.header("Accept", "application/json")
.header("Authorization", "Bearer ")
.header("Content-Type", "application/json")
.body("{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}")
.asString();
```
```php
request('POST', 'https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true', [
'body' => '{
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
}',
'headers' => [
'Accept' => 'application/json',
'Authorization' => 'Bearer ',
'Content-Type' => 'application/json',
],
]);
echo $response->getBody();
```
```csharp
var client = new RestClient("https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer ");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```
```swift
import Foundation
let headers = [
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
]
let parameters = [
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
```
```shell
curl -X POST "https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true" \
-H "Accept: application/json" \
-H "Authorization: Bearer " \
-H "Content-Type: application/json" \
-d '{
"permissible_purpose": "child-support",
"target": {
"date_of_birth": "string",
"first_name": "string",
"last_name": "string",
"social_security_number": "string"
},
"type": "employment-income",
"use_case": "mortgage"
}'
```
```python
import requests
url = "https://api.truework-sandbox.com/orders/employer-search"
querystring = {"fields":"string","include_income_analytics":"true"}
payload = {
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
}
headers = {
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers, params=querystring)
print(response.json())
```
```javascript
const url = 'https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true';
const options = {
method: 'POST',
headers: {
Accept: 'application/json',
Authorization: 'Bearer ',
'Content-Type': 'application/json'
},
body: '{"permissible_purpose":"child-support","type":"employment-income","use_case":"mortgage"}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
```
```go
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true"
payload := strings.NewReader("{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Bearer ")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
```
```ruby
require 'uri'
require 'net/http'
url = URI("https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer '
request["Content-Type"] = 'application/json'
request.body = "{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}"
response = http.request(request)
puts response.read_body
```
```java
HttpResponse response = Unirest.post("https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true")
.header("Accept", "application/json")
.header("Authorization", "Bearer ")
.header("Content-Type", "application/json")
.body("{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}")
.asString();
```
```php
request('POST', 'https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true', [
'body' => '{
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
}',
'headers' => [
'Accept' => 'application/json',
'Authorization' => 'Bearer ',
'Content-Type' => 'application/json',
],
]);
echo $response->getBody();
```
```csharp
var client = new RestClient("https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer ");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```
```swift
import Foundation
let headers = [
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
]
let parameters = [
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
```
```shell
curl -X POST "https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true" \
-H "Accept: application/json" \
-H "Authorization: Bearer " \
-H "Content-Type: application/json" \
-d '{
"permissible_purpose": "child-support",
"target": {
"date_of_birth": "string",
"first_name": "string",
"last_name": "string",
"social_security_number": "string"
},
"type": "employment-income",
"use_case": "mortgage"
}'
```
```python
import requests
url = "https://api.truework-sandbox.com/orders/employer-search"
querystring = {"fields":"string","include_income_analytics":"true"}
payload = {
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
}
headers = {
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers, params=querystring)
print(response.json())
```
```javascript
const url = 'https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true';
const options = {
method: 'POST',
headers: {
Accept: 'application/json',
Authorization: 'Bearer ',
'Content-Type': 'application/json'
},
body: '{"permissible_purpose":"child-support","type":"employment-income","use_case":"mortgage"}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
```
```go
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true"
payload := strings.NewReader("{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Bearer ")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
```
```ruby
require 'uri'
require 'net/http'
url = URI("https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer '
request["Content-Type"] = 'application/json'
request.body = "{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}"
response = http.request(request)
puts response.read_body
```
```java
HttpResponse response = Unirest.post("https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true")
.header("Accept", "application/json")
.header("Authorization", "Bearer ")
.header("Content-Type", "application/json")
.body("{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}")
.asString();
```
```php
request('POST', 'https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true', [
'body' => '{
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
}',
'headers' => [
'Accept' => 'application/json',
'Authorization' => 'Bearer ',
'Content-Type' => 'application/json',
],
]);
echo $response->getBody();
```
```csharp
var client = new RestClient("https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer ");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n \"permissible_purpose\": \"child-support\",\n \"type\": \"employment-income\",\n \"use_case\": \"mortgage\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```
```swift
import Foundation
let headers = [
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
]
let parameters = [
"permissible_purpose": "child-support",
"type": "employment-income",
"use_case": "mortgage"
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api.truework-sandbox.com/orders/employer-search?fields=string&include_income_analytics=true")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
```
# Create a Truework Direct order
```http
POST https://api.truework-sandbox.com/orders/truework-direct
Content-Type: application/json
```
POST requests create an order with a Truework Direct session token, used for instantiating the Truework.js widget.
## Request Headers
- Accept (required): Specify the content type and version that the API should use. It's recommended to include this to avoid breaking changes.
## Response Body
- 201: Order Created.
- 400: Bad Request
- 401: The request's authorization is missing, invalid, or expired
- 403: Forbidden
- 406: An invalid API version was requested
- 429: Too Many Requests
- 451: Frozen SSN
- 500: Internal Server Error
- 501: Not Implemented
## Examples
```shell
curl -X POST https://api.truework-sandbox.com/orders/truework-direct \
-H "Accept: application/json" \
-H "Authorization: Bearer " \
-H "Content-Type: application/json" \
-d '{
"targets": [
{
"contact_email": "contact_email",
"date_of_birth": "1990-05-20",
"first_name": "Jane",
"last_name": "Doe",
"permissible_purpose": "child-support",
"social_security_number": "000-00-0000",
"type": "employment-income",
"use_case": "mortgage"
}
]
}'
```
```python
import requests
url = "https://api.truework-sandbox.com/orders/truework-direct"
payload = {}
headers = {
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
```
```javascript
const url = 'https://api.truework-sandbox.com/orders/truework-direct';
const options = {
method: 'POST',
headers: {
Accept: 'application/json',
Authorization: 'Bearer ',
'Content-Type': 'application/json'
},
body: '{}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
```
```go
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truework-sandbox.com/orders/truework-direct"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Bearer ")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
```
```ruby
require 'uri'
require 'net/http'
url = URI("https://api.truework-sandbox.com/orders/truework-direct")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer '
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body
```
```java
HttpResponse response = Unirest.post("https://api.truework-sandbox.com/orders/truework-direct")
.header("Accept", "application/json")
.header("Authorization", "Bearer ")
.header("Content-Type", "application/json")
.body("{}")
.asString();
```
```php
request('POST', 'https://api.truework-sandbox.com/orders/truework-direct', [
'body' => '{}',
'headers' => [
'Accept' => 'application/json',
'Authorization' => 'Bearer ',
'Content-Type' => 'application/json',
],
]);
echo $response->getBody();
```
```csharp
var client = new RestClient("https://api.truework-sandbox.com/orders/truework-direct");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer ");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```
```swift
import Foundation
let headers = [
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
]
let parameters = [] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api.truework-sandbox.com/orders/truework-direct")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
```
```shell
curl -X POST https://api.truework-sandbox.com/orders/truework-direct \
-H "Accept: application/json" \
-H "Authorization: Bearer " \
-H "Content-Type: application/json" \
-d '{
"targets": [
{
"contact_email": "string",
"date_of_birth": "string",
"first_name": "string",
"last_name": "string",
"permissible_purpose": "child-support",
"social_security_number": "string",
"type": "employment-income",
"use_case": "mortgage"
}
]
}'
```
```python
import requests
url = "https://api.truework-sandbox.com/orders/truework-direct"
payload = {}
headers = {
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
```
```javascript
const url = 'https://api.truework-sandbox.com/orders/truework-direct';
const options = {
method: 'POST',
headers: {
Accept: 'application/json',
Authorization: 'Bearer ',
'Content-Type': 'application/json'
},
body: '{}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
```
```go
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truework-sandbox.com/orders/truework-direct"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Bearer ")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
```
```ruby
require 'uri'
require 'net/http'
url = URI("https://api.truework-sandbox.com/orders/truework-direct")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer '
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body
```
```java
HttpResponse response = Unirest.post("https://api.truework-sandbox.com/orders/truework-direct")
.header("Accept", "application/json")
.header("Authorization", "Bearer ")
.header("Content-Type", "application/json")
.body("{}")
.asString();
```
```php
request('POST', 'https://api.truework-sandbox.com/orders/truework-direct', [
'body' => '{}',
'headers' => [
'Accept' => 'application/json',
'Authorization' => 'Bearer ',
'Content-Type' => 'application/json',
],
]);
echo $response->getBody();
```
```csharp
var client = new RestClient("https://api.truework-sandbox.com/orders/truework-direct");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer ");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```
```swift
import Foundation
let headers = [
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
]
let parameters = [] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api.truework-sandbox.com/orders/truework-direct")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
```
```shell
curl -X POST https://api.truework-sandbox.com/orders/truework-direct \
-H "Accept: application/json" \
-H "Authorization: Bearer " \
-H "Content-Type: application/json" \
-d '{
"targets": [
{
"contact_email": "string",
"date_of_birth": "string",
"first_name": "string",
"last_name": "string",
"permissible_purpose": "child-support",
"social_security_number": "string",
"type": "employment-income",
"use_case": "mortgage"
}
]
}'
```
```python
import requests
url = "https://api.truework-sandbox.com/orders/truework-direct"
payload = {}
headers = {
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
```
```javascript
const url = 'https://api.truework-sandbox.com/orders/truework-direct';
const options = {
method: 'POST',
headers: {
Accept: 'application/json',
Authorization: 'Bearer ',
'Content-Type': 'application/json'
},
body: '{}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
```
```go
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truework-sandbox.com/orders/truework-direct"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Bearer ")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
```
```ruby
require 'uri'
require 'net/http'
url = URI("https://api.truework-sandbox.com/orders/truework-direct")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer '
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body
```
```java
HttpResponse response = Unirest.post("https://api.truework-sandbox.com/orders/truework-direct")
.header("Accept", "application/json")
.header("Authorization", "Bearer ")
.header("Content-Type", "application/json")
.body("{}")
.asString();
```
```php
request('POST', 'https://api.truework-sandbox.com/orders/truework-direct', [
'body' => '{}',
'headers' => [
'Accept' => 'application/json',
'Authorization' => 'Bearer ',
'Content-Type' => 'application/json',
],
]);
echo $response->getBody();
```
```csharp
var client = new RestClient("https://api.truework-sandbox.com/orders/truework-direct");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer ");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```
```swift
import Foundation
let headers = [
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
]
let parameters = [] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api.truework-sandbox.com/orders/truework-direct")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
```
```shell
curl -X POST https://api.truework-sandbox.com/orders/truework-direct \
-H "Accept: application/json" \
-H "Authorization: Bearer " \
-H "Content-Type: application/json" \
-d '{
"targets": [
{
"contact_email": "string",
"date_of_birth": "string",
"first_name": "string",
"last_name": "string",
"permissible_purpose": "child-support",
"social_security_number": "string",
"type": "employment-income",
"use_case": "mortgage"
}
]
}'
```
```python
import requests
url = "https://api.truework-sandbox.com/orders/truework-direct"
payload = {}
headers = {
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
```
```javascript
const url = 'https://api.truework-sandbox.com/orders/truework-direct';
const options = {
method: 'POST',
headers: {
Accept: 'application/json',
Authorization: 'Bearer ',
'Content-Type': 'application/json'
},
body: '{}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
```
```go
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truework-sandbox.com/orders/truework-direct"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Bearer ")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
```
```ruby
require 'uri'
require 'net/http'
url = URI("https://api.truework-sandbox.com/orders/truework-direct")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer '
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body
```
```java
HttpResponse response = Unirest.post("https://api.truework-sandbox.com/orders/truework-direct")
.header("Accept", "application/json")
.header("Authorization", "Bearer ")
.header("Content-Type", "application/json")
.body("{}")
.asString();
```
```php
request('POST', 'https://api.truework-sandbox.com/orders/truework-direct', [
'body' => '{}',
'headers' => [
'Accept' => 'application/json',
'Authorization' => 'Bearer ',
'Content-Type' => 'application/json',
],
]);
echo $response->getBody();
```
```csharp
var client = new RestClient("https://api.truework-sandbox.com/orders/truework-direct");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer ");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```
```swift
import Foundation
let headers = [
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
]
let parameters = [] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api.truework-sandbox.com/orders/truework-direct")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
```
```shell
curl -X POST https://api.truework-sandbox.com/orders/truework-direct \
-H "Accept: application/json" \
-H "Authorization: Bearer " \
-H "Content-Type: application/json" \
-d '{
"targets": [
{
"contact_email": "string",
"date_of_birth": "string",
"first_name": "string",
"last_name": "string",
"permissible_purpose": "child-support",
"social_security_number": "string",
"type": "employment-income",
"use_case": "mortgage"
}
]
}'
```
```python
import requests
url = "https://api.truework-sandbox.com/orders/truework-direct"
payload = {}
headers = {
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
```
```javascript
const url = 'https://api.truework-sandbox.com/orders/truework-direct';
const options = {
method: 'POST',
headers: {
Accept: 'application/json',
Authorization: 'Bearer ',
'Content-Type': 'application/json'
},
body: '{}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
```
```go
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truework-sandbox.com/orders/truework-direct"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Bearer ")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
```
```ruby
require 'uri'
require 'net/http'
url = URI("https://api.truework-sandbox.com/orders/truework-direct")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer '
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body
```
```java
HttpResponse response = Unirest.post("https://api.truework-sandbox.com/orders/truework-direct")
.header("Accept", "application/json")
.header("Authorization", "Bearer ")
.header("Content-Type", "application/json")
.body("{}")
.asString();
```
```php
request('POST', 'https://api.truework-sandbox.com/orders/truework-direct', [
'body' => '{}',
'headers' => [
'Accept' => 'application/json',
'Authorization' => 'Bearer ',
'Content-Type' => 'application/json',
],
]);
echo $response->getBody();
```
```csharp
var client = new RestClient("https://api.truework-sandbox.com/orders/truework-direct");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer ");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```
```swift
import Foundation
let headers = [
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
]
let parameters = [] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api.truework-sandbox.com/orders/truework-direct")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
```
```shell
curl -X POST https://api.truework-sandbox.com/orders/truework-direct \
-H "Accept: application/json" \
-H "Authorization: Bearer " \
-H "Content-Type: application/json" \
-d '{
"targets": [
{
"contact_email": "string",
"date_of_birth": "string",
"first_name": "string",
"last_name": "string",
"permissible_purpose": "child-support",
"social_security_number": "string",
"type": "employment-income",
"use_case": "mortgage"
}
]
}'
```
```python
import requests
url = "https://api.truework-sandbox.com/orders/truework-direct"
payload = {}
headers = {
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
```
```javascript
const url = 'https://api.truework-sandbox.com/orders/truework-direct';
const options = {
method: 'POST',
headers: {
Accept: 'application/json',
Authorization: 'Bearer ',
'Content-Type': 'application/json'
},
body: '{}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
```
```go
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truework-sandbox.com/orders/truework-direct"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Bearer ")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
```
```ruby
require 'uri'
require 'net/http'
url = URI("https://api.truework-sandbox.com/orders/truework-direct")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer '
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body
```
```java
HttpResponse response = Unirest.post("https://api.truework-sandbox.com/orders/truework-direct")
.header("Accept", "application/json")
.header("Authorization", "Bearer ")
.header("Content-Type", "application/json")
.body("{}")
.asString();
```
```php
request('POST', 'https://api.truework-sandbox.com/orders/truework-direct', [
'body' => '{}',
'headers' => [
'Accept' => 'application/json',
'Authorization' => 'Bearer ',
'Content-Type' => 'application/json',
],
]);
echo $response->getBody();
```
```csharp
var client = new RestClient("https://api.truework-sandbox.com/orders/truework-direct");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer ");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```
```swift
import Foundation
let headers = [
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
]
let parameters = [] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api.truework-sandbox.com/orders/truework-direct")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
```
```shell
curl -X POST https://api.truework-sandbox.com/orders/truework-direct \
-H "Accept: application/json" \
-H "Authorization: Bearer " \
-H "Content-Type: application/json" \
-d '{
"targets": [
{
"contact_email": "string",
"date_of_birth": "string",
"first_name": "string",
"last_name": "string",
"permissible_purpose": "child-support",
"social_security_number": "string",
"type": "employment-income",
"use_case": "mortgage"
}
]
}'
```
```python
import requests
url = "https://api.truework-sandbox.com/orders/truework-direct"
payload = {}
headers = {
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
```
```javascript
const url = 'https://api.truework-sandbox.com/orders/truework-direct';
const options = {
method: 'POST',
headers: {
Accept: 'application/json',
Authorization: 'Bearer ',
'Content-Type': 'application/json'
},
body: '{}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
```
```go
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truework-sandbox.com/orders/truework-direct"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Bearer ")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
```
```ruby
require 'uri'
require 'net/http'
url = URI("https://api.truework-sandbox.com/orders/truework-direct")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer '
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body
```
```java
HttpResponse response = Unirest.post("https://api.truework-sandbox.com/orders/truework-direct")
.header("Accept", "application/json")
.header("Authorization", "Bearer ")
.header("Content-Type", "application/json")
.body("{}")
.asString();
```
```php
request('POST', 'https://api.truework-sandbox.com/orders/truework-direct', [
'body' => '{}',
'headers' => [
'Accept' => 'application/json',
'Authorization' => 'Bearer ',
'Content-Type' => 'application/json',
],
]);
echo $response->getBody();
```
```csharp
var client = new RestClient("https://api.truework-sandbox.com/orders/truework-direct");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer ");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```
```swift
import Foundation
let headers = [
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
]
let parameters = [] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api.truework-sandbox.com/orders/truework-direct")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
```
```shell
curl -X POST https://api.truework-sandbox.com/orders/truework-direct \
-H "Accept: application/json" \
-H "Authorization: Bearer " \
-H "Content-Type: application/json" \
-d '{
"targets": [
{
"contact_email": "string",
"date_of_birth": "string",
"first_name": "string",
"last_name": "string",
"permissible_purpose": "child-support",
"social_security_number": "string",
"type": "employment-income",
"use_case": "mortgage"
}
]
}'
```
```python
import requests
url = "https://api.truework-sandbox.com/orders/truework-direct"
payload = {}
headers = {
"Accept": "application/json",
"Authorization": "Bearer ",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
```
```javascript
const url = 'https://api.truework-sandbox.com/orders/truework-direct';
const options = {
method: 'POST',
headers: {
Accept: 'application/json',
Authorization: 'Bearer ',
'Content-Type': 'application/json'
},
body: '{}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
```
```go
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truework-sandbox.com/orders/truework-direct"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Bearer