Assemble Developer Portal

User guardians (3.0)

Download OpenAPI specification:Download

This documentation describes how to manage legal guardians assigned to an user.

This API requires the Guardian feature.

Manage Guardians

Create a guardian in relation to a user

Creates a new legal Guardian

Authorizations:
JWT
Request Body schema: application/json

Responses

Response Schema: application/json
object (User Guardian)

Request samples

Content type
application/json
{
  • "first_name": "John",
  • "last_name": "Doe",
  • "email": "john.doe@emailserver.com",
  • "contact_number": "+32 12 34 56 78",
  • "relationship": "father"
}

Response samples

Content type
application/json
{
  • "data": {
    • "id": 2,
    • "first_name": "John",
    • "last_name": "Doe",
    • "email": "john.doe@emailhost.com",
    • "contact_number": "john.doe@emailhost.com",
    • "relationship": "father"
    }
}

Update an existing guardian

Updates an existing Guardian user

Authorizations:
JWT
Request Body schema: application/json

Responses

Response Schema: application/json
object (User Guardian)

Request samples

Content type
application/json
{
  • "first_name": "John",
  • "last_name": "Doe",
  • "email": "john.doe@emailserver.com",
  • "contact_number": "+32 12 34 56 78",
  • "relationship": "father"
}

Response samples

Content type
application/json
{
  • "data": {
    • "id": 2,
    • "first_name": "John",
    • "last_name": "Doe",
    • "email": "john.doe@emailhost.com",
    • "contact_number": "john.doe@emailhost.com",
    • "relationship": "father"
    }
}

Gets the list of guardians

Gets the list of guardians assigned to a specific user

Authorizations:
JWT

Responses

Response Schema: application/json
Array of objects (User Guardian)

Response samples

Content type
application/json
{
  • "data": [
    • {
      • "id": 2,
      • "first_name": "John",
      • "last_name": "Doe",
      • "email": "john.doe@emailhost.com",
      • "contact_number": "john.doe@emailhost.com",
      • "relationship": "father"
      }
    ]
}

Delete an existing Guardian

Deletes an existing Guardian

Authorizations:
JWT
Request Body schema: application/json

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "message": "Unauthorized action",
  • "status_code": "403"
}

Guardian action logs listing

Retrieve a paginated response of guardian action logs

Authorizations:
JWT
path Parameters
userId
required
string

User ID

Responses

Response Schema: application/json
Array of objects (User Guardian)
object

Response samples

Content type
application/json
{
  • "data": [
    • {
      • "id": 2,
      • "date": "2020-01-01T00:00:00.000Z",
      • "action": "Approved XYZ role",
      • "guardian": {
        • "id": 2,
        • "first_name": "John",
        • "last_name": "Doe",
        • "email": "john.doe@emailhost.com",
        • "contact_number": "john.doe@emailhost.com",
        • "relationship": "father"
        }
      }
    ],
  • "meta": {
    • "pagination": {
      • "total": "string",
      • "count": "string",
      • "per_page": "string",
      • "current_page": "string",
      • "total_pages": "string",
      • "links": {
        • "next": "string",
        • "previous": "string"
        }
      }
    }
}

Guardian Consents

Guardian role consents listing

Retrieve a paginated response of guardian consent for roles

Authorizations:
JWT
path Parameters
userId
required
string

User ID

Responses

Response Schema: application/json
Array of objects (Guardian Role Consents)
object

Response samples

Content type
application/json
{
  • "data": [
    • {
      • "id": "string",
      • "role_name": "string",
      • "team_name": "string",
      • "role_start_date": "2019-08-24",
      • "consent_status": "string"
      }
    ],
  • "meta": {
    • "pagination": {
      • "total": "string",
      • "count": "string",
      • "per_page": "string",
      • "current_page": "string",
      • "total_pages": "string",
      • "links": {
        • "next": "string",
        • "previous": "string"
        }
      }
    }
}

Guardian activity consents listing

Retrieve a paginated response of guardian consent for activities

Authorizations:
JWT
path Parameters
userId
required
string

User ID

Responses

Response Schema: application/json
Array of objects (Guardian Activity Consents)
object

Response samples

Content type
application/json
{
  • "data": [
    • {
      • "id": "string",
      • "activity_name": "string",
      • "activity_date": "2019-08-24",
      • "consent_status": "string"
      }
    ],
  • "meta": {
    • "pagination": {
      • "total": "string",
      • "count": "string",
      • "per_page": "string",
      • "current_page": "string",
      • "total_pages": "string",
      • "links": {
        • "next": "string",
        • "previous": "string"
        }
      }
    }
}