### Zenler API Authentication Example (Bash) Source: https://context7.com/context7/newzenler_api/llms.txt Demonstrates how to authenticate API requests using custom headers for API key and account subdomain. It shows example requests and potential responses for success and authentication failure. ```bash curl https://api.newzenler.com/api/v1/users \ -H 'X-API-Key: your-api-key-here' \ -H 'X-Account-Name: your-school-subdomain' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' # Response on success (200 OK): # {"response_code":200,"message":"success","data":{...}} # Response on auth failure (401/403): # {"response_code":401,"message":"Invalid Api key or account name"} # {"response_code":403,"message":"Api key missing"} # {"response_code":403,"message":"Account name missing"} ``` -------------------------------- ### Authenticate and Fetch Users Source: https://www.newzenler.com/api/documentation/public/api-doc Demonstrates how to authenticate API requests using your API key and account name, and then retrieve a list of users. It shows the required headers and an example GET request. ```curl curl https://api.newzenler.com/api/v1/users -H 'X-API-Key: my-api-key' -H 'X-Account-Name: my-school' -H 'Content-Type: application/json' -H 'Accept: application/json' ``` -------------------------------- ### GET /api/v1/reports/affiliates/brief Source: https://www.newzenler.com/api/documentation/public/api-doc Retrieves a brief report on affiliate performance, summarizing total sales and commissions. Supports filtering by date and course. ```APIDOC ## GET /api/v1/reports/affiliates/brief ### Description Retrieves a brief report on affiliate performance, summarizing total sales and commissions. Supports filtering by date and course. ### Method GET ### Endpoint https://api.newzenler.com/api/v1/reports/affiliates/brief ### Parameters #### Query Parameters - **start_date** (String) - Optional - Should be in format YYYY-mm-dd (e.g., 2018-05-18) - **end_date** (String) - Optional - Should be in format YYYY-mm-dd (e.g., 2018-05-18) - **limit** (Number) - Optional - The number of items to be returned. Default: 15 - **page** (Number) - Optional - The page within the collection to fetch. Default: 1 - **course_ids[]** (Array) - Optional - Specify course ID(s) - **affiliate_ids[]** (Array) - Optional - Specify affiliate ID(s) ### Response #### Success Response (200) - **response_code** (Integer) - Indicates the success of the operation. - **message** (String) - A message describing the result of the operation. - **data** (Object) - Contains the report data. - **items** (Array) - An array of affiliate performance objects. - **currency** (String) - The currency of the sales. - **aff_id** (String) - The affiliate's unique ID. - **aff_name** (String) - The name of the affiliate. - **aff_email** (String) - The email of the affiliate. - **total_sales_count** (Integer) - The total number of sales generated by the affiliate. - **total_commission** (String) - The total commission earned by the affiliate. - **pending_commission** (String) - The amount of commission pending payout. - **paid_commission** (String) - The amount of commission already paid out. - **pagination** (Object) - Pagination details for the response. - **total_items** (Integer) - The total number of items available. - **items_per_page** (String) - The number of items per page. - **page_index** (String) - The current page index. - **total_pages** (Integer) - The total number of pages. #### Response Example ```json { "response_code": 200, "message": "success", "data": { "items": [ { "currency": "USD", "aff_id": "FZHbhb", "aff_name": "test 123", "aff_email": "test@example.com", "total_sales_count": 23, "total_commission": "78.01", "pending_commission": "78.01", "paid_commission": "0.00" } ], "pagination": { "total_items": 2, "items_per_page": "1", "page_index": "1", "total_pages": 2 } } } ``` ``` -------------------------------- ### GET /api/v1/live-class/get-live-classes-list Source: https://context7.com/context7/newzenler_api/llms.txt Retrieves a list of upcoming live classes with support for pagination, search, and ordering. ```APIDOC ## GET /api/v1/live-class/get-live-classes-list ### Description Retrieves upcoming live class sessions with pagination and search capabilities. Returns scheduled live classes with details including topic, schedule, timezone, duration, registration URL, and recurrence information. ### Method GET ### Endpoint /api/v1/live-class/get-live-classes-list ### Parameters #### Query Parameters - **limit** (integer) - Optional - The maximum number of items to return per page. Defaults to 10. - **page** (integer) - Optional - The page number to retrieve. Defaults to 1. - **orderby** (string) - Optional - The field to order the results by (e.g., 'schedule_date'). - **order** (string) - Optional - The order direction ('asc' or 'desc'). - **search** (string) - Optional - A search term to filter live classes by topic or other relevant fields. #### Headers - **X-API-Key** (string) - Required - Your Newzenler API key. - **X-Account-Name** (string) - Required - Your Newzenler account name. - **Content-Type** (string) - Required - application/json - **Accept** (string) - Optional - application/json ### Response #### Success Response (200) - **response_code** (integer) - Success status code (200). - **message** (string) - Success message ('success'). - **data** (object) - Response data. - **items** (array) - An array of live class objects. - **id** (integer) - The unique identifier for the live class. - **topic** (string) - The topic of the live class. - **schedule_date** (string) - The scheduled date and time of the live class. - **timezone** (string) - The timezone for the scheduled time. - **duration** (integer) - The duration of the class in minutes. - **register_url** (string) - The URL to register for the live class. - **recurring** (boolean) - Indicates if the class is recurring. - **recent_recurring_schedule** (string) - The schedule for the most recent recurring instance. - **pagination** (object) - Pagination details. - **total_items** (integer) - Total number of items available. - **items_per_page** (integer) - Number of items per page. - **page_index** (integer) - The current page index. - **total_pages** (integer) - Total number of pages. #### Response Example ```json { "response_code": 200, "message": "success", "data": { "items": [ { "id": 4, "topic": "Advanced JavaScript Patterns", "schedule_date": "2021-10-08 12:00 PM", "timezone": "Asia/Kolkata", "duration": 90, "register_url": "https://beta.newzenler.com/live-class/advanced-javascript-patterns/register", "recurring": false, "recent_recurring_schedule": "" } ], "pagination": { "total_items": 3, "items_per_page": 10, "page_index": 1, "total_pages": 1 } } } ``` *Note: Duration is in minutes.* ``` -------------------------------- ### GET /api/v1/live-webinar/get-live-webinars-list Source: https://www.newzenler.com/api/documentation/public/api-doc Retrieves a list of upcoming live webinars with options for pagination, sorting, and searching. ```APIDOC ## GET /api/v1/live-webinar/get-live-webinars-list ### Description Fetches a list of upcoming live webinars. Supports filtering by limit, page, orderby, order, search, type, and status. ### Method GET ### Endpoint https://api.newzenler.com/api/v1/live-webinar/get-live-webinars-list ### Parameters #### Query Parameters - **limit** (Number) - Optional - The number of items to be returned. Default: 15 - **page** (Number) - Optional - The page within the collection to fetch. Default: 1 - **orderby** (String) - Optional - Any live_webinar table field. Default: created_at - **order** (String) - Optional - 'asc' or 'desc'. Default: 'asc' - **search** (String) - Optional - Search for live webinars topic. - **type** (String) - Optional - Filter by webinar type. - **status** (String) - Optional - Filter by webinar status. ### Request Example ```json { "example": "GET /api/v1/live-webinar/get-live-webinars-list?limit=10&page=1&orderby=schedule_date&order=asc&search=Test&status=upcoming" } ``` ### Response #### Success Response (200) - **response_code** (Number) - The response code. - **message** (String) - The response message. - **data** (Object) - Contains the list of live webinars and pagination details. - **items** (Array) - List of live webinar objects. - **id** (Number) - The ID of the live webinar. - **topic** (String) - The topic of the live webinar. - **schedule_date** (String) - The scheduled date and time of the live webinar. - **timezone** (String) - The timezone of the live webinar. - **duration** (Number) - The duration of the live webinar in minutes. - **register_url** (String) - The URL to register for the live webinar. - **recurring** (Boolean) - Whether the webinar is recurring. - **recent_recurring_schedule** (String) - The most recent recurring schedule. - **pagination** (Object) - Pagination details. - **total_items** (Number) - Total number of items available. - **items_per_page** (Number) - Number of items per page. - **page_index** (Number) - Current page index. - **total_pages** (Number) - Total number of pages. #### Response Example ```json { "response_code": 200, "message": "success", "data": { "items": [ { "id": 1, "topic": "Test Webinar", "schedule_date": "2021-10-09 12:00 PM", "timezone": "Asia\/Kolkata", "duration": 30, "register_url": "https:\/\/beta.newzenler.com\/live-webinar\/test-webinar\/register", "recurring": false, "recent_recurring_schedule": "" } ], "pagination": { "total_items": 2, "items_per_page": 1, "page_index": 1, "total_pages": 2 } } } ``` ``` -------------------------------- ### GET /api/v1/live-webinar/get-live-webinars-list Source: https://context7.com/context7/newzenler_api/llms.txt Retrieves a list of upcoming live webinars with pagination and filtering options. ```APIDOC ## GET /api/v1/live-webinar/get-live-webinars-list ### Description Retrieves upcoming live webinar sessions with pagination and filtering capabilities. Returns scheduled webinars with details including topic, timing, timezone, duration, registration URL, and recurrence patterns. Supports search and ordering. ### Method GET ### Endpoint /api/v1/live-webinar/get-live-webinars-list ### Parameters #### Query Parameters - **limit** (integer) - Optional - The maximum number of items to return per page. Defaults to 15. - **page** (integer) - Optional - The page number to retrieve. Defaults to 1. - **orderby** (string) - Optional - The field to order the results by (e.g., 'schedule_date'). - **order** (string) - Optional - The order direction ('asc' or 'desc'). - **search** (string) - Optional - A search term to filter webinars by topic or other relevant fields. #### Headers - **X-API-Key** (string) - Required - Your Newzenler API key. - **X-Account-Name** (string) - Required - Your Newzenler account name. - **Content-Type** (string) - Required - application/json - **Accept** (string) - Optional - application/json ### Response #### Success Response (200) (No specific schema provided for success response, but implies a list of webinars) #### Response Example (No specific response example provided for this endpoint, but it's expected to return a structure similar to the 'Get Live Classes List' endpoint, containing webinar details and pagination information.) ``` -------------------------------- ### GET /api/v1/live-class/get-live-classes-list Source: https://www.newzenler.com/api/documentation/public/api-doc Retrieves a list of upcoming live classes with options for pagination, sorting, and searching. ```APIDOC ## GET /api/v1/live-class/get-live-classes-list ### Description Fetches a list of upcoming live classes. Supports filtering by limit, page, orderby, order, and search. ### Method GET ### Endpoint https://api.newzenler.com/api/v1/live-class/get-live-classes-list ### Parameters #### Query Parameters - **limit** (Number) - Optional - The number of items to be returned. Default: 15 - **page** (Number) - Optional - The page within the collection to fetch. Default: 1 - **orderby** (String) - Optional - Any live_class table field. Default: created_at - **order** (String) - Optional - 'asc' or 'desc'. Default: 'asc' - **search** (String) - Optional - Search for live class topic. ### Request Example ```json { "example": "GET /api/v1/live-class/get-live-classes-list?limit=10&page=1&orderby=schedule_date&order=asc&search=Test" } ``` ### Response #### Success Response (200) - **response_code** (Number) - The response code. - **message** (String) - The response message. - **data** (Object) - Contains the list of live classes and pagination details. - **items** (Array) - List of live class objects. - **id** (Number) - The ID of the live class. - **topic** (String) - The topic of the live class. - **schedule_date** (String) - The scheduled date and time of the live class. - **timezone** (String) - The timezone of the live class. - **duration** (Number) - The duration of the live class in minutes. - **register_url** (String) - The URL to register for the live class. - **recurring** (Boolean) - Whether the class is recurring. - **recent_recurring_schedule** (String) - The most recent recurring schedule. - **pagination** (Object) - Pagination details. - **total_items** (Number) - Total number of items available. - **items_per_page** (Number) - Number of items per page. - **page_index** (Number) - Current page index. - **total_pages** (Number) - Total number of pages. #### Response Example ```json { "response_code": 200, "message": "success", "data": { "items": [ { "id": 4, "topic": "Test Liveclass", "schedule_date": "2021-10-08 12:00 PM", "timezone": "Asia\/Kolkata", "duration": 30, "register_url": "https:\/\/beta.newzenler.com\/live-class\/test-liveclass\/register", "recurring": false, "recent_recurring_schedule": "" } ], "pagination": { "total_items": 3, "items_per_page": 1, "page_index": 1, "total_pages": 3 } } } ``` ``` -------------------------------- ### Get Course Details - Bash Source: https://context7.com/context7/newzenler_api/llms.txt Retrieves detailed information about a specific course using its ID. Requires API key and account name. Returns course metadata, ownership, visibility, and access control flags. ```bash curl https://api.newzenler.com/api/v1/courses/1150 \ -H 'X-API-Key: your-api-key' \ -H 'X-Account-Name: myschool' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' # Response (200 OK): { "response_code": 200, "message": "success", "data": { "items": { "id": 1150, "name": "Advanced JavaScript Programming", "subtitle": "Master modern JavaScript techniques", "thumbnail": "https://s3.amazonaws.com/contents.newzenler.com/313/courses/1150/data/thumb/l-4.jpg", "course_type": 2, "owner": "313.5aacb2806f857", "school_id": 313, "public": 1, "featured": 1, "hidden": 0, "private": 0 } } } # Flags: public (1=yes), featured (1=yes), hidden (1=yes), private (1=yes) ``` -------------------------------- ### GET /api/v1/reports/enrollments/brief Source: https://www.newzenler.com/api/documentation/public/api-doc Retrieves a brief list of enrollments report, including the total number of enrollments for specified courses within a given date range. ```APIDOC ## GET /api/v1/reports/enrollments/brief ### Description Retrieves a brief list of enrollments report, including the total number of enrollments for specified courses within a given date range. ### Method GET ### Endpoint https://api.newzenler.com/api/v1/reports/enrollments/brief ### Parameters #### Query Parameters - **start_date** (String) - Optional - Should be in format YYYY-mm-dd (e.g., 2018-05-18) - **end_date** (String) - Optional - Should be in format YYYY-mm-dd (e.g., 2018-05-18) - **course_ids[]** (Array) - Optional - Specify course IDs ### Response #### Success Response (200) - **response_code** (Number) - Indicates the success of the operation. - **message** (String) - A message describing the result of the operation. - **data** (Object) - Contains the report data. - **items** (Array) - A list of enrollment data per course. - **course_id** (Number) - The ID of the course. - **course_name** (String) - The name of the course. - **no_of_enrollments** (Number) - The total number of enrollments for the course. - **pagination** (Object) - Pagination details for the response. - **total_items** (Number) - The total number of items across all pages. - **items_per_page** (Number) - The number of items per page. - **page_index** (Number) - The current page index. - **total_pages** (Number) - The total number of pages available. #### Response Example ```json { "response_code": 200, "message": "success", "data": { "items": [ { "course_id": 1156, "course_name": "test", "no_of_enrollments": 7 } ], "pagination": { "total_items": 3, "items_per_page": 1, "page_index": 1, "total_pages": 3 } } } ``` ``` -------------------------------- ### GET /api/v1/reports/course-progress/brief Source: https://www.newzenler.com/api/documentation/public/api-doc Retrieves a brief report on course progress, including completion statistics for courses within a specified date range and limit. ```APIDOC ## GET /api/v1/reports/course-progress/brief ### Description Retrieves a brief report on course progress, including completion statistics for courses within a specified date range and limit. ### Method GET ### Endpoint https://api.newzenler.com/api/v1/reports/course-progress/brief ### Parameters #### Query Parameters - **start_date** (String) - Optional - Should be in format YYYY-mm-dd (e.g., 2018-05-18) - **end_date** (String) - Optional - Should be in format YYYY-mm-dd (e.g., 2018-05-18) - **limit** (Number) - Optional - The number of items to be returned. Default: 15 - **page** (Number) - Optional - The page within the collection to fetch. Default: 1 - **course_ids[]** (Array) - Optional - Specify course IDs ### Response #### Success Response (200) - **response_code** (Number) - Indicates the success of the operation. - **message** (String) - A message describing the result of the operation. - **data** (Object) - Contains the course progress report data. - **items** (Array) - A list of course progress data. - **pagination** (Object) - Pagination details for the response. - **total_items** (Number) - The total number of items across all pages. - **items_per_page** (Number) - The number of items per page. - **page_index** (Number) - The current page index. - **total_pages** (Number) - The total number of pages available. #### Response Example (No example provided in the source text) ``` -------------------------------- ### GET /api/v1/reports/enrollments/detailed Source: https://www.newzenler.com/api/documentation/public/api-doc Retrieves a detailed list of enrollments report, including user information and enrollment dates for specified courses within a given date range. ```APIDOC ## GET /api/v1/reports/enrollments/detailed ### Description Retrieves a detailed list of enrollments report, including user information and enrollment dates for specified courses within a given date range. ### Method GET ### Endpoint https://api.newzenler.com/api/v1/reports/enrollments/detailed ### Parameters #### Query Parameters - **start_date** (String) - Optional - Should be in format YYYY-mm-dd - **end_date** (String) - Optional - Should be in format YYYY-mm-dd - **course_id** (String) - Optional - Specify course ID ### Response #### Success Response (200) - **response_code** (Number) - Indicates the success of the operation. - **message** (String) - A message describing the result of the operation. - **data** (Object) - Contains the report data. - **items** (Array) - A list of detailed enrollment information. - **course_id** (Number) - The ID of the course. - **user_id** (String) - The ID of the user. - **course_name** (String) - The name of the course. - **first_name** (String) - The first name of the user. - **last_name** (String) - The last name of the user. - **email** (String) - The email address of the user. - **enrollment_date** (String) - The date and time of enrollment. #### Response Example ```json { "response_code": 200, "message": "success", "data": { "items": [ { "course_id": 1156, "user_id": "313.5c0235e95c1dc", "course_name": "test", "first_name": "Api8", "last_name": "api8", "email": "api8@example.com", "enrollment_date": "2018-12-01 07:24:32" } ] } } ``` ``` -------------------------------- ### GET /api/v1/reports/sales/brief Source: https://www.newzenler.com/api/documentation/public/api-doc Retrieves a brief overview of sales data within a specified period, including total sales, earnings, and sales totals, with options for filtering and pagination. ```APIDOC ## GET /api/v1/reports/sales/brief ### Description Retrieves a brief overview of sales data within a specified period, including total sales, earnings, and sales totals, with options for filtering and pagination. ### Method GET ### Endpoint https://api.newzenler.com/api/v1/reports/sales/brief ### Parameters #### Query Parameters - **start_date** (String) - Optional - Should be in format YYYY-mm-dd (e.g., 2018-05-18) - **end_date** (String) - Optional - Should be in format YYYY-mm-dd (e.g., 2018-05-18) - **limit** (Number) - Optional - The number of items to be returned. Default: 15 - **page** (Number) - Optional - The page within the collection to fetch. Default: 1 - **groupby** (String) - Optional - It can be 'course', 'day' or 'month'. Default: 'course' - **course_ids[]** (Array) - Optional - Specify course IDs ### Response #### Success Response (200) - **response_code** (Number) - Indicates the success of the operation. - **message** (String) - A message describing the result of the operation. - **data** (Object) - Contains the sales report data. - **items** (Array) - A list of sales data items. - **total_sales** (Number) - Total number of sales. - **course_id** (Number) - The ID of the course. - **earnings_total** (String) - Total earnings. - **sales_total** (String) - Total sales amount. - **aff_fee** (String) - Affiliate fee. - **name** (String) - Name associated with the sale (e.g., course name). - **day** (String) - The day of the sale. - **month** (String) - The month of the sale. - **currency** (String) - The currency of the transaction. - **pagination** (Object) - Pagination details for the response. - **total_items** (Number) - The total number of items across all pages. - **items_per_page** (Number) - The number of items per page. - **page_index** (Number) - The current page index. - **total_pages** (Number) - The total number of pages available. #### Response Example ```json { "response_code": 200, "message": "success", "data": { "items": [ { "total_sales": 1, "course_id": 1156, "earnings_total": "18.52", "sales_total": "20.00", "aff_fee": "0.00", "name": "pppp", "day": "12/01/2018", "month": "December-2018", "currency": "USD" } ], "pagination": { "total_items": 19, "items_per_page": 1, "page_index": 1, "total_pages": 19 } } } ``` ``` -------------------------------- ### GET /api/v1/reports/sales/brief Source: https://context7.com/context7/newzenler_api/llms.txt Retrieves aggregated sales data, grouped by course, day, or month. Returns sales summaries with totals, earnings, affiliate fees, and transaction counts, including currency information. ```APIDOC ## Get Sales Brief Report ### Description Retrieve aggregated sales data with grouping by course, day, or month. Returns sales summaries with totals, earnings, affiliate fees, and transaction counts. Supports grouping by course, daily, or monthly aggregation. Includes currency information. ### Method GET ### Endpoint /api/v1/reports/sales/brief ### Parameters #### Query Parameters - **start_date** (string) - Required - The start date for the report. - **end_date** (string) - Required - The end date for the report. - **limit** (integer) - Optional - The number of items per page. - **page** (integer) - Optional - The page number for pagination. - **groupby** (string) - Optional - The field to group the results by. Options: "course" (default), "day", "month". - **course_ids[]** (array of integers) - Optional - An array of course IDs to filter the report. ### Request Example ```bash curl 'https://api.newzenler.com/api/v1/reports/sales/brief?start_date=2018-12-01&end_date=2018-12-31&limit=20&page=1&groupby=course&course_ids[]=1156' \ -H 'X-API-Key: your-api-key' \ -H 'X-Account-Name: myschool' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' ``` ### Response #### Success Response (200) - **response_code** (integer) - The response code. - **message** (string) - The success message. - **data** (object) - Contains the report data. - **items** (array) - An array of sales summary objects. - **total_sales** (integer) - Total number of sales. - **course_id** (integer) - The ID of the course. - **earnings_total** (string) - Total earnings. - **sales_total** (string) - Total sales amount. - **aff_fee** (string) - Total affiliate fees. - **name** (string) - The name of the course. - **day** (string) - The specific day for daily aggregation. - **month** (string) - The specific month for monthly aggregation. - **currency** (string) - The currency of the sales. - **pagination** (object) - Pagination details. - **total_items** (integer) - Total number of items. - **items_per_page** (integer) - Items per page. - **page_index** (integer) - Current page index. - **total_pages** (integer) - Total number of pages. #### Response Example ```json { "response_code": 200, "message": "success", "data": { "items": [ { "total_sales": 23, "course_id": 1156, "earnings_total": "426.96", "sales_total": "460.00", "aff_fee": "33.04", "name": "Digital Marketing Masterclass", "day": "12/15/2018", "month": "December-2018", "currency": "USD" } ], "pagination": { "total_items": 19, "items_per_page": 20, "page_index": 1, "total_pages": 1 } } } ``` ``` -------------------------------- ### Create Zenler User (Bash) Source: https://context7.com/context7/newzenler_api/llms.txt Provides an example of creating a new user via the API. It demonstrates the POST request with a JSON payload containing required fields like name, email, password, and optional fields such as roles, commission, and address details. ```bash curl -X POST https://api.newzenler.com/api/v1/users \ -H 'X-API-Key: your-api-key' \ -H 'X-Account-Name: myschool' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -d '{ "first_name": "Jane", "last_name": "Smith", "email": "jane.smith@example.com", "password": "SecurePass123", "commission": 10, "roles": [3, 7], "address": "456 Oak Ave", "city": "Boston", "state": "MA", "phone": "5551234567", "zip_code": "02101", "country": "USA", "gdpr_consent_status": 1 }' # Response (201 Created): { "response_code": 201, "message": "People added successfully", "data": { "id": "313.5c109f1b58473", "first_name": "Jane", "last_name": "Smith", "email": "jane.smith@example.com" } } ``` -------------------------------- ### GET /api/v1/reports/course-progress/detailed Source: https://context7.com/context7/newzenler_api/llms.txt Retrieves individual student progress records with advanced filtering. Returns per-student progress data including enrollment date, start date, completion status, last activity, and completion percentage. ```APIDOC ## Get Course Progress Detailed Report ### Description Retrieve individual student progress records with advanced filtering. Returns per-student progress data including enrollment date, start date, completion status, last activity, and completion percentage. Supports extensive filtering options. ### Method GET ### Endpoint /api/v1/reports/course-progress/detailed ### Parameters #### Query Parameters - **start_date** (string) - Required - The start date for the report. - **end_date** (string) - Required - The end date for the report. - **limit** (integer) - Optional - The number of items per page. - **page** (integer) - Optional - The page number for pagination. - **course_id[]** (array of integers) - Required - An array of course IDs to filter the report. - **af_v** (integer) - Optional - Advanced filter version. Set to 1 to enable advanced filters. - **email_like[]** (array of strings) - Optional - Partial email match for students. - **students_in_course[]** (array of strings) - Optional - Filter by specific student IDs within the course. ### Request Example ```bash curl 'https://api.newzenler.com/api/v1/reports/course-progress/detailed?start_date=2018-01-01&end_date=2018-12-31&limit=25&page=1&course_id[]=1036&af_v=1&email_like[]=gmail.com&students_in_course[0][]=313.5aacb3079ca59' \ -H 'X-API-Key: your-api-key' \ -H 'X-Account-Name: myschool' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' ``` ### Response #### Success Response (200) - **response_code** (integer) - The response code. - **message** (string) - The success message. - **data** (object) - Contains the report data. - **items** (array) - An array of detailed student progress objects. - **studentId** (string) - The unique ID of the student. - **courseId** (integer) - The ID of the course. - **enrollmentDate** (string) - The date the student enrolled. - **startDate** (string) - The date the student started the course. - **completionStatus** (string) - The completion status of the student. - **lastActivity** (string) - The date of the student's last activity. - **completionPercentage** (integer) - The percentage of the course completed. - **studentName** (string) - The name of the student. - **studentEmail** (string) - The email of the student. - **courseName** (string) - The name of the course. - **pagination** (object) - Pagination details. - **total_items** (integer) - Total number of items. - **items_per_page** (integer) - Items per page. - **page_index** (integer) - Current page index. - **total_pages** (integer) - Total number of pages. #### Response Example (Response example not provided in the input text) ``` -------------------------------- ### Enroll Multiple Users to Course - Bash Source: https://context7.com/context7/newzenler_api/llms.txt Enrolls multiple users into a course simultaneously. Supports optional pricing plan assignment. Requires course ID, user IDs, API key, and account name. Response indicates success. ```bash curl -X POST https://api.newzenler.com/api/v1/courses/1150/enroll \ -H 'X-API-Key: your-api-key' \ -H 'X-Account-Name: myschool' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -d '{ "users": ["313.5aacb3079ca59", "313.5bc576509d13d", "313.5c109f1b58473"], "plan_id": 45 }' # Response (200 OK): { "response_code": 200, "message": "success", "data": "Users enrolled to the course successfully" } # Without plan_id (default access): curl -X POST https://api.newzenler.com/api/v1/courses/1150/enroll \ -H 'X-API-Key: your-api-key' \ -H 'X-Account-Name: myschool' \ -H 'Content-Type: application/json' \ -d '{ "users": ["313.5aacb3079ca59", "313.5bc576509d13d"] }' ``` -------------------------------- ### Get Course Progress Detailed Report (Bash) Source: https://context7.com/context7/newzenler_api/llms.txt Retrieves individual student progress records with advanced filtering capabilities. It returns per-student progress data, including enrollment date, start date, completion status, last activity, and completion percentage, supporting extensive filtering options. ```bash curl 'https://api.newzenler.com/api/v1/reports/course-progress/detailed?start_date=2018-01-01&end_date=2018-12-31&limit=25&page=1&course_id[]=1036&af_v=1&email_like[]=gmail.com&students_in_course[0][]=313.5aacb3079ca59' \ -H 'X-API-Key: your-api-key' \ -H 'X-Account-Name: myschool' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' ``` -------------------------------- ### Register for Live Webinar (Bash) Source: https://context7.com/context7/newzenler_api/llms.txt Registers a user for a live webinar using their name and email, with optional contact details. The API expects an API key, account name, and a JSON payload containing user information. A successful registration returns a confirmation message. ```bash curl -X POST https://api.newzenler.com/api/v1/live-webinar/1/register \ -H 'X-API-Key: your-api-key' \ -H 'X-Account-Name: myschool' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -d '{ "name": "Robert", "last_name": "Martinez", "email": "robert.m@example.com", "address": "321 Elm St", "city": "Austin", "state": "TX", "phone": "5125559999", "zip_code": "78701" }' ``` ```bash curl -X POST https://api.newzenler.com/api/v1/live-webinar/1/register \ -H 'X-API-Key: your-api-key' \ -H 'X-Account-Name: myschool' \ -H 'Content-Type: application/json' \ -d '{"name": "Robert", "email": "robert.m@example.com"}' ``` -------------------------------- ### POST /api/v1/users Source: https://www.newzenler.com/api/documentation/public/api-doc Adds a new user to the system. ```APIDOC ## POST /api/v1/users ### Description Adds a new user to the system. Requires user details in the request body. ### Method POST ### Endpoint `/api/v1/users` ### Request Body * `first_name` (String) - Required - User's first name. * `last_name` (String) - Required - User's last name. * `email` (String) - Required - User's email address. * `password` (String) - Required - User's password. * `commission` (Number) - Required - User's commission rate. * `roles` (Array of Numbers) - Required - Array of role IDs to assign to the user. #### Optional Attributes * `address` (String) - Optional - User's address. * `city` (String) - Optional - User's city. * `state` (String) - Optional - User's state. * `phone` (String) - Optional - User's phone number. * `zip_code` (String) - Optional - User's zip code. * `country` (String) - Optional - User's country. * `gdpr_consent_status` (Number) - Optional - GDPR consent status (0 for deny, 1 for accept). Applicable for users from European countries. ### Request Example ```json { "first_name": "test", "last_name": "test", "email": "test@example.com", "password": "123456", "commission": 10, "roles": [3, 7], "address": "address1", "city": "city1", "state": "state1", "phone": "11111111", "zip_code": "2222", "country": "country1", "gdpr_consent_status": 1 } ``` ### Response #### Success Response (201) * `response_code` (Number) - Indicates success. * `message` (String) - Confirmation message. * `data` (Object) - Contains details of the added user: * `id` (String) - The unique identifier of the newly added user. * `first_name` (String) - User's first name. * `last_name` (String) - User's last name. * `email` (String) - User's email address. #### Response Example ```json { "response_code": 201, "message": "People added successfully", "data": { "id": "313.5c109f1b58473", "first_name": "test", "last_name": "test", "email": "test123456@example.com" } } ``` ```