0% found this document useful (0 votes)
7 views7 pages

Learnet

The document outlines the API integration for an ERP and Onboarding application, detailing authentication methods, user registration, course retrieval, and payment processing. It includes specific endpoints, HTTP methods, headers, body parameters, and example requests for each API function. Key functionalities include creating and updating users, retrieving courses and centers, and saving payment details.

Uploaded by

femevo4097
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views7 pages

Learnet

The document outlines the API integration for an ERP and Onboarding application, detailing authentication methods, user registration, course retrieval, and payment processing. It includes specific endpoints, HTTP methods, headers, body parameters, and example requests for each API function. Key functionalities include creating and updating users, retrieving courses and centers, and saving payment details.

Uploaded by

femevo4097
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

API Document for ERP and

Onboarding APP
Integration
1. Authentication

CLIENT ID: YOUR_CLIENT_ID_HERE

CLIENT SECRET: YOUR_CLIENT_SECRET_HERE

NOTE: Save the Client ID and Client Secret in your secrets manager and then use them

Purpose: To authenticate requests made to ERP APIs using OAuth2.

Endpoint: https://erpservices.linqskills.com/oauth2/token

Method: POST

Headers:

Content-Type: application/x-www-form-urlencoded

Cache-Control: no-cache

Cookie: XSRF-TOKEN=742b630f-805c-4ec8-bad2-0f7da9bec88b

Body Parameters:

grant_type: client_credentials

scope: tokens/access

client_id: YOUR_CLIENT_ID_HERE

client_secret: YOUR_CLIENT_SECRET_HERE

Example Request:

curl --location 'https://edmyst.auth.us-east-1.amazoncognito.com/oauth2/token' \

--header 'Content-Type: application/x-www-form-urlencoded' \

--header 'Cache-Control: no-cache' \

--header 'Cookie: XSRF-TOKEN=742b630f-805c-4ec8-bad2-0f7da9bec88b' \

--data-urlencode 'grant_type=client_credentials' \

--data-urlencode 'scope=tokens/access' \

2
--data-urlencode 'client_id=YOUR_CLIENT_ID_HERE' \

--data-urlencode 'client_secret=YOUR_CLIENT_SECRET_HERE'

Registration API’s

1.Create User at ERP

Purpose: To create the user at the ERP By sending user details from Onboarding
Application

Endpoint: {BASE_URL}/CreateERPUser

Method: POST

Headers:

Authorization: {AUTH_TOKEN}

Body Parameters:

{ "full_name": <fullname>, "Phone_number": <phonenumber>, "email": email>,"location":


<location> }

Response:

{ " status_message": <Message success or any error>, "Erp_user_id": <ErpUserid> }

Example Request:

curl --location ': {BASE_URL}/CreateERPUserByOD ' \

--header 'Authorization: {AUTH_TOKEN}' \

--header 'Content-Type: application/json' \

--data-raw '{ { "full_name": “Kishan Swaroop”, "Phone_number": “1232132132”, "email":


“abc@gmail.com”,"location": “Bhilwara”}

}'

Sample Response:

3
" status_message": “Success”, "erp_user_id": 12345

2. Update user details from step 2

Purpose: To update the rest of the details from the step2 to ERP DB

Endpoint: {BASE_URL}/UpdateUserByErpuserId

Method: POST

Headers:

Authorization: {AUTH_TOKEN}

Body Parameters:

{ "erp_user_id ": <stored erpuserid>, "projectid ": <erp_project_id>, "erp_center_id":


<centerid>,"courseid":
<erp_course_id>,”centername:”<centername>,”cousername”:<coursename> }

Response:

{ " status_message": <Message success or any error>}

Courses API’s

1.Get courses from ERP

Purpose: To get all the valid courses from erp DB

Endpoint: {BASE_URL}/GetERPcourses

Method: get

Headers:

Authorization: {AUTH_TOKEN}

Response:

{courses:[{ "coursename": <erpcoursename>,”courseid”:<erp_courseid>},

{ "coursename": <erpcoursename>,”courseid”:<erp_courseid>},

{ "coursename": <erpcoursename>,”courseid”:<erp_courseid>}…..] }

4
2.Get centers by course

Purpose: To get all the centers associated with the courses

Endpoint: {BASE_URL}/GetERPCentersByCourseid?courseid=<erp_course_id>

Method: get

Headers:

Authorization: {AUTH_TOKEN}

Query Parameters:

courseid: < erp_course_id >

Response:

“Course_id”:<erp_course_id>

“centers”:[{ "centername": <erp_center_name>,"centerid": <erp_center_id>},

{ "centername": <erp_center_name>,"centerid": <erp_center_id>},

{ "centername": <erp_center_name>,"centerid": <erp_center_id>}…..] }

3.Get Project details from ERP

Purpose: To get all the project details for mapping at Onboading application using
centerid and courseid

Endpoint:
{BASE_URL}/GetERPprojectById?centerid=<erp_center_id>&&courseid=<erp_course_id>

Method: get

Headers:

Authorization: {AUTH_TOKEN}

5
Response:

"course_id":<erp_course_id>,

”center_id”:<erp_center_id>,

”projectname”:<projectname>,

”projectid”:<erp_project_id>

4.Get regions from ERP

Purpose: To get all the regiondetails from erp DB

Endpoint: {BASE_URL}/GetERPRegions

Method: get

Headers:

Authorization: {AUTH_TOKEN}

Response:

{regions:[{ "regionname": <erp region_name 1>,” regionid”:<erp_region_id1>},

{ "regionname": <erp region_name2 >,” regionid”:<erp_region_id2>} …….

Payment API’s

1.Save Subscription details at ERP

Purpose: To create or save payment details at ERP

Endpoint: {BASE_URL}/SavePaymentDetails

Method: post

6
Headers:

Authorization: {AUTH_TOKEN}

Body Parameters:

"erp_user_id ": <erp_user_id>, "projectid ": <erp_project_id>,

"erp_center_id": <centerid>,"courseid":<erp_course_id>,

"regionid ": <erp_region_id>, “Payment_date”:<payment_date>,”


NoofInstallments”:<no_installments>,“installmentamount”:< installmentamount>,”
installmentno”:<installmentno>, ”paidamount”:< paidamount>,

“balanceamount”:< balanceamount> ”order/receipt id:”<order_id >

Response:

{“candidateSubscriptionid”:< CandidateInstallmentid > }

/*erp_user_id,orderid,projectid,courseid,regionid,centerid,installmentdate,No_installmen
ts,installmentamount,installmentno,

paidamount, balanceamount*/

You might also like