Skip to content

Instantly share code, notes, and snippets.

@logichub
Last active January 23, 2019 19:35
Show Gist options
  • Save logichub/69f21ffed97e4313638b0a59e44c3efb to your computer and use it in GitHub Desktop.
Save logichub/69f21ffed97e4313638b0a59e44c3efb to your computer and use it in GitHub Desktop.
{
"swagger":"2.0",
"info":{
"version":"1.0.0",
"title":"The Events Calendar REST API",
"description":"The Events Calendar REST API allows accessing upcoming events information easily and conveniently."
},
"host":"wpshindig.com",
"basePath":"\/wp-json\/tribe\/events\/v1\/",
"schemes":[
"https",
"http"
],
"consumes":[
"application\/json"
],
"produces":[
"application\/json"
],
"paths":{
"\/doc":{
"get":{
"responses":{
"200":{
"description":"Returns the documentation for The Events Calendar REST API in Swagger consumable format."
}
}
}
},
"\/events":{
"get":{
"parameters":[
{
"in":"query",
"type":"integer",
"description":"The archive page to return",
"required":false,
"default":1,
"name":"page"
},
{
"in":"query",
"type":"integer",
"description":"The number of events to return on each page",
"required":false,
"default":"10",
"name":"per_page"
},
{
"in":"query",
"type":"string",
"description":"Events should start after the specified date",
"required":false,
"default":"2019-01-22 15:59:00",
"name":"start_date"
},
{
"in":"query",
"type":"string",
"description":"Events should start before the specified date",
"required":false,
"default":"2021-01-23 19:16:56",
"name":"end_date"
},
{
"in":"query",
"type":"string",
"description":"Events should contain the specified string in the title or description",
"required":false,
"default":"",
"name":"search"
},
{
"in":"query",
"type":"array",
"description":"Events should be assigned one of the specified categories slugs or IDs",
"required":false,
"default":"",
"name":"categories",
"collectionFormat":"csv",
"items":{
"type":"integer"
}
},
{
"in":"query",
"type":"array",
"description":"Events should be assigned one of the specified tags slugs or IDs",
"required":false,
"default":"",
"name":"tags",
"collectionFormat":"csv",
"items":{
"type":"integer"
}
},
{
"in":"query",
"type":"array",
"description":"Events should be assigned one of the specified venue IDs",
"required":false,
"default":"",
"name":"venue",
"collectionFormat":"csv",
"items":{
"type":"integer"
}
},
{
"in":"query",
"type":"array",
"description":"Events should be assigned one of the specified organizer IDs",
"required":false,
"default":"",
"name":"organizer",
"collectionFormat":"csv",
"items":{
"type":"integer"
}
},
{
"in":"query",
"type":"boolean",
"description":"Events should be filtered by their featured status",
"required":false,
"default":"",
"name":"featured"
},
{
"in":"query",
"type":"string",
"description":"The event post status",
"required":false,
"default":"",
"name":"status"
},
{
"in":"query",
"type":"boolean",
"description":"Requires Events Calendar Pro. Events should be filtered by whether their venue has geolocation data",
"required":false,
"default":"",
"name":"geoloc"
},
{
"in":"query",
"type":"number",
"description":"Requires Events Calendar Pro. Events should be filtered by their venue latitude location, must also provide geoloc_lng",
"required":false,
"default":"",
"name":"geoloc_lat"
},
{
"in":"query",
"type":"number",
"description":"Requires Events Calendar Pro. Events should be filtered by their venue longitude location, must also provide geoloc_lat",
"required":false,
"default":"",
"name":"geoloc_lng"
},
{
"in":"query",
"type":"array",
"description":"Include events with one of the post IDs specified in the array of CSV list, date filters will be ignored.",
"required":false,
"default":"",
"name":"include",
"collectionFormat":"csv",
"items":{
"type":"integer"
}
},
{
"in":"query",
"type":"integer",
"description":"Events should be filtered by their post_parent being the specified one.",
"required":false,
"default":"",
"name":"post_parent"
}
],
"responses":{
"200":{
"description":"Returns all the upcoming events matching the search criteria",
"schema":{
"title":"events",
"type":"array",
"items":{
"$ref":"#\/definitions\/Event"
}
}
},
"400":{
"description":"One or more of the specified query variables has a bad format"
},
"404":{
"description":"The requested page was not found."
}
}
}
},
"\/events\/{id}":{
"get":{
"parameters":[
{
"in":"path",
"type":"integer",
"description":"the event post ID",
"required":true,
"default":"",
"name":"id"
}
],
"responses":{
"200":{
"description":"Returns the data of the event with the specified post ID",
"schema":{
"$ref":"#\/definitions\/Event"
}
},
"400":{
"description":"The event post ID is missing."
},
"403":{
"description":"The event with the specified ID is not accessible."
},
"404":{
"description":"An event with the specified ID does not exist."
}
}
},
"post":{
"consumes":[
"application\/x-www-form-urlencoded"
],
"parameters":[
{
"in":"path",
"type":"integer",
"description":"the event post ID",
"required":true,
"default":"",
"name":"id"
},
{
"in":"formData",
"type":"integer",
"description":"The event author ID",
"required":false,
"default":"",
"name":"author"
},
{
"in":"formData",
"type":"string",
"description":"The event publication date",
"required":false,
"default":"",
"name":"date"
},
{
"in":"formData",
"type":"string",
"description":"The event publication date (UTC time zone)",
"required":false,
"default":"",
"name":"date_utc"
},
{
"in":"formData",
"type":"string",
"description":"The event title",
"required":true,
"default":"",
"name":"title"
},
{
"in":"formData",
"type":"string",
"description":"The event description",
"required":false,
"default":"",
"name":"description"
},
{
"in":"formData",
"type":"string",
"description":"The event slug",
"required":false,
"default":"",
"name":"slug"
},
{
"in":"formData",
"type":"string",
"description":"The event excerpt",
"required":false,
"default":"",
"name":"excerpt"
},
{
"in":"formData",
"type":"string",
"description":"The event post status",
"required":false,
"default":"",
"name":"status"
},
{
"in":"formData",
"type":"string",
"description":"The event time zone",
"required":false,
"default":"",
"name":"timezone"
},
{
"in":"formData",
"type":"boolean",
"description":"Whether the event lasts the whole day or not",
"required":false,
"default":"",
"name":"all_day"
},
{
"in":"formData",
"type":"string",
"description":"The event start date and time",
"required":true,
"default":"",
"name":"start_date"
},
{
"in":"formData",
"type":"string",
"description":"The event end date and time",
"required":true,
"default":"",
"name":"end_date"
},
{
"in":"formData",
"type":"string",
"description":"The event featured image ID or URL",
"required":false,
"default":"",
"name":"image"
},
{
"in":"formData",
"type":"string",
"description":"The event cost",
"required":false,
"default":"",
"name":"cost"
},
{
"in":"formData",
"type":"string",
"description":"The event website URL",
"required":false,
"default":"",
"name":"website"
},
{
"in":"formData",
"type":"boolean",
"description":"Whether the event should show a map or not",
"required":false,
"default":"",
"name":"show_map"
},
{
"in":"formData",
"type":"boolean",
"description":"Whether the event should show a map link or not",
"required":false,
"default":"",
"name":"show_map_link"
},
{
"in":"formData",
"type":"boolean",
"description":"Whether events should be hidden in the calendar view or not",
"required":false,
"default":"",
"name":"hide_from_listings"
},
{
"in":"formData",
"type":"boolean",
"description":"Whether the event should be sticky in the calendar view or not",
"required":false,
"default":"",
"name":"sticky"
},
{
"in":"formData",
"type":"boolean",
"description":"Whether the event should be featured on the site or not",
"required":false,
"default":"",
"name":"featured"
},
{
"in":"formData",
"type":"array",
"description":"The event category ID or name",
"required":false,
"default":"",
"name":"categories"
},
{
"in":"formData",
"type":"array",
"description":"The event tag ID or name",
"required":false,
"default":"",
"name":"tags"
},
{
"in":"formData",
"type":"array",
"description":"The event venue ID or data",
"required":false,
"default":"",
"name":"venue",
"items":{
"type":"integer"
}
},
{
"in":"formData",
"type":"array",
"description":"The event organizer IDs or data",
"required":false,
"default":"",
"name":"organizer",
"items":{
"type":"integer"
}
}
],
"responses":{
"200":{
"description":"Returns the data of the updated event",
"schema":{
"$ref":"#\/definitions\/Event"
}
},
"201":{
"description":"Returns the data of the created event",
"schema":{
"$ref":"#\/definitions\/Event"
}
},
"400":{
"description":"A required parameter is missing or an input parameter is in the wrong format"
},
"403":{
"description":"The user is not authorized to create events"
}
}
},
"delete":{
"parameters":[
{
"in":"path",
"type":"integer",
"description":"the event post ID",
"required":true,
"default":"",
"name":"id"
}
],
"responses":{
"200":{
"description":"Deletes an event and returns its data",
"schema":{
"$ref":"#\/definitions\/Event"
}
},
"400":{
"description":"The event post ID is missing or does not exist."
},
"403":{
"description":"The current user cannot delete the event with the specified ID."
},
"410":{
"description":"The event with the specified ID has been deleted already."
},
"500":{
"description":"The event with the specified ID could not be deleted."
}
}
}
},
"\/events\/by-slug\/{slug}":{
"get":{
"parameters":[
{
"in":"path",
"type":"string",
"description":"the event post name",
"required":true,
"default":"",
"name":"slug"
}
],
"responses":{
"200":{
"description":"Returns the data of the event with the specified post ID",
"schema":{
"$ref":"#\/definitions\/Event"
}
},
"400":{
"description":"The event post ID is missing."
},
"403":{
"description":"The event with the specified ID is not accessible."
},
"404":{
"description":"An event with the specified ID does not exist."
}
}
},
"post":{
"consumes":[
"application\/x-www-form-urlencoded"
],
"parameters":[
{
"in":"formData",
"type":"string",
"description":"The event slug",
"required":false,
"default":"",
"name":"slug"
},
{
"in":"formData",
"type":"integer",
"description":"The event author ID",
"required":false,
"default":"",
"name":"author"
},
{
"in":"formData",
"type":"string",
"description":"The event publication date",
"required":false,
"default":"",
"name":"date"
},
{
"in":"formData",
"type":"string",
"description":"The event publication date (UTC time zone)",
"required":false,
"default":"",
"name":"date_utc"
},
{
"in":"formData",
"type":"string",
"description":"The event title",
"required":true,
"default":"",
"name":"title"
},
{
"in":"formData",
"type":"string",
"description":"The event description",
"required":false,
"default":"",
"name":"description"
},
{
"in":"formData",
"type":"string",
"description":"The event excerpt",
"required":false,
"default":"",
"name":"excerpt"
},
{
"in":"formData",
"type":"string",
"description":"The event post status",
"required":false,
"default":"",
"name":"status"
},
{
"in":"formData",
"type":"string",
"description":"The event time zone",
"required":false,
"default":"",
"name":"timezone"
},
{
"in":"formData",
"type":"boolean",
"description":"Whether the event lasts the whole day or not",
"required":false,
"default":"",
"name":"all_day"
},
{
"in":"formData",
"type":"string",
"description":"The event start date and time",
"required":true,
"default":"",
"name":"start_date"
},
{
"in":"formData",
"type":"string",
"description":"The event end date and time",
"required":true,
"default":"",
"name":"end_date"
},
{
"in":"formData",
"type":"string",
"description":"The event featured image ID or URL",
"required":false,
"default":"",
"name":"image"
},
{
"in":"formData",
"type":"string",
"description":"The event cost",
"required":false,
"default":"",
"name":"cost"
},
{
"in":"formData",
"type":"string",
"description":"The event website URL",
"required":false,
"default":"",
"name":"website"
},
{
"in":"formData",
"type":"boolean",
"description":"Whether the event should show a map or not",
"required":false,
"default":"",
"name":"show_map"
},
{
"in":"formData",
"type":"boolean",
"description":"Whether the event should show a map link or not",
"required":false,
"default":"",
"name":"show_map_link"
},
{
"in":"formData",
"type":"boolean",
"description":"Whether events should be hidden in the calendar view or not",
"required":false,
"default":"",
"name":"hide_from_listings"
},
{
"in":"formData",
"type":"boolean",
"description":"Whether the event should be sticky in the calendar view or not",
"required":false,
"default":"",
"name":"sticky"
},
{
"in":"formData",
"type":"boolean",
"description":"Whether the event should be featured on the site or not",
"required":false,
"default":"",
"name":"featured"
},
{
"in":"formData",
"type":"array",
"description":"The event category ID or name",
"required":false,
"default":"",
"name":"categories"
},
{
"in":"formData",
"type":"array",
"description":"The event tag ID or name",
"required":false,
"default":"",
"name":"tags"
},
{
"in":"formData",
"type":"array",
"description":"The event venue ID or data",
"required":false,
"default":"",
"name":"venue",
"items":{
"type":"integer"
}
},
{
"in":"formData",
"type":"array",
"description":"The event organizer IDs or data",
"required":false,
"default":"",
"name":"organizer",
"items":{
"type":"integer"
}
}
],
"responses":{
"200":{
"description":"Returns the data of the updated event",
"schema":{
"$ref":"#\/definitions\/Event"
}
},
"201":{
"description":"Returns the data of the created event",
"schema":{
"$ref":"#\/definitions\/Event"
}
},
"400":{
"description":"A required parameter is missing or an input parameter is in the wrong format"
},
"403":{
"description":"The user is not authorized to create events"
}
}
},
"delete":{
"parameters":[
{
"in":"path",
"type":"string",
"description":"the event post name",
"required":true,
"default":"",
"name":"slug"
}
],
"responses":{
"200":{
"description":"Deletes an event and returns its data",
"schema":{
"$ref":"#\/definitions\/Event"
}
},
"400":{
"description":"The event post ID is missing or does not exist."
},
"403":{
"description":"The current user cannot delete the event with the specified ID."
},
"410":{
"description":"The event with the specified ID has been deleted already."
},
"500":{
"description":"The event with the specified ID could not be deleted."
}
}
}
},
"\/venues":{
"get":{
"parameters":[
{
"in":"query",
"type":"integer",
"description":"The archive page to return",
"required":false,
"default":1,
"name":"page"
},
{
"in":"query",
"type":"integer",
"description":"The number of venues to return on each page",
"required":false,
"default":"10",
"name":"per_page"
},
{
"in":"query",
"type":"string",
"description":"Venues should contain the specified string in the title, description or custom fields",
"required":false,
"default":"",
"name":"search"
},
{
"in":"query",
"type":"integer",
"description":"Venues should be related to this event",
"required":false,
"default":"",
"name":"event"
},
{
"in":"query",
"type":"boolean",
"description":"Venues should have events associated to them",
"required":false,
"default":"",
"name":"has_events"
},
{
"in":"query",
"type":"boolean",
"description":"Venues should have upcoming events associated to them",
"required":false,
"default":"",
"name":"only_with_upcoming"
},
{
"in":"query",
"type":"string",
"description":"The organizer post status",
"required":false,
"default":"",
"name":"status"
}
],
"responses":{
"200":{
"description":"Returns all the venues matching the search criteria",
"schema":{
"title":"venues",
"type":"array",
"items":{
"$ref":"#\/definitions\/Venue"
}
}
},
"400":{
"description":"One or more of the specified query variables has a bad format"
},
"404":{
"description":"The requested page was not found."
}
}
}
},
"\/venues\/{id}":{
"get":{
"parameters":[
{
"in":"path",
"type":"integer",
"description":"the venue post ID",
"required":true,
"default":"",
"name":"id"
}
],
"responses":{
"200":{
"description":"Returns the data of the venue with the specified post ID",
"schema":{
"$ref":"#\/definitions\/Venue"
}
},
"400":{
"description":"The venue post ID is missing."
},
"403":{
"description":"The venue with the specified ID is not accessible."
},
"404":{
"description":"A venue with the specified post ID does not exist."
}
}
},
"post":{
"consumes":[
"application\/x-www-form-urlencoded"
],
"parameters":[
{
"in":"path",
"type":"integer",
"description":"the venue post ID",
"required":true,
"default":"",
"name":"id"
},
{
"in":"formData",
"type":"integer",
"description":"The venue author ID",
"required":false,
"default":"",
"name":"author"
},
{
"in":"formData",
"type":"string",
"description":"The venue publication date",
"required":false,
"default":"",
"name":"date"
},
{
"in":"formData",
"type":"string",
"description":"The venue publication date (UTC time zone)",
"required":false,
"default":"",
"name":"date_utc"
},
{
"in":"formData",
"type":"string",
"description":"The venue name",
"required":true,
"default":"",
"name":"venue"
},
{
"in":"formData",
"type":"string",
"description":"The venue description",
"required":false,
"default":"",
"name":"description"
},
{
"in":"formData",
"type":"string",
"description":"The venue post status",
"required":false,
"default":"",
"name":"status"
},
{
"in":"formData",
"type":"string",
"description":"Whether events linked to the venue should show a map or not",
"required":false,
"default":"",
"name":"show_map"
},
{
"in":"formData",
"type":"string",
"description":"Whether events linked to the venue should show a map link or not",
"required":false,
"default":"",
"name":"show_map_link"
},
{
"in":"formData",
"type":"string",
"description":"The venue address",
"required":false,
"default":"",
"name":"address"
},
{
"in":"formData",
"type":"string",
"description":"The venue city",
"required":false,
"default":"",
"name":"city"
},
{
"in":"formData",
"type":"string",
"description":"The venue country",
"required":false,
"default":"",
"name":"country"
},
{
"in":"formData",
"type":"string",
"description":"The venue province",
"required":false,
"default":"",
"name":"province"
},
{
"in":"formData",
"type":"string",
"description":"The venue state",
"required":false,
"default":"",
"name":"state"
},
{
"in":"formData",
"type":"string",
"description":"The venue ZIP code",
"required":false,
"default":"",
"name":"zip"
},
{
"in":"formData",
"type":"string",
"description":"The venue phone number",
"required":false,
"default":"",
"name":"phone"
},
{
"in":"formData",
"type":"string",
"description":"The venue state and province",
"required":false,
"default":"",
"name":"stateprovince"
},
{
"in":"formData",
"type":"string",
"description":"The venue website URL",
"required":false,
"default":"",
"name":"website"
},
{
"in":"formData",
"type":"string",
"description":"The organizer featured image ID or URL",
"required":false,
"default":"",
"name":"image"
}
],
"responses":{
"200":{
"description":"Returns the data of the updated venue",
"schema":{
"$ref":"#\/definitions\/Venue"
}
},
"201":{
"description":"Returns the data of the created venue",
"schema":{
"$ref":"#\/definitions\/Venue"
}
},
"400":{
"description":"A required parameter is missing or an input parameter is in the wrong format"
},
"403":{
"description":"The user is not authorized to create venues"
}
}
},
"delete":{
"parameters":[
{
"in":"path",
"type":"integer",
"description":"the venue post ID",
"required":true,
"default":"",
"name":"id"
}
],
"responses":{
"200":{
"description":"Deletes a venue and returns its data",
"schema":{
"$ref":"#\/definitions\/Venue"
}
},
"400":{
"description":"The venue post ID is missing or does not exist."
},
"403":{
"description":"The current user cannot delete the venue with the specified ID."
},
"410":{
"description":"The venue with the specified ID has been deleted already."
},
"500":{
"description":"The venue with the specified ID could not be deleted."
}
}
}
},
"\/venues\/by-slug\/{slug}":{
"get":{
"parameters":[
{
"in":"path",
"type":"string",
"description":"the venue post name",
"required":true,
"default":"",
"name":"slug"
}
],
"responses":{
"200":{
"description":"Returns the data of the venue with the specified post ID",
"schema":{
"$ref":"#\/definitions\/Venue"
}
},
"400":{
"description":"The venue post ID is missing."
},
"403":{
"description":"The venue with the specified ID is not accessible."
},
"404":{
"description":"A venue with the specified post ID does not exist."
}
}
},
"post":{
"consumes":[
"application\/x-www-form-urlencoded"
],
"parameters":[
{
"in":"path",
"type":"string",
"description":"the venue post name",
"required":true,
"default":"",
"name":"slug"
},
{
"in":"formData",
"type":"integer",
"description":"The venue author ID",
"required":false,
"default":"",
"name":"author"
},
{
"in":"formData",
"type":"string",
"description":"The venue publication date",
"required":false,
"default":"",
"name":"date"
},
{
"in":"formData",
"type":"string",
"description":"The venue publication date (UTC time zone)",
"required":false,
"default":"",
"name":"date_utc"
},
{
"in":"formData",
"type":"string",
"description":"The venue name",
"required":true,
"default":"",
"name":"venue"
},
{
"in":"formData",
"type":"string",
"description":"The venue description",
"required":false,
"default":"",
"name":"description"
},
{
"in":"formData",
"type":"string",
"description":"The venue post status",
"required":false,
"default":"",
"name":"status"
},
{
"in":"formData",
"type":"string",
"description":"Whether events linked to the venue should show a map or not",
"required":false,
"default":"",
"name":"show_map"
},
{
"in":"formData",
"type":"string",
"description":"Whether events linked to the venue should show a map link or not",
"required":false,
"default":"",
"name":"show_map_link"
},
{
"in":"formData",
"type":"string",
"description":"The venue address",
"required":false,
"default":"",
"name":"address"
},
{
"in":"formData",
"type":"string",
"description":"The venue city",
"required":false,
"default":"",
"name":"city"
},
{
"in":"formData",
"type":"string",
"description":"The venue country",
"required":false,
"default":"",
"name":"country"
},
{
"in":"formData",
"type":"string",
"description":"The venue province",
"required":false,
"default":"",
"name":"province"
},
{
"in":"formData",
"type":"string",
"description":"The venue state",
"required":false,
"default":"",
"name":"state"
},
{
"in":"formData",
"type":"string",
"description":"The venue ZIP code",
"required":false,
"default":"",
"name":"zip"
},
{
"in":"formData",
"type":"string",
"description":"The venue phone number",
"required":false,
"default":"",
"name":"phone"
},
{
"in":"formData",
"type":"string",
"description":"The venue state and province",
"required":false,
"default":"",
"name":"stateprovince"
},
{
"in":"formData",
"type":"string",
"description":"The venue website URL",
"required":false,
"default":"",
"name":"website"
},
{
"in":"formData",
"type":"string",
"description":"The organizer featured image ID or URL",
"required":false,
"default":"",
"name":"image"
}
],
"responses":{
"200":{
"description":"Returns the data of the updated venue",
"schema":{
"$ref":"#\/definitions\/Venue"
}
},
"201":{
"description":"Returns the data of the created venue",
"schema":{
"$ref":"#\/definitions\/Venue"
}
},
"400":{
"description":"A required parameter is missing or an input parameter is in the wrong format"
},
"403":{
"description":"The user is not authorized to create venues"
}
}
},
"delete":{
"parameters":[
{
"in":"path",
"type":"string",
"description":"the venue post name",
"required":true,
"default":"",
"name":"slug"
}
],
"responses":{
"200":{
"description":"Deletes a venue and returns its data",
"schema":{
"$ref":"#\/definitions\/Venue"
}
},
"400":{
"description":"The venue post ID is missing or does not exist."
},
"403":{
"description":"The current user cannot delete the venue with the specified ID."
},
"410":{
"description":"The venue with the specified ID has been deleted already."
},
"500":{
"description":"The venue with the specified ID could not be deleted."
}
}
}
},
"\/organizers":{
"get":{
"parameters":[
{
"in":"query",
"type":"integer",
"description":"The archive page to return",
"required":false,
"default":1,
"name":"page"
},
{
"in":"query",
"type":"integer",
"description":"The number of organizers to return on each page",
"required":false,
"default":"10",
"name":"per_page"
},
{
"in":"query",
"type":"string",
"description":"Organizers should contain the specified string in the title, description or custom fields",
"required":false,
"default":"",
"name":"search"
},
{
"in":"query",
"type":"integer",
"description":"Organizers should be related to this event",
"required":false,
"default":"",
"name":"event"
},
{
"in":"query",
"type":"boolean",
"description":"Organizers should have events associated to them",
"required":false,
"default":"",
"name":"has_events"
},
{
"in":"query",
"type":"boolean",
"description":"Organizers should have upcoming events associated to them",
"required":false,
"default":"",
"name":"only_with_upcoming"
},
{
"in":"query",
"type":"string",
"description":"The organizer post status",
"required":false,
"default":"",
"name":"status"
}
],
"responses":{
"200":{
"description":"Returns all the organizers matching the search criteria",
"schema":{
"title":"organizers",
"type":"array",
"items":{
"$ref":"#\/definitions\/Organizer"
}
}
},
"400":{
"description":"One or more of the specified query variables has a bad format"
},
"404":{
"description":"The requested page was not found."
}
}
}
},
"\/organizers\/{id}":{
"get":{
"parameters":[
{
"in":"path",
"type":"integer",
"description":"the organizer post ID",
"required":true,
"default":"",
"name":"id"
}
],
"responses":{
"200":{
"description":"Returns the data of the organizer with the specified post ID",
"schema":{
"$ref":"#\/definitions\/Organizer"
}
},
"400":{
"description":"The organizer post ID is missing."
},
"403":{
"description":"The organizer with the specified ID is not accessible."
},
"404":{
"description":"An organizer with the specified event does not exist."
}
}
},
"post":{
"consumes":[
"application\/x-www-form-urlencoded"
],
"parameters":[
{
"in":"path",
"type":"integer",
"description":"the organizer post ID",
"required":true,
"default":"",
"name":"id"
},
{
"in":"formData",
"type":"integer",
"description":"The organizer author ID",
"required":false,
"default":"",
"name":"author"
},
{
"in":"formData",
"type":"string",
"description":"The organizer publication date",
"required":false,
"default":"",
"name":"date"
},
{
"in":"formData",
"type":"string",
"description":"The organizer publication date (UTC time zone)",
"required":false,
"default":"",
"name":"date_utc"
},
{
"in":"formData",
"type":"string",
"description":"The organizer name",
"required":true,
"default":"",
"name":"organizer"
},
{
"in":"formData",
"type":"string",
"description":"The organizer description",
"required":false,
"default":"",
"name":"description"
},
{
"in":"formData",
"type":"string",
"description":"The organizer post status",
"required":false,
"default":"",
"name":"status"
},
{
"in":"formData",
"type":"string",
"description":"The organizer phone number",
"required":false,
"default":"",
"name":"phone"
},
{
"in":"formData",
"type":"string",
"description":"The organizer website",
"required":false,
"default":"",
"name":"website"
},
{
"in":"formData",
"type":"string",
"description":"The organizer e-mail address",
"required":false,
"default":"",
"name":"email"
},
{
"in":"formData",
"type":"string",
"description":"The organizer featured image ID or URL",
"required":false,
"default":"",
"name":"image"
}
],
"responses":{
"201":{
"description":"Returns the data of the created organizer",
"schema":{
"$ref":"#\/definitions\/Organizer"
}
},
"400":{
"description":"A required parameter is missing or an input parameter is in the wrong format"
},
"403":{
"description":"The user is not authorized to create organizers"
}
}
},
"delete":{
"parameters":[
{
"in":"path",
"type":"integer",
"description":"the organizer post ID",
"required":true,
"default":"",
"name":"id"
}
],
"responses":{
"200":{
"description":"Deletes an organizer and returns its data",
"schema":{
"$ref":"#\/definitions\/Organizer"
}
},
"400":{
"description":"The organizer post ID is missing or does not exist."
},
"403":{
"description":"The current user cannot delete the organizer with the specified ID."
},
"410":{
"description":"The organizer with the specified ID has been deleted already."
},
"500":{
"description":"The organizer with the specified ID could not be deleted."
}
}
}
},
"\/organizers\/by-slug\/{slug}":{
"get":{
"parameters":[
{
"in":"path",
"type":"string",
"description":"the organizer post name",
"required":true,
"default":"",
"name":"slug"
}
],
"responses":{
"200":{
"description":"Returns the data of the organizer with the specified post ID",
"schema":{
"$ref":"#\/definitions\/Organizer"
}
},
"400":{
"description":"The organizer post ID is missing."
},
"403":{
"description":"The organizer with the specified ID is not accessible."
},
"404":{
"description":"An organizer with the specified event does not exist."
}
}
},
"post":{
"consumes":[
"application\/x-www-form-urlencoded"
],
"parameters":[
{
"in":"path",
"type":"string",
"description":"the organizer post name",
"required":true,
"default":"",
"name":"slug"
},
{
"in":"formData",
"type":"integer",
"description":"The organizer author ID",
"required":false,
"default":"",
"name":"author"
},
{
"in":"formData",
"type":"string",
"description":"The organizer publication date",
"required":false,
"default":"",
"name":"date"
},
{
"in":"formData",
"type":"string",
"description":"The organizer publication date (UTC time zone)",
"required":false,
"default":"",
"name":"date_utc"
},
{
"in":"formData",
"type":"string",
"description":"The organizer name",
"required":true,
"default":"",
"name":"organizer"
},
{
"in":"formData",
"type":"string",
"description":"The organizer description",
"required":false,
"default":"",
"name":"description"
},
{
"in":"formData",
"type":"string",
"description":"The organizer post status",
"required":false,
"default":"",
"name":"status"
},
{
"in":"formData",
"type":"string",
"description":"The organizer phone number",
"required":false,
"default":"",
"name":"phone"
},
{
"in":"formData",
"type":"string",
"description":"The organizer website",
"required":false,
"default":"",
"name":"website"
},
{
"in":"formData",
"type":"string",
"description":"The organizer e-mail address",
"required":false,
"default":"",
"name":"email"
},
{
"in":"formData",
"type":"string",
"description":"The organizer featured image ID or URL",
"required":false,
"default":"",
"name":"image"
}
],
"responses":{
"201":{
"description":"Returns the data of the created organizer",
"schema":{
"$ref":"#\/definitions\/Organizer"
}
},
"400":{
"description":"A required parameter is missing or an input parameter is in the wrong format"
},
"403":{
"description":"The user is not authorized to create organizers"
}
}
},
"delete":{
"parameters":[
{
"in":"path",
"type":"string",
"description":"the organizer post name",
"required":true,
"default":"",
"name":"slug"
}
],
"responses":{
"200":{
"description":"Deletes an organizer and returns its data",
"schema":{
"$ref":"#\/definitions\/Organizer"
}
},
"400":{
"description":"The organizer post ID is missing or does not exist."
},
"403":{
"description":"The current user cannot delete the organizer with the specified ID."
},
"410":{
"description":"The organizer with the specified ID has been deleted already."
},
"500":{
"description":"The organizer with the specified ID could not be deleted."
}
}
}
},
"\/categories":{
"get":{
"parameters":[
{
"in":"query",
"type":"integer",
"description":"The archive page to return",
"required":false,
"default":1,
"name":"page"
},
{
"in":"query",
"type":"integer",
"description":"The number of event categories to return on each page",
"required":false,
"default":"10",
"name":"per_page"
},
{
"in":"query",
"type":"string",
"description":"Limit results to those matching a string",
"required":false,
"default":"",
"name":"search"
},
{
"in":"query",
"type":"array",
"description":"Ensure result set exclude specific IDs",
"required":false,
"default":"",
"name":"exclude",
"items":{
"type":"integer"
}
},
{
"in":"query",
"type":"array",
"description":"Limit result set to specific IDs",
"required":false,
"default":"",
"name":"include",
"items":{
"type":"integer"
}
},
{
"in":"query",
"type":"string",
"description":"Order sort attribute ascending or descending",
"required":false,
"default":"",
"name":"order"
},
{
"in":"query",
"type":"string",
"description":"Sort collection by term attribute",
"required":false,
"default":"",
"name":"orderby"
},
{
"in":"query",
"type":"boolean",
"description":"Whether to hide terms not assigned to any posts",
"required":false,
"default":"1",
"name":"hide_empty"
},
{
"in":"query",
"type":"integer",
"description":"Limit result set to terms assigned to a specific parent",
"required":false,
"default":"",
"name":"parent"
},
{
"in":"query",
"type":"integer",
"description":"Limit result set to terms assigned to a specific post",
"required":false,
"default":"",
"name":"post"
},
{
"in":"query",
"type":"integer",
"description":"Limit result set to terms assigned to a specific event (an alias of the \"post\" parameter)",
"required":false,
"default":"",
"name":"event"
},
{
"in":"query",
"type":"string",
"description":"Limit result set to terms with a specific slug",
"required":false,
"default":"",
"name":"slug"
}
],
"responses":{
"200":{
"description":"Returns all the event categories matching the search criteria",
"schema":{
"title":"categories",
"type":"array",
"items":{
"$ref":"#\/definitions\/Term"
}
}
},
"400":{
"description":"One or more of the specified query variables has a bad format"
},
"404":{
"description":"The requested page was not found."
}
}
}
},
"\/categories\/{id}":{
"get":{
"parameters":[
{
"in":"path",
"type":"integer",
"description":"the event category term ID",
"required":true,
"default":"",
"name":"id"
}
],
"responses":{
"200":{
"description":"Returns the data of the event category with the specified term ID",
"schema":{
"$ref":"#\/definitions\/Term"
}
},
"400":{
"description":"The event category term ID is missing."
},
"404":{
"description":"An event category with the specified term ID does not exist."
}
}
},
"post":{
"consumes":[
"application\/x-www-form-urlencoded"
],
"parameters":[
{
"in":"path",
"type":"integer",
"description":"the event category term ID",
"required":true,
"default":"",
"name":"id"
},
{
"in":"formData",
"type":"string",
"description":"The event category name",
"required":true,
"default":"",
"name":"name"
},
{
"in":"formData",
"type":"string",
"description":"The event category description",
"required":false,
"default":"",
"name":"description"
},
{
"in":"formData",
"type":"string",
"description":"The event category slug",
"required":false,
"default":"",
"name":"slug"
},
{
"in":"formData",
"type":"integer",
"description":"The event category slug",
"required":false,
"default":"",
"name":"parent"
}
],
"responses":{
"200":{
"description":"Returns the data of the updated event category",
"schema":{
"$ref":"#\/definitions\/Term"
}
},
"201":{
"description":"Returns the data of the created event category",
"schema":{
"$ref":"#\/definitions\/Term"
}
},
"400":{
"description":"A required parameter is missing or an input parameter is in the wrong format"
},
"403":{
"description":"The user is not authorized to create event categories"
}
}
},
"delete":{
"parameters":[
{
"in":"path",
"type":"integer",
"description":"the event category term ID",
"required":true,
"default":"",
"name":"id"
}
],
"responses":{
"200":{
"description":"Deletes an event category and returns its data",
"schema":{
"$ref":"#\/definitions\/Term"
}
},
"400":{
"description":"The event category term ID is missing or does not exist."
},
"403":{
"description":"The current user cannot delete the event category with the specified term ID."
},
"410":{
"description":"The event category with the specified term ID has been deleted already."
},
"500":{
"description":"The event category with the specified term ID could not be deleted."
}
}
}
},
"\/tags":{
"get":{
"parameters":[
{
"in":"query",
"type":"integer",
"description":"The archive page to return",
"required":false,
"default":1,
"name":"page"
},
{
"in":"query",
"type":"integer",
"description":"The number of event tags to return on each page",
"required":false,
"default":"10",
"name":"per_page"
},
{
"in":"query",
"type":"string",
"description":"Limit results to those matching a string",
"required":false,
"default":"",
"name":"search"
},
{
"in":"query",
"type":"array",
"description":"Ensure result set exclude specific IDs",
"required":false,
"default":"",
"name":"exclude",
"items":{
"type":"integer"
}
},
{
"in":"query",
"type":"array",
"description":"Limit result set to specific IDs",
"required":false,
"default":"",
"name":"include",
"items":{
"type":"integer"
}
},
{
"in":"query",
"type":"string",
"description":"Order sort attribute ascending or descending",
"required":false,
"default":"",
"name":"order"
},
{
"in":"query",
"type":"string",
"description":"Sort collection by term attribute",
"required":false,
"default":"",
"name":"orderby"
},
{
"in":"query",
"type":"boolean",
"description":"Whether to hide terms not assigned to any posts",
"required":false,
"default":"1",
"name":"hide_empty"
},
{
"in":"query",
"type":"integer",
"description":"Limit result set to terms assigned to a specific post",
"required":false,
"default":"",
"name":"post"
},
{
"in":"query",
"type":"integer",
"description":"Limit result set to terms assigned to a specific event (an alias of the \"post\" parameter)",
"required":false,
"default":"",
"name":"event"
},
{
"in":"query",
"type":"string",
"description":"Limit result set to terms with a specific slug",
"required":false,
"default":"",
"name":"slug"
}
],
"responses":{
"200":{
"description":"Returns all the event tags matching the search criteria",
"schema":{
"title":"tags",
"type":"array",
"items":{
"$ref":"#\/definitions\/Term"
}
}
},
"400":{
"description":"One or more of the specified query variables has a bad format"
},
"404":{
"description":"No event tags match the query or the requested page was not found."
}
}
}
},
"\/tags\/{id}":{
"get":{
"parameters":[
{
"in":"path",
"type":"integer",
"description":"the event tag term ID",
"required":true,
"default":"",
"name":"id"
}
],
"responses":{
"200":{
"description":"Returns the data of the event tag with the specified term ID",
"schema":{
"$ref":"#\/definitions\/Term"
}
},
"400":{
"description":"The event tag term ID is missing."
},
"404":{
"description":"An event tag with the specified term ID does not exist."
}
}
},
"post":{
"consumes":[
"application\/x-www-form-urlencoded"
],
"parameters":[
{
"in":"path",
"type":"integer",
"description":"the event tag term ID",
"required":true,
"default":"",
"name":"id"
},
{
"in":"formData",
"type":"string",
"description":"The event tag name",
"required":true,
"default":"",
"name":"name"
},
{
"in":"formData",
"type":"string",
"description":"The event tag description",
"required":false,
"default":"",
"name":"description"
},
{
"in":"formData",
"type":"string",
"description":"The event tag slug",
"required":false,
"default":"",
"name":"slug"
}
],
"responses":{
"200":{
"description":"Returns the data of the updated event tag",
"schema":{
"$ref":"#\/definitions\/Term"
}
},
"201":{
"description":"Returns the data of the created event tag",
"schema":{
"$ref":"#\/definitions\/Term"
}
},
"400":{
"description":"A required parameter is missing or an input parameter is in the wrong format"
},
"403":{
"description":"The user is not authorized to create event tags"
}
}
},
"delete":{
"parameters":[
{
"in":"path",
"type":"integer",
"description":"the event tag term ID",
"required":true,
"default":"",
"name":"id"
}
],
"responses":{
"200":{
"description":"Deletes an event tag and returns its data",
"schema":{
"$ref":"#\/definitions\/Term"
}
},
"400":{
"description":"The event tag term ID is missing or does not exist."
},
"403":{
"description":"The current user cannot delete the event tag with the specified term ID."
},
"410":{
"description":"The event tag with the specified term ID has been deleted already."
},
"500":{
"description":"The event tag with the specified term ID could not be deleted."
}
}
}
}
},
"definitions":{
"Event":{
"type":"object",
"properties":{
"id":{
"type":"integer",
"description":"The event WordPress post ID"
},
"global_id":{
"type":"string",
"description":"The event ID used to globally identify in Event Aggregator"
},
"global_id_lineage":{
"type":"array",
"items":{
"type":"string"
},
"description":"An Array containing the lineage of where this event comes from, this should not change after the event is created."
},
"author":{
"type":"integer",
"description":"The event author WordPress post ID"
},
"date":{
"type":"string",
"description":"The event creation date in the site time zone"
},
"date_utc":{
"type":"string",
"description":"The event creation date in UTC time"
},
"modified":{
"type":"string",
"description":"The event last modification date in the site time zone"
},
"modified_utc":{
"type":"string",
"description":"The event last modification date in UTC time"
},
"status":{
"type":"string",
"description":"The event status"
},
"url":{
"type":"string",
"description":"The URL to the event page"
},
"rest_url":{
"type":"string",
"description":"The TEC REST API link to fetch this event"
},
"title":{
"type":"string",
"description":"The event name"
},
"description":{
"type":"string",
"description":"The event long description"
},
"excerpt":{
"type":"string",
"description":"The event short description"
},
"slug":{
"type":"string",
"description":"The event slug"
},
"image":{
"type":"object",
"description":"The event featured image details if set",
"$ref":"#\/definitions\/Image"
},
"all_day":{
"type":"boolean",
"description":"Whether or not this event is an all day Event"
},
"start_date":{
"type":"string",
"description":"The event start date in the event or site time zone"
},
"start_date_details":{
"type":"array",
"description":"An array of each component of the event start date",
"$ref":"#\/definitions\/DateDetails"
},
"end_date":{
"type":"string",
"description":"The event end date in the event or site time zone"
},
"end_date_details":{
"type":"array",
"description":"An array of each component of the event end date",
"$ref":"#\/definitions\/DateDetails"
},
"utc_start_date":{
"type":"string",
"description":"The event start date in UTC time"
},
"utc_start_date_details":{
"type":"array",
"description":"An array of each component of the event start date in UTC time",
"$ref":"#\/definitions\/DateDetails"
},
"utc_end_date":{
"type":"string",
"description":"The event end date in UTC time"
},
"utc_end_date_details":{
"type":"array",
"description":"An array of each component of the event end date in UTC time",
"$ref":"#\/definitions\/DateDetails"
},
"timezone":{
"type":"string",
"description":"The event time zone string"
},
"timezone_abbr":{
"type":"string",
"description":"The abbreviated event time zone string"
},
"cost":{
"type":"string",
"description":"The event cost including the currency symbol"
},
"cost_details":{
"type":"array",
"description":"The event cost details",
"$ref":"#\/definitions\/CostDetails"
},
"website":{
"type":"string",
"description":"The event website URL"
},
"show_map":{
"type":"boolean",
"description":"Whether the map should be shown for the event or not"
},
"show_map_link":{
"type":"boolean",
"description":"Whether the map link should be shown for the event or not"
},
"hide_from_listings":{
"type":"boolean",
"description":"Whether an event should be hidden from the calendar view or not"
},
"sticky":{
"type":"boolean",
"description":"Whether an event is sticky in the calendar view or not"
},
"featured":{
"type":"boolean",
"description":"Whether the event is featured in the calendar or not"
},
"categories":{
"type":"array",
"description":"The event categories",
"$ref":"#\/definitions\/Term"
},
"tags":{
"type":"array",
"description":"The event tags",
"$ref":"#\/definitions\/Term"
},
"venue":{
"type":"object",
"description":"The event venue",
"$ref":"#\/definitions\/Venue"
},
"organizer":{
"type":"array",
"description":"The event organizers",
"$ref":"#\/definitions\/Organizer"
}
}
},
"Venue":{
"type":"object",
"properties":{
"id":{
"type":"integer",
"description":"The venue WordPress post ID"
},
"global_id":{
"type":"string",
"description":"The venue ID used to globally identify in Event Aggregator"
},
"global_id_lineage":{
"type":"array",
"items":{
"type":"string"
},
"description":"An Array containing the lineage of where this organizer comes from, this should not change after the organizer is created."
},
"author":{
"type":"integer",
"description":"The venue author WordPress post ID"
},
"date":{
"type":"string",
"description":"The venue creation date in the site time zone"
},
"date_utc":{
"type":"string",
"description":"The venue creation date in UTC time"
},
"modified":{
"type":"string",
"description":"The venue last modification date in the site time zone"
},
"modified_utc":{
"type":"string",
"description":"The venue last modification date in UTC time"
},
"status":{
"type":"string",
"description":"The venue status"
},
"url":{
"type":"string",
"description":"The URL to the venue page"
},
"venue":{
"type":"string",
"description":"The venue name"
},
"description":{
"type":"string",
"description":"The venue long description"
},
"excerpt":{
"type":"string",
"description":"The venue short description"
},
"slug":{
"type":"string",
"description":"The venue slug"
},
"image":{
"type":"string",
"description":"The event featured image details if set",
"$ref":"#\/definitions\/Image"
},
"show_map":{
"type":"boolean",
"description":"Whether the map should be shown for the venue or not"
},
"show_map_link":{
"type":"boolean",
"description":"Whether the map link should be shown for the venue or not"
},
"address":{
"type":"string",
"description":"The venue address"
},
"city":{
"type":"string",
"description":"The venue city"
},
"country":{
"type":"string",
"description":"The venue country"
},
"province":{
"type":"string",
"description":"The venue province"
},
"state":{
"type":"string",
"description":"The venue state"
},
"zip":{
"type":"string",
"description":"The venue ZIP code"
},
"phone":{
"type":"string",
"description":"The venue phone number"
},
"website":{
"type":"string",
"description":"The venue website URL"
},
"stateprovince":{
"type":"string",
"description":"The venue state or province"
},
"geo_lat":{
"type":"number",
"format":"double",
"description":"The venue geo latitude"
},
"geo_lng":{
"type":"number",
"format":"double",
"description":"The venue geo longitude"
}
}
},
"Organizer":{
"type":"object",
"properties":{
"id":{
"type":"integer",
"description":"The organizer WordPress post ID"
},
"global_id":{
"type":"string",
"description":"The organizer ID used to globally identify in Event Aggregator"
},
"global_id_lineage":{
"type":"array",
"items":{
"type":"string"
},
"description":"An Array containing the lineage of where this organizer comes from, this should not change after the organizer is created."
},
"author":{
"type":"integer",
"description":"The organizer author WordPress post ID"
},
"date":{
"type":"string",
"description":"The organizer creation date in the site time zone"
},
"date_utc":{
"type":"string",
"description":"The organizer creation date in UTC time"
},
"modified":{
"type":"string",
"description":"The organizer last modification date in the site time zone"
},
"modified_utc":{
"type":"string",
"description":"The organizer last modification date in UTC time"
},
"status":{
"type":"string",
"description":"The organizer status"
},
"url":{
"type":"string",
"description":"The URL to the organizer page"
},
"organizer":{
"type":"string",
"description":"The organizer name"
},
"description":{
"type":"string",
"description":"The organizer long description"
},
"excerpt":{
"type":"string",
"description":"The organizer short description"
},
"slug":{
"type":"string",
"description":"The organizer slug"
},
"image":{
"type":"string",
"description":"The event featured image details if set",
"$ref":"#\/definitions\/Image"
},
"phone":{
"type":"string",
"description":"The organizer phone number"
},
"website":{
"type":"string",
"description":"The organizer website"
},
"email":{
"type":"string",
"description":"The organizer email address"
}
}
},
"Image":{
"type":"object",
"properties":{
"url":{
"type":"string",
"format":"uri",
"description":"The URL to the full size version of the image"
},
"id":{
"type":"integer",
"description":"The image WordPress post ID"
},
"extension":{
"type":"string",
"description":"The image file extension"
},
"width":{
"type":"integer",
"description":"The image natural width in pixels"
},
"height":{
"type":"integer",
"description":"The image natural height in pixels"
},
"sizes":{
"type":"array",
"description":"The details about each size available for the image",
"items":{
"$ref":"#\/components\/schemas\/ImageSize"
}
}
}
},
"ImageSize":{
"type":"object",
"properties":{
"width":{
"type":"integer",
"description":"The image width in pixels in the specified size"
},
"height":{
"type":"integer",
"description":"The image height in pixels in the specified size"
},
"mime-type":{
"type":"string",
"description":"The image mime-type"
},
"url":{
"type":"string",
"format":"uri",
"description":"The link to the image in the specified size on the site"
}
}
},
"DateDetails":{
"type":"object",
"properties":{
"year":{
"type":"integer",
"description":"The date year"
},
"month":{
"type":"integer",
"description":"The date month"
},
"day":{
"type":"integer",
"description":"The date day"
},
"hour":{
"type":"integer",
"description":"The date hour"
},
"minutes":{
"type":"integer",
"description":"The date minutes"
},
"seconds":{
"type":"integer",
"description":"The date seconds"
}
}
},
"CostDetails":{
"type":"object",
"properties":{
"currency_symbol":{
"type":"string",
"description":"The cost currency symbol"
},
"currency_position ":{
"type":"string",
"description":"The position of the currency symbol in the cost string",
"enum":[
"prefix",
"postfix"
]
},
"values":{
"type":"array",
"items":{
"type":"integer"
},
"description":"A sorted array of all the numeric values for the cost"
}
}
},
"Term":{
"type":"object",
"properties":{
"id":{
"type":"integer",
"description":"The WordPress term ID"
},
"name":{
"type":"string",
"description":"The term name"
},
"slug":{
"type":"string",
"description":"The term slug"
},
"taxonomy":{
"type":"string",
"description":"The taxonomy the term belongs to"
},
"description":{
"type":"string",
"description":"The term description"
},
"parent":{
"type":"integer",
"description":"The term parent term if any"
},
"count":{
"type":"integer",
"description":"The number of posts associated with the term"
},
"url":{
"type":"string",
"description":"The URL to the term archive page"
},
"urls":{
"type":"array",
"items":{
"type":"string"
},
"description":"A list of links to the term own, archive and parent REST URL"
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment