API

Velpic Public API

Version: 2.0

The Velpic REST API provides programatic access to read and write Velpic data. All responses are in JSON format

Getting Started

Here’s a quick rundown on how to get started using the Velpic API

  1. Generate an API key
  2. Using your API key
  3. Example Request - Get list of trainees

Generate an API key

If you wish to use our public REST API to integrate with Velpic, you will need an API Access Key to use in a header for authentication. To generate one, please follow these steps.

Please Note: Not all subscription levels have access to the integrations tab. If you do not see this tab, you can contact team@velpic.com to enquire about having integrations enabled

  1. First select the Integrations view on the left navigation of the Manage section.
  2. This will open up the integrations section in your main panel. The options you see may differ according to your subscription level.
Integration
  1. Click API Access Keys that and you will see this view. On your first visit, you will not have an API Key yet.
APIKeys
  1. Click on Generate API Key and the system will generate your first API Key. Keep this value secret, it is the value which authenticates your account when calling our REST api.

Regenerating your API key

If you wish to cycle it due to security concerns, etc, the click on the Regenerate API Key button. This will inactivate your current key and issue you a new one. Please keep in mind that this will break any integrations that you have written that are using the previous value. You can only have one active API Key at a time.

Regenerate

Using your API Key

Your access key is an alpha-numeric string that must be attached in the header of all requests as AccessKey. This key is secret and should be treated like a password.

"accesskey": "[ACCESS_KEY]"

Example Request – Get a list of trainees

Using cURL on Linux, Mac or Windows

Install cURL from https://curl.haxx.se/download.html then run the following command

curl -X GET -H "AccessKey: [ACCESS_KEY]" -H "Content-Type: application/json" "https://app.velpic.com/api/v2/user/?roleId=3"

This should return a set of JSON objects, similar to the following.

{ 
results: 
[ 
  { 
    userName: 'smithjohn',
    firstName: 'John',
    lastName: 'Smith',
    emailAddress: 'jsmith@yourorganisation.com',
    mobileNumber: '0412 345 678',
    phoneNumber: '94123456',
    lastLoggedInDate: '2016-09-05T06:45:53.000Z',
    active: true,
    employeeNumber: '',
    clientStatusId: 56,
    groups: [Object],
    groupsSupervised: [],
    roles: [Object],
    clientId: 76,
    timeZone: 'Australia/Perth',
    id: 12345,
    createdDate: '2015-11-19T05:04:43.000Z',
    modifiedDate: '2016-09-05T06:45:53.000Z' 
  },
  { 
    userName: 'katepostman',
    firstName: 'Kate',
    lastName: 'Postman',
    emailAddress: 'kpostman@yourorganisation.com',
    mobileNumber: '0498 765 432',
    phoneNumber: '61524567',
    lastLoggedInDate: '2016-09-05T04:42:49.000Z',
    active: true,
    employeeNumber: '',
    clientStatusId: 56,
    groups: [Object],
    groupsSupervised: [],
    roles: [Object],
    clientId: 76,
    timeZone: 'Australia/Perth',
    id: 98765,
    createdDate: '2015-11-19T08:03:51.000Z',
    modifiedDate: '2016-09-05T04:42:49.000Z' 
  } 
],
meta: 
  {
    totalResultCount: 2,
    startIndex: 0,
    endIndex: 2,
    createdDate: '2016-09-05T07:38:00.550Z',
    modifiedDate: '2016-09-05T07:38:00.550Z'
  },
  createdDate: '2016-09-05T07:38:00.550Z',
  modifiedDate: '2016-09-05T07:38:00.550Z'
}

Using Node.js

Install Node.js Download and install Node.js from https://nodejs.org/en/download/

Create a JavaScript file Create a file called GetTrainees.js and open it. In the file add the following code, replacing [ACCESS_KEY] with your access key:

var http = require("https");

var options = {
 "method": "GET",
 "hostname": "app.velpic.com",
 "port": null,
 "path": "/api/v2/user/?roleId=6&maxResults=100",
 "headers": {
 "accesskey": "[ACCESS_KEY]",
 "content-type": "application/json"
 }
};

var req = http.request(options, function (res) {
 var chunks = [];

 res.on("data", function (chunk) {
 chunks.push(chunk);
 });

 res.on("end", function () {
 var body = JSON.parse(Buffer.concat(chunks));
 console.dir(body);
 });
});

req.end();

This will return a set of users who are Trainees.

Running the request

In your terminal, navigate to the folder you saved GetTrainees.js in and then enter the command.

node GetTrainees.js

Webhooks

WebHook integration provides Velpic with a way of communicating real-time information to third-party applications using HTTP callbacks.

Specification

WebHooks make HTTP POST requests to send data in real-time. This is advantageous over traditional API’s which require frequent polling, a process that can be less efficient. Messages are sent in JSON format.

Create a WebHook

WebHooks can be created through the Velpic App. To create a WebHook, follow the steps below

STEP 1: NAVIGATE TO THE INTEGRATION PAGE

In the app, navigate to the Integration tab under “Manage”

STEP 2: NAVIGATE TO THE WEBHOOKS PAGE

The options that you see here will differ according to your subscription level, but the one you want is “WebHooks”. Click on that Integration

STEP 3: ADD A URI

Once in the integrations page, you will see an input for the WebHook URI. This is the address that the event posts will be sent to. Enter your desired URI here. AddWebhook

STEP 4: SELECT AN EVENT TYPE

You will also see a dropdown for the types of events for which messages will be posted. A list of these events and their payloads can be found in the Events section below.

After selecting your event type, click the add button. The WebHook setup is now complete.

You can now add more WebHooks to your account. There is no limit to the number of WebHooks you can set up.

Dropdown

Delete a Webhook

WebHooks can be deleted from the WebHooks page. Simply click the trash icon beside the WebHook that you wish to delete.

When a WebHook is deleted, it is inactivated and will not generate ay new posts. DeleteWebhook

All Events

This event will trigger whenever any of the events in this section trigger.

Since there is no single event that will cause the WebHook to fire, there is no standard format for the post. Any handler would need to be able to accommodate all of the events below. However, all events have a name element which defines which event is fired

Lesson Schedule Completed

Requestsexample 1
Headers
Content-Type: application/json
Body
{
  "name": "lesson.schedule.completed",
  "lessonScheduleId": "1233",
  "userId": "1023",
  "timeStamp": "2017-01-16T01:33:27.012Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "lessonScheduleId": {
      "type": "string"
    },
    "userId": {
      "type": "string"
    },
    "timeStamp": {
      "type": "string"
    }
  }
}
Responses

Lesson Schedule Completed
POST/your-endpoint

This event fires when a user completes a lesson schedule

The fields in the body of the post are as follows;

key description
name The name of the event. For this event it is always be “lesson.schedule.completed”
lessonScheduleId The ID number of the lesson schedule that was completed
userID The ID number of the user that completed the lesson schedule
timeStamp The time at which the event was fired

Lesson Schedule Changed

Requestsexample 1
Headers
Content-Type: application/json
Body
{
  "name": "lesson.schedule.changed",
  "scheduleDate": "2017-01-20T01:33:27.012Z",
  "lessonScheduleId": "1233",
  "userID": "1023",
  "timeStamp": "2017-01-16T01:33:27.012Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "scheduleDate": {
      "type": "string"
    },
    "lessonScheduleId": {
      "type": "string"
    },
    "userID": {
      "type": "string"
    },
    "timeStamp": {
      "type": "string"
    }
  }
}
Responses

Lesson Schedule Changed
POST/your-endpoint

This event fires when a lesson schedule is changed. If a schedule assigned to multiple users is changed, the event will fire for each user.

The fields in the body of the post are as follows;

key description
name The name of the event. For this event it is always be “lesson.schedule.changed”
scheduleDate The new start date for the schedule
lessonScheduleId The ID number of the lesson schedule that was changed
userID The ID number of the user that is assigned to the lesson schedule that was changed
timeStamp The time at which the event was fired

Lesson Schedule Created

Requestsexample 1
Headers
Content-Type: application/json
Body
{
  "name": "lesson.schedule.created",
  "lessonScheduleId": "1233",
  "userID": "1023",
  "timeStamp": "2017-01-16T01:33:27.012Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "lessonScheduleId": {
      "type": "string"
    },
    "userID": {
      "type": "string"
    },
    "timeStamp": {
      "type": "string"
    }
  }
}
Responses

Lesson Schedule Created
POST/your-endpoint

This event fires when a lesson schedule is created. If a schedule assigned to multiple users is created, the event will fire for each user.

The fields in the body of the post are as follows;

key description
name The name of the event. For this event it is always be “lesson.schedule.created”
lessonScheduleId The ID number of the lesson schedule that was created
userID The ID number of the user that is assigned to the new lesson schedule
timeStamp The time at which the event was fired

Lesson Schedule Cancelled

Requestsexample 1
Headers
Content-Type: application/json
Body
{
  "name": "lesson.schedule.cancelled",
  "lessonScheduleId": "1233",
  "userID": "1023",
  "cancellationReason": "SCHEDULE_CANCELLED_MANUALLY",
  "timeStamp": "2017-01-16T01:33:27.012Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "lessonScheduleId": {
      "type": "string"
    },
    "userID": {
      "type": "string"
    },
    "cancellationReason": {
      "type": "string"
    },
    "timeStamp": {
      "type": "string"
    }
  }
}
Responses

