> For the complete documentation index, see [llms.txt](https://docs.partssource.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.partssource.com/api/getting-started/making-your-first-api-request.md).

# Making your first API request

This guide walks you through making your first request to a PartsSource API.

To make your first API call, you need to perform the following actions:

{% stepper %}
{% step %}
**Create an authentication token**. The token gives you access to PartsSource API resources. You must include the token in the **Authorization** header of all requests using the Bearer scheme:

```
Authorization: Bearer {your-access-token}
```

See [Authentication](/api/authentication/overview.md) for details on obtaining an access token.
{% endstep %}

{% step %}
**Choose the endpoint that corresponds to the resource you want to interact with.** Review the API Reference Documentation to select the right endpoint for your test.
{% endstep %}

{% step %}
**Prepare the full request and send it.** In this example, we'll use cURL to retrieve order details. Use the `GET` method to retrieve data without modifying it.

{% hint style="warning" %}
The following request example contains a sample authentication token. Don't use it in your requests. Generate your own token.
{% endhint %}

```bash
curl --location \
--request GET 'https://api.partssource.com/customer/orders/12345' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer 93dc8837-2911-4711-a766-59c1167a974d'
```

Always include a request body in `POST`, `PUT`, or `PATCH` requests.
{% endstep %}

{% step %}
**Evaluate the response.** The API returns `200 OK` and the order details in JSON format. If your request failed, you receive an error code. Refer to [Troubleshooting](/api/resources/troubleshooting.md) for help resolving issues.
{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.partssource.com/api/getting-started/making-your-first-api-request.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
