curl --request POST \
--url https://production.trackstarhq.com/sandbox/generate-sandbox/{integration_type} \
--header 'x-trackstar-api-key: <x-trackstar-api-key>'import requests
url = "https://production.trackstarhq.com/sandbox/generate-sandbox/{integration_type}"
headers = {"x-trackstar-api-key": "<x-trackstar-api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-trackstar-api-key': '<x-trackstar-api-key>'}};
fetch('https://production.trackstarhq.com/sandbox/generate-sandbox/{integration_type}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://production.trackstarhq.com/sandbox/generate-sandbox/{integration_type}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-trackstar-api-key: <x-trackstar-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://production.trackstarhq.com/sandbox/generate-sandbox/{integration_type}"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-trackstar-api-key", "<x-trackstar-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://production.trackstarhq.com/sandbox/generate-sandbox/{integration_type}")
.header("x-trackstar-api-key", "<x-trackstar-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://production.trackstarhq.com/sandbox/generate-sandbox/{integration_type}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-trackstar-api-key"] = '<x-trackstar-api-key>'
response = http.request(request)
puts response.read_body{
"access_token": "your_permanent_access_token",
"connection_id": "unique_connection_id",
"integration_name": "sandbox",
"customer_id": "customer_id",
"available_actions": [
"get_inventory",
"get_products"
],
"me": {
"account_id": "account_12345",
"account_name": "My WMS Account"
}
}{
"error": "<string>",
"id": "<string>"
}{
"error": "<string>",
"detail": {
"<location>": {
"<field_name>": [
"<string>"
]
}
}
}Generate Sandbox
Generates a sandbox with mocked out data. Uses the same connection ID every time, and will reset any existing sandbox. See the walkthrough for more information.
curl --request POST \
--url https://production.trackstarhq.com/sandbox/generate-sandbox/{integration_type} \
--header 'x-trackstar-api-key: <x-trackstar-api-key>'import requests
url = "https://production.trackstarhq.com/sandbox/generate-sandbox/{integration_type}"
headers = {"x-trackstar-api-key": "<x-trackstar-api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-trackstar-api-key': '<x-trackstar-api-key>'}};
fetch('https://production.trackstarhq.com/sandbox/generate-sandbox/{integration_type}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://production.trackstarhq.com/sandbox/generate-sandbox/{integration_type}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-trackstar-api-key: <x-trackstar-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://production.trackstarhq.com/sandbox/generate-sandbox/{integration_type}"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-trackstar-api-key", "<x-trackstar-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://production.trackstarhq.com/sandbox/generate-sandbox/{integration_type}")
.header("x-trackstar-api-key", "<x-trackstar-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://production.trackstarhq.com/sandbox/generate-sandbox/{integration_type}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-trackstar-api-key"] = '<x-trackstar-api-key>'
response = http.request(request)
puts response.read_body{
"access_token": "your_permanent_access_token",
"connection_id": "unique_connection_id",
"integration_name": "sandbox",
"customer_id": "customer_id",
"available_actions": [
"get_inventory",
"get_products"
],
"me": {
"account_id": "account_12345",
"account_name": "My WMS Account"
}
}{
"error": "<string>",
"id": "<string>"
}{
"error": "<string>",
"detail": {
"<location>": {
"<field_name>": [
"<string>"
]
}
}
}Headers
Your organization-level Trackstar API key.
"<x-trackstar-api-key>"
Path Parameters
Response
Successful response
The permanent access token for the integration used to make requests to the Trackstar API.
"your_permanent_access_token"
A unique connection ID for the integration.
"unique_connection_id"
The name of the integration that was installed.
"sandbox"
An identifier for your end customer.
"customer_id"
A list of actions that the integration supports.
Actions supported by the integration
["get_inventory", "get_products"]
Information that helps identify the connected account. If null, the integration does not provide this information.
Show child attributes
Show child attributes
{ "account_id": "account_12345", "account_name": "My WMS Account" }