Hosted API
This operation registers a new user in hosted API. After a new user is registered, a scan for this user can be registered with /scans.
The email address of the user
foo@bar.com
A unique token for the user provided by the partner
unique-user-token
The user's weight
{"value":80,"unit":"kg"}
The user's height
{"value":1.8,"unit":"m"}
The user's sex
male
Possible values: The user's region
north_america
Possible values: The user's state of residence
California
The user's birth date
1990-01-01
Whether the user has consented to their data being used for research
true
The terms of service
{"accepted":true,"version":"1"}
POST /users HTTP/1.1
Host: api.hosted.prismlabs.tech
Content-Type: application/json
Accept: */*
Content-Length: 282
{
"email": "foo@bar.com",
"token": "unique-user-token",
"weight": {
"value": 80,
"unit": "kg"
},
"height": {
"value": 1.8,
"unit": "m"
},
"sex": "male",
"region": "north_america",
"usaResidence": "California",
"birthDate": "1990-01-01",
"researchConsent": true,
"termsOfService": {
"accepted": true,
"version": "1"
}
}
{
"id": "unique-user-id",
"sex": "male",
"region": "north_america",
"usaResidence": "California",
"birthDate": "1990-01-01",
"weight": {
"value": 80,
"unit": "kg"
},
"height": {
"value": 1.8,
"unit": "m"
},
"token": "unique-user-token",
"email": "foo@bar.com",
"researchConsent": true
}
This operation provides the meta data for a specific user.
A unique token for the user provided by the partner
unique-user-token
GET /users/{token} HTTP/1.1
Host: api.hosted.prismlabs.tech
Accept: */*
{
"id": "unique-user-id",
"sex": "male",
"region": "north_america",
"usaResidence": "California",
"birthDate": "1990-01-01",
"weight": {
"value": 80,
"unit": "kg"
},
"height": {
"value": 1.8,
"unit": "m"
},
"token": "unique-user-token",
"email": "foo@bar.com",
"researchConsent": true
}
This operation deletes a specific user.
A unique token for the user provided by the partner
unique-user-token
DELETE /users/{token} HTTP/1.1
Host: api.hosted.prismlabs.tech
Accept: */*
{
"id": "unique-user-id",
"sex": "male",
"region": "north_america",
"usaResidence": "California",
"birthDate": "1990-01-01",
"weight": {
"value": 80,
"unit": "kg"
},
"height": {
"value": 1.8,
"unit": "m"
},
"token": "unique-user-token",
"email": "foo@bar.com",
"researchConsent": true
}
This operation updates the meta data for a specific user.
A unique token for the user provided by the partner
unique-user-token
The email address of the user
foo@bar.com
A unique token for the user provided by the partner
unique-user-token
The user's weight
{"value":80,"unit":"kg"}
The user's height
{"value":1.8,"unit":"m"}
The user's sex
male
Possible values: The user's region
north_america
Possible values: The user's state of residence
California
The user's birth date
1990-01-01
Whether the user has consented to their data being used for research
true
PATCH /users/{token} HTTP/1.1
Host: api.hosted.prismlabs.tech
Content-Type: application/json
Accept: */*
Content-Length: 233
{
"email": "foo@bar.com",
"token": "unique-user-token",
"weight": {
"value": 80,
"unit": "kg"
},
"height": {
"value": 1.8,
"unit": "m"
},
"sex": "male",
"region": "north_america",
"usaResidence": "California",
"birthDate": "1990-01-01",
"researchConsent": true
}
{
"id": "unique-user-id",
"sex": "male",
"region": "north_america",
"usaResidence": "California",
"birthDate": "1990-01-01",
"weight": {
"value": 80,
"unit": "kg"
},
"height": {
"value": 1.8,
"unit": "m"
},
"token": "unique-user-token",
"email": "foo@bar.com",
"researchConsent": true
}
GET /scans HTTP/1.1
Host: api.hosted.prismlabs.tech
Accept: */*
{}
This operation registers a new scan in hosted API.
A unique token for the user provided by the partner, that should be associated with the scan
unique-user-token
The name of the device configuration used for the scan
IPHONE_SCANNER
Possible values: The asset configuration used for the scan
The requested bodyfat method for the scan
coco
Possible values: POST /scans HTTP/1.1
Host: api.hosted.prismlabs.tech
Content-Type: application/json
Accept: */*
Content-Length: 111
{
"userToken": "unique-user-token",
"deviceConfigName": "IPHONE_SCANNER",
"assetConfigId": "",
"bodyfatMethod": "coco"
}
{
"id": "unique-scan-id",
"status": "PROCESSING",
"prismScanId": "prism-unique-scan-id",
"deviceConfigName": "IPHONE_SCANNER",
"assetConfigId": "",
"weight": {
"value": 80,
"unit": "kg"
},
"height": {
"value": 1.8,
"unit": "m"
},
"userId": "unique-user-id",
"userToken": "unique-user-token",
"createdAt": "text",
"updatedAt": "text",
"scanAssets": {
"id": "unique-scan-asset-id",
"scanId": "unique-scan-id",
"captureData": "succeeded",
"captureDataUpdatedAt": "text",
"body": "started",
"bodyUpdatedAt": "text",
"fittedBody": null,
"fittedBodyUpdatedAt": "text",
"measurement": null,
"measurementUpdatedAt": "text",
"createdAt": "text",
"updatedAt": "text"
},
"measurements": {
"neckFit": 1,
"shoulderFit": 1,
"upperChestFit": 1,
"chestFit": 1,
"lowerChestFit": 1,
"waistFit": 1,
"waistNavyFit": 1,
"stomachFit": 1,
"hipsFit": 1,
"upperThighLeftFit": 1,
"upperThighRightFit": 1,
"thighLeftFit": 1,
"thighRightFit": 1,
"lowerThighLeftFit": 1,
"lowerThighRightFit": 1,
"calfLeftFit": 1,
"calfRightFit": 1,
"ankleLeftFit": 1,
"ankleRightFit": 1,
"midArmRightFit": 1,
"midArmLeftFit": 1,
"lowerArmRightFit": 1,
"lowerArmLeftFit": 1,
"waistToHipRatio": 1,
"forearmLeftFit": 1,
"forearmRightFit": 1,
"wristLeftFit": 1,
"wristRightFit": 1,
"bmiPredicted": 1,
"bmiConfidence": 1,
"bodyRoundnessIndex": 1,
"fullBodyVolume": 1
},
"bodyfat": {
"bodyfatMethod": "coco",
"bodyfatPercentage": 20,
"leanMassPercentage": 80,
"fatMass": 16,
"leanMass": 64,
"vatPercentage": 1.5,
"vatMass": 1.2
}
}
This operation provides the status of a specific scan.
The unique ID of the scan
unique-scan-id
GET /scans/{id} HTTP/1.1
Host: api.hosted.prismlabs.tech
Accept: */*
{
"id": "unique-scan-id",
"status": "PROCESSING",
"prismScanId": "prism-unique-scan-id",
"deviceConfigName": "IPHONE_SCANNER",
"assetConfigId": "",
"weight": {
"value": 80,
"unit": "kg"
},
"height": {
"value": 1.8,
"unit": "m"
},
"userId": "unique-user-id",
"userToken": "unique-user-token",
"createdAt": "text",
"updatedAt": "text",
"scanAssets": {
"id": "unique-scan-asset-id",
"scanId": "unique-scan-id",
"captureData": "succeeded",
"captureDataUpdatedAt": "text",
"body": "started",
"bodyUpdatedAt": "text",
"fittedBody": null,
"fittedBodyUpdatedAt": "text",
"measurement": null,
"measurementUpdatedAt": "text",
"createdAt": "text",
"updatedAt": "text"
},
"measurements": {
"neckFit": 1,
"shoulderFit": 1,
"upperChestFit": 1,
"chestFit": 1,
"lowerChestFit": 1,
"waistFit": 1,
"waistNavyFit": 1,
"stomachFit": 1,
"hipsFit": 1,
"upperThighLeftFit": 1,
"upperThighRightFit": 1,
"thighLeftFit": 1,
"thighRightFit": 1,
"lowerThighLeftFit": 1,
"lowerThighRightFit": 1,
"calfLeftFit": 1,
"calfRightFit": 1,
"ankleLeftFit": 1,
"ankleRightFit": 1,
"midArmRightFit": 1,
"midArmLeftFit": 1,
"lowerArmRightFit": 1,
"lowerArmLeftFit": 1,
"waistToHipRatio": 1,
"forearmLeftFit": 1,
"forearmRightFit": 1,
"wristLeftFit": 1,
"wristRightFit": 1,
"bmiPredicted": 1,
"bmiConfidence": 1,
"bodyRoundnessIndex": 1,
"fullBodyVolume": 1
},
"bodyfat": {
"bodyfatMethod": "coco",
"bodyfatPercentage": 20,
"leanMassPercentage": 80,
"fatMass": 16,
"leanMass": 64,
"vatPercentage": 1.5,
"vatMass": 1.2
}
}
This operation deletes a specific scan.
The unique ID of the scan
unique-scan-id
DELETE /scans/{id} HTTP/1.1
Host: api.hosted.prismlabs.tech
Accept: */*
{
"id": "unique-scan-id",
"status": "PROCESSING",
"prismScanId": "prism-unique-scan-id",
"deviceConfigName": "IPHONE_SCANNER",
"assetConfigId": "",
"weight": {
"value": 80,
"unit": "kg"
},
"height": {
"value": 1.8,
"unit": "m"
},
"userId": "unique-user-id",
"userToken": "unique-user-token",
"createdAt": "text",
"updatedAt": "text",
"scanAssets": {
"id": "unique-scan-asset-id",
"scanId": "unique-scan-id",
"captureData": "succeeded",
"captureDataUpdatedAt": "text",
"body": "started",
"bodyUpdatedAt": "text",
"fittedBody": null,
"fittedBodyUpdatedAt": "text",
"measurement": null,
"measurementUpdatedAt": "text",
"createdAt": "text",
"updatedAt": "text"
},
"measurements": {
"neckFit": 1,
"shoulderFit": 1,
"upperChestFit": 1,
"chestFit": 1,
"lowerChestFit": 1,
"waistFit": 1,
"waistNavyFit": 1,
"stomachFit": 1,
"hipsFit": 1,
"upperThighLeftFit": 1,
"upperThighRightFit": 1,
"thighLeftFit": 1,
"thighRightFit": 1,
"lowerThighLeftFit": 1,
"lowerThighRightFit": 1,
"calfLeftFit": 1,
"calfRightFit": 1,
"ankleLeftFit": 1,
"ankleRightFit": 1,
"midArmRightFit": 1,
"midArmLeftFit": 1,
"lowerArmRightFit": 1,
"lowerArmLeftFit": 1,
"waistToHipRatio": 1,
"forearmLeftFit": 1,
"forearmRightFit": 1,
"wristLeftFit": 1,
"wristRightFit": 1,
"bmiPredicted": 1,
"bmiConfidence": 1,
"bodyRoundnessIndex": 1,
"fullBodyVolume": 1
},
"bodyfat": {
"bodyfatMethod": "coco",
"bodyfatPercentage": 20,
"leanMassPercentage": 80,
"fatMass": 16,
"leanMass": 64,
"vatPercentage": 1.5,
"vatMass": 1.2
}
}
This operation provides the body measurements of a specific scan.
The unique ID of the scan
unique-scan-id
GET /scans/{scanId}/measurements HTTP/1.1
Host: api.hosted.prismlabs.tech
Accept: */*
{
"neckFit": 1,
"shoulderFit": 1,
"upperChestFit": 1,
"chestFit": 1,
"lowerChestFit": 1,
"waistFit": 1,
"waistNavyFit": 1,
"stomachFit": 1,
"hipsFit": 1,
"upperThighLeftFit": 1,
"upperThighRightFit": 1,
"thighLeftFit": 1,
"thighRightFit": 1,
"lowerThighLeftFit": 1,
"lowerThighRightFit": 1,
"calfLeftFit": 1,
"calfRightFit": 1,
"ankleLeftFit": 1,
"ankleRightFit": 1,
"midArmRightFit": 1,
"midArmLeftFit": 1,
"lowerArmRightFit": 1,
"lowerArmLeftFit": 1,
"waistToHipRatio": 1,
"forearmLeftFit": 1,
"forearmRightFit": 1,
"wristLeftFit": 1,
"wristRightFit": 1,
"bmiPredicted": 1,
"bmiConfidence": 1,
"bodyRoundnessIndex": 1,
"fullBodyVolume": 1
}
This operation provides an upload url for a specific scan for uploading capture data to Prism.
The unique ID of the scan
unique-scan-id
POST /scans/{scanId}/upload-url HTTP/1.1
Host: api.hosted.prismlabs.tech
Accept: */*
{
"expirationTime": "text",
"url": "https://signed-url"
}
This operation provides the asset status of a specific scan.
The unique ID of the scan
unique-scan-id
GET /scans/{scanId}/scan-assets HTTP/1.1
Host: api.hosted.prismlabs.tech
Accept: */*
{
"id": "unique-scan-asset-id",
"scanId": "unique-scan-id",
"captureData": "succeeded",
"captureDataUpdatedAt": "text",
"body": "started",
"bodyUpdatedAt": "text",
"fittedBody": null,
"fittedBodyUpdatedAt": "text",
"measurement": null,
"measurementUpdatedAt": "text",
"createdAt": "text",
"updatedAt": "text"
}
This operation provides the asset urls of a specific body shape prediction.
The unique ID of the body shape prediction
unique-body-shape-prediction-id
GET /body-shape-prediction/{bodyShapePredictionId}/asset-urls HTTP/1.1
Host: api.hosted.prismlabs.tech
Accept: */*
{
"bodyShapePrediction": "text"
}
This operation provides the asset urls of a specific scan.
The unique ID of the scan
unique-scan-id
GET /scans/{scanId}/asset-urls HTTP/1.1
Host: api.hosted.prismlabs.tech
Accept: */*
{
"previewImage": "text",
"model": "text",
"canonicalBody": "text",
"texture": "text",
"material": "text",
"stripes": "text"
}
This operation provides a specific asset url of a specific scan.
The unique ID of the scan
unique-scan-id
The specific asset type of the scan
GET /scans/{scanId}/asset-urls/{assetType} HTTP/1.1
Host: api.hosted.prismlabs.tech
Accept: */*
text
This operation provides the bodyfat of a specific scan.
The unique ID of the scan
unique-scan-id
GET /scans/{scanId}/bodyfat HTTP/1.1
Host: api.hosted.prismlabs.tech
Accept: */*
{
"bodyfatMethod": "coco",
"bodyfatPercentage": 20,
"leanMassPercentage": 80,
"fatMass": 16,
"leanMass": 64,
"vatPercentage": 1.5,
"vatMass": 1.2
}
GET /users/{userToken}/terms HTTP/1.1
Host: api.hosted.prismlabs.tech
Accept: */*
[
{
"userId": "text",
"userToken": "text",
"accepted": true,
"version": "text",
"acceptanceDate": "text"
}
]
POST /users/{userToken}/terms HTTP/1.1
Host: api.hosted.prismlabs.tech
Content-Type: application/json
Accept: */*
Content-Length: 18
{
"version": "text"
}
{
"userId": "text",
"userToken": "text",
"accepted": true,
"version": "text",
"acceptanceDate": "text"
}
This operation provides the health report of a specific scan.
The unique ID of the scan
unique-scan-id
The unit system in which values will be returned
GET /scans/{scanId}/health-report HTTP/1.1
Host: api.hosted.prismlabs.tech
Accept: */*
{
"scan": {},
"user": {},
"bodyFatPercentageReport": {},
"leanMassReport": {},
"fatMassReport": {},
"waistCircumferenceReport": {},
"waistToHipRatioReport": {},
"waistToHeightRatioReport": {},
"metabolismReport": {}
}
This operation registers a new body shape prediction for a specific scan.
NOTE: Either a target weight or a target body fat percentage (but not both) must be specified
The unique ID of the scan on which the prediction should be based on
unique-scan-id
The prediction type that should be used for the prediction
weight_loss
Possible values: The target weight (in kg) for the prediction. This or 'targetBodyfat' should be specified
50
The target body fat percentage for the prediction. This or 'targetWeight' should be specified
20
POST /body-shape-prediction HTTP/1.1
Host: api.hosted.prismlabs.tech
Content-Type: application/json
Accept: */*
Content-Length: 95
{
"scanId": "unique-scan-id",
"predictionType": "weight_loss",
"targetWeight": 50,
"targetBodyfat": 20
}
{
"id": "unique-body-shape-prediction-id",
"status": "PROCESSING",
"scanId": "unique-scan-id",
"predictionType": "weight_loss",
"targetWeight": 50,
"targetBodyfat": 20,
"createdAt": "text",
"updatedAt": "text"
}
This operation provides the status of a specific body shape prediction.
The unique ID of the body shape prediction
unique-body-shape-prediction-id
GET /body-shape-prediction/{bodyShapePredictionId} HTTP/1.1
Host: api.hosted.prismlabs.tech
Accept: */*
{
"id": "unique-body-shape-prediction-id",
"status": "PROCESSING",
"scanId": "unique-scan-id",
"predictionType": "weight_loss",
"targetWeight": 50,
"targetBodyfat": 20,
"createdAt": "text",
"updatedAt": "text"
}
This operation deletes a specific body shape prediction.
The unique ID of the body shape prediction
unique-body-shape-prediction-id
DELETE /body-shape-prediction/{bodyShapePredictionId} HTTP/1.1
Host: api.hosted.prismlabs.tech
Accept: */*
{
"id": "unique-body-shape-prediction-id",
"status": "PROCESSING",
"scanId": "unique-scan-id",
"predictionType": "weight_loss",
"targetWeight": 50,
"targetBodyfat": 20,
"createdAt": "text",
"updatedAt": "text"
}
Last updated