The Filmchief REST API documentation
Getting started
Audience
This documentation is designed for people familiar with REST API programming and object-oriented programming concepts. You should also be familiar with Filmchief from a user's point of view. There are many REST API tutorials available on the Web.
In Filmchief, we recommend acquiring a Web developer role (ask your Administrator about this) and enable Show API column names on your My account page. This way, you will be able to navigate through the festival database to get a sense of its contents, and see the internal column names which you will be using in your API calls.
Prerequisites
Before you start, make sure that you have everything you need.
- A Light, Standard or Premium Filmchief license is required.
- The Filmchief API must be enabled.
- The Primary API user must be defined.
- The master API key
- An HTML editor
- A web server
About the Primary API user
The Primary API user is probably you: the person responsible for the API requests that are sent to our servers. If an API request fails, you will receive an error report that informs you about the details of what went wrong.
The Primary API user also serves as our primary contact for important notifications concerning the Filmchief API.
You can set the Primary API user at System About Filmchief.
Getting the master API key
To use the Filmchief REST API, you need the master API key. If your festival has a premium license, you will it at System About Filmchief
Connecting with the API
Before you can make any API calls, you need to connect with the API to obtain a token. To do this, include the following code in your project:
This code requires PHP 5.5 or higher to work, because of the password_hash function. If you have version 5.4 or less, you can download a PHP library here.
Note: Replace FESTIVAL IDENTIFIER with your festival’s subdomain name (the part before .filmchief.com) and MASTER API KEY with the key obtained from Filmchief.
Authentication
The filmchiefApiConnection object contains a token that you need to use in subsequent API calls. The token is valid for 5 minutes.
Reader module
A service for reading data from Filmchief.
| Endpoint | |
|---|---|
|
To use any of the methods in the
Reader module, call the following URL:https://«FESTIVAL IDENTIFIER».filmchief.com/api/php/Reader
|
|
token |
In each API call, you must specify the
token obtained in the authorization call described above. |
proc |
The requested method.
|
| + method parameters |
Include the parameters of the requested method in your API call.
|
| Methods | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
checkEmailAvailability |
Return Value:
NoneCall this method to verify if an email address can be used to create a new account.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
checkSignIn |
Return Value:
NoneCall this method to verify if the specified username (or email address) and password combination is valid and can be used to sign in.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
getAccreditations |
Return Value:
NoneRequests all accreditations in a specified event, optionally filtered by accreditation status.
Example:The following example retrieves information about all granted or pre-approved accreditations of the event with <?php
$params = array(
'token' => $filmchiefApiConnection['token'],
'proc' => 'getAccreditations',
'eventID' => 1,
'accreditationStatus' => 'granted,preapproved'
);
$url = 'https://«FESTIVAL IDENTIFIER».filmchief.com/api/php/Reader?' . http_build_query($params);
$data = json_decode(file_get_contents($url), true);
?>
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
getAuthenticatedUrl |
Return Value:
NoneConverts a URL (within the festival's filmchief.com subdomain) to a personalized link (also known as a "magic link"). When following a personalized link, the associated user is immediately signed in. If the user record is not yet associated with an account, the account will be immediately activated and the user will be asked to set a password, then taken to the targeted page.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
getCreditDetails |
Return Value:
NoneRequests all details of a credit identified by
creditID.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
getData |
Return Value:
NoneThis is the most universal method to request data from any specific table. The result set can be restricted to certain columns or rows (using filters), and it can be sorted.
Example:The following example retrieves event ID, name, publication level, start and end date of all main events, sorted by descending start date: <?php
$params = array(
'token' => $filmchiefApiConnection['token'],
'proc' => 'getData',
'table' => 'event',
'columns' => 'eventID,name,publicationLevel,startDate,endDate',
'filters' => 'abbreviation -column event.eventType ["main"]',
'orderBy' => 'startDate-'
);
$url = 'https://«FESTIVAL IDENTIFIER».filmchief.com/api/php/Reader?' . http_build_query($params);
$data = json_decode(file_get_contents($url), true);
?>
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
getEvents |
Return Value:
NoneRequests basic information about all events or a selection of events, based on the specified criteria.
Example:The following example requests information about all main events that took place in 2024: <?php
$params = array(
'token' => $filmchiefApiConnection['token'],
'proc' => 'getEvents',
'year' => 2024,
'eventType' => 'main'
);
$url = 'https://«FESTIVAL IDENTIFIER».filmchief.com/api/php/Reader?' . http_build_query($params);
$data = json_decode(file_get_contents($url), true);
?>
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
getEventDetails |
Return Value:
NoneRequests all details of an event identified by
eventID or name.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
getEventViewingSchedule |
Return Value:
NoneRequests detailed information about an event identified by
eventID, which can be used to build a time schedule.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
getFilmCopyDetails |
Return Value:
NoneRequests all details of a film copy identified by
filmCopyID.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
getFilmCredits |
Return Value:
NoneRequests all details of credits of the specified film, identified by
filmID or idNr.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
getFilmDetails |
Return Value:
NoneRequests all details of a film identified by
filmID or idNr.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
getFilmsShownInEvent |
Return Value:
NoneRequests specified columns of films shown in the specified event (identified by
eventID).
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
getImage deprecated |
Return Value:
NoneReturns a URL to an image, optionally scaled to meet specified constraints.
Note: this method is deprecated: please see File access for a more powerful and easier to use solution.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
getListData |
Return Value:
NoneRequests data from any existing list. You may select all records from a list, or a paginated subset.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
getMeetings |
Return Value:
NoneRequests all meetings in the specified event.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
getOnlineResources |
Return Value:
NoneRequests all online resources in the specified event, or all online resources used in the specified viewing.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
getOrderDetails |
Return Value:
NoneRequests all details of a order identified by
orderID.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
getOrganizationDetails |
Return Value:
NoneRequests all details of an organization identified by
organizationID.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
getProgramDetails |
Return Value:
NoneRequests all details of a program identified by
programID.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
getProgramItems |
Return Value:
NoneRequests all items of a program identified by
programID.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
getProgramLineDetails |
Return Value:
NoneRequests all details of a program line identified by
programLineID.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
getProgramLines |
Return Value:
NoneRequests program lines in the specified event. Either all program lines, or only the main program lines are returned.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
getPrograms |
Return Value:
NoneRequests all programs in the specified event or program line.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
getTicketingDetails |
Return Value:
NoneRequests information relevant for ticketing of one or more viewings. Note: if
Example:The following example retrieves online ticketing information of all viewings in a particular program (with Note how the value for <?php
// By default, assume no user is currently signed in:
$currentUserID = null;
// Check if session information from Filmchief is available:
if (isset($_SESSION['«FESTIVAL IDENTIFIER».filmchief.com'])
&& isset($_SESSION['«FESTIVAL IDENTIFIER».filmchief.com']['userID'])) {
// Get the ID of the currently signed in user (at the Filmchief Portal):
$currentUserID = $_SESSION['«FESTIVAL IDENTIFIER».filmchief.com']['userID'];
}
// Define API call parameters:
$params = array(
'token' => $filmchiefApiConnection['token'],
'proc' => 'getTicketingDetails',
'programID' => 598,
'currentUserID' => $currentUserID,
'pointOfSaleTypes' => 'online',
'onSaleNow' => 1
);
// Contruct the API call URL:
$url = 'https://«FESTIVAL IDENTIFIER».filmchief.com/api/php/Reader?' . http_build_query($params);
// Retrieve and decode the API call results:
$data = json_decode(file_get_contents($url), true);
?>
Example response:{
"data": [
{
"viewingID": 698,
"startDateTime": "2019-11-15 12:00:00Z",
"locationLabel": "Ketelhuis 1",
"programTitle": "Dutch Classics I: Musical Encounters",
"programSubtitle": "",
"programShortDescription": null,
"programLongDescription": null,
"onSaleNow": 1,
"saleStartDateTime": "2020-09-03T11:00:00Z",
"saleEndDateTime": "2019-11-15T11:45:00Z",
"currencySymbol": "€",
"ticketingDetails": [
{
"productID": 11,
"saleStartDateTime": "2019-09-02T14:29:00Z",
"productName": "Regular Ticket Test",
"productDescription": "Regular Ticket Test",
"saleEndDateTime": "2019-11-15T11:45:00Z",
"promotionID": null,
"promotionName": null,
"promotionDescription": null,
"priceAmount": 10,
"priceNote": null,
"promotionAccreditationListID": null,
"promotionCodeSets": null
},
{
"productID": 12,
"saleStartDateTime": "2019-09-02T14:33:00Z",
"productName": "Student Tickets Test",
"productDescription": "Student Tickets Test",
"saleEndDateTime": "2019-11-15T11:45:00Z",
"promotionID": null,
"promotionName": null,
"promotionDescription": null,
"priceAmount": 8,
"priceNote": null,
"promotionAccreditationListID": null,
"promotionCodeSets": null
},
{
"productID": 13,
"saleStartDateTime": "2019-09-02T14:39:00Z",
"productName": "Kid Tickets Test",
"productDescription": "Kid Tickets Test",
"saleEndDateTime": "2019-11-15T11:45:00Z",
"promotionID": null,
"promotionName": null,
"promotionDescription": null,
"priceAmount": 6.5,
"priceNote": null,
"promotionAccreditationListID": null,
"promotionCodeSets": null
}
],
"ticketsRemaining": 143
},
{
"viewingID": 699,
"startDateTime": "2019-11-16 12:00:00Z",
"locationLabel": "Ketelhuis 3",
"programTitle": "Dutch Classics I: Musical Encounters",
"programSubtitle": "",
"programShortDescription": null,
"programLongDescription": null,
"onSaleNow": 1,
"saleStartDateTime": "2019-09-02T14:29:00Z",
"saleEndDateTime": "2019-11-16T11:45:00Z",
"currencySymbol": "€",
"ticketingDetails": [
{
"productID": 11,
"saleStartDateTime": "2019-09-02T14:29:00Z",
"productName": "Regular Ticket Test",
"productDescription": "Regular Ticket Test",
"saleEndDateTime": "2019-11-16T11:45:00Z",
"promotionID": null,
"promotionName": null,
"promotionDescription": null,
"priceAmount": 10,
"priceNote": null,
"promotionAccreditationListID": null,
"promotionCodeSets": null
},
{
"productID": 12,
"saleStartDateTime": "2019-09-02T14:33:00Z",
"productName": "Student Tickets Test",
"productDescription": "Student Tickets Test",
"saleEndDateTime": "2019-11-16T11:45:00Z",
"promotionID": null,
"promotionName": null,
"promotionDescription": null,
"priceAmount": 8,
"priceNote": null,
"promotionAccreditationListID": null,
"promotionCodeSets": null
},
{
"productID": 13,
"saleStartDateTime": "2019-09-02T14:39:00Z",
"productName": "Kid Tickets Test",
"productDescription": "Kid Tickets Test",
"saleEndDateTime": "2019-11-16T11:45:00Z",
"promotionID": null,
"promotionName": null,
"promotionDescription": null,
"priceAmount": 6.5,
"priceNote": null,
"promotionAccreditationListID": null,
"promotionCodeSets": null
}
],
"ticketsRemaining": 50
},
{
"viewingID": 700,
"startDateTime": "2019-11-17 12:00:00Z",
"locationLabel": "Machinegebouw Grote zaal (4)",
"programTitle": "Dutch Classics I: Musical Encounters",
"programSubtitle": "",
"programShortDescription": null,
"programLongDescription": null,
"onSaleNow": 1,
"saleStartDateTime": "2019-09-02T14:29:00Z",
"saleEndDateTime": "2019-11-17T11:45:00Z",
"currencySymbol": "€",
"ticketingDetails": [
{
"productID": 11,
"saleStartDateTime": "2019-09-02T14:29:00Z",
"productName": "Regular Ticket Test",
"productDescription": "Regular Ticket Test",
"saleEndDateTime": "2019-11-17T11:45:00Z",
"promotionID": null,
"promotionName": null,
"promotionDescription": null,
"priceAmount": 10,
"priceNote": null,
"promotionAccreditationListID": null,
"promotionCodeSets": null
},
{
"productID": 12,
"saleStartDateTime": "2019-09-02T14:33:00Z",
"productName": "Student Tickets Test",
"productDescription": "Student Tickets Test",
"saleEndDateTime": "2019-11-17T11:45:00Z",
"promotionID": null,
"promotionName": null,
"promotionDescription": null,
"priceAmount": 8,
"priceNote": null,
"promotionAccreditationListID": null,
"promotionCodeSets": null
},
{
"productID": 13,
"saleStartDateTime": "2019-09-02T14:39:00Z",
"productName": "Kid Tickets Test",
"productDescription": "Kid Tickets Test",
"saleEndDateTime": "2019-11-17T11:45:00Z",
"promotionID": null,
"promotionName": null,
"promotionDescription": null,
"priceAmount": 6.5,
"priceNote": null,
"promotionAccreditationListID": null,
"promotionCodeSets": null
}
],
"ticketsRemaining": 180
}
],
"accepted": true
}
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
getUserDetails |
Return Value:
NoneRequests all or specified details of a person identified by
userID.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
getViewings |
Return Value:
NoneRequests all viewings in the specified event, or all viewings of the specified program.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Writer module
A service for modifying data on Filmchief.
| Endpoint | |
|---|---|
|
To use any of the methods in the
Writer module, call the following URL:https://«FESTIVAL IDENTIFIER».filmchief.com/api/php/Writer
|
|
token |
In each API call, you must specify the
token obtained in the authorization call described above. |
proc |
The requested method.
|
| + method parameters |
Include the parameters of the requested method in your API call.
|
| Methods | |||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
inAppPurchaseComplete |
Return Value:
NoneCall this method to register the in-app purchase of a single product by the app user. Based on the specified user and product, an order is created, validated, completed, and processed. Depending on the sold product type, Filmchief may generate a ticket, assign a pass. It will generate a receipt PDF and send a payment confirmation email. Note: order processing may take up to a minute to complete.
|
||||||||||||||||||||||||||||
inAppRequestedOrderComplete |
Return Value:
NoneCall this method to mark the order of an in-app payment request as complete, and to start processing the order. When an order is processed, depending on which products are sold, Filmchief may generate tickets, assign passes, generate a receipt PDF, and send a payment confirmation email.
|
||||||||||||||||||||||||||||
update |
Return Value:
NoneCall this method to directly update a cell in a record, or to add an update statement to an operation.
|
||||||||||||||||||||||||||||
userCreate |
Return Value:
NoneCall this method to create a new user account. An account activation email will be sent to the specified email address.
|
||||||||||||||||||||||||||||
userDeactivate |
Return Value:
NoneCall this method to deactivate a user account. From the user's perspective, the account is deleted, but the actual user details are preserved, because the festival may still need it. For instance, the user may be the director of a film; deleting the user record would result in loss of important information. After deactivation, the user's Status will be marked as "Deactivated account", and the user will no longer be able to sign in using this account.
|
||||||||||||||||||||||||||||
userReset |
Return Value:
NoneCall this method to let a user set a new password for their account. The user will receive an email with further instructions.
|
||||||||||||||||||||||||||||
