API Reference
API Reference [dev]
API Reference [dev]
  • Hosted API
    • API Reference v1.0
    • Specifications
  • PRISM API
    • Getting started with the Prism API
      • Partner & scanning devices onboarding
      • API Authentication
      • API Version
      • API responses and assets delivery
      • Getting from scan to insights
      • Sample data
      • API endpoints
      • Webhook Notification Events
      • Uploading data
    • API Reference 1.0
    • Specifications
Powered by GitBook
On this page
  1. Hosted API

API Reference v1.0

NextGetting started with the Prism API

Last updated 10 months ago

Request Headers

Name
Value

Content-Type

application/json

Accept

application/json;v=1

Authorization

Bearer <token>

Users

Terms

Scans

Measurements

Upload URL

Scan Assets

Asset URLs

Bodyfat

Health Report

Future Me

delete a user

delete

This operation deletes a specific user.

Path parameters
tokenstringRequired

A unique token for the user provided by the partner

Example: unique-user-token
Responses
200Success
application/json;v=1
delete
DELETE /users/{token} HTTP/1.1
Host: api.hosted.prismlabs.tech
Accept: */*
200Success
{
  "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 meta data of a user

get

This operation provides the meta data for a specific user.

Path parameters
tokenstringRequired

A unique token for the user provided by the partner

Example: unique-user-token
Responses
200Success
application/json;v=1
get
GET /users/{token} HTTP/1.1
Host: api.hosted.prismlabs.tech
Accept: */*
200Success
{
  "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
Path parameters
userTokenstringRequired
Responses
200Success
application/json;v=1
get
GET /users/{userToken}/terms HTTP/1.1
Host: api.hosted.prismlabs.tech
Accept: */*
200Success
[
  {
    "userId": "text",
    "userToken": "text",
    "accepted": true,
    "version": "text",
    "acceptanceDate": "text"
  }
]
get
Responses
200Success
application/json;v=1
Responseobject
get
GET /scans HTTP/1.1
Host: api.hosted.prismlabs.tech
Accept: */*
200Success
{}

get status of a scan

get

This operation provides the status of a specific scan.

Path parameters
idstringRequired

The unique ID of the scan

Example: unique-scan-id
Responses
200Success
application/json;v=1
get
GET /scans/{id} HTTP/1.1
Host: api.hosted.prismlabs.tech
Accept: */*
200Success
{
  "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"
  },
  "scanQuality": "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
  }
}

delete a scan

delete

This operation deletes a specific scan.

Path parameters
idstringRequired

The unique ID of the scan

Example: unique-scan-id
Responses
200Success
application/json;v=1
delete
DELETE /scans/{id} HTTP/1.1
Host: api.hosted.prismlabs.tech
Accept: */*
200Success
{
  "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"
  },
  "scanQuality": "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
  }
}

get body measurements of a scan

get

This operation provides the body measurements of a specific scan.

Path parameters
scanIdstringRequired

The unique ID of the scan

Example: unique-scan-id
Responses
200Success
application/json;v=1
get
GET /scans/{scanId}/measurements HTTP/1.1
Host: api.hosted.prismlabs.tech
Accept: */*
200Success
{
  "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
}

get the upload url

post

This operation provides an upload url for a specific scan for uploading capture data to Prism.

Path parameters
scanIdstringRequired

The unique ID of the scan

Example: unique-scan-id
Responses
201Success
application/json;v=1
post
POST /scans/{scanId}/upload-url HTTP/1.1
Host: api.hosted.prismlabs.tech
Accept: */*
201Success
{
  "expirationTime": "text",
  "url": "https://signed-url"
}

get asset status of a scan

get

This operation provides the asset status of a specific scan.

Path parameters
scanIdstringRequired

The unique ID of the scan

