Skip to content

Zapier Quickstart

All endpoints require authentication with an API key. You can obtain the API key from your school’s integration settings in the Zapier dashboard.

Me

Get the name of the school associated with the API key.

Terminal window
curl -X GET \
-H "Authorization: Bearer {api_key}" \
https://yourdomain.com/api/v1/zapiers/me

Enroll Course

Get a list of StudentCourseShip records for courses belonging to the school that were created in the past 30 minutes.

Terminal window
curl -G https://kaik.io/v1/api/v1/zapiers/enroll_course \
-H "Authorization: Bearer {token}"
// Response
// Status: 200 OK
// Body:
[
{
"id": "b20784f1-e0d1-46c8-ba6b-9e2d3266da23",
"course": {
"id": "b051c891-9201-4056-a7b9-2e28c23cbfbf",
"name": "Math",
"slug": "math",
"subtitle": "Introduction to Math",
"description": "This course provides an introduction to mathematics for beginners."
},
"user": {
"name": "John Doe",
"email": "johndoe@example.com",
"phone_number": "1234567890"
}
},
{
"id": "cecf1c7b-5a8e-41d2-ae5c-846fb7bfc404",
"course": {
"id": "534456eb-1b70-4d4d-90f6-7f0575c21ac9",
"name": "English",
"slug": "english",
"subtitle": "Introduction to English",
"description": "This course provides an introduction to English for beginners."
},
"user": {
"name": "Jane Doe",
"email": "janedoe@example.com",
"phone_number": "1234567890"
}
}
]

New User

Get a list of User records for students belonging to the school that were created in the past 30 minutes.

Terminal window
curl -G https://kaik.io/v1/api/v1/zapiers/new_user \
-H "Authorization: Bearer {token}"
// Response
// Status: 200 OK
// Body:
[
{
"id": "b20784f1-e0d1-46c8-ba6b-9e2d3266da23",
"name": "John Doe",
"email": "johndoe@example.com",
"phone_number": "1234567890"
},
{
"id": "cecf1c7b-5a8e-41d2-ae5c-846fb7bfc404",
"name": "Jane Doe",
"email": "janedoe@example.com",
"phone_number": "1234567890"
}
]

New Transaction

Get a list of Payment records for payments belonging to the school that were paid in the past 30 minutes.

Terminal window
curl -G https://kaik.io/api/v1/zapiers/new_transaction \
-H "Authorization: Bearer {token}"
// Response
// Status: 200 OK
// Body:
[
{
"id": "b20784f1-e0d1-46c8-ba6b-9e2d3266da23",
"trade_no": "TRADE20220420123456",
"currency": "TWD",
"amount": 5000.0,
"user": {
"name": "John Doe",
"email": "johndoe@example.com",
"phone_number": "1234567890"
}
},
{
"id": "cecf1c7b-5a8e-41d2-ae5c-846fb7bfc404",
"trade_no": "TRADE20220420123457",
"currency": "USD",
"amount": 100.0,
"user": {
"name": "Jane Doe",
"email": "janedoe@example.com",
"phone_number": "1234567890"
}
}
]

New Comment

Get a list of Comment records for comments belonging to the school that were created in the past 30 minutes.

Terminal window
curl -G https://kaik.io/api/v1/zapiers/new_comment \
-H "Authorization: Bearer {token}"
// Response
// Status: 200 OK
// Body:
[
{
"id": "b20784f1-e0d1-46c8-ba6b-9e2d3266da23",
"content": "This is a comment.",
"created_at": "2023-04-20T09:30:00.000Z",
"user": {
"name": "John Doe",
"email": "johndoe@example.com",
"phone_number": "1234567890"
}
},
{
"id": "cecf1c7b-5a8e-41d2-ae5c-846fb7bfc404",
"content": "This is another comment.",
"created_at": "2023-04-20T09:35:00.000Z",
"user": {
"name": "Jane Doe",
"email": "janedoe@example.com",
"phone_number": "1234567890"
}
}
]