Sites

The Sites API provides functionality for obtaining a list of Unet user sites.


Basic information

Endpoints

RESOURCE_URI — URI is obtained from token exchange point.
TARGET_RESOURCE_URI — URI is obtained from the "sites/" endpoint.

Prefix Endpoint Description
RESOURCE_URI sites/ Getting a list of user sites
TARGET_RESOURCE_URI info/ Retrieving a full site info
TARGET_RESOURCE_URI members/ Getting a list of site members
TARGET_RESOURCE_URI invitations/ Getting a list of site invitations
TARGET_RESOURCE_URI invitations/add Adding an invitation
TARGET_RESOURCE_URI invitations/lookup Searching for an existing invitation
TARGET_RESOURCE_URI invitations/ID/status Updating an invitation
TARGET_RESOURCE_URI invitations/ID/update Updating an invitation
TARGET_RESOURCE_URI invitations/ID/delete Deleting an invitation

+Getting a list of user sites

Get a list of sites where user is a member or administrator

Endpoint

Scopes

  • user_sites

Request

Response


+Retrieving a full site info

Endpoint

  • TARGET_RESOURCE_URIinfo/

Scopes

  • No specific scopes

Request

  • No specific request params

Response


+Getting a list of site members

Endpoint

  • TARGET_RESOURCE_URImembers/

Scopes

  • No specific scopes

Request

Response


+Getting a list of site invitations

Endpoint

  • TARGET_RESOURCE_URIinvitations/

Scopes

  • No specific scopes

Request

Response


+Adding an invitation

Endpoint

  • TARGET_RESOURCE_URIinvitations/add/

Scopes

  • No specific scopes

Request

Response


+Updating an invitation status

Endpoint

  • TARGET_RESOURCE_URIinvitations/ID/status

Scopes

  • No specific scopes

Request

Response

  • Response is empty object

+Updating an invitation

Endpoint

  • TARGET_RESOURCE_URIinvitations/ID/update

Scopes

  • No specific scopes

Request

Response


+Deleting an invitation

Endpoint

  • TARGET_RESOURCE_URIinvitations/ID/delete

Scopes

  • No specific scopes

Request

  • No specific request params

Response


+Searching for an existing invitation

Endpoint

  • TARGET_RESOURCE_URIinvitations/lookup

Scopes

  • No specific scopes

Request

Response


Definitions

SitesListRequest

Name Description

is_admin (o)
boolean

Filter sites where user is admin or not

type (o)
string

Filter sites by type
Possible values:

  • lander
  • community
  • shop

limit (o)
unsigned integer

Number of items expected in response. Default: 100

cursor (o)
string

The value of the next_cursor / prev_cursor parameter from the responce.
Should be empty to get the first set (page) of elements.

fields (o)
object

Fields that it needs to be obtained.
Read more about the Fields model.

SitesListResponse

Name Description

items[]
object

@SitesItem

limit
unsigned integer

Number of returned items (items per page).

next_cursor
string

URL for the next portion of items (next page).
Empty if there is no items for the next portion.

prev_cursor
string

URL for the previous portion of items (previous page).
Empty if there is no items for the previous portion.

total_count
unsigned integer

Total number of items.

SitesItemResponse

Name Description

id
unsigned integer

Site ID within Unet.

title
string

Site name.

type
string

Possible values:

  • lander
  • community
  • shop

url
string

Site address.

logo_url
string

Site logo URL.
Image dimensions: 100x100px

is_admin
boolean

Flag that describes whether the current user is the site admin.

target_resource_uri
string

The URI to be used as TARGET_RESOURCE_URI in the API requests.

permissions ?
object

PermissionsResponse

SiteInvitationRequest

Name Description

limit (o)
unsigned integer

Number of items expected in response. Default: 100

cursor (o)
string

The value of the next_cursor / prev_cursor parameter from the responce.
Should be empty to get the first set (page) of elements.

SiteInvitationResponse

Name Description

items[]
object

@SiteInvitationItem

next_cursor
string

URL for the next portion of items (next page).
Empty if there is no items for the next portion.

prev_cursor
string

URL for the previous portion of items (previous page).
Empty if there is no items for the previous portion.

total_count
unsigned integer

Total number of items.

SiteInvitationAddRequest

Name Description

identifier
string

String to represent invitation (email, social profile, contact id)
phone-contact@unique_id

label
string

Human readable name of invitation (basically name of contatct to invite)

SiteInvitationUpdateRequest

Name Description

label (o)
string

status (o)
string

Possible Values:

  • sent

SiteInvitationUpdateStatusRequest

Name Description

status (o)
string

Possible Values:

  • sent

SiteInvitationItem

Name Description

id
unsigned integer

Unique id of this invitation

label
string

Label added for this invitation

identifier
string

String this invitation was created for (email, social profile, contact id)

link
string

Invitation link

type
string

Invitation type
Possible Values:

  • unet
  • email
  • phone
  • facebook
  • linkedin
  • twitter
  • instagram
  • vk

status
string

Invitation status
Possible Values:

  • created
  • processed
  • sent
  • invalid
  • used
  • api-contact
  • deleted

create_uid
unsigned integer

Id of user who created this invitation

create_time
timestamp

Time when this invitation was created

used_uid
unsigned integer

Id of user who have used this invitaion (status = used)

used_time
timestamp

Time when invitaion was used (status = used)