Update

Update User

PATCH https://biometridon.polygon.pt/api/users/:id

This endpoint allows you to update an user by id.

Path Parameters

Name
Type
Description

id

string

ID of the user to get

Headers

Name
Type
Description

Content-Type

string

application/json

Authorization

string

Authentication user token

Request Body

Name
Type
Description

email

string

Unique email

firstName

string

First name

lastName

string

Last name

photo

string

Base64 image

roles

array

List of role ids

{
  "data": {
    "email": "user@polygon.pt",
    "firstName": "User",
    "lastName": "Tool",
    "clientId": "5f089930ae1e08524034ec9b",
    "roles": [
      "5f06dd360d2a954da80c0990"
    ],
    "active": true,
    "isMaster": false,
    "created_at": "2020-07-10T16:40:24.828Z",
    "updated_at": "2020-07-10T16:40:24.828Z",
    "id": "5f0899f8b9f874452cd5ff22",
    "name": "User Tool"
  },
  "meta": {
    "message": "User created with success."
  },
  "status": true
}

Update my User

PATCH https://biometridon.polygon.pt/api/users

This endpoint allows you to update the authenticated user information.

Headers

Name
Type
Description

Content-Type

string

application/json

Authorization

string

Authentication user token

Request Body

Name
Type
Description

email

string

Unique email

firstName

string

First name

lastName

string

Last name

photo

string

Base64 image

roles

array

List of role ids

{
  "data": {
    "email": "user@polygon.pt",
    "firstName": "User",
    "lastName": "Tool",
    "clientId": "5f089930ae1e08524034ec9b",
    "roles": [
      "5f06dd360d2a954da80c0990"
    ],
    "active": true,
    "isMaster": false,
    "created_at": "2020-07-10T16:40:24.828Z",
    "updated_at": "2020-07-10T16:40:24.828Z",
    "id": "5f0899f8b9f874452cd5ff22",
    "name": "User Tool"
  },
  "meta": {
    "message": "User created with success."
  },
  "status": true
}
// Example

{
	"firstName": "User",
	"lastName": "Tool",
	"email": "user@polygon.pt",
	"photo": "base64",
	"roles": ["5f06dd360d2a954da80c0990"]
}

Last updated

Was this helpful?