Get User

  • Path:
/user/get
  • Type:
POST

Schemas

Request

{
  "type": "object",
  "properties": {
    "token": {
      "type": "string"
    }
  },
  "required": [
    "token"
  ],
  "additionalProperties": false
}

Response

{
  "type": "object",
  "properties": {
    "status": {
      "properties": {
        "code": {
          "description": "The status code, check the Status Code Enums",
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code"
      ],
      "additionalProperties": false,
      "type": "object"
    },
    "user": {
      "properties": {
        "address": {
          "type": "string"
        },
        "createdAt": {
          "description": "The date this user was created at",
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "id": {
          "type": "number",
          "multipleOf": 1
        },
        "lastname": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "phone": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "skils": {
          "type": "array",
          "items": {
            "type": "number",
            "multipleOf": 1
          }
        }
      },
      "required": [
        "name",
        "lastname",
        "phone",
        "address",
        "email",
        "createdAt",
        "description"
      ],
      "additionalProperties": false,
      "type": "object"
    }
  },
  "required": [
    "status"
  ],
  "additionalProperties": false
}

Rules

  • Request must match https://trello.com/c/V51aY35Q
  • The service must return the user linked to the device that holds the provided token
  • If no device with the provided token is found, the service must return a status code invalid_token
  • If no user is linked to the found device, the service must return a status code unlinked_token
  • Response must match https://trello.com/c/EDWiwJvL
  • In a successful response, the response body must contian a status and a user