Lesson Schedule Cancelled
POST/your-endpoint

This event fires when a lesson schedule is cancelled. If a schedule assigned to multiple users is cancelled, the event will fire for each user.

The fields in the body of the post are as follows;

key description
name The name of the event. For this event it is always be “lesson.schedule.cancelled”
lessonScheduleId The ID number of the lesson schedule that was cancelled
userID The ID number of the user that was assigned to the cancelled lesson schedule
cancellationReason The reason the lesson was cancelled. See the table below for possible values
timeStamp The time at which the event was fired

User Account Created

Requestsexample 1
Headers
Content-Type: application/json
Body
{
  "name": "user.account.created",
  "firstName": "John",
  "lastName": "Smith",
  "userName": "j.smith",
  "userId": "1023",
  "timeStamp": "2017-01-16T01:33:27.012Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "firstName": {
      "type": "string"
    },
    "lastName": {
      "type": "string"
    },
    "userName": {
      "type": "string"
    },
    "userId": {
      "type": "string"
    },
    "timeStamp": {
      "type": "string"
    }
  }
}
Responses

User Account Created
POST/your-endpoint

This event fires each time a user is created.

The fields in the body of the post are as follows;

key description
name The name of the event. For this event it is always be “user.account.created”
firstName The first name of the created user
lastName The last name of the created user
userName The userName of the created user
userId The ID number of the created user
timeStamp The time at which the event was fired

User Settings Updated

Requestsexample 1
Headers
Content-Type: application/json
Body
{
  "name": "user.settings.updated",
  "userId": "1023",
  "actingUserId": "1055",
  "timeStamp": "2017-01-16T01:33:27.012Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "userId": {
      "type": "string"
    },
    "actingUserId": {
      "type": "string"
    },
    "timeStamp": {
      "type": "string"
    }
  }
}
Responses

User Settings Updated
POST/your-endpoint

This event fires whenever a user’s settings are changed.

The fields in the body of the post are as follows;

key description
name The name of the event. For this event it is always be “user.settings.updated”
userId The ID number of the modified user
actingUserId The ID number of user that changed the settings
timeStamp The time at which the event was fired

User Account Inactive

Requestsexample 1
Headers
Content-Type: application/json
Body
{
  "name": "user.account.inactivate",
  "userName": "j.smith",
  "userId": "1023",
  "timeStamp": "2017-01-16T01:33:27.012Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "userName": {
      "type": "string"
    },
    "userId": {
      "type": "string"
    },
    "timeStamp": {
      "type": "string"
    }
  }
}
Responses

User Account Inactive
POST/your-endpoint

This event fires whenever a user will be inactivated

The fields in the body of the post are as follows;

key description
name The name of the event. For this event it is always be “user.account.inactivate”
userName The username of the user that will be inactivated
userId The ID number of user that will be inactivated
timeStamp The time at which the event was fired

User

The user object contains all identifiying information about users within the platform.

Roles A user can have one or more of the following roles

Id Role Description
3 ADMIN Admins have access to the manage section and can create edit and update all objects in the system (users, lessons etc.)
6 TRAINEE A Trainee only has access to consume learning content and view results
7 OWNER There is only ever one owner.

clientStatusId This is an id to indicate the users active status.

Id Role Description
56 Active a trainee who is currently in the organisation
57 Not Current a trainee who is not currently active in the organisation. These people learning records are still available in velpic

Search for Users

Called to find users based on a number of criteria.

You can search for users by any of the paramaters. Specifying no paramaters will return users in a paged set.

GET https://app.velpic.com/api/v2/user?q=abc&empId=af09c&emailAddress=john@smith.com&startIndex=0&maxResults=10
Requestsexample 1
Headers
Content-Type: application/json
AccessKey: "Your API Access Key"
Responses200403403503
Headers
Content-Type: application/json
Body
{
  "results": [
    {
      "id": 1,
      "userName": "Username",
      "firstName": "John",
      "lastName": "Smith",
      "emailAddress": "john.smith@gmail.com",
      "phoneNumber": "0811112222",
      "mobileNumber": "0411222333",
      "employeeNumber": "E123",
      "clientStatusId": 56,
      "groups": [],
      "groupsSupervised": [],
      "roles": [
        6
      ],
      "timeZone": "Australia/Perth",
      "createdDate": "2015-10-29T15:28:59+0000",
      "modifiedDate": "2015-10-29T15:28:59+0000"
    }
  ],
  "meta": {
    "totalResultCount": 20,
    "startIndex": 0,
    "endIndex": 20
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "results": {
      "type": "array",
      "description": "The list of users in a UserBasic object structure."
    },
    "meta": {
      "type": "object",
      "properties": {
        "totalResultCount": {
          "type": "number",
          "description": "The total number of results in the search"
        },
        "startIndex": {
          "type": "number",
          "description": "The start index of the result set"
        },
        "endIndex": {
          "type": "number",
          "description": "The end index of the result set"
        }
      },
      "required": [
        "totalResultCount",
        "startIndex",
        "endIndex"
      ]
    }
  },
  "required": [
    "results"
  ]
}
Headers
Content-Type: application/json
Body
{
  "message": "AccessKey does not exist",
  "reason": "Invalid access key",
  "internalCode": 806,
  "error": "Invalid security token"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "A description of the error"
    },
    "reason": {
      "type": "string",
      "description": "The reason for the error"
    },
    "internalCode": {
      "type": "number",
      "description": "The internal status code of the error"
    },
    "error": {
      "type": "string",
      "description": "The error for the message"
    }
  }
}
Headers
Content-Type: application/json
Body
{
  "internalCode": 831,
  "error": "You are not authorised to make this request"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "internalCode": {
      "type": "number",
      "description": "The internal status code of the error"
    },
    "error": {
      "type": "string",
      "description": "The error for the message"
    }
  }
}
Headers
Content-Type: application/json
Body
{
  "internalCode": 500,
  "error": "Internal Server Error"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "internalCode": {
      "type": "number",
      "description": "The internal status code of the error"
    },
    "error": {
      "type": "string",
      "description": "The error for the message"
    }
  }
}

List
GET/user{?q,empId,emailAddress,startIndex,maxResults}

URI Parameters
HideShow
q
string (required) Example: abc

(Optional) A string to query that matches to username, firstname or lastname of the user.

empId
string (required) Example: af09c

(Optional) A exact match to the employee ID. If no match, then no user will be returned

emailAddress
string (required) Example: john@smith.com

(Optional) A exact match to the email address for the user. If no match, then no user will be returned.

startIndex
number (required) Example: 0

(Optional) The start index of the record set. Default is 0

maxResults
number (required) Example: 10

(Optional) The maximum number of results to return for the search Default is 0

activeValue
string (required) Example: active

(Optional) Filters list by user’s active status. One of active, inactive or all. Default is active


Get User

GET https://app.velpic.com/api/v2/user/1
Requestsexample 1
Headers
Content-Type: application/json
AccessKey: "Your API Access Key"
Responses200403403503
Headers
Content-Type: application/json
Body
{
  "id": 1,
  "userName": "Username",
  "firstName": "John",
  "lastName": "Smith",
  "emailAddress": "john.smith@gmail.com",
  "phoneNumber": "0811112222",
  "mobileNumber": "0411222333",
  "employeeNumber": "E123",
  "clientStatusId": 56,
  "groups": [],
  "groupsSupervised": [],
  "roles": [
    6
  ],
  "timeZone": "Australia/Perth",
  "createdDate": "2015-10-29T15:28:59+0000",
  "modifiedDate": "2015-10-29T15:28:59+0000"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "number",
      "description": "Unique identifier"
    },
    "userName": {
      "type": "string",
      "description": "Users username"
    },
    "firstName": {
      "type": "string",
      "description": "Users first name"
    },
    "lastName": {
      "type": "string",
      "description": "Users last name"
    },
    "emailAddress": {
      "type": "string",
      "description": "The users email address"
    },
    "phoneNumber": {
      "type": "string",
      "description": "Phone number for the user"
    },
    "mobileNumber": {
      "type": "string",
      "description": "Mobile phone number for the user"
    },
    "employeeNumber": {
      "type": "string",
      "description": "Employee Number"
    },
    "clientStatusId": {
      "type": "number",
      "description": "The active status Id for the user"
    },
    "groups": {
      "type": "array",
      "description": "The groups the user is a part of"
    },
    "groupsSupervised": {
      "type": "array",
      "description": "The groups a user supervises"
    },
    "roles": {
      "type": "array",
      "description": "The roles for a user."
    },
    "timeZone": {
      "type": "string",
      "description": "the timezone for a user"
    },
    "createdDate": {
      "type": "string",
      "description": "The date the group was created"
    },
    "modifiedDate": {
      "type": "string",
      "description": "The date the group was created"
    }
  },
  "required": [
    "id",
    "firstName",
    "lastName",
    "emailAddress",
    "createdDate",
    "modifiedDate"
  ]
}
Headers
Content-Type: application/json
Body
{
  "message": "AccessKey does not exist",
  "reason": "Invalid access key",
  "internalCode": 806,
  "error": "Invalid security token"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "A description of the error"
    },
    "reason": {
      "type": "string",
      "description": "The reason for the error"
    },
    "internalCode": {
      "type": "number",
      "description": "The internal status code of the error"
    },
    "error": {
      "type": "string",
      "description": "The error for the message"
    }
  }
}
Headers
Content-Type: application/json
Body
{
  "internalCode": 831,
  "error": "You are not authorised to make this request"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "internalCode": {
      "type": "number",
      "description": "The internal status code of the error"
    },
    "error": {
      "type": "string",
      "description": "The error for the message"
    }
  }
}
Headers
Content-Type: application/json
Body
{
  "internalCode": 500,
  "error": "Internal Server Error"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "internalCode": {
      "type": "number",
      "description": "The internal status code of the error"
    },
    "error": {
      "type": "string",
      "description": "The error for the message"
    }
  }
}

