Coachview With our generic link you get the possibility to send back results of students to your database in Coachview. This allows you to collect all student data in one location and automatically generate certificates, for example. Below you will find the documentation on how to create this part of the link.
Operation
Coachview provides a URL to which an XML message can be posted (method: POST).
For example URL: https://secure.coachview.net/elearning/result.aspx?plugin=IEvhlecMtCbKh4sdNoKr5g
Conditions
- Eén message per call
- Eén person with én course/part
- Per person per course/part only én call can be made.
Click here for the knowledge base article
Security
In a HTTP header (name ‘X-WebHook-Signature’) a signarture/hash should be included to check if this data actually comes from the sender.
A SHA512 HMAC is calculated over the entire XML message in the body. Coachview also calculates the SHA512 HMAC over the message. This must match what is sent by the sender in the HTTP header.
There will be an ‘secret’ agreed between sender and Coachview. Coachview can generate an ‘secret’
.
Status messages
Coachview returns status 200 when the message is successfully processed.
If another status code is returned, an error has occurred. See below for possible error messages:
Code | Technical name | Description |
405 | HttpStatusCode.MethodNotAllowed | Request method not supported. For example not using 'POST' but something else. Virtually nonexistent. |
403 | HttpStatusCode.Forbidden | Webhook validation failed, no hash in HTTP header or hashing does not match. Probably the secret keys or the like don't match. |
400 | HttpStatusCode.BadRequest | No data received in the HTTP body, it cannot be converted to XML or XML does not conform to XSD schema. See message for the error message. |
404 | HttpStatusCode.NotFound | Person and/or registration cannot be found in Coachview. |
503 | HttpStatusCode.ServerUnavailable | Coachview is not available at the moment. Try again later. |
500 | HttpStatusCode.InternalServerError | Error occurred in handling. Please contact Coachview with the error message sent along. |
200 | HttpStatusCode.OK | If all went well, this status code will be returned. |
Structure of the XML message
Below you will find the data that has to or can be sent in your XML file.
Element | Attribuut | Datatype | M/O* | Omschrijving |
CoachviewResult | ||||
Elearningcode | String | M | Id / code van de opleiding/e-learning Max. 50 characters | |
PersoonExternId | String | M | Id / code van de deelnemer Max. 50 characters | |
Note | String | O | Note on registering successful. Max. 255 characters | |
Date | Date | O | Afrondings- of slagingsdatum. Indien leeg, dan wordt huidige datum gebruikt. | |
Successful | boolean | M | true / false | |
Result | String | O | XML bevat Resultaat óf ResultaatDecimaal. Beide attributen in één bericht wordt niet ondersteund. | |
ResultDecimal | Decimal | O | XML contains either Result or ResultDecimal. Both attributes in one message are not supported. Max. 2 decimals | |
Note | String | O | Note on recording presence Max. 255 characters | |
Date | Date | O | attendance date. If empty, the current date is used. |
* M/O = Mandatory / Optional
Examples
Below you will find two examples that show the functioning of our generic link
Voorbeeld 1:
<?xml version="1.0" encoding="UTF-8"?>
<CoachviewResultaat xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Datum="2019-01-03" Opmerking="Opmerking" Elearningcode="e12345" PersoonExterneId="p12345">
<Geslaagd Resultaat="67%" Datum="2019-03-01" Opmerking="Voldoende">true</Geslaagd>
</CoachviewResultaat>
Voorbeeld 2:
<?xml version="1.0" encoding="UTF-8"?>
<CoachviewResultaat xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Datum="2019-01-03" Opmerking="Opmerking" Elearningcode="e12345" PersoonExterneId="p12345">
<Geslaagd ResultaatDecimaal="6.7" Datum="2019-03-01" Opmerking="Voldoende">true</Geslaagd>
</CoachviewResultaat>