Course Created
The course.created
event is triggered when a new course is created in the system.
Event Properties
Property | Type | Description |
---|---|---|
id | string | The unique identifier of the course |
name | string | The name of the course |
description | string | The description of the course |
state | string | The current state of the course |
type | string | The type of the course (always “Course”) |
created_at | string | The timestamp when the course was created |
updated_at | string | The timestamp when the course was last updated |
slug | string | The URL-friendly slug of the course |
plans | array | An array of plans associated with the course |
Plan Properties
Each plan in the plans
array has the following properties:
Property | Type | Description |
---|---|---|
id | string | The unique identifier of the plan |
name | string | The name of the plan |
description | string | A description of the plan |
currency | string | The currency code for the plan’s price |
amount | integer | The price amount in the smallest currency unit |
created_at | string | The timestamp when the plan was created (ISO 8601 format, e.g. “2023-12-04T18:45:44+08:00” or “2023-12-04T10:45:44Z”) |
updated_at | string | The timestamp when the plan was last updated (ISO 8601 format) |
Example Payload
{ "type": "course.created", "data": { "id": "550e8400-e29b-41d4-a716-446655440000", "name": "Introduction to Programming", "description": "Learn the basics of coding with this comprehensive course.", "state": "draft", "type": "Course", "created_at": "2023-05-15T14:30:00Z", "updated_at": "2023-05-15T14:30:00Z", "slug": "intro-to-programming", "plans": [ { "id": "plan_123", "name": "Basic Plan", "description": "Access to all course materials for 3 months", "currency": "TWD", "amount": 5000, "created_at": "2023-05-15T14:35:00Z", "updated_at": "2023-05-15T14:35:00Z" }, { "id": "plan_456", "name": "Premium Plan", "description": "Lifetime access to course materials and weekly Q&A sessions", "currency": "TWD", "amount": 1900, "created_at": "2023-05-15T14:36:00Z", "updated_at": "2023-05-15T14:36:00Z" } ] }}