Skip to content

Latest commit

 

History

History
92 lines (64 loc) · 6 KB

README.md

File metadata and controls

92 lines (64 loc) · 6 KB

Industries

(industries)

Overview

Available Operations

  • list - Returns a list of all industry titles and their corresponding MCC/SIC/NAICS codes. Results are ordered by title.

To access this endpoint using an access token you'll need to specify the /profile-enrichment.read scope.

list

Returns a list of all industry titles and their corresponding MCC/SIC/NAICS codes. Results are ordered by title.

To access this endpoint using an access token you'll need to specify the /profile-enrichment.read scope.

Example Usage

import { Moov } from "@moovio/sdk";

const moov = new Moov({
  security: {
    username: "",
    password: "",
  },
});

async function run() {
  const result = await moov.industries.list({});

  // Handle the result
  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { MoovCore } from "@moovio/sdk/core.js";
import { industriesList } from "@moovio/sdk/funcs/industriesList.js";

// Use `MoovCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const moov = new MoovCore({
  security: {
    username: "",
    password: "",
  },
});

async function run() {
  const res = await industriesList(moov, {});

  if (!res.ok) {
    throw res.error;
  }

  const { value: result } = res;

  // Handle the result
  console.log(result);
}

run();

Parameters

Parameter Type Required Description
request operations.ListIndustriesRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.ListIndustriesResponse>

Errors

Error Type Status Code Content Type
errors.APIError 4XX, 5XX */*