### Learning Path Enrollment Webhook Example Source: https://docs.learnupon.com/webhooks/v2 This JSON payload is sent when a learner is successfully enrolled in a learning path. It includes identifiers for the learning path, enrollment, user, and the event creation timestamp. ```json { "data" : [ { "learningPathId" : 21600, "dueDate" : null, "user" : { "email" : "bella.bell@yourdomain.com", "userId" : 2859300, "username" : null }, "enrollmentId" : 1053300, "eventCreated" : "2023-12-14T19:46:06.659Z" } ] } ``` -------------------------------- ### Live Learning Event Session Created Webhook Example Source: https://docs.learnupon.com/webhooks/v2 This JSON payload is sent when a live learning event session is created or updated. It contains detailed information about the session, including its title, timing, location, instructors, and custom data. ```json { "data" : [ { "description" : " testing webhooks v2 \n", "locationId" : null, "locationTitle" : null, "startTime" : "2025-11-21T18:00:00Z", "endTime" : "2025-11-21T19:00:00Z", "webinarUrl" : null, "customWebinarUrl" : null, "webinarTitle" : null, "createdByUserId" : 291100, "updatedByUserId" : null, "environmentType" : "in person", "numEnrolled" : 0, "completionRequirement" : "attendance required", "clonedFromId" : null, "title" : "Session created to test webhooks", "registerWaitlistEnabled" : true, "waitlistExpiry" : "2025-11-21T17:00:00Z", "customSessionData" : [ { "customSessionDataDefinitionId" : 29950, "fieldValue" : "SECRET", "fieldLabel" : "Client code" }, { "customSessionDataDefinitionId" : 29949, "fieldLabel" : "Cost center", "fieldValue" : [ "Sales" ] } ], "minimumAttendanceThreshold" : null, "minCapacity" : null, "maxCapacity" : 5, "sessionId" : 1574477, "timezone" : "Eastern Time (US & Canada)", "eventId" : 1449140, "sessionInstructorsUserIds" : [ 291160, 291142 ] } ] } ``` -------------------------------- ### User Created Webhook Source: https://docs.learnupon.com/webhooks/v2 Details and example payload for the 'User Created' webhook. ```APIDOC ## User Created ### Description The user creation webhook is sent to your designated URL endpoint whenever a user account is successfully created in LearnUpon via the user interface, batch upload, or API. ### Method POST ### Endpoint Your configured webhook URL. ### Request Body #### User Created Attributes | Attribute | Type | Description | |---|---|---| | `user` | object | List of unique identifiers for an individual user. | | `eventCreated` | date | Date and time of event completion in UTC format. | ### Request Example ```json { "data" : [ { "eventCreated" : "2026-02-04T21:04:53.238Z", "user" : { "source" : "UI_USER", "username" : null, "userId" : 13126820, "email" : "anne.headley@yourdomain.com" } } ] } ``` ### Response #### Success Response (200) - **Description**: Acknowledges successful receipt of the webhook. ``` -------------------------------- ### Course Unenrollment Webhook Example Source: https://docs.learnupon.com/webhooks/v2 This JSON payload is sent when a learner is successfully unenrolled from a course. It contains details about the course, enrollment, user, and the event creation time. ```json { "data" : [ { "courseId" : 2712800, "enrollmentId" : 18976600, "user" : { "email" : "bella.bell@yourdomain.com", "username" : null, "userId" : 2859300 }, "eventCreated" : "2023-12-14T19:43:33.822Z" } ] } ``` -------------------------------- ### Sample Purchase Completion Webhook Source: https://docs.learnupon.com/webhooks/v2 This JSON payload is sent for every successful sale on your LearnUpon store. It includes customer details, purchased items, and pricing information. ```json { "data": [ { "user": { "userId": 2415600, "email": "william.wallace@yourdomain.com", "username": "wnwallace" }, "orderId": 3465500, "currency": "usd", "country": "United States", "state": "Colorado", "paymentGateway": "paypal", "paymentId": "EC-24815576G65860000", "coupon": "testcoup90", "dateCompleted": "2023-12-14T21:21:26.000Z", "bulkCodes": null, "orderTotal": 5, "amountPaid": 0.5, "orderDiscount": 4.5, "salesTaxAmount": null, "lineItems": [ { "lineItemId": 4838500, "name": "Test Course 1", "courseReferenceCode": null, "type": "course", "listPrice": 5, "discount": 4.5, "coupon": null, "salesTaxRate": null, "salesTaxAmount": null, "taxRateLocation": "store", "amountPaid": 0.5, "quantity": 1 } ], "eventCreated": "2023-12-14T21:21:26.580Z" } ] } ``` -------------------------------- ### Sample Learning Path Completion Webhook Source: https://docs.learnupon.com/webhooks/v2 This JSON payload is sent when a learner completes a learning path. It includes details about the user, the learning path, and the courses within it. ```json { "data" : [ { "user" : { "userId" : 2859300, "email" : "wendy.gill@yourdomain.com", "username" : null }, "learningPathEnrollmentId" : 1053200, "learningPathId" : 194900, "certification" : null, "dateEnrolled" : "2023-12-13T20:06:09.000Z", "dateStarted" : "2023-12-13T20:08:26.000Z", "dateCompleted" : "2023-12-13T20:37:56.000Z", "percentage" : 50, "numberCompletedCourses" : 2, "credits" : [], "courses" : [ { "id" : 1413800, "status" : "passed", "percentage" : null, }, { "id" : 720600, "status" : "passed", "percentage" : 100, } ], "eventCreated" : "2023-12-13T20:37:57.000Z" } ] } ``` -------------------------------- ### Course Enrollment Webhook Sample Source: https://docs.learnupon.com/webhooks/v2 Sample JSON payload for a course enrollment webhook. This event is sent when a learner is successfully enrolled in a course. ```json { "data" : [ { "eventCreated" : "2023-12-14T19:41:35.463Z", "user" : { "userId" : 285900, "email" : "bella.bell@yourdomain.com", "username" : null }, "enrollmentId" : 18976600, "dueDate" : null, "courseId" : 2712800, "wasRecertified" : false } ] } ``` -------------------------------- ### Live Learning Event Session Created Webhook Source: https://docs.learnupon.com/webhooks/v2 Payload structure for live learning event session creation events. ```APIDOC ## Live Learning Event Session Created Webhook ### Description This webhook is sent when a live learning event session is created or updated. ### Method POST ### Endpoint `/websites/learnupon_webhooks_v2/live_learning_event_session_created` ### Request Body - **data** (array) - Required - Contains session details. - **description** (string) - Optional - Description of the session. - **locationId** (integer) - Optional - Identifier for the session location. - **locationTitle** (string) - Optional - Title of the session location. - **startTime** (date) - Required - The start time of the session in UTC format. - **endTime** (date) - Required - The end time of the session in UTC format. - **webinarUrl** (string) - Optional - URL for the webinar. - **customWebinarUrl** (string) - Optional - Custom URL for the webinar. - **webinarTitle** (string) - Optional - Title of the webinar. - **createdByUserId** (integer) - Required - User ID of the creator. - **updatedByUserId** (integer) - Optional - User ID of the last updater. - **environmentType** (string) - Required - Type of environment (e.g., 'in person'). - **numEnrolled** (integer) - Required - Number of enrolled participants. - **completionRequirement** (string) - Required - Requirement for completion (e.g., 'attendance required'). - **clonedFromId** (integer) - Optional - Identifier if the session was cloned. - **title** (string) - Required - Title of the session. - **registerWaitlistEnabled** (boolean) - Required - Whether waitlist registration is enabled. - **waitlistExpiry** (date) - Optional - Expiry date for the waitlist. - **customSessionData** (array) - Optional - Array of custom session data. - **customSessionDataDefinitionId** (integer) - Required - Identifier for the custom data definition. - **fieldValue** (any) - Required - The value of the custom field. - **fieldLabel** (string) - Required - The label of the custom field. - **minimumAttendanceThreshold** (integer) - Optional - Minimum attendance threshold. - **minCapacity** (integer) - Optional - Minimum capacity for the session. - **maxCapacity** (integer) - Optional - Maximum capacity for the session. - **sessionId** (integer) - Required - Unique identifier for the session. - **timezone** (string) - Required - Timezone of the session. - **eventId** (integer) - Required - Unique identifier for the event. - **sessionInstructorsUserIds** (array) - Optional - User IDs of the session instructors. ### Request Example ```json { "data" : [ { "description" : "testing webhooks v2\n", "locationId" : null, "locationTitle" : null, "startTime" : "2025-11-21T18:00:00Z", "endTime" : "2025-11-21T19:00:00Z", "webinarUrl" : null, "customWebinarUrl" : null, "webinarTitle" : null, "createdByUserId" : 291100, "updatedByUserId" : null, "environmentType" : "in person", "numEnrolled" : 0, "completionRequirement" : "attendance required", "clonedFromId" : null, "title" : "Session created to test webhooks", "registerWaitlistEnabled" : true, "waitlistExpiry" : "2025-11-21T17:00:00Z", "customSessionData" : [ { "customSessionDataDefinitionId" : 29950, "fieldValue" : "SECRET", "fieldLabel" : "Client code" }, { "customSessionDataDefinitionId" : 29949, "fieldLabel" : "Cost center", "fieldValue" : [ "Sales" ] } ], "minimumAttendanceThreshold" : null, "minCapacity" : null, "maxCapacity" : 5, "sessionId" : 1574477, "timezone" : "Eastern Time (US & Canada)", "eventId" : 1449140, "sessionInstructorsUserIds" : [ 291160, 291142 ] } ] } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message. #### Response Example ```json { "message": "Webhook received successfully" } ``` ``` -------------------------------- ### Learning Path Enrollment Webhook Source: https://docs.learnupon.com/webhooks/v2 Payload structure for learning path enrollment events. ```APIDOC ## Learning Path Enrollment Webhook ### Description This webhook is sent when a learner is successfully enrolled in a learning path. ### Method POST ### Endpoint `/websites/learnupon_webhooks_v2/learning_path_enrollment` ### Request Body - **data** (array) - Required - Contains enrollment details. - **learningPathId** (integer) - Required - Unique identifier for the learning path. - **dueDate** (date) - Optional - The learning path due date for this enrollment. - **user** (object) - Required - List of unique identifiers for an individual user. - **email** (string) - Required - User's email address. - **userId** (integer) - Required - Unique identifier for the user. - **username** (string) - Optional - User's username. - **enrollmentId** (integer) - Required - Unique identifier for this enrollment action. - **eventCreated** (date) - Required - Date of enrollment in UTC format. ### Request Example ```json { "data" : [ { "learningPathId" : 21600, "dueDate" : null, "user" : { "email" : "bella.bell@yourdomain.com", "userId" : 2859300, "username" : null }, "enrollmentId" : 1053300, "eventCreated" : "2023-12-14T19:46:06.659Z" } ] } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message. #### Response Example ```json { "message": "Webhook received successfully" } ``` ``` -------------------------------- ### Learning Path Completions Webhook Source: https://docs.learnupon.com/webhooks/v2 This webhook is triggered when a learner completes a learning path. It provides detailed information about the user, the learning path, and the courses within it. ```APIDOC ## Learning Path Completions Webhook ### Description This webhook sends a JSON payload containing completion data every time a learner completes a learning path. ### Method POST ### Endpoint `/websites/learnupon_webhooks_v2/learning_path_completions` ### Request Body - **data** (array) - Required - A list of learning path completion objects. - **user** (object) - Required - Information about the user. - **userId** (integer) - Required - Unique identifier for the user. - **email** (string) - Required - The email address of the user. - **username** (string) - Optional - The username of the user. - **learningPathEnrollmentId** (integer) - Required - Unique identifier for the learning path enrollment. - **learningPathId** (integer) - Required - Unique identifier for the learning path. - **certification** (object) - Optional - Details about the certificate awarded, if any. - **dateEnrolled** (string) - Required - The date and time (UTC) the learner was enrolled on the path. - **dateStarted** (string) - Required - The date and time (UTC) the learner started the path. - **dateCompleted** (string) - Required - The date and time (UTC) the learner completed the path. - **percentage** (integer) - Optional - The percentage score for the learner on the path. - **numberCompletedCourses** (integer) - Required - The number of courses completed by the learner in the path. - **credits** (array) - Optional - A list of credits awarded for completing the path. - **id** (integer) - Required - Unique identifier for the credit. - **name** (string) - Required - The name of the credit. - **number** (float) - Required - The number of credits awarded. - **courses** (array) - Required - A list of courses within the learning path. - **id** (integer) - Required - Unique identifier for the course. - **status** (string) - Required - The status of the course (e.g., `passed`, `completed`). - **percentage** (integer) - Optional - The score achieved on the course, if applicable. - **eventCreated** (string) - Required - The date and time (UTC) the event was created. ### Request Example ```json { "data" : [ { "user" : { "userId" : 2859300, "email" : "wendy.gill@yourdomain.com", "username" : null }, "learningPathEnrollmentId" : 1053200, "learningPathId" : 194900, "certification" : null, "dateEnrolled" : "2023-12-13T20:06:09.000Z", "dateStarted" : "2023-12-13T20:08:26.000Z", "dateCompleted" : "2023-12-13T20:37:56.000Z", "percentage" : 50, "numberCompletedCourses" : 2, "credits" : [], "courses" : [ { "id" : 1413800, "status" : "passed", "percentage" : null }, { "id" : 720600, "status" : "passed", "percentage" : 100 } ], "eventCreated" : "2023-12-13T20:37:57.000Z" } ] } ``` ### Response #### Success Response (200) An empty JSON object `{}` is returned upon successful receipt of the webhook. #### Response Example ```json {} ``` ``` -------------------------------- ### Sample User Creation Webhook Payload Source: https://docs.learnupon.com/webhooks/v2 This is a sample JSON payload for a user creation webhook. It includes event creation time and user details such as source, userId, and email. ```json { "data" : [ { "eventCreated" : "2026-02-04T21:04:53.238Z", "user" : { "source" : "UI_USER", "username" : null, "userId" : 13126820, "email" : "anne.headley@yourdomain.com" } } ] } ``` -------------------------------- ### Verify Webhook Signature in Python Source: https://docs.learnupon.com/webhooks/v2 This Python script demonstrates how to calculate and compare webhook signatures. Ensure your secret key is accurate and free of extra characters. ```python import hashlib import hmac secret = '00000AB00C0D0E00F0A' raw_body = r'{"data":[{"enrollmentId":19090500,"user":{"userId":291164,"email":"beatrice.dansk@yourdomain.com","username":null},"courseId":1807600,"dueDate":"2024-03-03T18:13:09.000Z","eventCreated":"2024-02-02T18:13:10.038Z","wasRecertified":false}]}' signature = 'a403759157e609bf3852001ff9d83db59b454a82841c4369b0e65d066035af45' # Calculate the hash of the raw body using the SHA-256 hash function and the secret digest = hmac.new(secret.encode('utf-8'), raw_body.encode('utf-8'), digestmod=hashlib.sha256).hexdigest() # Compare the encoded hash with the one sent in the X-Webhook-Signature signature header. print(hmac.compare_digest(digest.encode('utf-8'), signature.encode('utf-8'))) ``` -------------------------------- ### Purchase Completion Webhook Source: https://docs.learnupon.com/webhooks/v2 This webhook is triggered when a sale is successfully completed on your LearnUpon store. It includes details about the order, user, and purchased items. ```APIDOC ## Purchase Completion Webhook ### Description This webhook sends a JSON payload for every successful sale on your store, including customer details, purchased items, and pricing information. ### Method POST ### Endpoint `/websites/learnupon_webhooks_v2/purchase_completions` ### Request Body - **data** (array) - Required - A list of purchase completion objects. - **user** (object) - Required - Information about the user. - **userId** (integer) - Required - Unique identifier for the user. - **email** (string) - Required - The email address of the user. - **username** (string) - Optional - The username of the user. - **orderId** (integer) - Required - Unique identifier for the order. - **currency** (string) - Required - The currency of the order (e.g., "usd"). - **country** (string) - Optional - The country of the order. - **state** (string) - Optional - The state of the order. - **paymentGateway** (string) - Required - The payment gateway used for the transaction. - **paymentId** (string) - Required - The transaction ID from the payment gateway. - **coupon** (string) - Optional - The coupon code applied to the order, if any. - **dateCompleted** (string) - Required - The date and time (UTC) the order was completed. - **bulkCodes** (object) - Optional - Details about bulk codes used, if applicable. - **orderTotal** (float) - Required - The total value of the order before discounts and taxes. - **amountPaid** (float) - Required - The actual amount paid by the customer. - **orderDiscount** (float) - Optional - The total discount applied to the order. - **salesTaxAmount** (float) - Optional - The total sales tax applied to the order. - **lineItems** (array) - Required - A list of items included in the order. - **lineItemId** (integer) - Required - Unique identifier for the line item. - **name** (string) - Required - The name of the item (e.g., course, path). - **courseReferenceCode** (string) - Optional - The reference code for the course, if applicable. - **type** (string) - Required - The type of item (e.g., "course"). - **listPrice** (float) - Required - The original price of the item. - **discount** (float) - Optional - The discount applied to this line item. - **coupon** (string) - Optional - The coupon code applied to this line item. - **salesTaxRate** (float) - Optional - The sales tax rate for this line item. - **salesTaxAmount** (float) - Optional - The sales tax amount for this line item. - **taxRateLocation** (string) - Optional - The location for tax rate application. - **amountPaid** (float) - Required - The amount paid for this line item. - **quantity** (integer) - Required - The quantity of this item purchased. - **eventCreated** (string) - Required - The date and time (UTC) the event was created. ### Request Example ```json { "data": [ { "user": { "userId": 2415600, "email": "william.wallace@yourdomain.com", "username": "wnwallace" }, "orderId": 3465500, "currency": "usd", "country": "United States", "state": "Colorado", "paymentGateway": "paypal", "paymentId": "EC-24815576G65860000", "coupon": "testcoup90", "dateCompleted": "2023-12-14T21:21:26.000Z", "bulkCodes": null, "orderTotal": 5, "amountPaid": 0.5, "orderDiscount": 4.5, "salesTaxAmount": null, "lineItems": [ { "lineItemId": 4838500, "name": "Test Course 1", "courseReferenceCode": null, "type": "course", "listPrice": 5, "discount": 4.5, "coupon": null, "salesTaxRate": null, "salesTaxAmount": null, "taxRateLocation": "store", "amountPaid": 0.5, "quantity": 1 } ], "eventCreated": "2023-12-14T21:21:26.580Z" } ] } ``` ### Response #### Success Response (200) An empty JSON object `{}` is returned upon successful receipt of the webhook. #### Response Example ```json {} ``` ``` -------------------------------- ### Module Completion Webhook Source: https://docs.learnupon.com/webhooks/v2 This section details the attributes for the instructorFeedback and assignmentAnswer objects within the module completion webhook. ```APIDOC ## instructorFeedback Object Attributes ### Description Attributes for the instructorFeedback object within the module completion webhook. ### Attributes - **reviewedByUserId** (integer) - Unique numeric identifier of the instructor who reviews the assignment. - **wasAutocompleted** (boolean) - Indicates if the assignment was reviewed automatically with a pre-set score. Default is `null`. - **uploads** (array) - Contains details of any uploaded response by the instructor. - **feedback** (string) - Any text entered by the instructor to acknowledge the assignment. Can be provided automatically by autocomplete. - **reviewedAt** (date/time) - The date and time (UTC) that the instructor reviewed the assignment. - **score** (integer) - Numeric value assigned for the assignment. Can be provided automatically by autocomplete. ## assignmentAnswer Object Attributes ### Description Attributes for the assignmentAnswer object within the module completion webhook. ### Attributes - **id** (integer) - Unique numeric identifier for the learner's answer to this assignment. - **answer** (string) - Any text entered in the UI by the learner as part of their assignment response. This attribute truncates at 3000 characters. - **truncated** (boolean) - Indicates if the learner's answer shown in the webhook was cut short. - **uploads** (array) - Contains details of any uploaded content by the learner. - **answerSubmittedAt** (date/time) - The date and time (UTC) that the learner sent the assignment. ## uploads Array Attributes ### Description Attributes for the uploads array, which can be present in both instructorFeedback and assignmentAnswer objects. ### Attributes - **id** (integer) - Unique numeric identifier for the upload. - **url** (string) - URL link to the content uploaded by either the instructor or the learner. ``` -------------------------------- ### Course Clone Completion Webhook Source: https://docs.learnupon.com/webhooks/v2 This webhook is triggered when a course is successfully cloned. It provides details about the source and destination portals, original and new course IDs, the owner, and the event creation time. ```APIDOC ## POST /webhooks/v2/course_clone_completion ### Description This webhook is sent when a course is successfully cloned, either through the user interface or the API. It contains information about the cloning process, including source and destination portal IDs, and course IDs. ### Method POST ### Endpoint `/webhooks/v2/course_clone_completion` ### Request Body - **data** (array) - Required - A list of course cloning completion events. - **clonedFromPortalId** (integer) - Required - The ID of the source portal from which the course was cloned. - **clonedToPortalId** (integer) - Required - The ID of the destination portal where the course was cloned. - **originalCourseId** (integer) - Required - The ID of the original course. - **newCourseId** (integer) - Required - The ID of the newly cloned course. - **ownerId** (integer) - Required - The unique identifier of the course owner. - **eventCreated** (date) - Required - The date and time of cloning completion in UTC format. ### Request Example ```json { "data" : [ { "clonedFromPortalId" : 13600, "clonedToPortalId" : 15800, "originalCourseId" : 2700200, "newCourseId" : 2758500, "ownerId" : 291100, "eventCreated" : "2023-12-05T20:27:29.675Z" } ] } ``` ### Response #### Success Response (200) An empty JSON object `{}` is returned upon successful receipt of the webhook. #### Response Example ```json {} ``` ``` -------------------------------- ### Event Session Series Created Webhook Source: https://docs.learnupon.com/webhooks/v2 This webhook is triggered when a new live learning event session series is created in LearnUpon. The payload contains detailed information about the created session series. ```APIDOC ## POST /websites/learnupon_webhooks_v2 ### Description This endpoint receives webhook notifications from LearnUpon for the `event_session_series_created` event. It provides details about the newly created live learning event session series. ### Method POST ### Endpoint /websites/learnupon_webhooks_v2 ### Request Body - **data** (array) - Required - An array containing event session series objects. - **id** (integer) - The unique identifier for the session series. - **eventId** (integer) - The ID of the associated event. - **createdByUserId** (integer) - The ID of the user who created the session series. - **updatedByUserId** (null) - The ID of the user who last updated the session series (null if not updated). - **descriptionText** (string) - A text description of the session series. - **descriptionHtml** (string) - An HTML description of the session series. - **eventCreated** (string) - The date and time when the event was created (ISO 8601 format). - **title** (string) - The title of the session series. - **referenceName** (string) - A reference name for the session series. - **maxCapacity** (integer) - The maximum number of participants allowed. - **minCapacity** (null) - The minimum number of participants required (null if not specified). - **minimumAttendanceThreshold** (null) - The minimum attendance threshold (null if not specified). - **numEnrolled** (integer) - The number of currently enrolled participants. - **completionRequirement** (string) - The requirement for completing the session series (e.g., "attendance required"). - **restrictByGroupIds** (null) - An array of group IDs that the session series is restricted to (null if not restricted). - **sessionParts** (array) - An array of session parts within the series. - **id** (integer) - The unique identifier for the session part. - **webinarUrl** (string) - The URL for the webinar. - **webinarAccountId** (integer) - The webinar account ID. - **startTime** (string) - The start date and time of the session part (ISO 8601 format). - **endTime** (string) - The end date and time of the session part (ISO 8601 format). - **timezone** (string) - The timezone of the session part. - **sessionType** (string) - The type of session (e.g., "webinar"). - **environmentType** (integer) - The environment type for the session. - **location** (string) - The location of the session (e.g., "webinar"). - **locationId** (integer) - The ID of the location. - **address1** (null) - The first line of the address (null if not applicable). - **address2** (null) - The second line of the address (null if not applicable). - **address3** (null) - The third line of the address (null if not applicable). - **instructorsUserIds** (array) - An array of user IDs for the instructors. - **customSessionData** (array) - An array of custom data fields for the session. - **customSessionDataDefinitionId** (integer) - The ID of the custom data definition. - **fieldValue** (any) - The value of the custom field. - **fieldLabel** (string) - The label of the custom field. - **tags** (array) - An array of tags associated with the session part. - **name** (string) - The name of the tag. - **sequence** (integer) - The sequence number of the tag. - **requiredAttendance** (boolean) - Whether attendance is required for this tag. - **statusId** (integer) - The status ID of the tag. - **id** (integer) - The unique identifier for the tag. ### Response #### Success Response (200) - **status** (string) - Indicates the success of the webhook reception (e.g., "success"). #### Response Example ```json { "status": "success" } ``` ``` -------------------------------- ### Course Enrollment Webhook Source: https://docs.learnupon.com/webhooks/v2 This section details the 'Course Enrollment' webhook, which is sent when a learner is successfully enrolled in a course. It outlines the payload structure, including user details, enrollment ID, course ID, and due date. ```APIDOC ## Course Enrollment ### Description A JSON payload sent to your designated URL endpoint whenever LearnUpon successfully enrolls a learner on a course. ### Method POST ### Endpoint /websites/learnupon_webhooks_v2 ### Parameters #### Request Body - **data** (array) - Contains a list of course enrollment events. - **eventCreated** (date) - Required - Date and time the enrollment event was created in UTC format. - **user** (object) - Required - Details about the user enrolled. - **userId** (integer) - Required - Unique numeric identifier of the user. - **email** (string) - Required - Email address of the user. - **username** (string) - Nullable - Username of the user. - **enrollmentId** (integer) - Required - Unique numeric identifier for the enrollment. - **dueDate** (date) - Nullable - The due date for the course. - **courseId** (integer) - Required - Unique numeric identifier for the course. - **wasRecertified** (boolean) - Required - Indicates if the enrollment was a recertification. ### Request Example ```json { "data" : [ { "eventCreated" : "2023-12-14T19:41:35.463Z", "user" : { "userId" : 285900, "email" : "bella.bell@yourdomain.com", "username" : null }, "enrollmentId" : 18976600, "dueDate" : null, "courseId" : 2712800, "wasRecertified" : false } ] } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the webhook reception. #### Response Example ```json { "status": "success" } ``` ``` -------------------------------- ### SCORM Module Completion Webhook Source: https://docs.learnupon.com/webhooks/v2 This webhook is triggered when a SCORM module is completed. It includes user, enrollment, course, and module details, along with completion status and percentage. ```json { "data" : [ { "user" : { "email" : "agnes.poitou@yourdomain.com", "username" : null, "userId" : 291100 }, "enrollmentId" : 16107700, "courseId" : 1561400, "moduleId" : 1344900, "dateStarted" : "2023-12-05T21:25:44.000Z", "dateCompleted" : "2023-12-05T21:36:35.000Z", "markedCompleted" : false, "type" : "scorm", "sequence" : 1, "status" : "passed", "percentage" : 100, "additional_data" : null, "eventCreated" : "2023-12-05T21:36:35.647Z" } ] } ``` -------------------------------- ### Sample Course Completion Webhook Payload Source: https://docs.learnupon.com/webhooks/v2 This JSON payload represents data sent when a learner completes a course. It includes details about the course, enrollment, user, and modules completed. Note that module details differ from the module completion webhook. ```json { "data" : [ { "courseId" : 2587200, "enrollmentId" : 17906600, "courseReferenceCode" : null, "certification" : { "certExpiresAt" : "", "wasRecertified" : false, "certificationName" : "" }, "courseAccessExpiresAt" : null, "dateEnrolled" : "2023-10-20T20:45:41.000Z", "dateStarted" : "2023-10-20T20:47:42.000Z", "dateCompleted" : "2023-10-20T04:00:00.000Z", "enrollmentStatus" : "passed", "percentage" : 100, "hasAttemptsRemaining" : false, "manuallyMarkedCompleteById" : 291100, "manuallyMarkedComplete" : true, "user" : { "userId" : 291162, "username" : null, "email" : "agnes.poitou@yourdomain.com" }, "credits" : null, "modules" : [ { "name" : "Webhooks: intro", "dateCompleted" : "2023-10-20T04:00:00.000Z", "type" : "page", "status" : "completed", "dateStarted" : "2023-10-20T20:47:42.000Z", "additional_data" : null, "markedCompleted" : true, "id" : 2409200, "percentage" : null, "sequence" : 1 }, { "percentage" : null, "sequence" : 2, "markedCompleted" : true, "additional_data" : null, "id" : 2409200, "dateCompleted" : "2023-10-20T04:00:00.000Z", "dateStarted" : null, "status" : "not_started", "type" : "training", "name" : "Use webhooks to build integrations: intro" }, { "name" : "Use APIs to get the most from automation", "dateStarted" : null, "type" : "training", "status" : "not_started", "dateCompleted" : "2023-10-20T04:00:00.000Z", "id" : 405200, "additional_data" : null, "markedCompleted" : true, "sequence" : 3, "percentage" : null }, { "name" : "Webhooks exam", "dateCompleted" : "2023-10-20T04:00:00.000Z", "status" : "not_started", "type" : "exam", "dateStarted" : null, "additional_data" : { "attemptsTaken" : 0, "isKnowledgeTest" : false, "unlimitedAttemptsAllowed" : false, "passMark" : 0, "timedExam" : false, "passPercentage" : 50, "wasAutoSubmitted" : false, "timeTaken" : null, "examId" : 205900, "attemptsAllowed" : 1, "timeAllowed" : null }, "markedCompleted" : true, "id" : 2409200, "percentage" : null, "sequence" : 4 }, { "name" : "Wrap up survey", "type" : "survey", "status" : "not_started", "dateStarted" : null, "dateCompleted" : "2023-10-20T04:00:00.000Z", "id" : 2409200, "markedCompleted" : true, "additional_data" : { "surveyId" : 205900 }, "sequence" : 5, "percentage" : null } ], "eventCreated" : "2023-10-20T20:56:03.000Z" } ] } ``` -------------------------------- ### Checklist Module Completion Webhook Source: https://docs.learnupon.com/webhooks/v2 This webhook is triggered when a checklist module is marked as complete. It includes user, enrollment, course, and module details, along with the completion status. ```json { "data" : [ { "user" : { "email" : "jttaylor@yourndomain.com", "username" : null, ```