Get
GET/user/{userId}

Called to retrieve a user based on ID

URI Parameters
HideShow
userId
Number (required) Example: 1

The unique identifier for the user.


Create User

Call to create a user within Velpic for your organisation.

POST https://app.velpic.com/api/v2/user
Requestsexample 1
Headers
Content-Type: application/json
AccessKey: "Your API Access Key"
Body
{
  "userName": "j.smith",
  "firstName": "John",
  "lastName": "Smith",
  "emailAddress": "john.smith@gmail.com",
  "phoneNumber": "0811112222",
  "mobileNumber": "0411222333",
  "employeeNumber": "E123",
  "sendWelcomeEmail": true,
  "roles": [
    6
  ],
  "timeZone": "Australia/Perth"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "userName": {
      "type": "string",
      "description": "(Optional) a username to set for the new user.  This will be automatically generated if none is supplied"
    },
    "firstName": {
      "type": "string",
      "description": "Firstname of the user"
    },
    "lastName": {
      "type": "string",
      "description": "Lastname of the user"
    },
    "emailAddress": {
      "type": "string",
      "description": "Email of the user"
    },
    "phoneNumber": {
      "type": "string",
      "description": "The phone number for the user"
    },
    "mobileNumber": {
      "type": "string",
      "description": "The mobile phone number for the user"
    },
    "employeeNumber": {
      "type": "string",
      "description": "The clients employee number for the user"
    },
    "sendWelcomeEmail": {
      "type": "boolean",
      "description": "(Optional) Set to configure user creation to send the welcome email.  Is true by default."
    },
    "roles": {
      "type": "array",
      "description": "(Optional) The roles to set for a user. By default users are created with the TRAINEE(6) role."
    },
    "timeZone": {
      "type": "string",
      "description": "(Optional) the timezone for a user.  If not set, the timezone will default to the timezone set for the client"
    }
  }
}
Responses200403403503
Headers
Content-Type: application/json
Body
{
  "id": 327027,
  "createdDate": "2018-04-19T01:24:40.632Z",
  "modifiedDate": "2018-04-19T01:24:40.637Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "number",
      "description": "Unique identifier for the user"
    },
    "createdDate": {
      "type": "string",
      "description": "The date the user was created"
    },
    "modifiedDate": {
      "type": "string",
      "description": "The date the user was last modified"
    }
  }
}
Headers
Content-Type: application/json
Body
{
  "message": "AccessKey does not exist",
  "reason": "Invalid access key",
  "internalCode": 806,
  "error": "Invalid security token"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "A description of the error"
    },
    "reason": {
      "type": "string",
      "description": "The reason for the error"
    },
    "internalCode": {
      "type": "number",
      "description": "The internal status code of the error"
    },
    "error": {
      "type": "string",
      "description": "The error for the message"
    }
  }
}
Headers
Content-Type: application/json
Body
{
  "internalCode": 831,
  "error": "You are not authorised to make this request"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "internalCode": {
      "type": "number",
      "description": "The internal status code of the error"
    },
    "error": {
      "type": "string",
      "description": "The error for the message"
    }
  }
}
Headers
Content-Type: application/json
Body
{
  "internalCode": 500,
  "error": "Internal Server Error"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "internalCode": {
      "type": "number",
      "description": "The internal status code of the error"
    },
    "error": {
      "type": "string",
      "description": "The error for the message"
    }
  }
}

Create
POST/user


Update User

Call to update a user within Velpic for your organisation.

POST https://app.velpic.com/api/v2/user/1
Requestsexample 1
Headers
Content-Type: application/json
AccessKey: "Your API Access Key"
Body
{
  "id": 1,
  "userName": "Username",
  "firstName": "John",
  "lastName": "Smith",
  "emailAddress": "john.smith@gmail.com",
  "phoneNumber": "0811112222",
  "mobileNumber": "0411222333",
  "employeeNumber": "E123",
  "clientStatusId": 56,
  "groups": [],
  "groupsSupervised": [],
  "roles": [
    6
  ],
  "timeZone": "Australia/Perth",
  "createdDate": "2015-10-29T15:28:59+0000",
  "modifiedDate": "2015-10-29T15:28:59+0000"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "number",
      "description": "Unique identifier"
    },
    "userName": {
      "type": "string",
      "description": "Users username"
    },
    "firstName": {
      "type": "string",
      "description": "Users first name"
    },
    "lastName": {
      "type": "string",
      "description": "Users last name"
    },
    "emailAddress": {
      "type": "string",
      "description": "The users email address"
    },
    "phoneNumber": {
      "type": "string",
      "description": "Phone number for the user"
    },
    "mobileNumber": {
      "type": "string",
      "description": "Mobile phone number for the user"
    },
    "employeeNumber": {
      "type": "string",
      "description": "Employee Number"
    },
    "clientStatusId": {
      "type": "number",
      "description": "The active status Id for the user"
    },
    "groups": {
      "type": "array",
      "description": "The groups the user is a part of"
    },
    "groupsSupervised": {
      "type": "array",
      "description": "The groups a user supervises"
    },
    "roles": {
      "type": "array",
      "description": "The roles for a user."
    },
    "timeZone": {
      "type": "string",
      "description": "the timezone for a user"
    },
    "createdDate": {
      "type": "string",
      "description": "The date the group was created"
    },
    "modifiedDate": {
      "type": "string",
      "description": "The date the group was created"
    }
  },
  "required": [
    "id",
    "firstName",
    "lastName",
    "emailAddress",
    "createdDate",
    "modifiedDate"
  ]
}
Responses200403403503
Headers
Content-Type: application/json
Body
{
  "id": 1,
  "userName": "Username",
  "firstName": "John",
  "lastName": "Smith",
  "emailAddress": "john.smith@gmail.com",
  "phoneNumber": "0811112222",
  "mobileNumber": "0411222333",
  "employeeNumber": "E123",
  "clientStatusId": 56,
  "groups": [],
  "groupsSupervised": [],
  "roles": [
    6
  ],
  "timeZone": "Australia/Perth",
  "createdDate": "2015-10-29T15:28:59+0000",
  "modifiedDate": "2015-10-29T15:28:59+0000"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "number",
      "description": "Unique identifier"
    },
    "userName": {
      "type": "string",
      "description": "Users username"
    },
    "firstName": {
      "type": "string",
      "description": "Users first name"
    },
    "lastName": {
      "type": "string",
      "description": "Users last name"
    },
    "emailAddress": {
      "type": "string",
      "description": "The users email address"
    },
    "phoneNumber": {
      "type": "string",
      "description": "Phone number for the user"
    },
    "mobileNumber": {
      "type": "string",
      "description": "Mobile phone number for the user"
    },
    "employeeNumber": {
      "type": "string",
      "description": "Employee Number"
    },
    "clientStatusId": {
      "type": "number",
      "description": "The active status Id for the user"
    },
    "groups": {
      "type": "array",
      "description": "The groups the user is a part of"
    },
    "groupsSupervised": {
      "type": "array",
      "description": "The groups a user supervises"
    },
    "roles": {
      "type": "array",
      "description": "The roles for a user."
    },
    "timeZone": {
      "type": "string",
      "description": "the timezone for a user"
    },
    "createdDate": {
      "type": "string",
      "description": "The date the group was created"
    },
    "modifiedDate": {
      "type": "string",
      "description": "The date the group was created"
    }
  },
  "required": [
    "id",
    "firstName",
    "lastName",
    "emailAddress",
    "createdDate",
    "modifiedDate"
  ]
}
Headers
Content-Type: application/json
Body
{
  "message": "AccessKey does not exist",
  "reason": "Invalid access key",
  "internalCode": 806,
  "error": "Invalid security token"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "A description of the error"
    },
    "reason": {
      "type": "string",
      "description": "The reason for the error"
    },
    "internalCode": {
      "type": "number",
      "description": "The internal status code of the error"
    },
    "error": {
      "type": "string",
      "description": "The error for the message"
    }
  }
}
Headers
Content-Type: application/json
Body
{
  "internalCode": 831,
  "error": "You are not authorised to make this request"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "internalCode": {
      "type": "number",
      "description": "The internal status code of the error"
    },
    "error": {
      "type": "string",
      "description": "The error for the message"
    }
  }
}
Headers
Content-Type: application/json
Body
{
  "internalCode": 500,
  "error": "Internal Server Error"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "internalCode": {
      "type": "number",
      "description": "The internal status code of the error"
    },
    "error": {
      "type": "string",
      "description": "The error for the message"
    }
  }
}

