Passthrough requests allow you to make direct API calls to an integration’s API using the credentials already stored in Trackstar. This is useful when you need to access data that Trackstar may not make requests for.
Supported Integrations
Passthrough is currently being rolled out on a per-integration basis. The following integrations are currently supported:
WMS
- Amazon
- Deposco
- Linnworks
- Mintsoft
- ShipHero
- Tiktok
- Veracore
- Walmart
Cart
- Amazon
- NuOrder
- Tiktok
- Shopify
- Wayfair
This list is regularly updated as we add passthrough support to more integrations.
API Endpoint
Send POST requests to the URL below with the required body parameters to create a passthrough request. <integration_type> will either be wms or cart.
https://production.trackstarhq.com/<integration_type>/passthrough
Like all Trackstar API calls, you’ll need to authenticate using your API key and the access token for the specific connection.
Request Parameters
The HTTP method to use for the request. Must be one of: GET, POST, PUT, PATCH, DELETE.
The integration-specific endpoint path (e.g., /graphql, /api/v1/orders). This is the path on the integration’s API, not Trackstar’s.
The request body to send to the integration. For example, for GraphQL requests, this would contain your query. Only used with POST, PUT, and PATCH methods.
Optional additional headers to send with the request. Trackstar automatically handles authentication headers for you.
Optional query parameters to append to the request URL (e.g., {"page": "1", "limit": "100"}).
The passthrough endpoint returns the raw response from the integration’s API with the following structure:
- status_code: The HTTP status code returned by the integration
- headers: Response headers from the integration
- body: The raw response body from the integration
Example Request
Here’s an example of making a passthrough request to retrieve data from an integration-specific endpoint:
import requests
TRACKSTAR_API_KEY = "your_api_key"
ACCESS_TOKEN = "your_access_token"
url = "https://production.trackstarhq.com/wms/passthrough"
headers = {
"x-trackstar-api-key": TRACKSTAR_API_KEY,
"x-trackstar-access-token": ACCESS_TOKEN,
"Content-Type": "application/json"
}
payload = {
"method": "GET",
"path": "/api/v1/custom-endpoint",
"params": {
"page": "1",
"limit": "50"
}
}
response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()
data = response.json()
# Access the raw integration response
print(f"Status: {data['status_code']}")
print(f"Body: {data['body']}")
const axios = require('axios');
const TRACKSTAR_API_KEY = 'your_api_key';
const ACCESS_TOKEN = 'your_access_token';
const url = 'https://production.trackstarhq.com/wms/passthrough';
const headers = {
'x-trackstar-api-key': TRACKSTAR_API_KEY,
'x-trackstar-access-token': ACCESS_TOKEN,
'Content-Type': 'application/json'
};
const payload = {
method: 'GET',
path: '/api/v1/custom-endpoint',
params: {
page: '1',
limit: '50'
}
};
const response = await axios.post(url, payload, { headers });
// Access the raw integration response
console.log(`Status: ${response.data.status_code}`);
console.log(`Body: ${response.data.body}`);
curl --request POST \
--url https://production.trackstarhq.com/wms/passthrough \
--header 'x-trackstar-api-key: your_api_key' \
--header 'x-trackstar-access-token: your_access_token' \
--header 'Content-Type: application/json' \
--data '{
"method": "GET",
"path": "/api/v1/custom-endpoint",
"params": {
"page": "1",
"limit": "50"
}
}'
Example: GraphQL Request
Some integrations use GraphQL. Here’s how to make a GraphQL query via passthrough:
import requests
TRACKSTAR_API_KEY = "your_api_key"
ACCESS_TOKEN = "your_access_token"
url = "https://production.trackstarhq.com/wms/passthrough"
headers = {
"x-trackstar-api-key": TRACKSTAR_API_KEY,
"x-trackstar-access-token": ACCESS_TOKEN,
"Content-Type": "application/json"
}
# GraphQL query
payload = {
"method": "POST",
"path": "/graphql",
"headers": {
"Content-Type": "application/json"
},
"data": {
"query": """
query {
products(first: 10) {
edges {
node {
id
name
sku
}
}
}
}
"""
}
}
response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()
data = response.json()
# Access the GraphQL response
graphql_response = data['body']
print(graphql_response)
const axios = require('axios');
const TRACKSTAR_API_KEY = 'your_api_key';
const ACCESS_TOKEN = 'your_access_token';
const url = 'https://production.trackstarhq.com/wms/passthrough';
const headers = {
'x-trackstar-api-key': TRACKSTAR_API_KEY,
'x-trackstar-access-token': ACCESS_TOKEN,
'Content-Type': 'application/json'
};
// GraphQL query
const payload = {
method: 'POST',
path: '/graphql',
headers: {
'Content-Type': 'application/json'
},
data: {
query: `
query {
products(first: 10) {
edges {
node {
id
name
sku
}
}
}
}
`
}
};
const response = await axios.post(url, payload, { headers });
// Access the GraphQL response
const graphqlResponse = response.data.body;
console.log(graphqlResponse);
curl --request POST \
--url https://production.trackstarhq.com/wms/passthrough \
--header 'x-trackstar-api-key: your_api_key' \
--header 'x-trackstar-access-token: your_access_token' \
--header 'Content-Type: application/json' \
--data '{
"method": "POST",
"path": "/graphql",
"headers": {
"Content-Type": "application/json"
},
"data": {
"query": "query { products(first: 10) { edges { node { id name sku } } } }"
}
}'
Important Notes
Passthrough is currently in beta. If you attempt to use passthrough with an integration that doesn’t support it, you will receive a 501 error indicating the endpoint is not implemented.
- Authentication: Trackstar automatically handles authentication with the integration. You don’t need to include API keys or authentication tokens in your passthrough request.
- Integration Documentation: You’ll need to refer to the specific integration’s API documentation to understand available endpoints, request formats, and response structures.
- Response Format: The response body will match the format returned by the integration, not Trackstar’s unified format.
- Rate Limits: Passthrough requests are subject to both Trackstar’s rate limits and the rate limits of the underlying integration.
- Cart Passthrough: Cart integrations also support passthrough via
/cart/passthrough using the same request format shown above.