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

Users

PreviousUpload urlNextBody shape prediction
  • POSTRegister a new user
  • GETFetch a user
  • PATCHUpdate a user

Fetch a user

get
Authorizations
Path parameters
userIdstringRequired
Query parameters
weight-unitstring · enumOptional

The unit in which the weight will be returned

Possible values:
height-unitstring · enumOptional

The unit in which the height will be returned

Possible values:
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 /users/{userId} HTTP/1.1
Host: api.prismlabs.tech
Authorization: Bearer JWT
Accept: */*
{
  "id": "7f2ec6e0-b06d-42b1-b2a1-fff59a458490",
  "sex": "female",
  "region": "north_america",
  "birthYear": 1990,
  "weight": {
    "value": 80,
    "unit": "kg"
  },
  "height": {
    "value": 1.7,
    "unit": "m"
  }
}

Register a new user

post
Authorizations
Body
sexstring · enumRequired

Describes the user's sex

Example: femalePossible values:
regionstring · enumRequired

Describes the region where the user is being registered

Example: north_americaPossible values:
birthYearnumber · min: 1900Required

The user's birth year

Example: 1990
weightall ofOptional

Describes the user's weight in kilograms (kg) or pounds (lb)

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

Describes the user's height in meters (m) or inches (in)

Example: {"value":1.7,"unit":"m"}
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 /users HTTP/1.1
Host: api.prismlabs.tech
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 126

{
  "sex": "female",
  "region": "north_america",
  "birthYear": 1990,
  "weight": {
    "value": 80,
    "unit": "kg"
  },
  "height": {
    "value": 1.7,
    "unit": "m"
  }
}
{
  "id": "7f2ec6e0-b06d-42b1-b2a1-fff59a458490",
  "sex": "female",
  "region": "north_america",
  "birthYear": 1990,
  "weight": {
    "value": 80,
    "unit": "kg"
  },
  "height": {
    "value": 1.7,
    "unit": "m"
  }
}

Update a user

patch

IMPORTANT: A user should be updated with current information (e.g. weight) before the creation a new scan.

Authorizations
Path parameters
userIdstringRequired
Query parameters
weight-unitstring · enumOptional

The unit in which the weight will be returned

Possible values:
height-unitstring · enumOptional

The unit in which the height will be returned

Possible values:
Body
sexstring · enumOptional

Describes the user's sex

Example: femalePossible values:
regionstring · enumOptional

Describes the region where the user is being registered

Example: north_americaPossible values:
birthYearnumber · min: 1900Optional

The user's birth year

Example: 1990
weightall ofOptional

Describes the user's weight in kilograms (kg) or pounds (lb)

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

Describes the user's height in meters (m) or inches (in)

Example: {"value":1.7,"unit":"m"}
Responses
200Success
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
patch
PATCH /users/{userId} HTTP/1.1
Host: api.prismlabs.tech
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 126

{
  "sex": "female",
  "region": "north_america",
  "birthYear": 1990,
  "weight": {
    "value": 80,
    "unit": "kg"
  },
  "height": {
    "value": 1.7,
    "unit": "m"
  }
}
{
  "id": "7f2ec6e0-b06d-42b1-b2a1-fff59a458490",
  "sex": "female",
  "region": "north_america",
  "birthYear": 1990,
  "weight": {
    "value": 80,
    "unit": "kg"
  },
  "height": {
    "value": 1.7,
    "unit": "m"
  }
}