Example: unique-scan-id
Responses
200Success
application/json;v=1
get
GET /scans/{scanId}/scan-assets HTTP/1.1
Host: api.hosted.prismlabs.tech
Accept: */*
200Success
{
  "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"
}

get asset urls of a scan

get

This operation provides the asset urls of a specific scan.

Path parameters
scanIdstringRequired

The unique ID of the scan

Example: unique-scan-id
Responses
200Success
application/json;v=1
get
GET /scans/{scanId}/asset-urls HTTP/1.1
Host: api.hosted.prismlabs.tech
Accept: */*
200Success
{
  "previewImage": "text",
  "model": "text",
  "canonicalBody": "text",
  "texture": "text",
  "material": "text",
  "stripes": "text"
}

get specific asset url of a scan

get

This operation provides a specific asset url of a specific scan.

Path parameters
scanIdstringRequired

The unique ID of the scan

Example: unique-scan-id
assetTypestring · enumRequired

The specific asset type of the scan

Possible values:
Responses
200Success
application/json;v=1
Responsestring
get
GET /scans/{scanId}/asset-urls/{assetType} HTTP/1.1
Host: api.hosted.prismlabs.tech
Accept: */*
200Success
text

get bodyfat of a scan

get

This operation provides the bodyfat of a specific scan.

Path parameters
scanIdstringRequired

The unique ID of the scan

Example: unique-scan-id
Responses
200Success
application/json;v=1
get
GET /scans/{scanId}/bodyfat HTTP/1.1
Host: api.hosted.prismlabs.tech
Accept: */*
200Success
{
  "bodyfatMethod": "coco",
  "bodyfatPercentage": 20,
  "leanMassPercentage": 80,
  "fatMass": 16,
  "leanMass": 64,
  "vatPercentage": 1.5,
  "vatMass": 1.2
}

get the health report of a scan

get

This operation provides the health report of a specific scan.

Path parameters
scanIdstringRequired

The unique ID of the scan

Example: unique-scan-id
Query parameters
unit-systemstring · enumOptional

The unit system in which values will be returned

Possible values:
Responses
200Success
application/json;v=1
get
GET /scans/{scanId}/health-report HTTP/1.1
Host: api.hosted.prismlabs.tech
Accept: */*
200Success
{
  "scan": {},
  "user": {},
  "bodyFatPercentageReport": {},
  "leanMassReport": {},
  "fatMassReport": {},
  "waistCircumferenceReport": {},
  "waistToHipRatioReport": {},
  "waistToHeightRatioReport": {},
  "metabolismReport": {}
}

get status of a body shape prediction

get

This operation provides the status of a specific body shape prediction.

Path parameters
bodyShapePredictionIdstringRequired

The unique ID of the body shape prediction

Example: unique-body-shape-prediction-id
Responses
200Success
application/json;v=1
get
GET /body-shape-prediction/{bodyShapePredictionId} HTTP/1.1
Host: api.hosted.prismlabs.tech
Accept: */*
200Success
{
  "id": "unique-body-shape-prediction-id",
  "status": "PROCESSING",
  "scanId": "unique-scan-id",
  "predictionType": "weight_loss",
  "targetWeight": 50,
  "targetBodyfat": 20,
  "createdAt": "text",
  "updatedAt": "text"
}

get asset urls of a body shape prediction

get

This operation provides the asset urls of a specific body shape prediction.

Path parameters
bodyShapePredictionIdstringRequired

The unique ID of the body shape prediction

