# Copy of API Documentation

<figure><img src="/files/sGYg09OFTyLzvuSjCPDr" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
*To add the API module to your Fast-Weigh subscription, contact us at 865-219-2980 or* [*support@tacinsight.com*](mailto:mailto:support@tacinsight.com)*.*
{% endhint %}

[Fast-Weigh](https://fast-weigh.com/) is a modern cloud-based truck ticketing, ordering, and dispatching platform.

The Fast-Weigh GraphQL APs allow system integrators to interface with the Fast-Weigh data model to extend functionality and/or extract data for third-party use.

## Authentication

The Fast-Weigh REST & GraphQL API services use token-based authentication with a custom `x-api-key` HTTP header record. The token should be included with every call.

{% hint style="info" %}
**Basic Authentication has been deprecated.**
{% endhint %}

We have transitioned from using Basic Authentication with username/password credentials to token-based authentication. Existing integrations will continue to work, but please note that Basic Auth has been deprecated and will be removed in the future.

## Graph QL

**Your endpoint:**

You can find your endpoint listed on the [API Info](https://tacinsight.zohodesk.com/portal/en/kb/articles/149-api-overview) page under the settings gear of the Fast-Weigh Web Portal.

**Don't see API Info on your web portal?**

1. You may not be an admin of your Fast-Weigh account. Check with a known admin to see if they can set up this key.
2. Your company's account may not have this enabled. If this is the case you will need to contact your sales or onboarding rep to get it enabled.

The endpoint should look something like this: [`https://server-name.fast-weigh.dev/v1/graphql`](https://server-name.fast-weigh.dev/v1/graphql)

**API schema explorer:**

Your credentials will allow you to use the Insomnia tool to build queries. There, you can dive into the data model docs as well as test queries with the live editor.

## REST API

The REST API generally handles CREATE and UPDATE calls.

The OpenAPI/Swagger docs can be found here: <https://api.fast-weigh.com/swagger>

### Create an API key and get an Endpoint <a href="#create_an_api_key_and_get_endpoint" id="create_an_api_key_and_get_endpoint"></a>

On the Fast-Weigh Web Portal, go to the [API Info](https://portal.fast-weigh.com/APIInfo) page under the settings gear.

<figure><img src="/files/FXB5OMzzhW5Snk7Hh9eO" alt=""><figcaption></figcaption></figure>

You should see the GraphQL Endpoint listed here as well as any available keys.

To create a new key click the "+ New Key" button on the grid and fill in the info required.

**Don't see API Info on your web portal?**

1. You may not be an admin of your Fast-Weigh account. Check with a known admin to see if they can set up this key.
2. Your company's account may not have this enabled. If this is the case you will need to contact your sales or onboarding rep to get it enabled.

### Making requests <a href="#making_requests" id="making_requests"></a>

When making requests to the GraphQL or REST APIs include the following header:

```
x-api-key: your-key-goes-here
```

**Download tooling**

We recommend using a tool called [Insomnia Client](https://insomnia.rest/products/insomnia) for query development and debugging. It has some great built-in features tailored for join REST and GraphQL development that make it quick and easy to get started.

[Grab the free download here](https://insomnia.rest/download)

### **Setup development workspace**

Create a new request collection to house your queries.

![](https://docs.fast-weigh.dev/static/insomnia-req-collection.png)

**Create a request**

In this Request Collection, you'll define your queries.

*Note: Make sure you remember to set the HTTP method to POST and the body to GraphQL Query.*

![](https://docs.fast-weigh.dev/static/graphql-query-setup.png)

**Add your endpoint and API key**

In your request, fill in the URL/endpoint and go to the "Header" tab to paste your API key.

![](https://docs.fast-weigh.dev/static/insomnia-api-key.png)<br>

**View documentation and enable autocompletion**

Once your API key and endpoint are pasted in, you can view the always-up-to-date data model docs without leaving Insomnia.

Back on the "GraphQL" tab you should see a "schema" option at the top right of the query box.

Clicking on that will give you the option to refresh the schema. Doing so will fetch the latest data model from the server and build live documentation.

![](https://docs.fast-weigh.dev/static/insomnia-refresh-schema.png)

Once you have refreshed, you'll have access to the documentation as well as query auto-completion within the editor.

![](https://docs.fast-weigh.dev/static/insomnia-docs.png)

**Adding the Copy Telerik Body Plugin**

Once you have written your query and are ready to use to it build a [Telerik Data Source](/fast-weigh-knowledge-base/references/deprecated-graphql-documentation/reporting-with-graphql.md), you will need the "Fast-Weigh: Copy Telerik Body" Plugin to generate your Telerik Data Source Body.

On the top of the screen, click Application > Preferences.

On the Insomnia Preferences pop-up, navigate to Plugins.

![](https://s3.amazonaws.com/helpscout.net/docs/assets/5dadcbbb04286364bc90ab50/images/6203e107d86136157d9a26d9/file-7Dl8N1nVc6.png)

In the npm-package-name field, enter `insomnia-plugin-fast-weigh` and click Install Plugin.

You should now see the plugin in the list.

![](https://s3.amazonaws.com/helpscout.net/docs/assets/5dadcbbb04286364bc90ab50/images/6203e13b025ca67522c796df/file-W9wgfQNjLV.png)

Close the Preferences pop-up and right-click an existing Request name. You should now see the Fast-Weigh: Copy Telerik Body plugin as an option.

![](https://s3.amazonaws.com/helpscout.net/docs/assets/5dadcbbb04286364bc90ab50/images/6203e24639e5d05141b67eb6/file-2agskhnSJy.png)

![](https://s3.amazonaws.com/helpscout.net/docs/assets/5dadcbbb04286364bc90ab50/images/6203e266025ca67522c796ed/file-B4Kmog6opy.png)

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.tacinsight.com/fast-weigh-knowledge-base/references/copy-of-api-documentation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
