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 Access

Contact team@velpic.com to request an API key for access to the Velpic API. Once enabled you’ll be able to use the following endpoints.

Access 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.

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.