Invitations

Создать общую ссылку на роль

Changed on

Одна ссылка на роль для многих — подрядчики, склад, волна найма. Каждый, кто войдёт или зарегистрируется по ней, становится участником с этой ролью; карточка «Команды» заводится новой с почтой его учётной записи, а если карточка с этой почтой уже есть — принятие отказывает invitations.shared_link.email_taken (нужно личное приглашение). Лимит принятий max_uses от 1 до 500 (по умолчанию 10), срок expires_in_days от 1 до 90 дней (по умолчанию 7), иначе 400 invitations.shared_link.limit_invalid. Роль — не шире прав создающего. Внешним и гостям нужна организация. Ссылка возвращается в invite_url только в этом ответе.

post/api/v1/invitations/shared-links

Request

  • Base URL
    https://erp.akeda.ru
  • Auth
    • HTTP bearer
    • or OAuth 2
      Authorization codehttps://erp.akeda.ru/oauth2/authorize
      Token URLhttps://erp.akeda.ru/oauth2/token
      Scopesakeda:delegate

Headers

X-Tenant, string required

Slug выбранного кабинета; кабинет не является юрлицом

Request body

InvitationSharedLinkInput required
role_id, string uuid required
max_uses, integer

Сколько человек может присоединиться по ссылке

expires_in_days, integer

Срок действия ссылки в днях

access_until, string date nullable

Последний день доступа присоединившихся ГГГГ-ММ-ДД; пусто — бессрочно

affiliation, 'own' | 'external' | 'guest'

Кем приходят: own — свои, external — внешние участники, guest — гости-подрядчики (места тарифа не занимают)

organization_contact_id, string uuid nullable

Контрагент-организация внешних и гостей; обязателен при affiliation external и guest

Response

Общая ссылка и её адрес

InvitationSharedLink required
id, string uuid required
tenant_id, string uuid required
tenant_name, string
role_id, string uuid required
role_name, string
affiliation, 'own' | 'external' | 'guest' required
organization_contact_id, string uuid
access_until, string date
max_uses, integer required
used_count, integer required
expires_at, string date-time required
created_by, integer required
created_by_name, string
created_at, string date-time required
revoked_at, string date-time
status, 'active' | 'expired' | 'exhausted' | 'revoked' required
invite_url, string

Адрес ссылки; только в ответе на создание

Changes

    • info

      added the optional property field to the response with the status

    • info

      added the optional property field to the response with the status

    • info

      added the optional property field to the response with the status

    3 more changes in this revision