The Dealer’s Secret Weapon: What is a Dealer Business Operating System & How it Fuels Growth

API Tutorial

Introduction

Welcome to this quick walkthrough on how to get started using the e-manage | ONE API. In this guide, we will cover:

  • Setting Up Your Environment
  • Authenticating with the API
  • Making Your First API Call

Obtaining an API Key

The first step is to create a technical support request to obtain your API key. Follow the link below to submit your request:

Create Technical Support Request

The support team will reach out to you with your API key.

Generating Your Client Library

The next step is to generate your client library using the OpenAPI specification. This makes it easy to generate a client library for any language using the OpenAPI Generator.

Step 1: Access the OpenAPI Specification

Our OpenAPI specification is hosted at this URL:

OpenAPI Specification

Step 2: Use OpenAPI Generator

The best way to use the OpenAPI Generator is through Docker. Use the following command to generate a client library:

docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli generate \
-i https://emws.azurewebsites.net/api/openapi/1.0 \
-g go \
-o /local/out/go

Replace go with your desired language. The available options include:

  • ActionScript, Ada, Apex, Bash, C, C# (.net 2.0, 3.5 or later, .NET Standard 1.3 – 2.1, .NET Core 3.1, .NET 5.0. Libraries: RestSharp, GenericHost, HttpClient), C++ (Arduino, cpp-restsdk, Qt5, Tizen, Unreal Engine 4), Clojure, Crystal, Dart, Elixir, Elm, Eiffel, Erlang, Go, Groovy, Haskell (http-client, Servant), Java (Apache HttpClient 4.x, Apache HttpClient 5.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client, MicroProfile Rest Client, Helidon), Jetbrains HTTP Client, Julia, k6, Kotlin, Lua, N4JS, Nim, Node.js/JavaScript (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types, Apollo GraphQL DataStore), Objective-C, OCaml, Perl, PHP, PowerShell, Python, R, Ruby, Rust (hyper, reqwest, rust-server), Scala (akka, http4s, scalaz, sttp, swagger-async-httpclient, pekko), Swift (2.x, 3.x, 4.x, 5.x), Typescript (AngularJS, Angular (9.x – 17.x), Aurelia, Axios, Fetch, Inversify, jQuery, Nestjs, Node, redux-query, Rxjs), XoJo, Zapier

Using the Generated Client Library

Once you have generated your client library, you can use it to interact with the API.

Step 1: Install the Generated Client Library

Navigate to the generated client library directory and install it using pip:

cd out/python
pip install .

Step 2: Example Usage

Here is an example of how to use the generated client library to find company types:

import os
from openapi_client import ApiClient, Configuration
from openapi_client.api.company_types_api import CompanyTypesApi

# Configure API key authorization: ApiKeyAuth
configuration = Configuration()
configuration.api_key['ApiKeyAuth'] = os.getenv("EM_API_KEY")
configuration.host = "https://emws-apim.azure-api.net"

# Create an instance of the API client
api_client = ApiClient(configuration)
company_types_api = CompanyTypesApi(api_client)

# Find company types
try:
api_response = company_types_api.find_company_types()
print(api_response)
except Exception as e:
print(f"Exception when calling CompanyTypesApi->find_company_types: {e}")

You should see output indicating whether the API call was successful.