Log in
Create a portal via API
Description

GO1 offers an On-board API for creating new customer portals via API. There are parameters to support various use cases, and authentication/refresh tokens are created automatically, enabling partners to communicate with GO1's API on behalf of the newly-on-boarded users, without the need for a separate authorization step.

Content Groups

When learning objects are added to GO1 they can be grouped together. Large content groups such as GO1 Premium contain curated content from many different providers (who are represented with their own portals inside the GO1 ecosystem). Smaller, more focused content groups can also be created. When a portal is created, Partners use content groups to reference what users on the portal can see. This can be the same for all portals, or different depending on the customer's region, industry, etc.

GO1 will assist with the creation of these groups and provide the relevant Content Group IDs to the Partner.

Notifications

When users are created, a welcome email is sent with sign-in credentials. If this is not required, the welcome email can be switched off manually inside the portal. By default, all child portals will inherit the mail template settings of the partner portal but can be configured individually from within the portal.

If no email or in-app notifications are required (e.g. when learners self-register or are assigned content), partners can set notifications to 'false' during the on-boarding process.

For a full list of Notifications, see the Notifications tab under 'Settings' inside the portal.

When it works
  • When a partner is creating a GO1 portal for all customers by default
  • When content assignment needs to be customized per customer (e.g. when portals are created for customers in different locations, where GO1 offers regional specific content)
  • When a partner wants the GO1 sign up experience to be contained within their own platform and user interface
When it doesn't work
  • When development resources are limited
  • If expected portal numbers are small
Requirements
  • Authorization via OAuth2 in order to connect to GO1
API Documentation
Step 1

Follow the client credentials grant type steps on our Authentication and authorization guide to retrieve an access token.

Step 2

Post a request to the On-board API with the access token in the header

Header
{
  "Authorization": "Bearer <ACCESS_TOKEN>",
  "Content-Type": "application/json"
}
Body
{
  "creation_path": "test",
  "customer": {
    "name": "<CUSTOMER_NAME>",
    "industry": "<CUSTOMER_INDUSTRY>",
    "country": "<CUSOMTER_COUNTRY_CODE>"
  },
  "partner_portal_id": 123456,
  "portal": {
    "domain": "<DESIRED_CUSTOMER_DOMAIN>.mygo1.com",
    "seats": 5,
    "administrators": [
      "<ADMIN_EMAIL_ADDRESS>"
		],
    "content_group_ids": [
      100,
      101
		],
  },
  "user": {
    "email": "<ADMIN_EMAIL_ADDRESS>",
    "first_name": "<ADMIN_NAME>",
    "last_name": "<ADMIN_SURNAME>",
    "password": "<PASSWORD>",
    "phone": "<ADMIN_PHONE_NUMBER>",
    "consent": {
      "term_privacy": true,
      "term_tos": true,
      "term_collection": true
    }
  }
}

The creation_path will be updated from 'test' to 'integration' during the Go Live process.

The /onboard API accepts an additional_users array separate to the user object.

Country enum: https://api.go1.co/portal/properties/country
Industry enum: https://api.go1.co/portal/properties/industry

Step 3

The API will return

{
    "user": {
        "id": 5311480,
        "mail": "<ADMIN_EMAIL_ADDRESS>",
        "created": 1576548029,
        "status": true,
        "first_name": "<ADMIN_FIRST_NAME>",
        "last_name": "<ADMIN_SURNAME>",
        "timestamp": 1576548029,
        "roles": [
            "authenticated user"
        ],
        "accounts_total": 1,
        "accounts": [
            {
                "id": 5311482,
                "mail": "<ADMIN_EMAIL_ADDRESS>",
                "created": 1576548029,
                "status": true,
                "first_name": "<ADMIN_FIRST_NAME>",
                "last_name": "<ADMIN_SURNAME",
                "timestamp": 1576548029,
                "roles": [
                    "authenticated user",
                    "Student",
                    "administrator"
                ],
                "instance_name": "<DESIRED_CUSTOMER_DOMAIN>.mygo1.com"
            }
        ],
        "oauth_token": {
            "token_type": "Bearer",
            "expires_in": 43200,
            "access_token": "<ACCESS_TOKEN_FOR_THIS_USER>",
            "refresh_token": "<REFRESH_TOKEN_FOR_THIS_USER>"
        }
    },
    "portal": {
        "id": "5181422",
        "title": "<DESIRED_CUSTOMER_DOMAIN>.mygo1.com",
        "status": "1",
        "timestamp": "1576548029",
        "created": "1576548029",
        "features": {
            "marketplace": true,
            "user_invite": false
        },
        "configuration": {
            "is_virtual": 1,
            "site_name": "<CUSTOMER_NAME>",
            "locale": "<CUSOMTER_COUNTRY_CODE>",
            "integrations": {
                "scorm": {
                    "status": true
                },
                "zapier": {
                    "status": true
                }
            }
        }
    }
}

The returned access token and refresh token can be stored so that partners can communicate with GO1 API's on behalf of the newly on-boarded customers.

© Copyright 2020 · All Rights Reserved