--- title: "Full Procurement Integration CLI tool usage" slug: "full-procurement-integration-cli-tool-usage" updated: 2026-10-15T00:43:52Z published: 2026-10-15T00:43:52Z canonical: "help.servicetitan.com/full-procurement-integration-cli-tool-usage" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.servicetitan.com/llms.txt > Use this file to discover all available pages before exploring further. # Full Procurement Integration CLI tool usage ## 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](https://partner-api-credentials-portal-integration.servicetitan.io/). - **Postman Setup**: Create an account on the [Postman site](https://www.postman.com/) and download the [ServiceTitan Postman collection](https://www.postman.com/st-supplychain-requestmiddleware/st-supplychain-requestmiddleware/request/fzgp2fb/get-supplier-configuration) to test API requests and configurations. - **Architecture Overview**: Familiarize yourself with ServiceTitan's architecture, [generic endpoints and the supply chain system](/construction/docs/full-procurement-integration-generic-endpoints) to understand how it works for your customers. - **Assess Compatibility**: Analyze the existing APIs using [Full Procurement Integration generic endpoints](/construction/docs/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](/construction/docs/full-procurement-integration-generic-endpoints). - Analyze the existing APIs using [Full Procurement Integration generic endpoints](/construction/docs/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](/construction/docs/full-procurement-integration-request-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](/construction/docs/full-procurement-integration-generic-endpoints). - To explore more about ServiceTitan’s supply chain integrations and supplier features, check out [Available Supply Chain Integrations](/construction/docs/available-supply-chain-integrations). - Visit our [Full Procurement Integration](/construction/docs/full-procurement-integration-home) 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](https://www.postman.com/st-supplychain-requestmiddleware/st-supplychain-requestmiddleware/folder/0uvo6pq/supplier-configuration) 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: - [Windows](https://rmcblobstorage.blob.core.windows.net/packages/0.0.1-2411202234/win-x64/request-middleware.exe) - [MacOS](https://rmcblobstorage.blob.core.windows.net/packages/0.0.1-2411202234/osx-x64/request-middleware) - [Linux](https://rmcblobstorage.blob.core.windows.net/packages/0.0.1-2411202234/linux-x64/request-middleware) 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. 1. Open the **Start Menu** and type **Environment Variables**. 2. Select **Edit the system environment variables**. 3. In the *System Properties* window, click **Environment Variables**. ![CLI tool usage 1](https://cdn.document360.io/961862ab-d0f2-4d91-bb62-a62ee8184eff/Images/Documentation/full-procurement-integration-cli-tool-usage-image-95pvgsxp.png?sv=2026-02-06&spr=https&st=2026-10-31T02%3A36%3A44Z&se=2026-10-31T03%3A36%3A44Z&sr=c&sp=r&sig=%2FhxhftNzuLwYOS3XK7QCVVUZNYZVCoc7xrTY0ftA9%2BU%3D) 4. In the *System Variables* section, locate and select **Path**, then click **Edit**. 5. Click **New**, and add the directory path where the CLI tool is installed (e.g.,*C:\Users\AB\Downloads*). 6. 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](/construction/docs/full-procurement-integration-cli-tool-usage#use-the-environment-command): *Set* and *Get* the environment to use, such as integration or production. - [Auth-credentials](/construction/docs/full-procurement-integration-cli-tool-usage#use-the-authcredentials-command): Add authentication credentials for vendors to access Middleware APIs securely. - [Vendor-config](/construction/docs/full-procurement-integration-cli-tool-usage#use-the-vendorconfig-command): Add or update vendor configurations. - [Endpoint-config](/construction/docs/full-procurement-integration-cli-tool-usage#use-the-endpointconfig-command): Configure API endpoints. - [Vendor-credentials](/construction/docs/full-procurement-integration-cli-tool-usage#use-the-vendorcredentials-command): Add and manage vendor credentials for Middleware to have access to vendor APIs. - [Template](/construction/docs/full-procurement-integration-cli-tool-usage#use-the-template-command): Manage vendor templates for requests and responses. - [Sandbox](/construction/docs/full-procurement-integration-cli-tool-usage#use-the-sandbox-command): Test configurations in a controlled environment. - [Promote](/construction/docs/full-procurement-integration-cli-tool-usage#use-the-promote-command): Move configurations and templates from the integration environment to production. ![CLI tool usage 2](https://cdn.document360.io/961862ab-d0f2-4d91-bb62-a62ee8184eff/Images/Documentation/full-procurement-integration-cli-tool-usage-image-lj94rh88.png?sv=2026-02-06&spr=https&st=2026-10-31T02%3A36%3A44Z&se=2026-10-31T03%3A36%3A44Z&sr=c&sp=r&sig=%2FhxhftNzuLwYOS3XK7QCVVUZNYZVCoc7xrTY0ftA9%2BU%3D) > [!TIP] > **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 ![CLI tool usage 3](https://cdn.document360.io/961862ab-d0f2-4d91-bb62-a62ee8184eff/Images/Documentation/full-procurement-integration-cli-tool-usage-image-dzmoy3ix.png?sv=2026-02-06&spr=https&st=2026-10-31T02%3A36%3A44Z&se=2026-10-31T03%3A36%3A44Z&sr=c&sp=r&sig=%2FhxhftNzuLwYOS3XK7QCVVUZNYZVCoc7xrTY0ftA9%2BU%3D) ## 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 --client-secret * ![CLI tool usage 4](https://cdn.document360.io/961862ab-d0f2-4d91-bb62-a62ee8184eff/Images/Documentation/full-procurement-integration-cli-tool-usage-image-x5dk6eee.png?sv=2026-02-06&spr=https&st=2026-10-31T02%3A36%3A44Z&se=2026-10-31T03%3A36%3A44Z&sr=c&sp=r&sig=%2FhxhftNzuLwYOS3XK7QCVVUZNYZVCoc7xrTY0ftA9%2BU%3D) **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](/construction/docs/full-procurement-integration-authentication-process-1) to learn more about each authentication method. ![](https://cdn.document360.io/961862ab-d0f2-4d91-bb62-a62ee8184eff/Images/Documentation/full-procurement-integration-cli-tool-usage-image-3aqvhfgo.png?sv=2026-02-06&spr=https&st=2026-10-31T02%3A36%3A44Z&se=2026-10-31T03%3A36%3A44Z&sr=c&sp=r&sig=%2FhxhftNzuLwYOS3XK7QCVVUZNYZVCoc7xrTY0ftA9%2BU%3D) **Example**: *request-middleware vendor-config basic-config* ![CLI tool usage 5](https://cdn.document360.io/961862ab-d0f2-4d91-bb62-a62ee8184eff/Images/Documentation/full-procurement-integration-cli-tool-usage-image-azmyuj4n.png?sv=2026-02-06&spr=https&st=2026-10-31T02%3A36%3A44Z&se=2026-10-31T03%3A36%3A44Z&sr=c&sp=r&sig=%2FhxhftNzuLwYOS3XK7QCVVUZNYZVCoc7xrTY0ftA9%2BU%3D) > [!NOTE] > **Note**: The CLI tool specifies if a particular detail is required, ensuring you’re aware of required information. > [!TIP] > **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[](/construction/docs/full-procurement-integration-authentication-process-1) [Full Procurement Integration authentication process](/construction/docs/full-procurement-integration-authentication-process-1) 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. ![](https://cdn.document360.io/961862ab-d0f2-4d91-bb62-a62ee8184eff/Images/Documentation/full-procurement-integration-cli-tool-usage-image-ofnae6c6.png?sv=2026-02-06&spr=https&st=2026-10-31T02%3A36%3A44Z&se=2026-10-31T03%3A36%3A44Z&sr=c&sp=r&sig=%2FhxhftNzuLwYOS3XK7QCVVUZNYZVCoc7xrTY0ftA9%2BU%3D) **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](/construction/docs/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. ![](https://cdn.document360.io/961862ab-d0f2-4d91-bb62-a62ee8184eff/Images/Documentation/full-procurement-integration-cli-tool-usage-image-c1037ppd.png?sv=2026-02-06&spr=https&st=2026-10-31T02%3A36%3A44Z&se=2026-10-31T03%3A36%3A44Z&sr=c&sp=r&sig=%2FhxhftNzuLwYOS3XK7QCVVUZNYZVCoc7xrTY0ftA9%2BU%3D) **Example**: *request-middleware endpoint-config add --endpoint=’account’ --url=’/account/retrieve’* ![](https://cdn.document360.io/961862ab-d0f2-4d91-bb62-a62ee8184eff/Images/Documentation/full-procurement-integration-cli-tool-usage-image-oy7t5trg.png?sv=2026-02-06&spr=https&st=2026-10-31T02%3A36%3A44Z&se=2026-10-31T03%3A36%3A44Z&sr=c&sp=r&sig=%2FhxhftNzuLwYOS3XK7QCVVUZNYZVCoc7xrTY0ftA9%2BU%3D) > [!TIP] > **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](/construction/docs/full-procurement-integration-generic-endpoints) 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](/construction/docs/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’* ![CLI tool usage 6](https://cdn.document360.io/961862ab-d0f2-4d91-bb62-a62ee8184eff/Images/Documentation/full-procurement-integration-cli-tool-usage-image-0cjdl4g0.png?sv=2026-02-06&spr=https&st=2026-10-31T02%3A36%3A44Z&se=2026-10-31T03%3A36%3A44Z&sr=c&sp=r&sig=%2FhxhftNzuLwYOS3XK7QCVVUZNYZVCoc7xrTY0ftA9%2BU%3D) ## 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* ![CLI tool usage 6](https://cdn.document360.io/961862ab-d0f2-4d91-bb62-a62ee8184eff/Images/Documentation/full-procurement-integration-cli-tool-usage-image-cwxasr17.png?sv=2026-02-06&spr=https&st=2026-10-31T02%3A36%3A44Z&se=2026-10-31T03%3A36%3A44Z&sr=c&sp=r&sig=%2FhxhftNzuLwYOS3XK7QCVVUZNYZVCoc7xrTY0ftA9%2BU%3D) ## 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* ## Want to learn more? - See [Full Procurement Integration generic endpoints](/construction/docs/full-procurement-integration-generic-endpoints) - See [Full Procurement Integration authentication process](/construction/docs/full-procurement-integration-authentication-process-1)