Cannot find what you need? - Click here to contact us

Close




Is there a REST API or WebHooks?

Yes we offer a REST API to allow access to the data in your online account. In addition we have Webhooks that can send information to other services based on actions that happen in your account.

We also partner with Zapier to make integration with our API even quicker and easier. Connect to 1000+ of your favorite tools with our Zapier app. Get our Zapier app here.

Within our API we use Hypermedia to allow you to explore the API and its calls. You can use many API browsers to see and interact with the API for your account with tools like Postman. Once you are logged into your account simply start your API browser and point it to https://www.scheduleit.com/api/.

API calls are made via the HTTP methods GET, POST, and DELETE. The responses return status codes indicating success or failure, along with any applicable headers, and JSON representing the affected fields (or nothing) in the message-body.

Mandatory requirement for API access - Error checking
So we can work together to deliver you and all our users a reliable service, a mandatory requirement to access the API is you must include error checking in your scripts and check each response for a response code of 200 (OK), 429 (Wait 1 Minute), 400 or 403 (access denied). Occasionally our system will reply with a 429 response to see if your error checking code is working. Your script must wait one minute before trying again. Failure to do so could results in your API access being blocked, or your account being put on hold. Other error codes may also be returned and your script must track them. If constant errors are returned your script must stop sending requests until the issue is resolved.

Reply code 200 = No issues. Keep posting.
Reply code 400 or 403 = Login or security issue. Stop posting or wait one hour before posting again, and inform your IT to investigate.
Reply code 429 or any other = Wait one minute before posting again.
3 errors (non 200 codes) in a row should also cause your script to stop posting or wait one hour before posting again

If you are using Zapier they also have error handling steps you can use to inform you or pause on errors...
https://zapier.com/blog/zap-error-handling/
https://help.zapier.com/hc/en-us/articles/22495436062605-Set-up-custom-error-handling



Security & Access

Authentication to the API is normally done using HTTP Basic Authentication where your account login (account number_login name) and password are required. The most compelling aspect about HTTP Basic Authentication is that it's simple, and you should of course always use HTTPS when submitting HTTP Basic Authentication credentials.

Although the connection between you and our servers is encrypted and protected by the SSL layer it is advised not to put your login details as URL parameters where possible. These could be stored in the clear in our server logs as well as being visible to snooping if your SSL connection is not secure.

cURL
$ch = curl_init('https://www.scheduleit.com/api/');
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($curl, CURLOPT_USERPWD, 'accountnum_username:password');
$output = curl_exec($ch);
curl_close($ch);

cURL
$ch = curl_init('https://www.scheduleit.com/api/');
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization:Basic '.base64_encode('accountnum_username:password').''));
$output = curl_exec($ch);
curl_close($ch);

Base64 Encoding Tools





Workspaces

All API data is retrieved from the main workspace (id=1) by default. If you are using multiple workspaces you will need to add a search query using the workspace ID to retrieve data that is NOT in the main workspace. Workspace IDs are shown next to their name in your Account Settings > Workspaces page.

Get resources from the main workspace with the ID 1

/api/resources


Get resources from a workspace with the ID 2

/api/resources?search_workspace=2





Retrieving User Information

Data is request via the URL path and additional parameters.

URL
https://accountnum_loginname:password@www.scheduleit.com/api/

cURL
$ch = curl_init('https://accountnum_loginname:password@www.scheduleit.com/api/');
curl_setopt($ch, CURLOPT_HEADER, 0);
$output = curl_exec($ch);
curl_close($ch);





API ROOT

The root path for all API calls is https://www.scheduleit.com/api/



GET

