Docs
Users

Users

List Users

GET /v2/users

ParameterDescription
attributesSpecifies which attributes to retrieve. Can include values like 'serial', 'number', 'carrier', 'service_provider', and 'batch'. If null, retrieves all information.
includesSpecifies related entities to include in the query. Contains arrays for 'device' and 'enterprise', each with its own set of possible values, such as 'name', 'imei', 'code' for the 'device' array, and 'name', 'cnpj' for the 'enterprise' array.
filtersSpecifies filters for various fields such as 'chips.serial', 'chips.number', 'chips.carrier', 'chips.service_provider', 'chips.batch', 'device.name', 'device.imei', 'device.code', 'enterprise.name', 'enterprise.cnpj'. Each filter field supports conditions like 'eq', 'neq', 'ilk', 'ew', 'sw'.
searchSpecifies the search query with a maximum length of 100 characters.
limitSpecifies the maximum number of results to return. Must be a number between 1 and 100.
pageSpecifies the page number for paginated results. Must be a number greater than or equal to 0.
countIndicates whether to include the total count of results in the response.
sortSpecifies sorting criteria for 'number' and 'serial' fields. Values can be -1 (descending order) or 1 (ascending order).

Responses

StatusMeaningDescription
200OKDefault Response
400Bad RequestBad Request

This operation does not require authentication

Create User

POST /v2/users

{
  "body": {
    "data": {
      "attributes": {
        "username": "john_doe",
        "email": "john.doe@example.com",
        "name": "John Doe",
        "phone1": "+1234567890",
        "phone2": "+9876543210",
        "emergency_contact": "Jane Doe",
        "emergency_phone": "+1112223333",
        "document_number": "12345678901",
        "cpf": "98765432109",
        "birthdate": "1990-05-15",
        "locale": "en_US"
      },
      "relationships": {
        "enterprise": {
          "type": "enterprise",
          "id": "abc123def456ghi"
        },
        "roles": {
          "type": "roles",
          "id": "role123"
        }
      }
    }
  }
}
FieldDescriptionRequired
dataObjecttrue
attributesObject containing user data attributes.true
- usernameString named after user's username, trimmed, with a length between 1 and 255 characters.true
- emailString named after user's email address, validated as an email format.true
- nameString named after user's name, with a maximum length of 255 characters.true
- phone1String named after user's primary phone number, with a maximum length of 20 characters.false
- phone2String named after user's secondary phone number, with a maximum length of 20 characters.false
- emergency_contactString named after user's emergency contact information, with a maximum length of 255 characters.false
- emergency_phoneString named after user's emergency phone number, with a maximum length of 20 characters.false
- document_numberString named after user's document number, with a maximum length of 20 characters.false
- cpfString named after user's CPF, trimmed, with a length between 1 and 20 characters.true
- birthdateUser's birthdate.false
- localeString named after user's locale, must be one of 'pt_BR', 'es_UY', or 'en_US'.true
relationshipsObject containing relationship data.true
- enterpriseObject representing the relationship with an enterprise.true
-- typeString named after the type of relationship, must be 'enterprise'.true
-- idString named after the ID of the enterprise, must consist of 15 alphanumeric characters.true
- rolesObject representing the relationship with roles.false
-- typeString named after the type of relationship, must be 'roles'.true
-- idString named after the ID of the roles, must consist of 15 alphanumeric characters.true

Responses

StatusMeaningDescription
200OKDefault Response
400Bad RequestOne of 'Bad Request', 'Entity Duplicated' or 'Can Not Create Multiple Users For Different Enterprises'

This operation does not require authentication

Show User

GET /v2/users/{id}

FieldDescription
attributesArray of attributes to retrieve. It can contain values such as 'username', 'email', 'name', etc. If null, all information is retrieved.
includesSpecifies related entities to include in the query. It contains arrays for 'addresses', 'document', and 'enterprise', which can include values like 'formatted_address', 'city', 'name', etc.
- addressesArray of address attributes to include. It can contain values such as 'formatted_address', 'city', 'region', 'zip_code'.
- documentArray of document attributes to include. It can contain values such as 'file_size', 'created_at', 'folder', 'key_name', 'mime', 'name'.
- enterpriseArray of enterprise attributes to include. It can contain values such as 'name', 'cnpj'.

