Skip to main content
GET
/
company
/
user
Retrieve Company User
curl --request GET \
  --url https://api.nuwebgroup.com/v1/company/user \
  --header 'Authorization: Bearer <token>'
{
  "data": {
    "type": "users",
    "id": 1,
    "attributes": {
      "name": "John Doe",
      "email": "[email protected]",
      "phone": "07123456789",
      "phoneCode": "44",
      "createdAt": "2021-11-22T11:59:00.000000Z",
      "updatedAt": "2021-11-22T11:59:00.000000Z",
      "deletedAt": null
    },
    "relationships": {
      "companyUsers": {
        "data": [
          {
            "type": "companyUsers",
            "id": 1
          }
        ]
      },
      "roles": {
        "data": [
          {
            "type": "roles",
            "id": 1
          }
        ]
      },
      "visibilityGroups": {
        "data": [
          {
            "type": "visibilityGroups",
            "id": 1
          }
        ]
      }
    }
  },
  "included": [
    {
      "type": "companyUsers",
      "id": 1,
      "atributes": {
        "isSelected": true,
        "locale": null,
        "acceptedTermsAt": "2021-11-22T11:59:00.000000Z",
        "acceptedPrivacyAt": "2021-11-22T11:59:00.000000Z",
        "acceptedEmailOptInAt": "2021-11-22T11:59:00.000000Z",
        "createdAt": "2021-11-22T11:59:00.000000Z",
        "updatedAt": "2021-11-22T11:59:00.000000Z",
        "deletedAt": null
      }
    },
    {
      "type": "roles",
      "id": 1,
      "attributes": {
        "title": "Role title"
      }
    },
    {
      "type": "visibilityGroups",
      "id": 1,
      "attributes": {
        "name": "Bristol Group",
        "createdAt": "2021-11-22T11:59:00.000000Z",
        "updatedAt": "2021-11-22T11:59:00.000000Z"
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

The 'Bearer' token can be obtained from the token management interface or via the login endpoint using your admin user credentials.

Query Parameters

id
integer

The users's ID. This is required if the email field is empty.

email
string

The users email address. This is required if the id field is empty.

include
enum<string>[]

A list of related resources you wish to include in the response. Values can be a url encoded array, or comma separated string.

Available options:
companyUsers,
visibilityGroups,
roles
withTrashed
enum<string>

Controls records returned depending on their deletedAt status. This is a global flag, so will apply to all resources, including relationships such as resources returned under the included attribute.

  • true to include deleted records
  • false to exclude deleted records (or leave blank)

Available options:
true,
false
only
string

A list of attributes that you wish to be returned in the payload. When empty or omitted, all fields will be included by default. Use dot-notation for both top-level resources and child resources, i.e. users.email,roles.title. Can be used in conjunction with except providing both parameters don't reference the same resource.

except
string

A list of attributes that you wish to exclude from the payload. When empty or omitted, all fields will be included by default. Use dot-notation for both top-level resources and child resources, i.e. users.email,roles.title. Can be used in conjunction with only providing both parameters don't reference the same resource.

Response

Successfully retrieved the company user.

data
object
included
object[]