Hubb offers Custom Fields for both Sessions and Users. This article will go over how to get a Session Custom Field data from the API using the /Sessions endpoint.
Read on to learn more!
Getting Session Custom Field Data
Use this recommended API call:
GET https://ngapi.hubb.meapi/v1/[eventId]/Sessions?$expand=PropertyValues/PropertyMetadata
Here's an example of the returned data:
The PropertyMetadata object gives information about the Custom Field itself.
- Custom Field Title - "Title"
- Field options - "Options"
- The type of field - "FieldType"
The PropertyValues object gives information about the Custom Field data for the session itself.
- The "Value" field will give you the value for this specific session.
- In the example, it's "Fireside Chat"
You are also able to run the query with only PropertyValues, as shown below:
GET https://ngapi.hubb.meapi/v1/[eventId]/Sessions?$expand=PropertyValues
This will not return the information about the Custom Field, but rather the Session's value for the field.
Still have questions? Need help tweaking this call?
Contact Hubb Support at support@hubb.me for further assistance.