Sandbox
Create a simulated teammate
Creates a simulated test teammate from a preset, sends its starting history and starts building its first program as a job. The same external_id, preset and seed answer the same teammate; another preset or seed is 409. Needs a test key.
POST
/
v1
/
sandbox
/
teammates
Create a simulated teammate
curl --request POST \
--url https://api.technicallyfit.com/v1/sandbox/teammates \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"external_id": "<string>",
"seed": 0
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({external_id: '<string>', seed: 0})
};
fetch('https://api.technicallyfit.com/v1/sandbox/teammates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.technicallyfit.com/v1/sandbox/teammates"
payload = {
"external_id": "<string>",
"seed": 0
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"history": {
"events": 123,
"results": {
"accepted": 123,
"duplicate": 123,
"rejected": 123
},
"weeks": 123
},
"program_job_id": "<string>",
"simulated_now": "<string>",
"teammate": {
"external_id": "<string>",
"preset": "new_to_training",
"seed": 123,
"simulated": true,
"weeks_simulated": 123
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}Body
application/json
⌘I
Create a simulated teammate
curl --request POST \
--url https://api.technicallyfit.com/v1/sandbox/teammates \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"external_id": "<string>",
"seed": 0
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({external_id: '<string>', seed: 0})
};
fetch('https://api.technicallyfit.com/v1/sandbox/teammates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.technicallyfit.com/v1/sandbox/teammates"
payload = {
"external_id": "<string>",
"seed": 0
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"history": {
"events": 123,
"results": {
"accepted": 123,
"duplicate": 123,
"rejected": 123
},
"weeks": 123
},
"program_job_id": "<string>",
"simulated_now": "<string>",
"teammate": {
"external_id": "<string>",
"preset": "new_to_training",
"seed": 123,
"simulated": true,
"weeks_simulated": 123
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"request_id": "<string>"
}
}