Example: unique-body-shape-prediction-id
Responses
200Success
application/json;v=1
get
GET /body-shape-prediction/{bodyShapePredictionId}/asset-urls HTTP/1.1
Host: api.hosted.prismlabs.tech
Accept: */*
200Success
{
  "bodyShapePrediction": "text"
}
  • Users
  • POSTregister a new user
  • DELETEdelete a user
  • GETget meta data of a user
  • PATCHupdate meta data of a user
  • Terms
  • GET/users/{userToken}/terms
  • POST/users/{userToken}/terms
  • Scans
  • GET/scans
  • POSTregister a new scan
  • GETget status of a scan
  • DELETEdelete a scan
  • Measurements
  • GETget body measurements of a scan
  • Upload URL
  • POSTget the upload url
  • Scan Assets
  • GETget asset status of a scan
  • Asset URLs
  • GETget asset urls of a scan
  • GETget specific asset url of a scan
  • Bodyfat
  • GETget bodyfat of a scan
  • Health Report
  • GETget the health report of a scan
  • Future Me
  • POSTregister a new body shape prediction
  • GETget status of a body shape prediction
  • GETget asset urls of a body shape prediction

register a new user

post

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.

Body
emailstring | nullableOptional

The email address of the user

Example: foo@bar.com
tokenstringRequired

A unique token for the user provided by the partner

Example: unique-user-token
weightall ofRequired

The user's weight

Example: {"value":80,"unit":"kg"}
heightall ofRequired

The user's height

Example: {"value":1.8,"unit":"m"}
sexstring · enumRequired

The user's sex

Example: malePossible values:
regionstring · enumRequired

The user's region

Example: north_americaPossible values:
usaResidencestringOptional

The user's state of residence

Example: California
birthDatestringRequired

The user's birth date

Example: 1990-01-01
researchConsentbooleanRequired

Whether the user has consented to their data being used for research

Example: true
termsOfServiceall ofRequired

The terms of service

Example: {"accepted":true,"version":"1"}
Responses
201Success
application/json;v=1
post
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"
  }
}
201Success
{
  "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
}

update meta data of a user

patch

This operation updates the meta data for a specific user.

Path parameters
tokenstringRequired

A unique token for the user provided by the partner

Example: unique-user-token
Body
emailstring | nullableOptional

The email address of the user

Example: foo@bar.com
tokenstringOptional

A unique token for the user provided by the partner

Example: unique-user-token
weightall ofOptional

The user's weight

Example: {"value":80,"unit":"kg"}
heightall ofOptional

The user's height

Example: {"value":1.8,"unit":"m"}
sexstring · enumOptional

The user's sex

Example: malePossible values:
regionstring · enumOptional

The user's region

Example: north_americaPossible values:
usaResidencestringOptional

The user's state of residence

Example: California
birthDatestringOptional

The user's birth date

Example: 1990-01-01
researchConsentbooleanOptional

Whether the user has consented to their data being used for research

Example: true
Responses
200Success
application/json;v=1
patch
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
}
200Success
{
  "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
}
post
Path parameters
userTokenstringRequired
Body
versionstringOptional
Responses
201Success
application/json;v=1
post
POST /users/{userToken}/terms HTTP/1.1
Host: api.hosted.prismlabs.tech
Content-Type: application/json
Accept: */*
Content-Length: 18

{
  "version": "text"
}
201Success
{
  "userId": "text",
  "userToken": "text",
  "accepted": true,
  "version": "text",
  "acceptanceDate": "text"
}

register a new scan

post

This operation registers a new scan in hosted API.

Body
userTokenstringRequired

A unique token for the user provided by the partner, that should be associated with the scan

Example: unique-user-token
deviceConfigNamestring · enumRequired

The name of the device configuration used for the scan

Example: IPHONE_SCANNERPossible values:
assetConfigIdstringOptional

The asset configuration used for the scan

bodyfatMethodstring · enumOptional

The requested bodyfat method for the scan

Example: cocoPossible values:
Responses
201Success
application/json;v=1
post
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"
}
201Success
{
  "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"
  },
  "scanQuality": "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
  }
}

register a new body shape prediction

post

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

Body
scanIdstringRequired

The unique ID of the scan on which the prediction should be based on

Example: unique-scan-id
predictionTypestring · enumRequired

The prediction type that should be used for the prediction

Example: weight_lossPossible values:
targetWeightnumber · min: 1Optional

The target weight (in kg) for the prediction. This or 'targetBodyfat' should be specified

Example: 50
targetBodyfatnumber · min: 1Optional

The target body fat percentage for the prediction. This or 'targetWeight' should be specified

Example: 20
Responses
201Success
application/json;v=1
post
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
}
201Success
{
  "id": "unique-body-shape-prediction-id",
  "status": "PROCESSING",
  "scanId": "unique-scan-id",
  "predictionType": "weight_loss",
  "targetWeight": 50,
  "targetBodyfat": 20,
  "createdAt": "text",
  "updatedAt": "text"
}