Who uses this feature
Supply Chain partners, vendors, suppliers
Applies to all business types
What you need to get started
Before getting started, ensure you have the following prerequisites ready:
Login Credentials: Get access to the ServiceTitan Integration API Portal.
Postman Setup: Create an account on the Postman site and download the ServiceTitan Postman collection to test API requests and configurations.
Architecture Overview: Familiarize yourself with ServiceTitan's architecture, generic endpoints and the supply chain system to understand how it works for your customers.
Assess Compatibility: Analyze the existing APIs using Full Procurement Integration generic endpoints article to assess compatibility by comparing request/response specifications.
As a supplier integrating with ServiceTitan, you can use our Command-Line Interface (CLI) Tool which offers a simple, text-based solution for managing tasks through command prompts. It streamlines the integration process by automating repetitive actions, minimizing errors, and saving time, providing an efficient and user-friendly way to interact with integration systems.
Things to know
ServiceTitan provides four main endpoints for supplier integration – Account, Branch (Default Branch), Pricing, and Purchase Order. To learn more about the endpoint configuration, see Full Procurement Integration generic endpoints.
Analyze the existing APIs using Full Procurement Integration generic endpoints article to assess compatibility by comparing request/response specifications. For APIs that are not compatible, you have two options:
Use the Middleware liquid templates to modify an existing API to accept/provide the data and bring it into compatibility with ServiceTitan.
Create a new API endpoint specifically for ServiceTitan using the generic endpoints templates.
To explore more about ServiceTitan’s supply chain integrations and supplier features, check out Available Supply Chain Integrations.
Visit our Full Procurement Integration knowledge base landing page to access all the relevant customer-facing articles about supply chain workflows in ServiceTitan.
Full Procurement Integration CLI Tool overview
The CLI tool enables suppliers to perform integration tasks such as configuring environments, managing vendor credentials, and setting up endpoints through simple command-line inputs.
CLI is an alternative to the Postman collection, offering a more efficient option for partners familiar with command-line operations.
Download the CLI Tool on your computer
The tool is available for download via shared links, with versions for:
When you click the link on your computer, the latest version of the CLI tool will be downloaded automatically.
To access the CLI tool from any directory, set up environment variables.
Open the Start Menu and type Environment Variables.
Select Edit the system environment variables.
In the System Properties window, click Environment Variables.

In the System Variables section, locate and select Path, then click Edit.
Click New, and add the directory path where the CLI tool is installed (e.g.,C:\Users\AB\Downloads).
Click OK to save your changes.
CLI Tool commands overview
Each command in the CLI Tool is designed to handle specific aspects of the integration process, enabling efficient and secure communication between ServiceTitan and your system. Below is an overview of the key commands and their purposes, providing step-by-step guidance through the integration process.
Environment: Set and Get the environment to use, such as integration or production.
Auth-credentials: Add authentication credentials for vendors to access Middleware APIs securely.
Vendor-config: Add or update vendor configurations.
Endpoint-config: Configure API endpoints.
Vendor-credentials: Add and manage vendor credentials for Middleware to have access to vendor APIs.
Template: Manage vendor templates for requests and responses.
Sandbox: Test configurations in a controlled environment.
Promote: Move configurations and templates from the integration environment to production.

Tip: Use -?, -h, or --help after any command to see available options and usage examples.
Use the Environment command
The Environment command is used to manage integration environments to determine where the tool sends requests. The actions include:
Set: Specify the environment to use, such as integration or production.
Get: Displays the currently active environment.
Example: request-middleware environment set integration

Use the Auth-Credentials command
The Auth-Credentials command is used to add authentication credentials for accessing Middleware APIs securely. These credentials validate the tool's requests to Middleware. The authentication details include:
Name
Client ID
Client Secret
API Key
Example: request-middleware auth-credentials add --client-id <your-client-id> --client-secret <your-client-secret>

Note: The CLI tool specifies if a particular detail is required, ensuring you’re aware of required information.
Use the Vendor-Config command
The vendor-config command sets up the foundational configuration for a vendor, including details like base URL and authentication type. Sub-commands allow for different authentication methods based on your preference:
Basic-config: Set up with Basic Authentication method (username and password).
OAuth2-config: Configure vendors using OAuth2 Client Credentials authentication.
ApiKey-config: Set up vendors using API Key authentication.
OAuth2code-config: Configure vendors using OAuth2 Authorization Code Flow.
See Full Procurement Integration authentication process to learn more about each authentication method.

Example: request-middleware vendor-config basic-config

Note: The CLI tool specifies if a particular detail is required, ensuring you’re aware of required information.
Tip: Use the -- raw option to bypass interactive or structured command-line inputs by directly providing a file containing all the configuration details.
Use the Vendor-Credentials command
The Vendor-Credentials command is used to manage the credentials Middleware needs to access your APIs. These credentials vary depending on the authentication method used, such as Basic Authentication, API Key, or OAuth2. See Full Procurement Integration authentication process to learn more about each authentication method.
The command supports adding your credentials with a json file and ensures secure communication between ServiceTitan and your system.

Example: request-middleware vendor-credentials apiKey
Use the Endpoint-Config command
This command configures individual API endpoints for your system, such as those for retrieving Account, Pricing, Purchase Order or Branch information. This attaches request and response templates to ensure proper communication between systems. To learn more about the Full Procurement Integration endpoints, see Full Procurement Integration generic endpoints.
The actions include:
Add: Add a new endpoint configuration, by providing the endpoint name, and the URL.
Get: Retrieve details of existing endpoint configurations.
Remove: Delete an existing endpoint configuration. This is typically used when an endpoint is no longer needed or needs to be reconfigured from scratch.

Example: request-middleware endpoint-config add --endpoint=’account’ --url=’/account/retrieve’

Tip: Use the -- raw option bypass interactive or structured command-line inputs by directly providing a file containing all the configuration details.
Use the Template command
The Template command is used to manage Request and Response templates for vendor endpoints. These templates define how data is structured when sent to or received from vendor APIs, ensuring compatibility between ServiceTitan and the vendor's system.
Templates are typically written in Liquid format, which allows for dynamic transformation of data. For more, see Full Procurement Integration Request Middleware.
The actions include:
Add: Add a new endpoint configuration, by providing the path of the directory where the endpoint template is located and specifying the
Get: Retrieve details of existing endpoint configurations.
Remove: Delete an existing endpoint configuration. This is typically used when an endpoint is no longer needed or needs to be reconfigured from scratch.
Example: request-middleware template add --endpoint-config add -- endpoint=’account’ -- path = ‘C:\ServiceTitan\request-middleware-supplier\templates\account’

Use the Sandbox command
Provides a testing environment to validate configurations and simulate API interactions before deploying to production. Use the sandbox to ensure that endpoints, templates, and credentials function as expected without affecting the live system.
Example: request-middleware sandbox

Use the Promote command
This last command transfers validated configurations, templates, and endpoints from the integration environment to production. It generates a pull request for approval, streamlining the promotion process without manual reconfiguration.
Example: request-middleware promote