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
  1. PRISM API
  2. API reference

Body shape prediction

PreviousUsersNextDownload url
  • POSTInitiate generation of a Body Shape Prediction asset
  • GETFetch the status of a Body Shape Prediction asset creation operation

Fetch the status of a Body Shape Prediction asset creation operation

get
Authorizations
Path parameters
bodyShapePredictionIdstringRequired
Responses
200Success
application/json;v=1
401
Unauthorized access. Please include a valid access token.
application/json;v=1
403
Forbidden access to resource. See documentation for more details.
application/json;v=1
404
An entity could not be found
application/json;v=1
500
An internal server error occurred
application/json;v=1
get
GET /body-shape-prediction/{bodyShapePredictionId} HTTP/1.1
Host: api.prismlabs.tech
Authorization: Bearer JWT
Accept: */*
{
  "id": "f4c2ef4a-dc5f-4d13-a6a9-43dc03c003fd",
  "state": "ASSET_SUCCEEDED",
  "scanId": "6380a5cf-cce5-41bc-b01b-4d42b5752d1f"
}

Initiate generation of a Body Shape Prediction asset

post

This operation tells Prism to take a Fitted Body asset and produce a Body Shape Prediction asset that can then be downloaded.

NOTE: This request will return an error if a Fitted Body has not already been successfully created. This can be generated by requesting a Body Asset, a process that automatically creates a Fitted Body.

Authorizations
Body
scanIdstringRequired

The id of the scan from which to make a prediction

Example: 6380a5cf-cce5-41bc-b01b-4d42b5752d1f
predictionTypestring ยท enumRequired

The type of prediction to make

Example: WEIGHT_LOSSPossible values:
relativeWeightChangenumberOptional

A percentage change of a user's weight to target for the prediction

Example: -5
relativeBodyFatChangenumberOptional

A percentage change of a user's body fat percentage to target for the prediction

Example: -10
Responses
201Success
application/json;v=1
400
A bad request was made
application/json;v=1
401
Unauthorized access. Please include a valid access token.
application/json;v=1
403
Forbidden access to resource. See documentation for more details.
application/json;v=1
422
A validation error occurred
application/json;v=1
500
An internal server error occurred
application/json;v=1
post
POST /body-shape-prediction HTTP/1.1
Host: api.prismlabs.tech
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 134

{
  "scanId": "6380a5cf-cce5-41bc-b01b-4d42b5752d1f",
  "predictionType": "WEIGHT_LOSS",
  "relativeWeightChange": -5,
  "relativeBodyFatChange": -10
}
{
  "id": "f4c2ef4a-dc5f-4d13-a6a9-43dc03c003fd",
  "state": "ASSET_SUCCEEDED",
  "scanId": "6380a5cf-cce5-41bc-b01b-4d42b5752d1f"
}