Skip to main content
GET
/
company
/
users
Retrieve Company Users
curl --request GET \
  --url https://api.nuwebgroup.com/v1/company/users \
  --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

offset
integer

The offset - e.g 100 for listing company users starting with the 100th company user. Offset will always take precedence over page.

page
integer

The page you wish to retrieve company users. You can only paginate by page if no offset is given.

limit
integer

The number of users you wish to retrieve per page.

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 users.

data
object[]
meta
object
included
object[]