HTTP GET requests are used to retrieve data without directly modifying it, in json format.

  • /api/data set name (returns a simple summery of the top 10 records if no additional query parameters are sent)

    /api/groups

    /api/resources

    /api/events

    /api/labels



    Unless specific fields are specified only a summary is returned. You must specify the fields if you need additional record information. Request a single record to see and return ALL fields.

    Get the ID and Name fields from all your Groups

    /api/groups?fields=id,name


    Get the id, name and email addresses from all your Resources

    /api/resources?fields=id,name,email


    Get the ID, Start and Title from all your Events within the default date range

    /api/events?fields=id,date_start,title


  • /api/data set name/data record id (returns ALL the available fields of the requested record)

    Get ALL fields from Event where the Event ID is 1234

    /api/events/1234


    Get the title of your Events where the Event ID is 123456

    /api/events/123456?fields=title




    Search the data sets for multiple records.


    Event search:
  • search_id=search for multiple ids
  • search_title=search text
  • search_name=search text
  • search_completed=search completed
  • search_date_start=search date
  • search_date_end=search date
  • search_owner=search with tagged resource using resource id
  • search_date_modified=(>,<,!) search date (e.g. search_date_modified=>2022-01-31)
  • date_range_from=search date
  • date_range_to=search date
  • search_istask=search for tasks (1 or 0)
  • search_isnodate=search for events with no date (1 or 0)

    Resource search:
  • search_id=search for multiple ids
  • search_name=search name
  • search_owner=(,!) search within a Group using group id
  • search_data1=search details 1
    ...
  • search_data10=search details 10
  • search_price=(>,<,!) search hourly or fix rate/price (e.g. search_price=>0)
  • search_date_modified=(>,<,!) search date (e.g. search_date_modified=>2022-01-31)

    Group search:
  • search_id=search for multiple ids
  • search_name=search name
  • search_date_modified=(>,<,!) search date (e.g. search_date_modified=>2022-01-31)


    Get any Events linked to a resource with the ID 123, 123 OR 456, and 123 AND 456, and NOT 123 AND NOT 456

    /api/events?fields=id&search_owner=123

    /api/events?fields=id&search_owner=123,456

    /api/events?fields=id&search_owner=$,123,456

    /api/events?fields=id&search_owner=!,123,456


    Get Events for 2018

    /api/events?date_range_from=2018-01-01&date_range_to=2018-12-31


    Get Events where the start date is from 2016-01-01, and where the title contains the word 'test'

    /api/events?date_range_from=2016-01-01&date_range_to=2020-01-01&search_title=test


    Get Groups where the ID is greater than 10 but less than 200

    /api/groups?search_id=>10,<200


    Polling and scraping:
    Polling is when you request a set of records on a repeating time bases. Scraping is when calling for many records one after another to create a final list.

    Whilst polling or scraping is not yet banned, it should be used with great caution and must be used correctly to ensure continued API access. Use a single batch/search command to return all the records at once rather than individually.

    Polling for all records should never be used and will cause access to your API to be limited or blocked. Occasional polling is sometimes allowed to find new or recently updates records. If you are polling ensure your polling time is no more than every 20 minutes depending on the size of the data set returned.

    When polling you must query for changed records since your last poll or date, and never repeat requests the same data set. Use search_date_modified to find changed events since your last check. Updating your last check date each time.

    Get data that was added or updated after a date, on date, before date, and not on date...

    /api/events?search_date_modified=>2022-01-01 (after date)

    /api/resources?search_date_modified=>2022-01-01 (after date)

    /api/groups?search_date_modified=>2022-01-01 (after date)

    Other queries

    ?search_date_modified=2022-01-01 (on date)

    ?search_date_modified=>2022-01-01 (after date)

    ?search_date_modified=>2022-01-01 14:00 (after date and time)

    ?search_date_modified=<2022-01-01 (before date)

    ?search_date_modified=!2022-01-01 (not on date)






    Sort the returned records with the specified fields.

  • sort=field names

    Get the Name of your Groups and sort by the Name then descending by ID

    /api/groups?fields=name&sort=name,-id



    Get the ID of the last modified Event

    /api/events?fields=id&sort=-date_modified&limit=1





    Return up to the specified number of records.

  • limit=search value

    Get the Name of the first 5 records from your Groups

    /api/groups?fields=name&limit=5


    Get the Name and the first 500 records from your Resources

    /api/resources?fields=name&limit=500






    POST

    HTTP POST requests are used to add or update data to your account. Returned response is in json format.

  • POST /api/data set name


    Create a new event by posting to...

    /api/events/


    Create a new group by posting to...

    /api/groups/


    Update an existing event with the ID of 1234

    /api/events/1234


    Add a new Event

    cURL
    $ch = curl_init();
    $fields = array(
    'title' => 'the title',
    'owner' => '220',
    'date_start' => urlencode('2016-09-29 09:00:00'),
    'date_end' => urlencode('2016-09-29 17:00:00'),
    'notes' => 'the notes',
    'custom1' => 'custom 1',
    'custom2' => 'custom 2',
    'custom3' => 'custom 3',
    'custom4' => 'custom 4',
    'custom7' => 'custom 7',
    'custom8' => 'custom 8',
    'custom9' => 'custom 9',
    'starticon' => '1',
    'color_text' => '#66FF66',
    'color_back' => '#FFFFFF',
    'priority' => '7',
    'completed' => '75'
    );
    $post_data = '';
    foreach($fields as $key => $value) {
    $post_data .= $key.'='.$value.'&';;
    }
    rtrim($post_data, '&');
    curl_setopt($ch, CURLOPT_URL, 'https://accountnum_loginname:password@www.scheduleit.com/api/events');
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
    curl_exec($ch);



    Add a new Resource

    cURL
    $ch = curl_init();
    $fields = array(
    'name' => 'the resource name',
    'owner' => '10,456,789',
    'email' => 'fred@example.com',
    'color_back' => '#A9f5A9',
    'color_text' => '#66FF66',
    'color_event_back' => '#FF0000',
    'data1' => 'Manager',
    'data2' => '',
    'data3' => '',
    'data4' => '',
    'data5' => '',
    'data6' => '',
    'data7' => '',
    'data8' => '',
    'data9' => '',
    'data10' => '',
    'skills' => '123,456,678',
    'geonav' => ''
    );
    $post_data = '';
    foreach($fields as $key => $value) {
    $post_data .= $key.'='.$value.'&';
    }
    rtrim($post_data, '&');
    curl_setopt($ch, CURLOPT_URL, 'https://accountnum_loginname:password@www.scheduleit.com/api/resources');
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
    curl_exec($ch);


    Add a new Group

    cURL
    $ch = curl_init();
    $fields = array(
    'name' => 'the group name',
    'color_back' => '#66FF66',
    'positionv' => '5',
    'min_resources' => '0',
    'max_resources' => '0',
    'hide_from_main' => '0',
    'hide_from_event' => '0'
    );
    $post_data = '';
    foreach($fields as $key => $value) {
    $post_data .= $key.'='.$value.'&';
    }
    rtrim($post_data, '&');
    curl_setopt($ch, CURLOPT_URL, 'https://accountnum_loginname:password@www.scheduleit.com/api/groups');
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
    curl_exec($ch);





    DELETE

    HTTP DELETE requests are used to delete data from your account. Returned response is in json format.

  • DELETE /api/data set name/record id

    cURL
    $ch = curl_init('accountnum_loginname:password@https://www.scheduleit.com/api/events/123456');
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
    curl_setopt($ch, CURLOPT_POSTFIELDS);
    curl_exec($ch);



    #api documentation notes spec webhook
  • Last updated, 31 October 2024, 15:52


    SA
    Salar
    8 February 2022, 15:52
    Is there a way to query the custom fields we have created in the custom tab?

    MA
    Mark
    19 February 2022, 10:44
    Yes, include in your query &search_custom1=ABC

    For faster live support please message our support team directly.

    TH
    Thomas
    22 July 2022, 13:48
    Is there a possibility to query the result or a custom report?

    MA
    Mark
    22 July 2022, 14:13
    You can use the API to query your database and return data by posting a Search query. Some examples...

    search_id=search id
    search_title=search text
    search_name=search text
    search_date_start=search date
    search_date_end=search date
    search_owner=search resource id
    search_date_modified=(search type) search date
    date_range_from=search date
    date_range_to=search date

    For faster live support you can message our support team directly.

    SA
    Saascend
    9 August 2024, 20:46
    I would like to ask about the ScheduleIT API -> it feels like the search is returning all records no matter what.

    https://www.scheduleit.com/api/events?fields=id,title,date_start,date_end,custom1,custom2,custom3?search_custom1=221014

    For example something like this will return all the records and not only the 221014 one.

    Could you please advise if there is any sanitization required prior to this search? Should the 221014 be in quotes or something?



    Leave a public comment (Login required) or click here to contact us for support




    Still need help? Contact Us
    Schedule it
    /faq/10640/is-there-a-rest-api-or-webhooks
    Join Us - Live Webinar
    ...
    Close
     
    Help Topics
    Search
    Contact Us