Users

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: [email protected]
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": "[email protected]",
  "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": "[email protected]",
  "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
Query parameters
unit-systemstring · enumOptional

The unit system in which values will be returned

Possible values:
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": "[email protected]",
  "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": "[email protected]",
  "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: [email protected]
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": "[email protected]",
  "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": "[email protected]",
  "researchConsent": true
}