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

Update student attendance - PUT /api/v2/newLessonStudent

Request

1curl --location --request PUT  'https://test.langlion.com/api/v2/newLessonStudent' \
2--header 'Authorization: Bearer af2b3df9c671d5413fc5c38b467794782b4047705ac3...'
3--form 'newLessonId="35765"' \
4--form 'studentId="597"' \
5--form 'attendanceStatusId="1"' \

Response

  1{
  2    "data": {
  3        "newLessonStudent": {
  4            "id": 9272,
  5            "isHomeworkDone": 1,
  6            "student": {
  7                "id": 597,
  8                "isAdult": 0,
  9                "isActive": 1,
 10                "createdAt": "2022-09-12 10:17:42",
 11                "updatedAt": "2022-09-12 10:17:42",
 12                "user": {
 13                    "id": 1278,
 14                    "login": "tests",
 15                    "name": "test",
 16                    "firstName": "Test",
 17                    "lastName": "Student",
 18                    "fullname": "Test Student",
 19                    "systemRole": "student",
 20                    "isArchived": 0,
 21                    "photo": null,
 22                    "language": "pl_PL",
 23                    "tosAccepted": null,
 24                    "type": 0,
 25                    "typeName": "normal",
 26                    "createdAt": "2022-09-12 10:17:41",
 27                    "updatedAt": "2023-11-09 10:20:07",
 28                    "additionalData": {
 29                        "id": 1152,
 30                        "phone": null,
 31                        "mobile": null,
 32                        "email": "test@langlion.test",
 33                        "skype": null,
 34                        "street": null,
 35                        "zipCode": null,
 36                        "city": null,
 37                        "country": null,
 38                        "post": null,
 39                        "province": null,
 40                        "pesel": null,
 41                        "nipNumber": null,
 42                        "birthDate": null,
 43                        "birthPlace": null,
 44                        "description": null,
 45                        "billingName": "Test Student",
 46                        "billingStreet": null,
 47                        "billingCity": null,
 48                        "billingZipCode": null,
 49                        "billingNipNumber": null,
 50                        "billingPesel": null,
 51                        "billingEmail": null,
 52                        "createdAt": "2022-09-12 10:17:42",
 53                        "updatedAt": "2022-09-12 10:17:42"
 54                    },
 55                    "parentUser": {
 56                        "id": 1281,
 57                        "login": "testsR",
 58                        "name": null,
 59                        "firstName": null,
 60                        "lastName": null,
 61                        "fullname": null,
 62                        "systemRole": "parent",
 63                        "isArchived": 0,
 64                        "photo": null,
 65                        "language": "pl_PL",
 66                        "tosAccepted": 1,
 67                        "type": 0,
 68                        "typeName": "normal",
 69                        "createdAt": "2022-09-12 10:17:42",
 70                        "updatedAt": "2023-05-31 12:00:16",
 71                        "additionalData": {
 72                            "id": 1155,
 73                            "phone": null,
 74                            "mobile": null,
 75                            "email": "testr@langlion.test",
 76                            "skype": null,
 77                            "street": null,
 78                            "zipCode": null,
 79                            "city": null,
 80                            "country": null,
 81                            "post": null,
 82                            "province": null,
 83                            "pesel": null,
 84                            "nipNumber": null,
 85                            "birthDate": null,
 86                            "birthPlace": null,
 87                            "description": null,
 88                            "billingName": null,
 89                            "billingStreet": null,
 90                            "billingCity": null,
 91                            "billingZipCode": null,
 92                            "billingNipNumber": null,
 93                            "billingPesel": null,
 94                            "billingEmail": null,
 95                            "createdAt": "2022-09-12 10:17:42",
 96                            "updatedAt": "2022-09-12 10:17:42"
 97                        },
 98                        "parentUser": null
 99                    }
100                }
101            },
102            "attendanceStatus": {
103                "id": 1,
104                "name": "Absent",
105                "shortName": "NB",
106                "type": 2,
107                "typeName": "absent",
108                "color": "fc5c50"
109            }
110        }
111    }
112}

Parameters

Required

Optional

  • isHomeworkDone - if homeworks are enabled mark homework as done