Update
POST/user/{userId}

URI Parameters
HideShow
userId
Number (required) Example: 1

The unique identifier for the user.


Bulk Create User

POST https://app.velpic.com/api/v2/bulkUserImport
Requestsexample 1
Headers
Content-Type: application/json
AccessKey: "Your API Access Key"
Body
{
  "users": [
    {
      "userName": "j.smith",
      "firstName": "John",
      "lastName": "Smith",
      "emailAddress": "john.smith@gmail.com",
      "phoneNumber": "0811112222",
      "mobileNumber": "0411222333",
      "employeeNumber": "E123",
      "roles": [
        6
      ],
      "timeZone": "Australia/Perth"
    }
  ],
  "mergeType": "none"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "users": {
      "type": "array",
      "description": "The list of users in a UserBasic object structure."
    },
    "mergeType": {
      "type": "string",
      "description": "Field to use as identifier to update an existing user"
    }
  },
  "required": [
    "users"
  ]
}
Responses200403
Headers
Content-Type: application/json
Body
[
  {
    "id": 1,
    "userName": "Username",
    "firstName": "John",
    "lastName": "Smith",
    "emailAddress": "john.smith@gmail.com",
    "phoneNumber": "0811112222",
    "mobileNumber": "0411222333",
    "employeeNumber": "E123",
    "clientStatusId": 56,
    "groups": [],
    "groupsSupervised": [],
    "roles": [
      6
    ],
    "timeZone": "Australia/Perth",
    "createdDate": "2015-10-29T15:28:59+0000",
    "modifiedDate": "2015-10-29T15:28:59+0000"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
Headers
Content-Type: application/json
Body
{
  "message": "AccessKey does not exist",
  "reason": "Invalid access key",
  "internalCode": 806,
  "error": "Invalid security token"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "A description of the error"
    },
    "reason": {
      "type": "string",
      "description": "The reason for the error"
    },
    "internalCode": {
      "type": "number",
      "description": "The internal status code of the error"
    },
    "error": {
      "type": "string",
      "description": "The error for the message"
    }
  }
}

Bulk Create
POST/bulkUserImport

Called to bulk create or update users in Velpic

mergeType can be used to identify if you’d like users to be merged based on a field.

Possible values for mergeType are;

value description
empNo Will merge a user with another based on the employee number supplied
email Will merge a user with another based on the email address supplied
userName Will merge a user with another based on the user name supplied
none No merge will occur. this is the default

Activate User

POST https://app.velpic.com/api/v2/user/1/activate
Requestsexample 1
Headers
Content-Type: application/json
AccessKey: "Your API Access Key"
Responses200403403503
This response has no content.
Headers
Content-Type: application/json
Body
{
  "message": "AccessKey does not exist",
  "reason": "Invalid access key",
  "internalCode": 806,
  "error": "Invalid security token"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "A description of the error"
    },
    "reason": {
      "type": "string",
      "description": "The reason for the error"
    },
    "internalCode": {
      "type": "number",
      "description": "The internal status code of the error"
    },
    "error": {
      "type": "string",
      "description": "The error for the message"
    }
  }
}
Headers
Content-Type: application/json
Body
{
  "internalCode": 831,
  "error": "You are not authorised to make this request"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "internalCode": {
      "type": "number",
      "description": "The internal status code of the error"
    },
    "error": {
      "type": "string",
      "description": "The error for the message"
    }
  }
}
Headers
Content-Type: application/json
Body
{
  "internalCode": 500,
  "error": "Internal Server Error"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "internalCode": {
      "type": "number",
      "description": "The internal status code of the error"
    },
    "error": {
      "type": "string",
      "description": "The error for the message"
    }
  }
}

Activate
POST/user/{userId}/activate

Called to activate a user based on ID

URI Parameters
HideShow
userId
Number (required) Example: 1

The unique identifier for the user.


Inactivate User

POST https://app.velpic.com/api/v2/user/1/inactivate
Requestsexample 1
Headers
Content-Type: application/json
AccessKey: "Your API Access Key"
Responses200403403503
This response has no content.
Headers
Content-Type: application/json
Body
{
  "message": "AccessKey does not exist",
  "reason": "Invalid access key",
  "internalCode": 806,
  "error": "Invalid security token"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "A description of the error"
    },
    "reason": {
      "type": "string",
      "description": "The reason for the error"
    },
    "internalCode": {
      "type": "number",
      "description": "The internal status code of the error"
    },
    "error": {
      "type": "string",
      "description": "The error for the message"
    }
  }
}
Headers
Content-Type: application/json
Body
{
  "internalCode": 831,
  "error": "You are not authorised to make this request"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "internalCode": {
      "type": "number",
      "description": "The internal status code of the error"
    },
    "error": {
      "type": "string",
      "description": "The error for the message"
    }
  }
}
Headers
Content-Type: application/json
Body
{
  "internalCode": 500,
  "error": "Internal Server Error"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "internalCode": {
      "type": "number",
      "description": "The internal status code of the error"
    },
    "error": {
      "type": "string",
      "description": "The error for the message"
    }
  }
}

Inactivate
POST/user/{userId}/inactivate

Called to inactivate a user based on ID

URI Parameters
HideShow
userId
Number (required) Example: 1

The unique identifier for the user.


Generate Login URL

Create a magic link url that provides automatic, username and password free account login when clicked.

POST https://app.velpic.com/api/v2/user/1/generate_login_url?expiresIn=day
Requestsexample 1
Headers
Content-Type: application/json
AccessKey: "Your API Access Key"
Responses200403403503
Headers
Content-Type: application/json
Body
touch_token_url
Headers
Content-Type: application/json
Body
{
  "message": "AccessKey does not exist",
  "reason": "Invalid access key",
  "internalCode": 806,
  "error": "Invalid security token"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "A description of the error"
    },
    "reason": {
      "type": "string",
      "description": "The reason for the error"
    },
    "internalCode": {
      "type": "number",
      "description": "The internal status code of the error"
    },
    "error": {
      "type": "string",
      "description": "The error for the message"
    }
  }
}
Headers
Content-Type: application/json
Body
{
  "internalCode": 831,
  "error": "You are not authorised to make this request"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "internalCode": {
      "type": "number",
      "description": "The internal status code of the error"
    },
    "error": {
      "type": "string",
      "description": "The error for the message"
    }
  }
}
Headers
Content-Type: application/json
Body
{
  "internalCode": 500,
  "error": "Internal Server Error"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "internalCode": {
      "type": "number",
      "description": "The internal status code of the error"
    },
    "error": {
      "type": "string",
      "description": "The error for the message"
    }
  }
}

Generate Login URL
POST/user/{userId}/generate_login_url{?expiresIn}

URI Parameters
HideShow
userId
Number (required) Example: 1

The unique identifier for the user.

expiresIn
String (required) Example: day

The time the magic link expires (disabled, never, day, week, month, year)


Group

APIs that allow for read and write of Groups.

A Velpic group contains members and supervisors. Supervisors have the ability to perform manage functions on users in the group and view followup information. Automatic scheduling rules can be set for members of a group.

List Groups

GET https://app.velpic.com/api/v2/group?q=myGroup&startIndex=0&maxResults=20
Requestsexample 1
Headers
Content-Type: application/json
Content-Type: application/json
AccessKey: "Your API Access Key"
Responses200403
Headers
Content-Type: application/json
Body
{
  "results": [
    {
      "id": 1,
      "name": "Dev Group",
      "parentId": 1,
      "description": "The Development Team",
      "memberCount": 15,
      "createdDate": "2015-10-29 15:28:59",
      "clientId": 1
    }
  ],
  "meta": {
    "totalResultCount": 20,
    "startIndex": 0,
    "endIndex": 20
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "results": {
      "type": "array",
      "description": "The result of groups."
    },
    "meta": {
      "type": "object",
      "properties": {
        "totalResultCount": {
          "type": "number",
          "description": "The total number of results in the search"
        },
        "startIndex": {
          "type": "number",
          "description": "The start index of the result set"
        },
        "endIndex": {
          "type": "number",
          "description": "The end index of the result set"
        }
      },
      "required": [
        "totalResultCount",
        "startIndex",
        "endIndex"
      ]
    }
  },
  "required": [
    "results"
  ]
}
Headers
Content-Type: application/json
Body
{
  "internalCode": 806,
  "error": "Token not valid"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "internalCode": {
      "type": "number",
      "description": "The internal status code of the error"
    },
    "error": {
      "type": "string",
      "description": "The error for the message"
    }
  }
}

List
GET/group{?q,startIndex,maxResults}

URI Parameters
HideShow
q
string (required) Example: myGroup

The query string for the group search. Will match to group name

