Skip to main content

Accessing the Viewcy Public API for Custom Websites

Viewcy provides a public API endpoint that allows organizations to fetch their upcoming events and courses programmatically. This is ideal for organizations looking to display their Viewcy schedule directly on their own custom website or mobile app.

Turjo Khan avatar
Written by Turjo Khan
Updated over 2 weeks ago

The API Endpoint

To fetch your organization's data, you will need to send a GET request to the following endpoint:

https://www.viewcy.com/api/v1/schools/:username_id/courses

Finding Your Organization's username_id

To use the endpoint, you must replace :username_id with your specific organization identifier. You can find this ID in two ways:

  1. On your Profile: Look for the handle under your organization's name (e.g., if it says @dance_studio_nyc, your ID is dance_studio_nyc).

  2. In your URL: Navigate to your organization's public Viewcy page. The ID is the last part of the URL:

    • https://www.viewcy.com/dance_studio_nyc β†’ ID is dance_studio_nyc

Example: If your organization's ID is my_org, your API URL will be: https://www.viewcy.com/api/v1/schools/my_org/courses

Note: if you change your username, it will render inactive your API endpoint.

Technical Details

Endpoint: GET /api/v1/schools/:username_id/courses Method: GET Purpose: Fetch upcoming events for an organization to display on a custom website.

Response Structure

The API returns a JSON object containing an array of upcoming courses and events. Below is an example of the data structure you will receive:

  {
"data": [
{
"id": 123,
"uuid": "a1b2c3d4-...",
"category_id": 5,
"object": "course",
"name": "Course Name",
"featured_image": "https://...",
"thumbnail_image": "https://...",
"description": "Course description",
"url": "https://viewcy.com/event/a1b2c3d4-...",
"timezone": "America/New_York",
"events": [
{
"object": "event",
"uuid": "e1f2g3h4-...",
"name": "Event Name",
"starts_at": "2025-01-15T19:00:00Z",
"ends_at": "2025-01-15T21:00:00Z",
"book_url": "https://viewcy.com/event/..."
}
],
"tickets": [
{
"object": "ticket",
"uuid": "t1u2v3w4-...",
"name": "General Admission",
"price": 25.00,
"currency": "USD"
}
],
"tags": [
{ "name": "Music", ... }
]
}
]
}

Using the Data

Developers can use this JSON response to build custom schedule cards on your website, including:

  • Images: Use featured_image or thumbnail_image.

  • Booking Links: Use the url (for the main course page) or book_url (for specific event sessions) to direct users to checkout.

  • Dates: Parse starts_at and ends_at to show local times.

If you have questions about integrating this into your website, please contact our support team at support@viewcy.com

Did this answer your question?