Account /account/{account-id}

Represents an individual account.

Reading

GET /account/{account-id} HTTP/1.1
Host: localhost:3000

Permissions

  • An access token with workspace_repertory permission is required.
  • If access token points to an user, at least one of the following criteria must be met :
    • The account is owned by the current person.
    • The account is shared with the current person.
    • The current person is an admin of the workspace at witch is attached the account.
  • If access token points to a workspace, at least one of the following criteria must be met :
    • The current workspace is the workspace at witch is attached the account.

Fields

Name Description Type

_id

The account ID.

string

name

The name of the account.

string

type

The type of the account.

string

activity

The activity of the account.

string

avatar

The ID of the Photo that represents the avatar of the account.

Photo

website_url

The website url of the account.

string

mails

The mail addresses of the account.

object[]

type

The type attached to the mail address.

string

address

The mail address.

string

main

If the address is the main mail.

boolean

phones

The phone numbers of the account.

object[]

type

The type attached to the phone number.

string

number

The phone number.

string

main

If the number is the main phone.

boolean

addresses

The postal addresses of the account.

object[]

type

The type attached to the postal address.

string

lane_number

The address lane number.

string

lane_name

The address lane name.

string

complement

The address complement.

string

zip

The address zip.

string

city

The address city.

string

region

The address region.

string

country

The address country.

string

main

If the address is the main address.

boolean

notes

Notes about the account.

string

custom_fields

Custom fields attached to the account.

object

tags

An array of Tag IDs at which is attached the account.

Tag[]

owner

The ID of the User that added the account.

User

workspace

The ID of the Workspace at which is attached the account.

Workspace

privacy

The privacy of the account.

object

value

The value of the privacy.

string{WORKSPACE, SELF, CUSTOM}

perms

The privacy permission.

string{READ, SPEAK, WRITE}

allow

An array of User and/or Group IDs who have access.

User[], Group[]

deny

An array of User and/or Group IDs who don't have access.

User[], Group[]

created_time

The date that indicates when the account was created.

date

updated_time

The date that indicates when the account was updated for the last time.

date

Computed fields

Name Description Type

main_mail

The main mail address of the account.
Taken from mails field (item whose its main field is set to true).

object

type

The type attached to the mail address.

string

address

The mail address.

string

main

If the address is the main mail.

boolean

main_phones

The main phone number of the account.
Taken from phones field (item whose its main field is set to true).

object

type

The type attached to the phone number.

string

number

The phone number.

string

main

If the number is the main phone.

boolean

main_addresses

The main postal address of the account.
Taken from addresses field (item whose its main field is set to true).

object

type

The type attached to the postal address.

string

lane_number

The address lane number.

string

lane_name

The address lane name.

string

complement

The address complement.

string

zip

The address zip.

string

city

The address city.

string

region

The address region.

string

country

The address country.

string

main

If the address is the main address.

boolean

Publishing

You can publish accounts by using the /user/accounts edge or the /environment/accounts edge.

Updating

PUT /account/{account-id} HTTP/1.1
Host: localhost:3000

Permissions

  • An access token (pointing to an user) with manage_repertory permission is required.
  • At least one of the following criteria must be met :
    • The account is owned by the current person.
    • The account is shared (with MANAGE permission) with the current person.
    • The current person is an admin (with MANAGE permission) of the workspace at witch is attached the account.

Fields

Name Description Type

name

The name of the account.

string

type

The type of the account.

string

activity

The activity of the account.

string

avatar

The ID of the Photo that represents the avatar of the account.
Must be a photo attached to the account or a photo owned by the current person whose its tmp field is set to true.

string

website_url

The website url of the account.

string

mails

The mail addresses of the account.

object[]

type

The type attached to the mail address.

string

address

The mail address.

string

main

If the address is the main mail.

boolean

phones

The phone numbers of the account.

object[]

type

The type attached to the phone number.

string

number

The phone number.

string

main

If the number is the main phone.

boolean

addresses

The postal addresses of the account.

object[]

type

The type attached to the postal address.

string

lane_number

The address lane number.

string

lane_name

The address lane name.

string

complement

The address complement.

string

zip

The address zip.

string

city

The address city.

string

region

The address region.

string

country

The address country.

string

main

If the address is the main address.

boolean

notes

Notes about the account.

string

custom_fields

Custom fields attached to the account.

object

tags

An array of Tag IDs at which is attached to the account.
Must be some Tags belonging to the current person workspace.

string[]

privacy

The privacy of the account.

object

value

The value of the privacy.

string{WORKSPACE, SELF, CUSTOM}

perms

The privacy permission.

string{READ, SPEAK, WRITE}

allow

An array of User and/or Group IDs who have access.

User[], Group[]

deny

An array of User and/or Group IDs who don't have access.

User[], Group[]

Response

If successful :

{
    "success" : true
}

Otherwise a relevant error message will be returned.

Deleting

DELETE /account/{account-id} HTTP/1.1
Host: localhost:3000

Permissions

  • The applied permissions to update accounts are required.

Fields

No fields are required.

Response

If successful :

{
    "success" : true
}

Otherwise a relevant error message will be returned.

Edges

Name Description

/contacts

The contacts attached to the account.

/photos

The photos attached to the account.

/feed

The feed of the account.