startIndex
number (required) Example: 0

The starting index to list from in the result set.

maxResults
number (required) Example: 20

The maximum number of results to return.


Get

GET https://app.velpic.com/api/v2/group/1234
Requestsexample 1
Headers
Content-Type: application/json
Content-Type: application/json
AccessKey: "Your API Access Key"
Responses200403404
Headers
Content-Type: application/json
Body
{
  "id": 1,
  "name": "Dev Group",
  "parentId": 1,
  "description": "The Development Team",
  "memberCount": 15,
  "createdDate": "2015-10-29 15:28:59",
  "clientId": 1
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "number",
      "description": "Unique identifier"
    },
    "name": {
      "type": "string",
      "description": "The name of the group"
    },
    "parentId": {
      "type": "number",
      "description": "The id of the parent group"
    },
    "description": {
      "type": "string",
      "description": "The group description"
    },
    "memberCount": {
      "type": "number",
      "description": "The number of members in the group"
    },
    "createdDate": {
      "type": "string",
      "description": "The date the group was created"
    },
    "clientId": {
      "type": "number",
      "description": "The related client Id"
    }
  },
  "required": [
    "id",
    "name",
    "description",
    "memberCount",
    "createdDate",
    "clientId"
  ]
}
Headers
Content-Type: application/json
Body
{
  "internalCode": 806,
  "error": "Token not valid"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "internalCode": {
      "type": "number",
      "description": "The internal status code of the error"
    },
    "error": {
      "type": "string",
      "description": "The error for the message"
    }
  }
}
Headers
Content-Type: application/json
Body
{ 
    "message":"No group found for that Id",
    "reason":"No Group found",
    "error":true,
    "internalCode":TBD,
    "statusCode":404
}

Get
GET/group/{groupId}

Retrieve a group based on ID

URI Parameters
HideShow
groupId
Number (required) Example: 1234

The group unique identifier.


Create Group

POST https://app.velpic.com/api/v2/group
Requestsexample 1
Headers
Content-Type: application/json
Content-Type: application/json
AccessKey: "Your API Access Key"
Body
{
  "name": "Dev Group",
  "description": "The Development Team",
  "parentId": 1
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the group"
    },
    "description": {
      "type": "string",
      "description": "The group description"
    },
    "parentId": {
      "type": "number",
      "description": "The id of the parent group"
    }
  },
  "required": [
    "name",
    "description"
  ]
}
Responses200403
Headers
Content-Type: application/json
Body
{
  "id": 1,
  "name": "Dev Group",
  "parentId": 1,
  "description": "The Development Team",
  "memberCount": 15,
  "createdDate": "2015-10-29 15:28:59",
  "clientId": 1
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "number",
      "description": "Unique identifier"
    },
    "name": {
      "type": "string",
      "description": "The name of the group"
    },
    "parentId": {
      "type": "number",
      "description": "The id of the parent group"
    },
    "description": {
      "type": "string",
      "description": "The group description"
    },
    "memberCount": {
      "type": "number",
      "description": "The number of members in the group"
    },
    "createdDate": {
      "type": "string",
      "description": "The date the group was created"
    },
    "clientId": {
      "type": "number",
      "description": "The related client Id"
    }
  },
  "required": [
    "id",
    "name",
    "description",
    "memberCount",
    "createdDate",
    "clientId"
  ]
}
Headers
Content-Type: application/json
Body
{
  "message": "AccessKey does not exist",
  "reason": "Invalid access key",
  "internalCode": 806,
  "error": "Invalid security token"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "A description of the error"
    },
    "reason": {
      "type": "string",
      "description": "The reason for the error"
    },
    "internalCode": {
      "type": "number",
      "description": "The internal status code of the error"
    },
    "error": {
      "type": "string",
      "description": "The error for the message"
    }
  }
}

Create
POST/group

Called when a new group is created


Update

POST https://app.velpic.com/api/v2/group/1234
Requestsexample 1
Headers
Content-Type: application/json
Content-Type: application/json
AccessKey: "Your API Access Key"
Body
{
  "name": "Dev Group",
  "description": "The Development Team",
  "parentId": 1
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the group"
    },
    "description": {
      "type": "string",
      "description": "The group description"
    },
    "parentId": {
      "type": "number",
      "description": "The id of the parent group"
    }
  },
  "required": [
    "name",
    "description"
  ]
}
Responses200403
Headers
Content-Type: application/json
Body
{
  "id": 1,
  "name": "Dev Group",
  "parentId": 1,
  "description": "The Development Team",
  "memberCount": 15,
  "createdDate": "2015-10-29 15:28:59",
  "clientId": 1
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "number",
      "description": "Unique identifier"
    },
    "name": {
      "type": "string",
      "description": "The name of the group"
    },
    "parentId": {
      "type": "number",
      "description": "The id of the parent group"
    },
    "description": {
      "type": "string",
      "description": "The group description"
    },
    "memberCount": {
      "type": "number",
      "description": "The number of members in the group"
    },
    "createdDate": {
      "type": "string",
      "description": "The date the group was created"
    },
    "clientId": {
      "type": "number",
      "description": "The related client Id"
    }
  },
  "required": [
    "id",
    "name",
    "description",
    "memberCount",
    "createdDate",
    "clientId"
  ]
}
Headers
Content-Type: application/json
Body
{
  "message": "AccessKey does not exist",
  "reason": "Invalid access key",
  "internalCode": 806,
  "error": "Invalid security token"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "A description of the error"
    },
    "reason": {
      "type": "string",
      "description": "The reason for the error"
    },
    "internalCode": {
      "type": "number",
      "description": "The internal status code of the error"
    },
    "error": {
      "type": "string",
      "description": "The error for the message"
    }
  }
}

Update
POST/group/{groupId}

When a groups information is updated

URI Parameters
HideShow
groupId
Number (required) Example: 1234

The group unique identifier.


Get Users for a group

GET https://app.velpic.com/api/v2/group/1234/member?startIndex=0&maxResults=10
Requestsexample 1
Headers
Content-Type: application/json
AccessKey: "Your API Access Key"
Responses200403
Headers
Content-Type: application/json
Body
{
  "results": [
    {
      "id": 1,
      "userName": "Username",
      "firstName": "John",
      "lastName": "Smith",
      "emailAddress": "john.smith@gmail.com",
      "phoneNumber": "0811112222",
      "mobileNumber": "0411222333",
      "employeeNumber": "E123",
      "clientStatusId": 56,
      "groups": [],
      "groupsSupervised": [],
      "roles": [
        6
      ],
      "timeZone": "Australia/Perth",
      "createdDate": "2015-10-29T15:28:59+0000",
      "modifiedDate": "2015-10-29T15:28:59+0000"
    }
  ],
  "meta": {
    "totalResultCount": 20,
    "startIndex": 0,
    "endIndex": 20
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "results": {
      "type": "array",
      "description": "a list of the members in the group"
    },
    "meta": {
      "type": "object",
      "properties": {
        "totalResultCount": {
          "type": "number",
          "description": "The total number of results in the search"
        },
        "startIndex": {
          "type": "number",
          "description": "The start index of the result set"
        },
        "endIndex": {
          "type": "number",
          "description": "The end index of the result set"
        }
      },
      "required": [
        "totalResultCount",
        "startIndex",
        "endIndex"
      ],
      "description": "Meta data information about the seach"
    }
  }
}
Headers
Content-Type: application/json
Body
{
  "message": "AccessKey does not exist",
  "reason": "Invalid access key",
  "internalCode": 806,
  "error": "Invalid security token"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "A description of the error"
    },
    "reason": {
      "type": "string",
      "description": "The reason for the error"
    },
    "internalCode": {
      "type": "number",
      "description": "The internal status code of the error"
    },
    "error": {
      "type": "string",
      "description": "The error for the message"
    }
  }
}

Get Group Members
GET/group/{groupId}/member{?startIndex,maxResults}

Called to get a list of users for a group

URI Parameters
HideShow
groupId
Number (required) Example: 1234

The group unique identifier.

startIndex
Number (required) Example: 0

The starting index to list from in the result set.

maxResults
Number (required) Example: 10

The maximum number of results to return.


Add Members to Group

POST https://app.velpic.com/api/v2/group/1234/add_members
Requestsexample 1
Headers
Content-Type: application/json
AccessKey: "Your API Access Key"
Body
{
  "userIds": [
    1,
    2,
    3,
    4,
    5,
    6,
    7,
    8,
    9,
    10
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "userIds": {
      "type": "array",
      "description": "List of users ids to be added as group supervisors"
    }
  }
}
Responses200403404
Headers
Content-Type: application/json
Body
HTTP/1.1 200 OK
Headers
Content-Type: application/json
Body
{
  "message": "AccessKey does not exist",
  "reason": "Invalid access key",
  "internalCode": 806,
  "error": "Invalid security token"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "A description of the error"
    },
    "reason": {
      "type": "string",
      "description": "The reason for the error"
    },
    "internalCode": {
      "type": "number",
      "description": "The internal status code of the error"
    },
    "error": {
      "type": "string",
      "description": "The error for the message"
    }
  }
}
Headers
Content-Type: application/json
Body
{
  "message": "Group with id 1 not found",
  "reason": "Group not found",
  "internalCode": 842,
  "statusCode": 404
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Description of the error"
    },
    "reason": {
      "type": "string",
      "description": "Reason for the error"
    },
    "internalCode": {
      "type": "number",
      "description": "internal velpic code for the error"
    },
    "statusCode": {
      "type": "number",
      "description": "The http code for the error"
    }
  }
}