Responses

StatusMeaningDescription
200OKDefault Response
400Bad RequestBad Request
401UnauthorizedUnauthorized
404Not FoundNot Found

This operation does not require authentication

Update User

PATCH /v2/users/{id}

Payload

{
  "body": {
    "data": {
      "attributes": {
        "username": "john_doe",
        "email": "john.doe@example.com",
        "name": "John Doe",
        "phone1": "+1234567890",
        "phone2": "+9876543210",
        "emergency_contact": "Jane Doe",
        "emergency_phone": "+1112223333",
        "document_number": "12345678901",
        "cpf": "98765432109",
        "birthdate": "1990-05-15",
        "locale": "en_US"
      },
      "relationships": {
        "enterprise": {
          "type": "enterprise",
          "id": "abc123def456ghi"
        },
        "roles": {
          "type": "roles",
          "id": "role123"
        }
      }
    }
  }
}
FieldDescriptionRequired
dataObjecttrue
attributesObject containing user data attributes.true
- usernameString named after user's username, trimmed, with a length between 1 and 255 characters.true
- emailString named after user's email address, validated as an email format.true
- nameString named after user's name, with a maximum length of 255 characters.true
- phone1String named after user's primary phone number, with a maximum length of 20 characters.false
- phone2String named after user's secondary phone number, with a maximum length of 20 characters.false
- emergency_contactString named after user's emergency contact information, with a maximum length of 255 characters.false
- emergency_phoneString named after user's emergency phone number, with a maximum length of 20 characters.false
- document_numberString named after user's document number, with a maximum length of 20 characters.false
- cpfString named after user's CPF, trimmed, with a length between 1 and 20 characters.true
- birthdateUser's birthdate.false
- localeString named after user's locale, must be one of 'pt_BR', 'es_UY', or 'en_US'.true
relationshipsObject containing relationship data.true
- enterpriseObject representing the relationship with an enterprise.true
-- typeString named after the type of relationship, must be 'enterprise'.true
-- idString named after the ID of the enterprise, must consist of 15 alphanumeric characters.true
- rolesObject representing the relationship with roles.false
-- typeString named after the type of relationship, must be 'roles'.true
-- idString named after the ID of the roles, must consist of 15 alphanumeric characters.true

Responses

StatusMeaningDescription
200OKDefault Response
400Bad RequestOne of 'Bad Request', 'Can Not Update User Without Role', 'Can Only Update Yourself', 'Can Not Update Yourself', 'Can Not Update an User With Role Above' or 'Can Not Update an User To Role Above'
401UnauthorizedUnauthorized
404Not FoundNot Found

This operation does not require authentication

Delete User

DELETE /v2/users/{id}

Payload

{
  "params": {
    "id": "abc123def456ghi"
  }
}
FieldDescriptionRequired
idString representing an identifier. It must consist of 15 alphanumeric characters (uppercase and lowercase letters, and digits).true

Responses

StatusMeaningDescription
200OKDefault Response
400Bad RequestOne of 'Bad Request', 'Can Not Delete Self' or 'Can Not Delete an User With Role Above'
401UnauthorizedUnauthorized
404Not FoundNot Found

This operation does not require authentication

Udpate {situation} Users

PATCH /v2/users/{id}/status/{situation}

Parameters

{
  "params": {
    "id": "ABC1234567890DEF",
    "situation": "activation"
  }
}
FieldDescriptionRequired
idString containing the ID, must follow the alphanumeric pattern and have a length of 15 characters.true
situationString indicating the situation, must be either 'activation' or 'deactivation'.true

Responses

StatusMeaningDescription
200OKDefault Response

This operation does not require authentication