API Reference
API Reference [stage]
API Reference [stage]
  • API Reference
  • Specifications
  • HOSTED API
    • API reference
      • Users
        • Terms
      • Scans
        • Measurements
        • Upload url
        • Scan assets
        • Asset urls
        • Bodyfat
        • Health report
      • Body shape prediction
        • Asset urls
    • Specification
  • PRISM API
    • About
    • API reference
      • Scans
        • Body
          • Download url
        • Fitted body
        • Measurements
          • Download url
        • Upload url
      • Users
      • Body shape prediction
        • Download url
    • Specification
Powered by GitBook
On this page

API Reference

NextAPI reference

Last updated 1 year ago

Headers

Name
Value

Content-Type

application/json

Accept

application/json;v=1

Authorization

Bearer <token>

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
}

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
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",
  "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
  },
  "bodyfat": {
    "bodyfatMethod": "coco",
    "bodyfatPercentage": 20,
    "leanMassPercentage": 80,
    "fatMass": 16,
    "leanMass": 64
  }
}

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",
  "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
  },
  "bodyfat": {
    "bodyfatMethod": "coco",
    "bodyfatPercentage": 20,
    "leanMassPercentage": 80,
    "fatMass": 16,
    "leanMass": 64
  }
}

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
}

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",
  "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

Example: preview-imagePossible 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
}
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 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
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": {},
  "metabolismReport": {}
}
  • POSTregister a new user
  • GETget meta data of a user
  • DELETEdelete a user
  • PATCHupdate meta data of a user
  • GET/scans
  • POSTregister a new scan
  • GETget status of a scan
  • DELETEdelete a scan
  • GETget body measurements of a scan
  • POSTget the upload url
  • GETget asset status of a scan
  • GETget asset urls of a scan
  • GETget specific asset url of a scan
  • GETget bodyfat of a scan
  • GET/users/{userToken}/terms
  • POST/users/{userToken}/terms
  • GETget the health report of a scan

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
emailstringOptional

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
emailstringOptional

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
}

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:
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: 92

{
  "userToken": "unique-user-token",
  "deviceConfigName": "IPHONE_SCANNER",
  "bodyfatMethod": "coco"
}
201Success
{
  "id": "unique-scan-id",
  "status": "PROCESSING",
  "prismScanId": "prism-unique-scan-id",
  "deviceConfigName": "IPHONE_SCANNER",
  "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
  },
  "bodyfat": {
    "bodyfatMethod": "coco",
    "bodyfatPercentage": 20,
    "leanMassPercentage": 80,
    "fatMass": 16,
    "leanMass": 64
  }
}
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"
}