Add Members
POST/group/{groupId}/add_members

Called to set a user as a group member

URI Parameters
HideShow
groupId
Number (required) Example: 1234

The group unique identifier.


Remove Members from Group

POST https://app.velpic.com/api/v2/group/1234/remove_members
Requestsexample 1
Headers
Content-Type: application/json
AccessKey: "Your API Access Key"
Body
{
  "userIds": [
    1,
    2,
    3,
    4,
    5,
    6,
    7,
    8,
    9,
    10
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "userIds": {
      "type": "array",
      "description": "List of users ids to be removed"
    }
  }
}
Responses200403404
Headers
Content-Type: application/json
Body
HTTP/1.1 200 OK
Headers
Content-Type: application/json
Body
{
  "message": "AccessKey does not exist",
  "reason": "Invalid access key",
  "internalCode": 806,
  "error": "Invalid security token"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "A description of the error"
    },
    "reason": {
      "type": "string",
      "description": "The reason for the error"
    },
    "internalCode": {
      "type": "number",
      "description": "The internal status code of the error"
    },
    "error": {
      "type": "string",
      "description": "The error for the message"
    }
  }
}
Headers
Content-Type: application/json
Body
{
  "message": "Group with id 1 not found",
  "reason": "Group not found",
  "internalCode": 842,
  "statusCode": 404
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Description of the error"
    },
    "reason": {
      "type": "string",
      "description": "Reason for the error"
    },
    "internalCode": {
      "type": "number",
      "description": "internal velpic code for the error"
    },
    "statusCode": {
      "type": "number",
      "description": "The http code for the error"
    }
  }
}

Remove Members
POST/group/{groupId}/remove_members

Remove users (individual or multiple) from a group

URI Parameters
HideShow
groupId
Number (required) Example: 1234

The group unique identifier.


Get Supervisors for a group

GET https://app.velpic.com/api/v2/group/1234/supervisor?startIndex=0&maxResults=10
Requestsexample 1
Headers
Content-Type: application/json
AccessKey: "Your API Access Key"
Responses200403
Headers
Content-Type: application/json
Body
{
  "results": [
    {
      "id": 1,
      "userName": "Username",
      "firstName": "John",
      "lastName": "Smith",
      "emailAddress": "john.smith@gmail.com",
      "phoneNumber": "0811112222",
      "mobileNumber": "0411222333",
      "employeeNumber": "E123",
      "clientStatusId": 56,
      "groups": [],
      "groupsSupervised": [],
      "roles": [
        6
      ],
      "timeZone": "Australia/Perth",
      "createdDate": "2015-10-29T15:28:59+0000",
      "modifiedDate": "2015-10-29T15:28:59+0000"
    }
  ],
  "meta": {
    "totalResultCount": 20,
    "startIndex": 0,
    "endIndex": 20
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "results": {
      "type": "array",
      "description": "a list of the supervisors in the group"
    },
    "meta": {
      "type": "object",
      "properties": {
        "totalResultCount": {
          "type": "number",
          "description": "The total number of results in the search"
        },
        "startIndex": {
          "type": "number",
          "description": "The start index of the result set"
        },
        "endIndex": {
          "type": "number",
          "description": "The end index of the result set"
        }
      },
      "required": [
        "totalResultCount",
        "startIndex",
        "endIndex"
      ],
      "description": "Meta data information about the seach"
    }
  }
}
Headers
Content-Type: application/json
Body
{
  "message": "AccessKey does not exist",
  "reason": "Invalid access key",
  "internalCode": 806,
  "error": "Invalid security token"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "A description of the error"
    },
    "reason": {
      "type": "string",
      "description": "The reason for the error"
    },
    "internalCode": {
      "type": "number",
      "description": "The internal status code of the error"
    },
    "error": {
      "type": "string",
      "description": "The error for the message"
    }
  }
}

Get Supervisors
GET/group/{groupId}/supervisor{?startIndex,maxResults}

Called to get a list of the supervisor users for a group

URI Parameters
HideShow
groupId
Number (required) Example: 1234

The group unique identifier.

startIndex
Number (required) Example: 0

The starting index to list from in the result set.

maxResults
Number (required) Example: 10

The maximum number of results to return.


Add Supervisor to Group

POST https://app.velpic.com/api/v2/group/1234/add_supervisors
Requestsexample 1
Headers
Content-Type: application/json
AccessKey: "Your API Access Key"
Body
{
  "userIds": [
    1,
    2,
    3,
    4,
    5,
    6,
    7,
    8,
    9,
    10
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "userIds": {
      "type": "array",
      "description": "List of users ids to be added to the group"
    }
  }
}
Responses200403404
Headers
Content-Type: application/json
Body
HTTP/1.1 200 OK
Headers
Content-Type: application/json
Body
{
  "message": "AccessKey does not exist",
  "reason": "Invalid access key",
  "internalCode": 806,
  "error": "Invalid security token"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "A description of the error"
    },
    "reason": {
      "type": "string",
      "description": "The reason for the error"
    },
    "internalCode": {
      "type": "number",
      "description": "The internal status code of the error"
    },
    "error": {
      "type": "string",
      "description": "The error for the message"
    }
  }
}
Headers
Content-Type: application/json
Body
{
  "message": "Group with id 1 not found",
  "reason": "Group not found",
  "internalCode": 842,
  "statusCode": 404
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Description of the error"
    },
    "reason": {
      "type": "string",
      "description": "Reason for the error"
    },
    "internalCode": {
      "type": "number",
      "description": "internal velpic code for the error"
    },
    "statusCode": {
      "type": "number",
      "description": "The http code for the error"
    }
  }
}

Add Supervisors
POST/group/{groupId}/add_supervisors

Called to set a user as a group supervisor

URI Parameters
HideShow
groupId
Number (required) Example: 1234

The group unique identifier.


Remove Supervisors from Group

POST https://app.velpic.com/api/v2/group/1234/remove_supervisors
Requestsexample 1
Headers
Content-Type: application/json
AccessKey: "Your API Access Key"
Body
{
  "userIds": [
    1,
    2,
    3,
    4,
    5,
    6,
    7,
    8,
    9,
    10
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "userIds": {
      "type": "array",
      "description": "List of supervisor users ids to be removed"
    }
  }
}
Responses200403404
Headers
Content-Type: application/json
Body
HTTP/1.1 200 OK
Headers
Content-Type: application/json
Body
{
  "message": "AccessKey does not exist",
  "reason": "Invalid access key",
  "internalCode": 806,
  "error": "Invalid security token"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "A description of the error"
    },
    "reason": {
      "type": "string",
      "description": "The reason for the error"
    },
    "internalCode": {
      "type": "number",
      "description": "The internal status code of the error"
    },
    "error": {
      "type": "string",
      "description": "The error for the message"
    }
  }
}
Headers
Content-Type: application/json
Body
{
  "message": "Group with id 1 not found",
  "reason": "Group not found",
  "internalCode": 842,
  "statusCode": 404
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Description of the error"
    },
    "reason": {
      "type": "string",
      "description": "Reason for the error"
    },
    "internalCode": {
      "type": "number",
      "description": "internal velpic code for the error"
    },
    "statusCode": {
      "type": "number",
      "description": "The http code for the error"
    }
  }
}

Remove Supervisors
POST/group/{groupId}/remove_supervisors

Remove supervisors (individual or multiple) from a group

URI Parameters
HideShow
groupId
Number (required) Example: 1234

The group unique identifier.


Inactivate Group

POST https://app.velpic.com/api/v2/group/1/inactivate
Requestsexample 1
Headers
Content-Type: application/json
AccessKey: "Your API Access Key"
Responses200403403503
This response has no content.
Headers
Content-Type: application/json
Body
{
  "message": "AccessKey does not exist",
  "reason": "Invalid access key",
  "internalCode": 806,
  "error": "Invalid security token"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "A description of the error"
    },
    "reason": {
      "type": "string",
      "description": "The reason for the error"
    },
    "internalCode": {
      "type": "number",
      "description": "The internal status code of the error"
    },
    "error": {
      "type": "string",
      "description": "The error for the message"
    }
  }
}
Headers
Content-Type: application/json
Body
{
  "internalCode": 831,
  "error": "You are not authorised to make this request"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "internalCode": {
      "type": "number",
      "description": "The internal status code of the error"
    },
    "error": {
      "type": "string",
      "description": "The error for the message"
    }
  }
}
Headers
Content-Type: application/json
Body
{
  "internalCode": 500,
  "error": "Internal Server Error"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "internalCode": {
      "type": "number",
      "description": "The internal status code of the error"
    },
    "error": {
      "type": "string",
      "description": "The error for the message"
    }
  }
}

Inactivate
POST/group/{groupId}/inactivate

