Order Credit Data

Retrieving Credit Data for Consumers from Bloom's Data Access API

Creating a Credit Data Order

After creating a consumer (see Create Consumer for reference as how to register a consumer), you can start ordering credit data for that consumer using a sku (sku name in the request) and a portfolio (with portfolio_id in the request).

📘

Note:

If you aren't sure about what portfolio or sku you may have, you can reach out to Bloom Credit and we'll help you understand them.

Credit Data can be ordered synchronously (blocking) or asynchronously (non-blocking), and the HTTP request will either return immediately when ordering credit data asynchronously, or the HTTP request will wait until the entire credit data order completes in a terminal state.

Please refer to Order States for more information on how the order can be processed.

Order Credit Data Sample Request

You can see an example of a POST request made to the Order Credit Data endpoint below:

curl --location --request POST 'https://sandbox.bloom.dev/v2/data-access/orders/' \
--header 'Authorization: Bearer <ACCESS_TOKEN_WILL_BE_HERE>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "data": {
        "type": "order",
        "attributes": {
            "consumer_id": "<CONSUMER_ID>",
            "portfolio_id": "<ACCOUNT_ID_WILL_BE_HERE>",
            "sku": "equifax-gold-hard-fico"
        }
    }
}'
POST /v2/data-access/orders/ HTTP/1.1
Host: sandbox.bloom.dev
Authorization: Bearer <ACCESS_TOKEN_WILL_BE_HERE>
Content-Type: application/json
Content-Length: 541

{
   "data": {
        "type": "order",
        "attributes": {
            "consumer_id": "<CONSUMER_ID>",
            "portfolio_id": "<ACCOUNT_ID_WILL_BE_HERE>",
            "sku": "equifax-gold-hard-fico"
        }
    }
}
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <ACCESS_TOKEN_WILL_BE_HERE>");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "data": {
        "type": "order",
        "attributes": {
            "consumer_id": "<CONSUMER_ID>",
            "portfolio_id": "<ACCOUNT_ID_WILL_BE_HERE>",
            "sku": "equifax-gold-hard-fico"
        }
    }
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://sandbox.bloom.dev/v2/data-access/orders/", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests
import json

url = "https://sandbox.bloom.dev/v2/data-access/orders/"

payload = json.dumps({
  "data": {
        "type": "order",
        "attributes": {
            "consumer_id": "<CONSUMER_ID>",
            "portfolio_id": "<ACCOUNT_ID_WILL_BE_HERE>",
            "sku": "equifax-gold-hard-fico"
        }
    }
})
headers = {
  'Authorization': 'Bearer <ACCESS_TOKEN_WILL_BE_HERE>',
  'Content-Type': 'application/json'
}

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

print(response.text)

var request = require('request');
var options = {
  'method': 'POST',
  'url': 'https://sandbox.bloom.dev/v2/data-access/orders/',
  'headers': {
    'Authorization': 'Bearer <ACCESS_TOKEN_WILL_BE_HERE>',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "data": {
        "type": "order",
        "attributes": {
            "consumer_id": "<CONSUMER_ID>",
            "portfolio_id": "<ACCOUNT_ID_WILL_BE_HERE>",
            "sku": "equifax-gold-hard-fico"
        }
    }
  })

};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});

package main

import (
  "fmt"
  "strings"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://sandbox.bloom.dev/v2/data-access/orders/"
  method := "POST"

  payload := strings.NewReader(`{
    "data": {
        "type": "order",
        "attributes": {
            "consumer_id": "<CONSUMER_ID>",
            "portfolio_id": "<ACCOUNT_ID_WILL_BE_HERE>",
            "sku": "equifax-gold-hard-fico"
        }
    }
}`)

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Authorization", "Bearer <ACCESS_TOKEN_WILL_BE_HERE>")
  req.Header.Add("Content-Type", "application/json")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}

📘

SKU

The sku is the name of the SKU bundle you wish to pull data on, they come prepacked for usage of Bloom's API and need to be provided with the request.

Order Credit Data Sample Response

You can see an example of a response from the Order Credit Data endpoint below:

