Create Order Resource

Creating an order is the second and final step to placing a background check order.
To create a candidate which is the first step, see this tutorial.

To create an order you will be sending a [POST HTTP call to the /order resource] (https://accurate.readme.io/reference#postorder-1) .

๐Ÿ“˜

All calls require HTTP Basic Authentication

Prepare your payload by including the following:

  • Package type โ€“ Letโ€™s use PKG_BASIC
  • Workflow โ€“ Either EXPRESS or INTERACTIVE. Letโ€™s use EXPRESS

๐Ÿ“˜

Additional Information

EXPRESS workflow requires your organization to provide all the required Candidate information in the Candidate resource. You must also ensure you are configuring your platform to present and collect the required notices and authorizations directly from the candidate.
INTERACTIVE only requires basic candidate information, and an invitation email can be sent to the candidate to provide additional information.

  • Candidate ID โ€“ Include the candidate ID of the candidate for which the order is placed. This is the ID returned in the response to the create Candidate API call made in the previous step.
  • Job Location โ€“ Whatโ€™s the location of the job?
    I City โ€“ Required
    II Region โ€“ Required. If the country is the US, provide a 2-character state code.
    III Country โ€“ Required. Provide a 2-character country code.
    IV Region 2 โ€“ Provide US county name. Only required when the country is the US.
  • Copy of the report, either true or false. Did the candidate ask for a copy of their consumer report when it completes? Letโ€™s use false for now.

We wonโ€™t include optional information in this example, but these are listed below.

  • Requestor โ€“ You can specify what requestor the order should be associated with by providing the requestorโ€™s email address.
  • Reference Codes โ€“ Up to 4 elements can be provided in this array. These values will show up on your invoice.

Send the payload along with your basic authentication credentials to
[https://api.accuratebackground.com/v3/order/ ](https://api.accuratebackground.com/v3/order/

curl --request POST \
  --url https://api.accuratebackground.com/v3/order \
  --header 'Accept: application/json' \
  --header 'Authorization: Basic NmQwZWRlMjgtYzNjNS00N2FjLWEwMjctMzg0ZjAyMjVlZDExOjIxMmQ4YTU5LWZhNWYtNGU0My1iM2M4LTk4NGE5ZTUyNDU3Nw==' \
  --header 'Content-Type: application/json' \
  --data '{"jobLocation":{"country":"US","region":"CA","region2":"Orange","city":"Irvine"},"candidateId":"602e5268f4a8ad000170ac2a","workflow":"EXPRESS","packageType":"PKG_BASIC"}'
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://api.accuratebackground.com/v3/order")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Accept"] = 'application/json'
request["Content-Type"] = 'application/json'
request["Authorization"] = 'Basic NmQwZWRlMjgtYzNjNS00N2FjLWEwMjctMzg0ZjAyMjVlZDExOjIxMmQ4YTU5LWZhNWYtNGU0My1iM2M4LTk4NGE5ZTUyNDU3Nw=='
request.body = "{\"jobLocation\":{\"country\":\"US\",\"region\":\"CA\",\"region2\":\"Orange\",\"city\":\"Irvine\"},\"candidateId\":\"602e5268f4a8ad000170ac2a\",\"workflow\":\"EXPRESS\",\"packageType\":\"PKG_BASIC\"}"

response = http.request(request)
puts response.read_body
const options = {
  method: 'POST',
  headers: {
    Accept: 'application/json',
    'Content-Type': 'application/json',
    Authorization: 'Basic NmQwZWRlMjgtYzNjNS00N2FjLWEwMjctMzg0ZjAyMjVlZDExOjIxMmQ4YTU5LWZhNWYtNGU0My1iM2M4LTk4NGE5ZTUyNDU3Nw=='
  },
  body: '{"jobLocation":{"country":"US","region":"CA","region2":"Orange","city":"Irvine"},"candidateId":"602e5268f4a8ad000170ac2a","workflow":"EXPRESS","packageType":"PKG_BASIC"}'
};

fetch('https://api.accuratebackground.com/v3/order', options)
  .then(response => console.log(response))
  .catch(err => console.error(err));
import requests

url = "https://api.accuratebackground.com/v3/order"

payload = {
    "jobLocation": {
        "country": "US",
        "region": "CA",
        "region2": "Orange",
        "city": "Irvine"
    },
    "candidateId": "602e5268f4a8ad000170ac2a",
    "workflow": "EXPRESS",
    "packageType": "PKG_BASIC"
}
headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
    "Authorization": "Basic NmQwZWRlMjgtYzNjNS00N2FjLWEwMjctMzg0ZjAyMjVlZDExOjIxMmQ4YTU5LWZhNWYtNGU0My1iM2M4LTk4NGE5ZTUyNDU3Nw=="
}

response = requests.request("POST", url, json=payload, headers=headers)

print(response.text)
var client = new RestClient("https://api.accuratebackground.com/v3/order");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Authorization", "Basic NmQwZWRlMjgtYzNjNS00N2FjLWEwMjctMzg0ZjAyMjVlZDExOjIxMmQ4YTU5LWZhNWYtNGU0My1iM2M4LTk4NGE5ZTUyNDU3Nw==");
request.AddParameter("application/json", "{\"jobLocation\":{\"country\":\"US\",\"region\":\"CA\",\"region2\":\"Orange\",\"city\":\"Irvine\"},\"candidateId\":\"602e5268f4a8ad000170ac2a\",\"workflow\":\"EXPRESS\",\"packageType\":\"PKG_BASIC\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.accuratebackground.com/v3/order",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\"jobLocation\":{\"country\":\"US\",\"region\":\"CA\",\"region2\":\"Orange\",\"city\":\"Irvine\"},\"candidateId\":\"602e5268f4a8ad000170ac2a\",\"workflow\":\"EXPRESS\",\"packageType\":\"PKG_BASIC\"}",
  CURLOPT_HTTPHEADER => [
    "Accept: application/json",
    "Authorization: Basic NmQwZWRlMjgtYzNjNS00N2FjLWEwMjctMzg0ZjAyMjVlZDExOjIxMmQ4YTU5LWZhNWYtNGU0My1iM2M4LTk4NGE5ZTUyNDU3Nw==",
    "Content-Type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"jobLocation\":{\"country\":\"US\",\"region\":\"CA\",\"region2\":\"Orange\",\"city\":\"Irvine\"},\"candidateId\":\"602e5268f4a8ad000170ac2a\",\"workflow\":\"EXPRESS\",\"packageType\":\"PKG_BASIC\"}");
Request request = new Request.Builder()
  .url("https://api.accuratebackground.com/v3/order")
  .post(body)
  .addHeader("Accept", "application/json")
  .addHeader("Content-Type", "application/json")
  .addHeader("Authorization", "Basic NmQwZWRlMjgtYzNjNS00N2FjLWEwMjctMzg0ZjAyMjVlZDExOjIxMmQ4YTU5LWZhNWYtNGU0My1iM2M4LTk4NGE5ZTUyNDU3Nw==")
  .build();

Response response = client.newCall(request).execute();

๐Ÿ“˜

POST calls can have content-type of application/x-www-form-urlencoded or application/json

Once an order resource is created successfully your response will include an ID for the order resource.

๐Ÿ‘

Store the order ID so you can reference it for status and result updates.

๐Ÿ‘

Try it yourself!


Whatโ€™s Next

Click here to read the next tutorial for the next step.