Called to inactivate a group based on ID

URI Parameters
HideShow
groupId
Number (required) Example: 1

The unique identifier for the group.


Lesson

A Lesson is the learning content that can be scheduled for a trainee.

status
The lesson status can be one of the following

Value Description
active A lesson that is published and can be scheduled
inactive A lesson that was previously published, but inactivated. Cannot be scheduled.
never A lesson that is being edited and never been published. Cannot be scheduled.
rendering A lesson that is currently rendering. Cannot be scheduled.
error A lesson that has errored during rendering. Cannot be scheduled.

List Lessons

GET https://app.velpic.com/api/v2/lesson?q=myGroup&startIndex=0&maxResults=20
Requestsexample 1
Headers
Content-Type: application/json
AccessKey: "Your API Access Key"
Responses200403
Headers
Content-Type: application/json
Body
{
  "results": [
    {
      "lessonVersionId": 1,
      "lessonId": "Username",
      "name": "Lesson One",
      "duration": 133000,
      "status": "active",
      "inLibrary": false,
      "version": 1,
      "questionnaireType": 18,
      "clientId": 1,
      "lessonVersionCustomFields": [
        {
          "lessonVersionId": 22,
          "customFieldId": 111,
          "customFieldDescription": "Description of field",
          "fieldId": "customField1",
          "type": "string",
          "value": "Field Value",
          "id": 98765,
          "createdDate": "2015-10-29T15:28:59+0000",
          "modifiedDate": "2015-10-29T15:28:59+0000"
        }
      ],
      "createdDate": "2015-10-29T15:28:59+0000",
      "modifiedDate": "2015-10-29T15:28:59+0000"
    }
  ],
  "meta": {
    "totalResultCount": 20,
    "startIndex": 0,
    "endIndex": 20
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "results": {
      "type": "array",
      "description": "The list of lessons"
    },
    "meta": {
      "type": "object",
      "properties": {
        "totalResultCount": {
          "type": "number",
          "description": "The total number of results in the search"
        },
        "startIndex": {
          "type": "number",
          "description": "The start index of the result set"
        },
        "endIndex": {
          "type": "number",
          "description": "The end index of the result set"
        }
      },
      "required": [
        "totalResultCount",
        "startIndex",
        "endIndex"
      ]
    }
  },
  "required": [
    "results"
  ]
}
Headers
Content-Type: application/json
Body
{
  "internalCode": 806,
  "error": "Token not valid"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "internalCode": {
      "type": "number",
      "description": "The internal status code of the error"
    },
    "error": {
      "type": "string",
      "description": "The error for the message"
    }
  }
}

List
GET/lesson{?q,startIndex,maxResults}

URI Parameters
HideShow
q
string (required) Example: myGroup

The query string for the group search. Will match to group name

startIndex
number (required) Example: 0

The starting index to list from in the result set.

maxResults
number (required) Example: 20

The maximum number of results to return.


Lesson Schedule

Lesson Schedules capture a users current scheduled lesson and their status. A Lesson schedule can have one of the following status’;

Type Description
scheduled Lessons that are scheduled for the future but not available for completion yet.
due Lessons that are due to be completed
overdue Lessons that were not started past there scheduled date
completed Lessons that have been completed
cancelled Lessons that have been cancelled

Get lesson schedule by Id

GET https://app.velpic.com/api/v2/lesson_schedule/17
Requestsexample 1
Headers
Content-Type: application/json
AccessKey: "Your API Access Key"
Responses200403
Headers
Content-Type: application/json
Body
{
  "startDate": "2016-08-24T15:00:00.000Z",
  "endDate": "2016-08-24T16:00:00.000Z",
  "active": false,
  "userId": 1234,
  "clientId": 456788,
  "clientName": "Your Company",
  "lessonVersionId": 1216,
  "lessonId": 123,
  "version": 6,
  "lessonName": "Lesson One",
  "lessonDuration": 10000,
  "lessonEvolution": 129,
  "thumbnailId": 123456789,
  "lessonThumbnail": "https://app.velpic.com/downloads/lessons/1216/thumbnail.png",
  "lessonStartedDate": "2016-08-24T15:00:00.000Z",
  "lessonCompletedDate": "2016-08-24T16:00:00.000Z",
  "lessonCompletedBy": 12345,
  "lessonCompletedByName": "John Smith",
  "reminders": [],
  "questionResults": [],
  "questionCount": 8,
  "questionnaireType": 19,
  "userFirstName": "John",
  "userLastName": "Smith",
  "userUserName": "jsmith",
  "userEmployeeNumber": "1356",
  "userGroups": [],
  "supervisors": [],
  "published": 65,
  "completionTypeId": 77,
  "typeId": 81,
  "questionnairePassRate": 80,
  "progress": 10000,
  "scheduleOverEmailAttempted": true,
  "overdueEmailAttempted": false,
  "movieId": 123987,
  "moviePhysicalURI": "download/lessons/123/movieFile.mp4",
  "movieSizeInBytes": 7849374,
  "chapterCount": 5,
  "id": 98765,
  "createdDate": "2016-08-24T15:00:00.000Z",
  "modifiedDate": "2016-08-24T15:00:00.000Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "startDate": {
      "type": "string",
      "description": "The scheduled start date of the lesson"
    },
    "endDate": {
      "type": "string",
      "description": "The due date of the lesson"
    },
    "active": {
      "type": "boolean",
      "description": "The active flag of the lesson"
    },
    "userId": {
      "type": "number",
      "description": "The UserId of the trainee assigned the lesson"
    },
    "clientId": {
      "type": "number",
      "description": "The ID of the client the trainee is part of"
    },
    "clientName": {
      "type": "string",
      "description": "The name of the client the trainee is part of"
    },
    "lessonVersionId": {
      "type": "number",
      "description": "the unique lesson version ID"
    },
    "lessonId": {
      "type": "number",
      "description": "The unique lesson ID"
    },
    "version": {
      "type": "number",
      "description": "The lesson version that the user has completed"
    },
    "lessonName": {
      "type": "string",
      "description": "The name of the lesson"
    },
    "lessonDuration": {
      "type": "number",
      "description": "The length of the lesson in milliseconds"
    },
    "lessonEvolution": {
      "type": "number",
      "description": "Indicates if the lesson is a module or video lesson"
    },
    "thumbnailId": {
      "type": "number",
      "description": "The thumbnail ID for the lesson"
    },
    "lessonThumbnail": {
      "type": "string",
      "description": "The URI for the lesson thumbnail"
    },
    "lessonStartedDate": {
      "type": "string",
      "description": "The date the trainee started the lesson"
    },
    "lessonCompletedDate": {
      "type": "string",
      "description": "The date the trainee finished the lesson"
    },
    "lessonCompletedBy": {
      "type": "number",
      "description": "The UserId of the user who completed the lesson"
    },
    "lessonCompletedByName": {
      "type": "string",
      "description": "The name of the user who completed the lesson"
    },
    "reminders": {
      "description": "An array of the reminders sent to a trainee"
    },
    "questionResults": {
      "description": "An array of the question results, includes questions and answers"
    },
    "questionCount": {
      "type": "number",
      "description": "The number of questions"
    },
    "questionnaireType": {
      "type": "number",
      "description": "The ID of the type of questionnaire"
    },
    "userFirstName": {
      "type": "string",
      "description": "The trainees first name"
    },
    "userLastName": {
      "type": "string",
      "description": "The trainees last name"
    },
    "userUserName": {
      "type": "string",
      "description": "The user name of the trainee"
    },
    "userEmployeeNumber": {
      "type": "string",
      "description": "The employee number of the trainee"
    },
    "userGroups": {
      "description": "An array of the groups the trainee belongs to"
    },
    "supervisors": {
      "description": "An array of the supervisors for this user or group"
    },
    "published": {
      "type": "number",
      "description": "The ID of the published status for a lesson"
    },
    "completionTypeId": {
      "type": "number",
      "description": "The ID of the method used to complete the lesson schedule"
    },
    "typeId": {
      "type": "number",
      "description": "The type ID of the lesson schedule method"
    },
    "questionnairePassRate": {
      "type": "number",
      "description": "The minimum pass rate of a test"
    },
    "progress": {
      "type": "number",
      "description": "The current position of the trainee through the lesson in milliseconds"
    },
    "scheduleOverEmailAttempted": {
      "type": "boolean",
      "description": "Shows if the trainee has received an email with the scheduled lesson linked"
    },
    "overdueEmailAttempted": {
      "type": "boolean",
      "description": "Shows if the trainee received an overdue email reminder"
    },
    "movieId": {
      "type": "number",
      "description": "The movie ID"
    },
    "moviePhysicalURI": {
      "type": "string",
      "description": "The movie URI location"
    },
    "movieSizeInBytes": {
      "type": "number",
      "description": "The movie file size in bytes"
    },
    "chapterCount": {
      "type": "number",
      "description": "The number of chapters in the lesson"
    },
    "id": {
      "type": "number",
      "description": "The id of the lesson schedule"
    },
    "createdDate": {
      "type": "string",
      "description": "The date the lesson schedule was created"
    },
    "modifiedDate": {
      "type": "string",
      "description": "The date the lesson schedule was last modified"
    }
  },
  "required": [
    "lessonId"
  ]
}
Headers
Content-Type: application/json
Body
{
  "message": "AccessKey does not exist",
  "reason": "Invalid access key",
  "internalCode": 806,
  "error": "Invalid security token"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "A description of the error"
    },
    "reason": {
      "type": "string",
      "description": "The reason for the error"
    },
    "internalCode": {
      "type": "number",
      "description": "The internal status code of the error"
    },
    "error": {
      "type": "string",
      "description": "The error for the message"
    }
  }
}

