Skip to main content

Suggest Course API

This API is used to suggest a course in LMS.

Request URL: 

https://people.zoho.com/api/v1/courses/<courseId>/suggest

Scope:

ZOHOPEOPLE.training.ALL
OR
ZOHOPEOPLE.training.CREATE

Possible Operation Types:

ALL - Complete access to data
CREATE - Only to add data

Method:

POST

Request Parameters

ParametersValues AllowedDefault ValueDescription
erecnosList<JSON Array of erecnos>-Speciy the employee's erecnos

Error Codes and Descriptions

Status CodesDescription
400Invalid parameter value/input parameter missing
403Sorry! You are not authorized to do this operation
404Not found
422Maximum limit exceeded
500Sorry! Server error occured

View complete list of LMS API error codes

Threshold Limit: 30 requests | Lock period: 5 minutes

Threshold Limit - Number of API calls allowed within a minute.
Lock Period - Wait time before consecutive API requests.

Request

Copiedimport okhttp3.*;

public class Main {
    public static void main(String[] args) throws Exception {
        OkHttpClient client = new OkHttpClient();

        MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
        RequestBody body = RequestBody.create(mediaType, "erecnosList=%5B588882000000212025%5D");
        Request request = new Request.Builder()
            .url("https://people.zoho.com/api/v1/courses/588882000000996067/suggest")
            .post(body)
            .addHeader("Content-Type", "application/x-www-form-urlencoded")
            .addHeader("Authorization", "Zoho-oauthtoken YOUR_ACCESS_TOKEN")
            .build();

        Response response = client.newCall(request).execute();
        System.out.println(response.body().string());
    }
}
Copiedfetch("https://people.zoho.com/api/v1/courses/588882000000996067/suggest", {
    method: "POST",
    headers: {
        "Content-Type": "application/x-www-form-urlencoded",
        "Authorization": "Zoho-oauthtoken YOUR_ACCESS_TOKEN"
    },
    body: "erecnosList=%5B588882000000212025%5D"
})
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.error(error));
Copiedcurl --location --request POST 'https://people.zoho.com/api/v1/courses/588882000000996067/suggest' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Zoho-oauthtoken YOUR_ACCESS_TOKEN' \
--data-raw 'erecnosList=%5B588882000000212025%5D'
Copiedurl = "https://people.zoho.com/api/v1/courses/588882000000996067/suggest";
headers = map();
headers.put("Content-Type", "application/x-www-form-urlencoded");
headers.put("Authorization", "Zoho-oauthtoken YOUR_ACCESS_TOKEN");
body = "erecnosList=%5B588882000000212025%5D";
response = invokeurl
[
    url : url
    type : POST
    parameters: body
    headers: headers
];
info response;
Copiedimport requests

url = "https://people.zoho.com/api/v1/courses/588882000000996067/suggest"

payload = "erecnosList=%5B588882000000212025%5D"
headers = {
    "Content-Type": "application/x-www-form-urlencoded",
    "Authorization": "Zoho-oauthtoken YOUR_ACCESS_TOKEN"
}

response = requests.post(url, headers=headers, data=payload)

print(response.text)

Show full

Show less

​Header

CopiedAuthorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxx9be93.9b8xxxxxxf

Response

Copied{
    "code": "200",
    "erecnosList": [
        219225000000185023
    ],
    "message": "success",
    "courseId": "219225000000642002"
}