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:

1

Create an authentication token. The token gives you access to PartsSource API resources depending on your assigned scopes. You must include the token in the Authorization header of all requests using the Bearer scheme:

Authorization: Bearer {your-access-token}

See Authentication for details on obtaining an access token.

2

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.

3

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.

circle-exclamation
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.

4

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 for help resolving issues.

Last updated