Collections API - Events
You’ll need to first obtain an API key using instructions here.
Authentication
For all endpoints, when making API requests, add the following auth headers:
Uploading events
Endpoint
POST https://api3.twise.ai/personalities/{twise_id}/twin/vector_documents
(tip: you can find the twise_id in Integrations -> Zapier -> Twise ID)
Request payload fields
This endpoint consumes application/json.
document_type
boolean
Yes
Should be ‘event’
document
Event object
Yes
‘Event’ object documented below
Event model
id
string
No
If not provided, will automatically generate one.
title
string
Yes
Event title
description
string
Yes
Event description
venue
string
No
Venue name
url
string
No
URL for event details page
phone_number
string (in E.164 format)
No
Contact phone number (in E.164 format)
contact_email
string
No
Contact email
address
string
No
Address
city
string
No
City (e.g. “Dubai”)
category
string
No
Category
date_start
ISO date string
No
When the event happens/starts.
date_end
ISO date string
No
When the event ends.
date_end cannot be defined if date_start is not defined
price
string (decimal)
No
Event ticket price (e.g. “100.50”).
Has to be provided together with currency.
currency
string (ISO 4217, 3-letter currency code)
No
ISO 4217, 3-letter currency code (e.g. “AED”).
Has to be provided together with price.
media
List[string]
No
List of URLs pointing to event images
price_range
PriceRange
No
A price range for tickets an event. If provided, product cards will show a price range instead of the price provided in price
and currency
fields.
Request body example
Response Example
Get events
Endpoint
GET https://api3.twise.ai/personalities/{twise_id}/twin/vector_documents
(tip: you can find the twise_id in Integrations -> Zapier -> Twise ID)
Request URL params fields
document_type
string
Yes
‘event’
per_page
int
No
number of events to return per page
is_featured
boolean
No
gets only ‘featured’ events
sort
string
No
key to sort by: ‘updated_at’
Response Example
Update events
Endpoint
PUT https://api3.twise.ai/personalities/{twise_id}/twin/vector_documents/{_id}
(tip: you can find the twise_id in Integrations -> Zapier -> Twise ID)
Request payload fields
This endpoint consumes application/json.
document
Event object
Yes
‘Event’ object documented below
title
string
No
Event title
description
string
No
Event description
venue
string
No
Venue name
url
string
No
URL for event details page
phone_number
string (in E.164 format)
No
Contact phone number (in E.164 format)
contact_email
string
No
Contact email
address
string
No
Address
city
string
No
City (e.g. “Dubai”)
category
string
No
Category
date_start
ISO date string
No
When the event happens/starts.
date_end
ISO date string
No
When the event ends.
date_end cannot be defined if date_start is not defined
price
string (decimal)
No
Event ticket price (e.g. “100.50”).
Has to be provided together with currency.
currency
string (ISO 4217, 3-letter currency code)
No
ISO 4217, 3-letter currency code (e.g. “AED”).
Has to be provided together with price.
media
List[string]
No
List of URLs pointing to event images
Request body example
Response example
Delete events
Endpoint
DELETE https://api3.twise.ai/personalities/{twise_id}/twin/vector_documents/{_id}
(tip: you can find the twise_id in Integrations -> Zapier -> Twise ID)
Returns 204 No Content on a successful deletion.
Delete events (batch)
You are also able to batch delete documents using:
DELETE https://api3.twise.ai/personalities/{twise_id}/twin/vector_documents
Usage example
Response example
Last updated