LangLion Developer Wiki

⚠️ APIv2 is legacy

APIv2 is considered legacy and is no longer recommended for new integrations.

We strongly encourage you to use APIv4 for all new integrations and to migrate existing integrations where possible.

Please refer to our latest APIv4 documentation for up-to-date information and integration guidelines:

Click here to view the APIv4 example documentation - your own documentation is at https://[your-instance].langlion.com/api/v4/docs

List all students - GET /api/v2/students

Returns a list of the all students (including archived). Students are returned sorted by 'id' field in increasing order.

Request

1curl -G 'https://test.langlion.com/api/v2/students' \
2--header 'Authorization: Bearer af2b3df9c671d5413fc5c38b467794782b4047705ac3...'

Response

  1{
  2    "data": {
  3        "students": [
  4            {
  5                "id": 1,
  6                "isAdult": 0,
  7                "isActive": 1,
  8                "createdAt": "2017-12-18 16:10:04",
  9                "updatedAt": "2023-09-05 18:40:41",
 10                "user": {
 11                    "id": 3,
 12                    "login": "student",
 13                    "name": "Maciej",
 14                    "firstName": "Maciej",
 15                    "lastName": "Kursant",
 16                    "fullname": "Maciej Kursant",
 17                    "systemRole": "student",
 18                    "isArchived": 1,
 19                    "photo": null,
 20                    "language": "pl_PL",
 21                    "tosAccepted": 1,
 22                    "type": 0,
 23                    "typeName": "normal",
 24                    "createdAt": "2017-12-18 16:10:04",
 25                    "updatedAt": "2023-09-05 18:40:41",
 26                    "additionalData": {
 27                        "id": 2,
 28                        "phone": "ffdfff",
 29                        "mobile": null,
 30                        "email": "ffds@fdgfds.pl",
 31                        "skype": null,
 32                        "street": "Kwiatowa 4/5 ",
 33                        "zipCode": "01-123 ",
 34                        "city": "Warszawa",
 35                        "country": null,
 36                        "post": null,
 37                        "province": null,
 38                        "pesel": null,
 39                        "nipNumber": null,
 40                        "birthDate": null,
 41                        "birthPlace": null,
 42                        "description": null,
 43                        "billingName": null,
 44                        "billingStreet": "Kwiatowa 4/5 ",
 45                        "billingCity": "Warszawa",
 46                        "billingZipCode": "01-123 ",
 47                        "billingNipNumber": null,
 48                        "billingPesel": null,
 49                        "billingEmail": null,
 50                        "createdAt": "2017-12-18 16:10:04",
 51                        "updatedAt": "2023-08-07 15:29:29"
 52                    },
 53                    "parentUser": {
 54                        "id": 4,
 55                        "login": "studentr",
 56                        "name": null,
 57                        "firstName": null,
 58                        "lastName": null,
 59                        "fullname": null,
 60                        "systemRole": "parent",
 61                        "isArchived": 1,
 62                        "photo": null,
 63                        "language": "pl_PL",
 64                        "tosAccepted": 0,
 65                        "type": null,
 66                        "typeName": null,
 67                        "createdAt": "2017-12-18 16:10:04",
 68                        "updatedAt": "2023-09-05 18:40:41",
 69                        "additionalData": {
 70                            "id": 3,
 71                            "phone": null,
 72                            "mobile": null,
 73                            "email": null,
 74                            "skype": null,
 75                            "street": null,
 76                            "zipCode": null,
 77                            "city": null,
 78                            "country": null,
 79                            "post": null,
 80                            "province": null,
 81                            "pesel": null,
 82                            "nipNumber": null,
 83                            "birthDate": null,
 84                            "birthPlace": null,
 85                            "description": null,
 86                            "billingName": null,
 87                            "billingStreet": null,
 88                            "billingCity": null,
 89                            "billingZipCode": null,
 90                            "billingNipNumber": null,
 91                            "billingPesel": null,
 92                            "billingEmail": null,
 93                            "createdAt": "2017-12-18 16:10:04",
 94                            "updatedAt": "2017-12-18 16:10:04"
 95                        },
 96                        "parentUser": null
 97                    }
 98                }
 99            },
100            {
101                "id": 2,
102                "isAdult": 1,
103                "isActive": 1,
104                "createdAt": "2017-12-18 16:16:38",
105                "updatedAt": "2017-12-18 16:16:38",
106                "user": {
107                    "id": 5,
108                    "login": "wisniewa",
109                    "name": "Adam",
110                    "firstName": "Adam",
111                    "lastName": "Wiśniewski",
112                    "fullname": "Adam Wiśniewski",
113                    "systemRole": "student",
114                    "isArchived": 0,
115                    "photo": null,
116                    "language": "pl_PL",
117                    "tosAccepted": 0,
118                    "type": 0,
119                    "typeName": "normal",
120                    "createdAt": "2017-12-18 16:16:38",
121                    "updatedAt": "2020-09-21 16:18:11",
122                    "additionalData": {
123                        "id": 4,
124                        "phone": null,
125                        "mobile": null,
126                        "email": null,
127                        "skype": null,
128                        "street": "Nowa 15/48",
129                        "zipCode": "01-493",
130                        "city": "Warszawa",
131                        "country": null,
132                        "post": null,
133                        "province": null,
134                        "pesel": null,
135                        "nipNumber": null,
136                        "birthDate": null,
137                        "birthPlace": null,
138                        "description": null,
139                        "billingName": null,
140                        "billingStreet": "Nowa 15/48",
141                        "billingCity": "Warszawa",
142                        "billingZipCode": "01-493",
143                        "billingNipNumber": null,
144                        "billingPesel": null,
145                        "billingEmail": null,
146                        "createdAt": "2017-12-18 16:16:38",
147                        "updatedAt": "2017-12-18 16:16:38"
148                    },
149                    "parentUser": {
150                        "id": 6,
151                        "login": "wisniewaR",
152                        "name": null,
153                        "firstName": null,
154                        "lastName": null,
155                        "fullname": null,
156                        "systemRole": "parent",
157                        "isArchived": 0,
158                        "photo": null,
159                        "language": "pl_PL",
160                        "tosAccepted": 0,
161                        "type": null,
162                        "typeName": null,
163                        "createdAt": "2017-12-18 16:16:38",
164                        "updatedAt": "2020-09-21 16:18:11",
165                        "additionalData": {
166                            "id": 5,
167                            "phone": null,
168                            "mobile": null,
169                            "email": null,
170                            "skype": null,
171                            "street": null,
172                            "zipCode": null,
173                            "city": null,
174                            "country": null,
175                            "post": null,
176                            "province": null,
177                            "pesel": null,
178                            "nipNumber": null,
179                            "birthDate": null,
180                            "birthPlace": null,
181                            "description": null,
182                            "billingName": null,
183                            "billingStreet": null,
184                            "billingCity": null,
185                            "billingZipCode": null,
186                            "billingNipNumber": null,
187                            "billingPesel": null,
188                            "billingEmail": null,
189                            "createdAt": "2017-12-18 16:16:38",
190                            "updatedAt": "2017-12-18 16:16:38"
191                        },
192                        "parentUser": null
193                    }
194                }
195            },
196            [...]

Parameters

Required
No required parameters.

Optional

  • filter - JSON filter
  • recordFrom - fetch records from
  • recordTo - fetch record up to
  • userId - filter by user id
  • schoolId - filter by school id
  • createdAt - filter by user's date of creation
  • updatedAt - filter by user's date of creation

Create student - POST /api/v2/student

Request

1curl --location --request POST 'https://test.langlion.com/api/v2/student' \
2--header 'Authorization: Bearer f88bba34ffff68f4235d8ae0581[...]' \
3--form 'firstname="John"' \
4--form 'lastname="Smith"' \
5--form 'email="jsmith@langlion.com"' \
6--form 'schoolId="1"'

Response

  1{
  2    "data": {
  3        "student": {
  4            "id": 85,
  5            "isAdult": "1",
  6            "isActive": "1",
  7            "createdAt": "2023-09-18 12:37:17",
  8            "updatedAt": "2023-09-18 12:37:17",
  9            "user": {
 10                "id": 203,
 11                "login": "6861760",
 12                "name": "John",
 13                "firstName": "John",
 14                "lastName": "Smith",
 15                "fullname": "John Smith",
 16                "systemRole": "student",
 17                "isArchived": "0",
 18                "photo": null,
 19                "language": "pl_PL",
 20                "tosAccepted": null,
 21                "type": 0,
 22                "typeName": "normal",
 23                "createdAt": "2023-09-18 12:37:17",
 24                "updatedAt": "2023-09-18 12:37:17",
 25                "additionalData": {
 26                    "id": 148,
 27                    "phone": null,
 28                    "mobile": null,
 29                    "email": "jsmith@langlion.com",
 30                    "skype": null,
 31                    "street": null,
 32                    "zipCode": null,
 33                    "city": null,
 34                    "country": null,
 35                    "post": null,
 36                    "province": null,
 37                    "pesel": null,
 38                    "nipNumber": null,
 39                    "birthDate": null,
 40                    "birthPlace": null,
 41                    "description": null,
 42                    "billingName": null,
 43                    "billingStreet": null,
 44                    "billingCity": null,
 45                    "billingZipCode": null,
 46                    "billingNipNumber": null,
 47                    "billingPesel": null,
 48                    "billingEmail": null,
 49                    "createdAt": "2023-09-18 12:37:17",
 50                    "updatedAt": "2023-09-18 12:37:17"
 51                },
 52                "parentUser": {
 53                    "id": 204,
 54                    "login": "8085315",
 55                    "name": null,
 56                    "firstName": null,
 57                    "lastName": null,
 58                    "fullname": null,
 59                    "systemRole": "parent",
 60                    "isArchived": "0",
 61                    "photo": null,
 62                    "language": "pl_PL",
 63                    "tosAccepted": null,
 64                    "type": 0,
 65                    "typeName": "normal",
 66                    "createdAt": "2023-09-18 12:37:17",
 67                    "updatedAt": "2023-09-18 12:37:17",
 68                    "additionalData": {
 69                        "id": null,
 70                        "phone": null,
 71                        "mobile": null,
 72                        "email": null,
 73                        "skype": null,
 74                        "street": null,
 75                        "zipCode": null,
 76                        "city": null,
 77                        "country": null,
 78                        "post": null,
 79                        "province": null,
 80                        "pesel": null,
 81                        "nipNumber": null,
 82                        "birthDate": null,
 83                        "birthPlace": null,
 84                        "description": null,
 85                        "billingName": null,
 86                        "billingStreet": null,
 87                        "billingCity": null,
 88                        "billingZipCode": null,
 89                        "billingNipNumber": null,
 90                        "billingPesel": null,
 91                        "billingEmail": null,
 92                        "createdAt": null,
 93                        "updatedAt": null
 94                    },
 95                    "parentUser": null,
 96                    "oneTimePassword": "dt7fJ3cnSb"
 97                },
 98                "oneTimePassword": "CEJCyZpZ5T"
 99            }
100        }
101    }
102}

In response there are returned one time passwords (OTP) for student and parent which could be provided to student and parent for login

Parameters

Required

  • firstname - student's firstname
  • lastname - student's lastname
  • email - student's email
  • schoolId - assign student to the school using school ID

Optional

Update student - PATCH /api/v2/student

Request

1curl --location --request PATCH 'https://test.langlion.com/api/v2/student' \
2--header 'Authorization: Bearer f88bba34ffff68f4235d8ae0581[...]' \
3--form 'firstname="John"' \
4--form 'lastname="Smith"' \
5--form 'email="jsmith@langlion.com"' \

Response

  1{
  2    "data": {
  3        "student": {
  4            "id": 85,
  5            "isAdult": "1",
  6            "isActive": "1",
  7            "createdAt": "2023-09-18 12:37:17",
  8            "updatedAt": "2023-09-18 12:37:17",
  9            "user": {
 10                "id": 203,
 11                "login": "6861760",
 12                "name": "John",
 13                "firstName": "John",
 14                "lastName": "Smith",
 15                "fullname": "John Smith",
 16                "systemRole": "student",
 17                "isArchived": "0",
 18                "photo": null,
 19                "language": "pl_PL",
 20                "tosAccepted": null,
 21                "type": 0,
 22                "typeName": "normal",
 23                "createdAt": "2023-09-18 12:37:17",
 24                "updatedAt": "2023-09-18 12:37:17",
 25                "additionalData": {
 26                    "id": 148,
 27                    "phone": null,
 28                    "mobile": null,
 29                    "email": "jsmith@langlion.com",
 30                    "skype": null,
 31                    "street": null,
 32                    "zipCode": null,
 33                    "city": null,
 34                    "country": null,
 35                    "post": null,
 36                    "province": null,
 37                    "pesel": null,
 38                    "nipNumber": null,
 39                    "birthDate": null,
 40                    "birthPlace": null,
 41                    "description": null,
 42                    "billingName": null,
 43                    "billingStreet": null,
 44                    "billingCity": null,
 45                    "billingZipCode": null,
 46                    "billingNipNumber": null,
 47                    "billingPesel": null,
 48                    "billingEmail": null,
 49                    "createdAt": "2023-09-18 12:37:17",
 50                    "updatedAt": "2023-09-18 12:37:17"
 51                },
 52                "parentUser": {
 53                    "id": 204,
 54                    "login": "8085315",
 55                    "name": null,
 56                    "firstName": null,
 57                    "lastName": null,
 58                    "fullname": null,
 59                    "systemRole": "parent",
 60                    "isArchived": "0",
 61                    "photo": null,
 62                    "language": "pl_PL",
 63                    "tosAccepted": null,
 64                    "type": 0,
 65                    "typeName": "normal",
 66                    "createdAt": "2023-09-18 12:37:17",
 67                    "updatedAt": "2023-09-18 12:37:17",
 68                    "additionalData": {
 69                        "id": null,
 70                        "phone": null,
 71                        "mobile": null,
 72                        "email": null,
 73                        "skype": null,
 74                        "street": null,
 75                        "zipCode": null,
 76                        "city": null,
 77                        "country": null,
 78                        "post": null,
 79                        "province": null,
 80                        "pesel": null,
 81                        "nipNumber": null,
 82                        "birthDate": null,
 83                        "birthPlace": null,
 84                        "description": null,
 85                        "billingName": null,
 86                        "billingStreet": null,
 87                        "billingCity": null,
 88                        "billingZipCode": null,
 89                        "billingNipNumber": null,
 90                        "billingPesel": null,
 91                        "billingEmail": null,
 92                        "createdAt": null,
 93                        "updatedAt": null
 94                    },
 95                    "parentUser": null,
 96                    "oneTimePassword": "dt7fJ3cnSb"
 97                },
 98                "oneTimePassword": "CEJCyZpZ5T"
 99            }
100        }
101    }
102}

In response there are returned one time passwords (OTP) for student and parent which could be provided to student and parent for login

Parameters

Required

  • id - id of student

Optional

  • firstname - student's firstname
  • lastname - student's lastname
  • email - student's email