Industry Prediction

Automatically identify the industry of a business, effortlessly

Initial Search Request

If a business search included Order.NaicsPrediction as an option, once the business search has been completed the user can retrieve the details of Baselayer's industry code prediction results.

Example payload for a business search including the option for industry prediction:

{
  "options": [
    "Order.NaicsPrediction"
  ],
  "name": "White, Floyd and Cook",
  "address": "155 Carla Circles Jordanfurt, OK 59066"
}
  

As part of the POST response, Baselayer will return the array orderables, which includes all the associated requests that were made as a result of ordering optional features through the options when the search was submitted. This will include a corresponding NAICSPredictionRequest orderable containing the ID and URL for the forthcoming associated operations.

Example response:

{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "options": "Order.NaicsPrediction",
  "orderables": [
    {
      "id": "3f88c055-7bb9-4840-8c5e-c7b30756ca58",
      "option": "Order.NaicsPrediction",
      "type": "NAICSPredictionRequest",
      "url": "https://api.baselayerhq.com/naics_prediction_requests/3f88c055-7bb9-4840-8c5e-c7b30756ca58"
    }
  ],
  "user": {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "first_name": "Austin",
    "last_name": "Taylor",
    "email": "[email protected]"
  },
  "state": "COMPLETED",
  ...
}

Industry Prediction Request

Once the business search is completed, you can retrieve the industry code prediction results using the ID from the associated orderable, using [GET /naics_prediction_requests/{id}](https://docs.baselayer.com/reference/get_industry_prediction_naics_prediction_requests__id__get) or by listening for the webhook event [NaicsPredictionRequest.completed](https://docs.baselayer.com/reference/naics_prediction_completednaicspredictionrequest_completed_post)