Get Lesson Schedule By Id
GET/lesson_schedule/{lessonScheduleId}

Called to retrieve a lesson schedule by unique Id.

URI Parameters
HideShow
lessonScheduleId
Number (required) Example: 17

The lesson schedule unique identifier.


Get User lesson schedules

GET https://app.velpic.com/api/v2/user/4321/lesson_schedule?status=completed&startIndex=0&maxResults=10
Requestsexample 1
Headers
Content-Type: application/json
AccessKey: "Your API Access Key"
Responses200403
Headers
Content-Type: application/json
Body
{
  "results": [
    {
      "lessonName": "Lesson One",
      "lessonId": 123,
      "lessonVersionId": 1216,
      "version": 6,
      "userId": 1234,
      "startDate": "2016-08-24T15:00:00.000Z",
      "endDate": "2016-08-24T16:00:00.000Z",
      "lessonStartedDate": "2016-08-24T15:00:00.000Z",
      "lessonCompletedDate": "2016-08-24T16:00:00.000Z",
      "userFirstName": "John",
      "userLastName": "Smith",
      "lessonDuration": 10000,
      "progress": 10000,
      "chapterCount": 5,
      "questionnaireType": 19,
      "questionCount": 8,
      "scheduleType": "automatic",
      "typeId": 81,
      "thumbnailId": 123456789,
      "lessonThumbnail": "https://app.velpic.com/downloads/lessons/1216/thumbnail.png",
      "status": "completed",
      "statusId": 94,
      "completionTypeId": 77,
      "lessonCompletedBy": 12345,
      "lessonCompletedByName": "John Smith",
      "lessonEvolution": 129,
      "id": 98765,
      "createdDate": "2016-08-24T15:00:00.000Z",
      "modifiedDate": "2016-08-24T15:00:00.000Z"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "results": {
      "type": "array",
      "description": "The list of lessons"
    }
  },
  "required": [
    "results"
  ]
}
Headers
Content-Type: application/json
Body
{
  "message": "AccessKey does not exist",
  "reason": "Invalid access key",
  "internalCode": 806,
  "error": "Invalid security token"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "A description of the error"
    },
    "reason": {
      "type": "string",
      "description": "The reason for the error"
    },
    "internalCode": {
      "type": "number",
      "description": "The internal status code of the error"
    },
    "error": {
      "type": "string",
      "description": "The error for the message"
    }
  }
}

Get User Lesson Schedules
GET/user/{userId}/lesson_schedule{?status,startIndex,maxResults}

Called for a list of users lesson schedules.

URI Parameters
HideShow
userId
Number (required) Example: 4321

The user unique identifier.

startIndex
Number (required) Example: 0

The starting index to list from in the result set.

maxResults
Number (required) Example: 10

The maximum number of results to return.

status
string (required) Example: completed

The status of the lesson schedules to return.

Choices: all scheduled due overdue completed cancelled


Schedule a User

POST https://app.velpic.com/api/v2/user/1234/lesson_schedule
Requestsexample 1
Headers
Content-Type: application/json
AccessKey: "Your API Access Key"
Body
{
  "lessonVersionIds": [
    1,
    4,
    3
  ],
  "scheduleDate": "2015-10-29T15:28:59+0000",
  "gracePeriod": "14",
  "gracePeriodUnit": "days"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "lessonVersionIds": {
      "type": "array",
      "description": "The name of the group"
    },
    "scheduleDate": {
      "type": "string",
      "description": "(Optional) the date to schedule a user to start a lesson.  By default it is NOW().  the user will not be able to watch the lesson untl after the scheduleDate"
    },
    "gracePeriod": {
      "type": "string",
      "description": "(Optional) The time period in which the user has to complete the lesson.  If defined, gracePeriodUnit is requred.  Default is the default grace period for the account - configurable in global settings"
    },
    "gracePeriodUnit": {
      "type": "string",
      "description": "The grace period unit.  Possible values are `days` and `months`"
    }
  },
  "required": [
    "lessonVersionIds",
    "gracePeriod",
    "gracePeriodUnit"
  ]
}
Responses200403
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Body
{
  "message": "AccessKey does not exist",
  "reason": "Invalid access key",
  "internalCode": 806,
  "error": "Invalid security token"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "A description of the error"
    },
    "reason": {
      "type": "string",
      "description": "The reason for the error"
    },
    "internalCode": {
      "type": "number",
      "description": "The internal status code of the error"
    },
    "error": {
      "type": "string",
      "description": "The error for the message"
    }
  }
}

Schedule a User
POST/user/{userId}/lesson_schedule

Called to schedule a user for a lesson

Optional Paramaters

Paramater Description
scheduleDate The date to schedule a user to start a lesson. By default it is NOW(). the user will not be able to watch the lesson untl after the scheduleDate
gracePeriod The time period in which the user has to complete the lesson. If defined, gracePeriodUnit is requred. Default is the default grace period for the account - configurable in global settings
gracePeriodUnit The grace period unit. Possible values are days and months
URI Parameters
HideShow
userId
Number (required) Example: 1234

The user to schedule the lesson for


Download a certificate for a passed completed lesson schedule

GET https://app.velpic.com/api/v2/lesson_schedule/4321/certificate
Requestsexample 1
Headers
Content-Type: application/json
AccessKey: "Your API Access Key"
Responses200403403
Headers
Content-Type: application/pdf
Headers
Content-Type: application/json
Body
{
  "message": "AccessKey does not exist",
  "reason": "Invalid access key",
  "internalCode": 806,
  "error": "Invalid security token"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "A description of the error"
    },
    "reason": {
      "type": "string",
      "description": "The reason for the error"
    },
    "internalCode": {
      "type": "number",
      "description": "The internal status code of the error"
    },
    "error": {
      "type": "string",
      "description": "The error for the message"
    }
  }
}
Headers
Content-Type: application/json
Body
{
  "internalCode": 831,
  "error": "You are not authorised to make this request"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "internalCode": {
      "type": "number",
      "description": "The internal status code of the error"
    },
    "error": {
      "type": "string",
      "description": "The error for the message"
    }
  }
}

Download a certificate for a passed completed lesson schedule
GET/lesson_schedule/{lessonScheduleId}/certificate

Called to schedule a user for a lesson

Optional Paramaters

URI Parameters
HideShow
lessonScheduleId
Number (required) Example: 4321

The lesson schedule unique identifier.


Embed Player

Get Embed url for Player

GET https://app.velpic.com/api/v2/embed_player?lessonScheduleId=4321
Requestsexample 1
Headers
Content-Type: application/json
AccessKey: "Your API Access Key"
Responses200403404400400
Headers
Content-Type: application/json
Body
{
  "embedUrl": "https://app.velpic.com/#player/4321?embed=true&token=YThhZTYzMWYtOGY2ZS00ODFjLWI0MWMtNjM3N2UxMzhiNzkz"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "embedUrl": {
      "type": "string",
      "description": "The full url for use in the iframe embed code"
    }
  }
}
Headers
Content-Type: application/json
Body
{
  "message": "AccessKey does not exist",
  "reason": "Invalid access key",
  "internalCode": 806,
  "error": "Invalid security token"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "A description of the error"
    },
    "reason": {
      "type": "string",
      "description": "The reason for the error"
    },
    "internalCode": {
      "type": "number",
      "description": "The internal status code of the error"
    },
    "error": {
      "type": "string",
      "description": "The error for the message"
    }
  }
}
Headers
Content-Type: application/json
Body
{
  "internalCode": 840,
  "error": "Lesson Schedule does not exist"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "internalCode": {
      "type": "number",
      "description": "The internal status code of the error"
    },
    "error": {
      "type": "string",
      "description": "The error for the message"
    }
  }
}
Headers
Content-Type: application/json
Body
{
  "internalCode": 837,
  "error": "This lesson schedule is completed"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "internalCode": {
      "type": "number",
      "description": "The internal status code of the error"
    },
    "error": {
      "type": "string",
      "description": "The error for the message"
    }
  }
}
Headers
Content-Type: application/json
Body
{
  "internalCode": 836,
  "error": "This lesson schedule is cancelled"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "internalCode": {
      "type": "number",
      "description": "The internal status code of the error"
    },
    "error": {
      "type": "string",
      "description": "The error for the message"
    }
  }
}

Get Embed url for Player
GET/embed_player{?lessonScheduleId}

Returns a url for embeding the Velpic lesson player into a iframe

URI Parameters
HideShow
lessonScheduleId
Number (required) Example: 4321

The lesson schedule unique identifier.