Quantcast
Channel: Blog Archives | The Events Calendar
Viewing all articles
Browse latest Browse all 67

Events Calendar Pro REST API Now Supports Additional Fields

$
0
0

If you’re a developer using the REST API with Events Calendar Pro, you’re going to love our latest update. In it we’ve resolved a frustrating issue for anyone creating, updating, and displaying events with additional fields via the REST API.

What’s new?

In our latest release of Events Calendar Pro we’ve added REST API support for additional fields. This represents three key improvements when using the REST API to read, update, or create an event.

  • When an event is read via REST API and displayed somewhere else, any additional fields will also be displayed. Before they were not.
  • In the past, when updating an event via REST API additional field data was reset to its default state, deleting it. This meant someone would manually need to re-populate those fields. Now, that data remains intact.
  • Previously, when creating an event via REST API you were unable to populate additional fields. Now you can!

Understanding additional fields

This may not seem like big news if you’ve never used additional fields before, so let’s talk briefly about what they are and why you might want to use them.

What are additional fields?

Additional fields are just what the name would imply–additional pieces of information that can be attached to your events.

By default, all events have fields for the following information:

  • Time & Date
    • Date
    • Time
  • Event Category
    • Category
  • Location
    • Venue
    • Map
  • Virtual Event
    • Link
  • Organizer
    • Organizer name
    • Phone number
    • Email
  • Event Website
    • URL

On the front end the information in these fields appears below the event description.

With additional fields, which can be added by navigating to Events > Settings > Additional Fields, you’re able to create new fields that are unique to your use case.

Once created, they appear on the editor screen as new options to be configured under the “Additional Event Fields” heading.

Once configured and published, they will appear on the front end along with the default fields.

Why you may want to use additional fields

Additional fields are a great way to highlight essential information that might get lost in an event description. If you’re using our Filter Bar add-on, visitors will be able to filter your events by these fields–making it easy for them to find what they’re most interested in.

Here are some usage examples to give you a broad range of ideas on how users can utilize additional fields to enhance their event listings and provide valuable information to their attendees:

1. Age Group

  • Options: All Ages, 18+, 21+, Kids (5-12), Teens (13-19), Adults (20+)
  • Use Case: This is useful for events that have age restrictions or are targeted at specific age groups, such as concerts, workshops, or community gatherings.

2. Featured Performer(s)

  • Options: (Text field or multi-select)
  • Use Case: For events like concerts, comedy shows, or theater performances, organizers can list the main performers or guest stars. This helps attendees know who they can expect to see.

3. Topic

  • Options: (Text field or dropdown with predefined topics)
  • Use Case: For conferences, seminars, or workshops, organizers can specify the main topic or theme of the event, such as “Digital Marketing,” “Artificial Intelligence,” or “Sustainable Living.”

4. Skill Level

  • Options: Beginner, Intermediate, Advanced
  • Use Case: This is particularly useful for workshops, training sessions, or classes where the content is tailored to specific skill levels.

5. Language

  • Options: English, Spanish, French, German, etc.
  • Use Case: For events that are conducted in a specific language, this field helps attendees know if the event is suitable for them based on their language proficiency.

6. Dress Code

  • Options: Casual, Business Casual, Formal, Black Tie, Costume
  • Use Case: This is useful for events like galas, parties, or networking events where the dress code is important for attendees to know in advance.

7. Food Options

  • Options: Vegetarian, Vegan, Gluten-Free, Kosher, Halal, etc.
  • Use Case: For events that include catering or food services, organizers can specify the available food options to accommodate dietary restrictions.

8. Ticket Type

  • Options: General Admission, VIP, Early Bird, Student, Senior
  • Use Case: This helps attendees understand the different ticket options available for the event, giving them the ability to filter events by ticket type.

9. Networking Opportunities

  • Options: Yes, No
  • Use Case: For business events, conferences, or meetups, organizers can indicate whether there will be dedicated networking sessions or opportunities.

10. Accessibility Information

  • Options: Wheelchair Accessible, Sign Language Interpreter, Hearing Loop, etc.
  • Use Case: This helps ensure that the event is inclusive and accessible to all attendees, including those with disabilities.

11. Sponsors

  • Options: (Text field or multi-select)
  • Use Case: For events that are sponsored by companies or organizations, organizers can list the sponsors to give them visibility and credit.

12. Event Format

  • Options: In-Person, Virtual, Hybrid
  • Use Case: This is particularly relevant in today’s world where events can be held in various formats. Attendees can know if they need to attend in person or if they can join online.

13. Required Materials

  • Options: (Text field)
  • Use Case: For workshops or classes, organizers can list any materials or tools that attendees need to bring, such as laptops, notebooks, or specific software.

14. Parking Information

  • Options: Free Parking, Paid Parking, Street Parking, Parking Garage
  • Use Case: This helps attendees plan their transportation and know what to expect in terms of parking availability and costs.

15. Event Hashtag

  • Options: (Text field)
  • Use Case: For events that encourage social media interaction, organizers can specify a unique hashtag for attendees to use when posting about the event.

16. Weather Considerations

  • Options: Indoor, Outdoor, Rain or Shine
  • Use Case: For outdoor events, this field can inform attendees about the event’s rain policy or if they should dress for the weather.

17. Event Type

  • Options: Conference, Workshop, Seminar, Networking, Festival, Exhibition, Webinar, Meetup, etc
  • Use Case: This field helps categorize the event, making it easier for attendees to understand the nature of the event at a glance.

18. Social Media Links

  • Options: (Text field or multiple fields for different platforms)
  • Use Case: Organizers can provide links to the event’s social media pages, allowing attendees to follow for updates and engage with the community.

19. Event Badge or Pass

  • Options: (Text field or url field)
  • Use Case: For events that require badges or passes for entry, organizers can provide information on how to obtain them.

20. Registration URL

  • Options: (URL field)
  • Use Case: This is particularly useful for events that require external registration, have detailed information on a separate site, or are part of a larger series or organization. Attendees can easily access additional details or sign up without needing to search for the link.

REST API Endpoints

To read your event’s details you can send a GET request to the API endpoint your-site/wp-json/tribe/events/v1/events/{your-event-id}

The JSON response of that endpoint will include all your additional fields as well! 

You can create a new event or edit an existing one by sending a POST request to the same API endpoint. The Additional Fields are now fully supported!

Enjoy a better REST API experience with Additional Fields

We’ve got more amazing updates coming in the weeks ahead, but in the meantime we hope those of you using the REST API with Events Calendar Pro enjoy this improved experience. Stay tuned for more!

The post Events Calendar Pro REST API Now Supports Additional Fields appeared first on The Events Calendar.


Viewing all articles
Browse latest Browse all 67

Trending Articles