{
    "data": {
        "type": "order",
        "id": "58cb4230-04ce-4915-9d27-d4deb7b603a0",
        "attributes": {
            "status": "PROCESSING"
        }
    }
}
Rejected Order response
{
  "data": {
    "type": "orders",
    "id": "5ebf4d5c-15f8-492d-8f72-b593f80b35cf",
    "attributes": {
      "status_code": "10",
      "status_message": "SKU not enabled",
      "status": "REJECTED"
    }
  }
}
Async Order response
{
  "data": {
    "type": "orders",
    "id": "4d6d92af-ae16-4dac-b028-3c9172e60ddc",
    "attributes": {
      "status": "PROCESSING"
    }
  }
}
Get Success Order response
{ 
  "data": {
    "type": "orders",
    "id": "4d6d92af-ae16-4dac-b028-3c9172e60ddc",
    "attributes": {
      "consumer_id": "52705fc7-d0ff-47b9-bbfd-5519b706c541",
      "sku": "equifax-bronze-hard",
      "order_placed": "2023-04-17T17:57:21.812057Z",
      "order_filled": "2023-04-17T17:57:21.98094Z",
      "order_updated": "2023-04-17T17:57:21.99703Z",
      "status": "SUCCESS"
    }
  }
}
API Documentation

v1 API

If you're looking for our previous Data Access API version, see Version 1 Documentation

v2 API

For API documentation regarding orders, see Version 2 API Documentation

Possible causes for REJECTED response

Possible causes for REJECTED response

Status code 10: SKU not enabled. The given SKU is not enabled for the provided portfolio.

{
    "data": {
        "type": "order",
        "id": "58cb4230-04ce-4915-9d27-d4deb7b603a0",
        "attributes": {
            "status_code": "10",
            "status_message": "SKU not enabled",
            "status": "REJECTED"
        }
    }
}

Status code 11: Invalid consumer id. The consumer ID is not valid or doesn't exists.

{
    "data": {
        "type": "order",
        "id": "58cb4230-04ce-4915-9d27-d4deb7b603a0",
        "attributes": {
            "status_code": "11",
            "status_message": "Invalid consumer id",
            "status": "REJECTED"
        }
    }
}

Status code 12: Invalid portfolio id. The portfolio ID is not valid or doesn't exists.

{
    "data": {
        "type": "order",
        "id": "58cb4230-04ce-4915-9d27-d4deb7b603a0",
        "attributes": {
            "status_code": "12",
            "status_message": "Invalid portfolio id",
            "status": "REJECTED"
        }
    }
}

Status code 13: minor. The consumer ID provided belongs to a minor.

{
    "data": {
        "type": "order",
        "id": "58cb4230-04ce-4915-9d27-d4deb7b603a0",
        "attributes": {
            "status_code": "13",
            "status_message": "Consumer is minor",
            "status": "REJECTED"
        }
    }
}

Checking order status

After submitting an order for consumer data, you can then check order status by just passing using the order_id that we originally provided to you.

Get order status sample request

You can see an example of a GET request made to the required Order Credit Data endpoint below:

curl --location --request GET 'https://sandbox.bloom.dev/v2/data-access/orders/<ORDER-ID>' \
--header 'Authorization: Bearer <ACCESS_TOKEN_WILL_BE_HERE>' \
GET /v2/data-access/orders/<ORDER-ID> HTTP/1.1
Host: sandbox.bloom.dev
Authorization: Bearer <ACCESS_TOKEN_WILL_BE_HERE>
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer <ACCESS_TOKEN_WILL_BE_HERE>");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://sandbox.bloom.dev/v2/data-access/orders/<ORDER-ID>", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
import requests
import json

url = "https://sandbox.bloom.dev/v2/data-access/orders/<ORDER-ID>"

headers = {
  'Authorization': 'Bearer <ACCESS_TOKEN_WILL_BE_HERE>'
}

response = requests.request("GET", url, headers=headers)

print(response.text)

var request = require('request');
var options = {
  'method': 'GET',
  'url': 'https://sandbox.bloom.dev/v2/data-access/orders/<ORDER-ID>',
  'headers': {
    'Authorization': 'Bearer <ACCESS_TOKEN_WILL_BE_HERE>'
  }

};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});

package main

import (
  "fmt"
  "strings"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://sandbox.bloom.dev/v2/data-access/orders/<ORDER-ID>"
  method := "GET"

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, nil)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Authorization", "Bearer <ACCESS_TOKEN_WILL_BE_HERE>")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
Get order status sample response

You can see an example of the response with the details of the order here:

{
    "data": {
        "type": "order",
        "id": "b097d8cd-f72b-4fbb-aad1-7454e0e8ce82",
        "attributes": {
            "consumer_id": "1f3259d8-f115-4c4b-9bf6-3b704f57b9a7",
            "sku": "",
            "order_placed": "2023-03-16T18:28:42.297018Z",
            "order_filled": "2023-03-16T18:28:42.433244Z",
            "order_updated": "2023-03-16T18:28:42.45531Z",
            "status": "SUCCESS"
        }
    }
}
API Documentation

v1 API

If you're looking for our previous Data Access API version, see Version 1 Documentation

v2 API

For API documentation regarding orders, see Version 2 API Documentation