ЕСОЗ - публічна документація

Deprecated.Create User Invite

Validate request

    1. Validate request using JSON schema
      1. In case validation fails - generate 422 error
JSON schema
{
   "$schema":"http://json-schema.org/draft-04/schema#",
   "definitions":{

   },
   "properties":{
      "email":{
         "type":"string",
         "format":"email"
      },
      "data":{
         "properties":{

         },
         "type":"object",
         "additionalProperties":true
      }
   },
   "type":"object",
   "additionalProperties":false
}


Search user using requested email

Search user record in authdb.users using requested { $.email }

  • lower ( authdb.users.email ) == lower { $.email }

If record found - return USER_EXISTS error (including authdb.users.id)

Search active invite

Search pending invite in authdb.invites using requested {$.email}

  • lower ( authdb.invites.email ) == lower { $.email }
  • authdb.invites.expires_at > now ()


If invite found - return authdb.invites.id

Create invite

Using configuration parameter INVITE_EXPIRATION_PERIOD determine expires_at value

  • authdb.invites.expires_at = now () + INVITE_EXPIRATION_PERIOD (seconds)

Add invite record into authdb.invites and return generated authdb.invites.id

ЕСОЗ - публічна документація