Fresh LMS API Reference

The FreshLMS API is base around REST. We return JSON for every request.

This is unique API key which you will use in the API’s .


Authentication

To start using the FreshLMS API, You have to login to your Admin account and goto Settings -> User and click on your user. You will find the API Key.

API Methods

FreshLMS API lets you send the information about member and course enrollment related details seamlessly.

Create Member

POST /integration/member

Adds a New Member

https://api.freshlms.com/v1/integration/member

Header Parameters:

Key Value
api-key This is the request header parameter, unique key assigned in your admin settings.

Request Parameters:

In each POST Request body following parameters need to be sent in JSON

email Mandatory, Member’s email address
fullName Mandatory, Member’s full name
phone Member’s Phone Number
city Member’s city of residence
source Mandatory, Zapier/Fresh LMS/etc
cURL example

curl -X POST \
https://api.freshlms.com/v1/integration/member \
-H 'api-key: ffec555c3fc0a0882f2720weewew' \
-H 'content-type: application/json' \
-d '{ "email": "john@gmail.com","fullName": "John Sculley",
"phone": "0113452310", "city": "Seattle", "source": "Zapier’
}'

Example Request

{
"email": "john@gmail.com",
"fullName": "John Sculley",
"phone": "0113452310",
"city": "Seattle",
"source": "Zapier"
}

Example Response: 201 Created

{
"id": 39744,
"fullName": "John Sculley",
"email": "john@gmail.com",
"phone": "0113452310",
"city": "Seattle",
"source": "Zapier",
"message": "Memebr created successfully ",
"createdDate": "2021-04-27"
}

Update Member

PUT /integration/member/update

Update member information based on registered email

https://api.freshlms.com/v1/integration/member/update

Header Parameters:

Key Value
api-key This is the request header parameter, unique key assigned in your admin settings.

Request Parameters:

In each PUT Request body following parameters need to be sent in JSON

email Mandatory, Member’s email address, (email can not be modified)
fullName Mandatory, Member’s full name
phone Member’s Phone Number
city Member’s city of residence
source Mandatory, Zapier/Fresh LMS/etc
cURL example

curl -X PUT \
https://api.freshlms.com/v1/integration/member/update \
-H 'api-key: ffec555c3fc0a0882f2720weewew' \
-H 'content-type: application/json' \
-d '{ "email": "john@gmail.com","fullName": "John Sculley",
"phone": "0113452310", "city": "Seattle", "source": "Zapier’
}'

Example Request

{
"email": "john@gmail.com",
"fullName": "John Sculley",
"phone": "0113452310",
"city": "Seattle",
"source": "Zapier"
}

Example Response: 200 OK

{
"id": 39744,
"fullName": "John Sculley",
"email": "john@gmail.com",
"phone": "0113452310",
"city": "Seattle",
"source": "Zapier",
"message": "Memebr created successfully ",
"createdDate": "2021-04-27"
}

Enroll Member

POST /integration/member/enroll

Update member information based on registered email

https://api.freshlms.com/v1/integration/member/enroll

Parameters:

Key Value
api-key This is the request header parameter, unique key assigned in your admin settings.

Request Parameters:

In each POST Request body following parameters need to be sent in JSON

courseId Mandatory, Course unique identifier from Admin Portal.You will find this under the course name. See here
planId Mandatory, You will find this against the course -> pricing.
memberEmail Mandatory, Member’s Email Address,
paymentGateway Manual/Stripe/Paypal/etc
paymentType cash/cheque/etc
reference References if any for enrollment
transactionDate Payment transaction date in ‘yyyy-MM-dd’ format
transactionId Mandatory, Payment unique identifier for the enrollment
source Mandatory, Zapier/Fresh LMS/etc
cURL example

curl -X PUT \
https://api.freshlms.com/v1/integration/member/enroll \
-H 'api-key: ffec555c3fc0a0882f2720weewew' \
-H 'content-type: application/json' \
-d '{ "courseId": 39555,"planId": 40234, "memberEmail":
"john@gmail.com","paymentGateway": "stripe",
"paymentType": "cheque", "reference": "Course Enrollment Fee",
"transactionDate": "2021-01-01","transactionId": "abc_1123345",
"source": "zapier"
}'

Example Request

{
"courseId": 39555,
"planId": 40234,
"memberEmail": "john@gmail.com",
"paymentGateway": "stripe",
"paymentType": "cheque",
"reference": "Course Enrollment Fee",
"transactionDate": "2021-01-01",
"transactionId": "abc_1123345",
"source": "zapier"
}

Example Response: 200 OK

{
"enrollmentId": 39745,
"courseId": 39555,
"memberEmail": "john@gmail.com",
"planId": 40234,
"transactionId": "abc_1123345",
"transactionDate": "2021-01-01",
"paymentType": null,
"paymentGateway": null,
"reference": "Course Enrollment Fee",
"source": "zapier",
"createdDate": "2021-04-27"
}

API Errors

Fresh lms API integration uses HTTP status to indicate the status of the request, Here is the possible response codes

200 OK Success response
201 CREATED when new requested item is created
400 Bad Request you did not provide Mandatory, parameter or wrong data
401 Unauthorized you did not provide a valid api key

// We pre-filled your app ID in the widget URL: 'https://widget.intercom.io/widget/mge6qd4s' // (function () { var w = window; var ic = w.Intercom; if (typeof ic === "function") { ic('reattach_activator'); ic('update', w.intercomSettings); } else { var d = document; var i = function () { i.c(arguments); }; i.q = []; i.c = function (args) { i.q.push(args); }; w.Intercom = i; var l = function () { var s = d.createElement('script'); s.type = 'text/javascript'; s.async = true; s.src = 'https://widget.intercom.io/widget/mge6qd4s'; var x = d.getElementsByTagName('script')[0]; x.parentNode.insertBefore(s, x); }; if (w.attachEvent) { w.attachEvent('onload', l); } else { w.addEventListener('load', l, false); } } })(); //