NAV Navbar
  • Introduction
  • Authentication
  • Options
  • Requests
  • Calendar
  • Tally
  • Introduction

    Welcome to the Call Scheduler API Documentation.

    Authentication

    Login

    Login Response:

    { 
            "data": {
                "group": {
                    "groupid": "number", // unique id to the group
                    "clinicid": "number", // unique id to the clinic
                    "clinic_name": "string", // clinic's name
                    "name": "string", // group name
                    "abbrev": "string", // group name abbreviation
                    "priority": "number", // group priority
                    "group_key": "string", // unique group key
                    "classic_rules": "number", // boolean 0 - false, 1 - true
                    "classic_algorithm": "number" // boolean 0 - false, 1 - true
                },
                "user": {
                    "userid": "string", // unique id to the user
                    "groupid": "string", // unique id to the group
                    "providerid": "number", // unique id to the provider
                    "firstname": "string", // user's first name
                    "middleint": "string", // user's middle initial
                    "lastname": "string", // user's last name
                    "username": "string", // user's username
                    "address": "string", // user's address
                    "city": "string", // user's city
                    "state": "string", // user's state
                    "zipcode": "string", // user's zipcode
                    "country": "string", // user's country
                    "email": "string", // user's email address
                    "user_type": "string", // user type name
                    "user_typeid": "number", //  user type id
                    "multi_group_scheduler": "number" // 0 - false, 1 - true
                },
                "cookie": "string" //the user's session cookie
            }
        }
    

    Authenticates user and returns user details, group details, and the request header cookie.

    URL:

    /api/auth/login.cgi

    Method:

    POST

    Parameters as FormData

    Parameter Type Required Description
    username string yes the user's unique username
    passwd string yes the user's password

    Error Response:

    Logout

    Logout Response:

    {}
    

    Ends authenticated user's current session.

    URL:

    /api/auth/login.cgi

    Method:

    GET

    Parameters as FormData

    None

    Error Response:

    None

    Options

    Day Off Types

    Day Off Types Response:

    { 
        "data": [
            {
                "priority": "number", // the priority of the day off type
                "abbrev": "string", // abbreviation of day off type
                "dayoff_typeid": "number", // id of day off type
                "type": "string" // day off type name
            }
        ]
    }
    

    Returns an array of the possible day off types.

    URL:

    /api/options/dayoff_types.cgi

    Method:

    GET

    Parameters as FormData

    None

    Error Response:

    None

    Job Types

    Job Types Response:

    { 
        "data": [
            {
                "job_typeid": "number", // job type id
                "type": "string" // job type name
            }
        ]
    }
    

    Returns an array job types.

    URL:

    /api/options/job_types.cgi

    Method:

    GET

    Parameters as FormData

    None

    Error Response:

    None

    Day Types

    Day Types Response:

    { 
        "data": [
            {
                "dayid": "number", // group's day order
                "day_typeid": "number", // day type id
                "day_type": "string", // day type name - 'Noxious1', 'Regular2', etc
                "day_name": "string" // day name - 'Monday', 'Tuesday', etc
            }
        ]
    }
    

    Returns an array of a group's ordered day types.

    URL:

    /api/options/day_types.cgi

    Method:

    POST

    Parameters as FormData

    Parameter Type Required Description
    groupid number yes user's group id

    Error Response:

    Group Providers

    Group Providers Response:

    { 
        "data": [
            {
                "userid": "number", // provider's unique user id
                "providerid": "number", // provider's unique id
                "firstname": "string", // provider's first name
                "middleint": "string", // provider's middle initial
                "lastname": "string", // provider's last name
                "name": "string", // provider's full name
                "display_name": "string", // provider's display name
                "username": "string", // provider's username
                "addr1": "string", // provider's address
                "city": "string", // provider's city
                "state": "string", // provider's state name
                "stateid": "number", // application related state id
                "zipcode": "string", // provider's zipcode
                "country": "string", // provider's country
                "phone": "string", // provider's phone
                "email": "string", // provider's email
                "start_year": "number", // provider's start year: format YYYY
                "start_monthid": "number", // provider's start month:  {1 - 12} January - February
                "end_date": "string", // provider job end date MM-DD-YYYY
                "provider_inactive": "number", // active provider: boolean 0 - false, 1 - true
                "priority": "number", // provider's priority
                "job_typeid": "number", // job type id
                "provider_typeid": "number", // provider type id
                "provider_type": "string", // provider type name
                "type_abbrev": "string", // provider type abbreviation
                "procedure_email": null, // appears to be null
                "procedure_reports": null // appears to be null
            }
        ]
    }
    

    Returns an array of a group's active providers.

    URL:

    /api/options/group_providers.cgi

    Method:

    POST

    Parameters as FormData

    Parameter Type Required Description
    groupid number yes user's group id

    Error Response:

    Requests

    Group Request Types

    Group Request Types Response:

    { 
        "data": [
            {
                "request_typeid": "number", // request type id
                "type": "string" // request type name
            }
        ]
    }
    

    Returns an array of group approved request types.

    URL:

    /api/options/group_request_types.cgi

    Method:

    POST

    Parameters as FormData

    Parameter Type Required Description
    groupid number yes user's group id

    Error Response:

    Provider Requests

    Requests Response:

        { 
            "success": 1
        }
    

    Submit a swap, preference, or day off request.

    URL:

    /editor/request_editor.cgi

    Method:

    POST

    Parameters as FormData

    Parameter Type Required Description
    page string yes set as 'ajax'
    request_idx number yes set to 1
    request_typeid_1 number yes request type id
    override_warnings number yes boolean: 0 - false, 1 - true. Set initially to false
    length_1 number yes 'single' or 'range'
    date_1 number yes request date: format MM/DD/YYYY
    date2_1 number no if length is range or swap request, must be included: format MM/DD/YYYY
    requestid number no request id
    comment_1 number no optional comment for the request reviewer
    providerid number yes the requesting provider's id
    providerid_1 number yes, if swap request the provider to swap with
    jobid_1 number yes, if swap request the job to swap
    jobid_2 number yes, if swap request the job to swap with

    Error Response:

    Calendar

    Group Calendar

    Group Calendar Response:

    { 
        "data": {
            "request_information": {
                "providerid": "number", // provider's unique id
                "groupid": "number", // group id
                "month": "number", // request start month
                "year": "number", // request start year
                "end_month": "number", // request end month
                "end_year": "number" // request end month
            },
            "days_off": [
                {
                    "providerid": "number", // provider's id
                    "groupid": "number", // group id
                    "first_name": "string", // provider's first name
                    "middle_int": "string", // provider's middle initial
                    "last_name": "string", // provider's last name
                    "username": "string", // provider's username
                    "date": "string", // day off date: format YYYY-MM-DD
                    "dayoffid": "number", // day off id
                    "dayoff_type": "string", // day off type name
                    "abbrev": "string", // day off type name abbreviation
                    "priority": "number", // event priority
                    "link_dateid": "number"
                }
            ], 
            "vacations": [
                {
                    "userid": "number", // provider's unique user id
                    "providerid": "number", // provider's id
                    "groupid": "number", // group id
                    "firstname": "string", // provider's first name
                    "middleint": "string", // provider's middle initial
                    "lastname": "string", // provider's last name
                    "display_name": "string", // provider's display name
                    "username": "string", // provider's username
                    "provider_typeid": "number", // provider's type id
                    "provider_type": "string", // provider's type name
                    "type_abbrev": "string", // provider's type name abbreviation
                    "date": "string", // day off date: format YYYY-MM-DD
                    "dayoff_typeid": "number", // day off type id
                    "dayoff_type": "string", // day off type name
                    "dayoff_abbrev": "string", // day off type name abbreviation
                    "vacationid": "number", // vacation id
                    "priority": "number", // event priority
                    "schedule_sessionid": null // appears to be null
                }
            ],
            "events": [
                {
                    "userid": "number", // provider's unique user id
                    "providerid": "number", // provider's unique id
                    "groupid": "number", // group id
                    "firstname": "string", // provider's first name
                    "middleint": "string", // provider's middle initial
                    "lastname": "string", // provider's last name
                    "display_name": "string", // provider's display name
                    "username": "string", // provider's username
                    "provider_typeid": "number", // provider's type id
                    "provider_type": "string", // provider's type name
                    "provider_priority": "number", // provider's priority 
                    "eventid": "number", // unique event id
                    "date": "string", // day off date: format YYYY-MM-DD
                    "starttime": "string", // start time: format hh:mm:ss
                    "endtime": "string", // end time: format hh:mm:ss
                    "jobid": "number", // job id
                    "job_name": "string", // job name
                    "job_abbrev": "string", // job name abbreviation
                    "priority": "number", // job priority
                    "type": "string", // job type
                    "type_abbrev": "string", // job type abbreviation
                    "job_typeid": "number", // job type id
                    "schedule_sessionid": null, // appears to be null
                    "schedule_session_flag": null, // boolean 0 - false, 1 - true // appears to be null
                    "facilityid": null // appears to be null
                }
            ]
        }
    }
    

    Returns a groups' day off, vacation, and call events between a given range.

    URL:

    /api/calendar/group_schedule.cgi

    Method:

    POST

    Parameters as FormData

    Parameter Type Required Description
    groupid number yes a user's group id
    month number yes start month number: { 1 - 12 } - January - December
    year number yes start year: format YYYY
    end_month number yes end month number: { 1 - 12 } - January - December
    end_year number yes end year: format YYYY

    Error Response:

    Provider Calendar

    Provider Calendar Response:

    { 
        "data": {
            "request_information": {
                "providerid": "number", // provider's unique id
                "groupid": "number", // group id
                "month": "number", // request start month
                "year": "number", // request start year
                "end_month": "number", // request end month
                "end_year": "number" // request end month
            },
            "days_off": [
                {
                    "providerid": "number", // provider's id
                    "groupid": "number", // group id
                    "first_name": "string", // provider's first name
                    "middle_int": "string", // provider's middle initial
                    "last_name": "string", // provider's last name
                    "username": "string", // provider's username
                    "date": "string", // day off date: format YYYY-MM-DD
                    "dayoffid": "number", // day off id
                    "dayoff_type": "string", // day off type name
                    "abbrev": "string", // day off type name abbreviation
                    "priority": "number", // event priority
                    "link_dateid": "number"
                }
            ], 
            "vacations": [
                {
                    "userid": "number", // provider's unique user id
                    "providerid": "number", // provider's id
                    "groupid": "number", // group id
                    "firstname": "string", // provider's first name
                    "middleint": "string", // provider's middle initial
                    "lastname": "string", // provider's last name
                    "display_name": "string", // provider's display name
                    "username": "string", // provider's username
                    "provider_typeid": "number", // provider's type id
                    "provider_type": "string", // provider's type name
                    "type_abbrev": "string", // provider's type name abbreviation
                    "date": "string", // day off date: format YYYY-MM-DD
                    "dayoff_typeid": "number", // day off type id
                    "dayoff_type": "string", // day off type name
                    "dayoff_abbrev": "string", // day off type name abbreviation
                    "vacationid": "number", // vacation id
                    "priority": "number", // event priority
                    "schedule_sessionid": null // appears to be null
                }
            ],
            "events": [
                {
                    "userid": "number", // provider's unique user id
                    "providerid": "number", // provider's unique id
                    "groupid": "number", // group id
                    "firstname": "string", // provider's first name
                    "middleint": "string", // provider's middle initial
                    "lastname": "string", // provider's last name
                    "display_name": "string", // provider's display name
                    "username": "string", // provider's username
                    "provider_typeid": "number", // provider's type id
                    "provider_type": "string", // provider's type name
                    "provider_priority": "number", // provider's priority 
                    "eventid": "number", // unique event id
                    "date": "string", // day off date: format YYYY-MM-DD
                    "starttime": "string", // start time: format hh:mm:ss
                    "endtime": "string", // end time: format hh:mm:ss
                    "jobid": "number", // job id
                    "job_name": "string", // job name
                    "job_abbrev": "string", // job name abbreviation
                    "priority": "number", // job priority
                    "type": "string", // job type
                    "type_abbrev": "string", // job type abbreviation
                    "job_typeid": "number", // job type id
                    "schedule_sessionid": "number", 
                    "schedule_session_flag": "number", // boolean 0 - false, 1 - true
                    "facilityid": null // appears to be null
                }
            ]
        }
    }
    

    Returns a provider's day off, vacation, and call events between a given range.

    URL:

    /api/calendar/provider_schedule.cgi

    Method:

    POST

    Parameters as FormData

    Parameter Type Required Description
    providerid number yes a provider's unique id
    groupid number yes a user's group id
    month number yes start month number: { 1 - 12 } - January - December
    year number yes start year: format YYYY
    end_month number yes end month number: { 1 - 12 } - January - December
    end_year number yes end year: format YYYY

    Error Response:

    Tally

    Jobs Options Select

    Jobs Options Select Response:

    { 
        "data": [
            {
                "job_typeid": "string || number", // job option type id
                "name": "string" // job option type name
            }
        ]
    }
    

    Group job options for tally related options select.

    URL:

    /api/tally/jobs.cgi

    Method:

    POST

    Parameters as FormData

    Parameter Type Required Description
    groupid number yes a user's group id

    Job Id Types

    id Description
    '*' all jobs
    '*, 1' all jobs of a given type
    'null' string null, not an option
    1234 id related to a specific job

    Error Response:

    Current Tally

    Current Tally Response:

    { 
        "data": {
            "date": "string ", // api request datetime 
            "group": {
                "groupid": "number", // group id
                "name": "string", // group name
                "abbrev": "string", // group abbreviation
                "clinicid": "number", // clinic id
                "priority": "number", // group priority
                "classic_rules": "number", // boolean 0 - false, 1 - true
                "classic_algorithm": "number", // boolean 0 - false, 1 - true
                "group_key": "string"
            },
            "day_types": [
                {
                    "day_typeid": "number", // day type id
                    "day_type": "string" // day type name: 'Noxious1', 'Regular1', etc 
                }
            ],
            "tally": [
                {
                "priority": "number", // provider priority
                "providerid": "number", // provider id
                "name": "string", // provider full name
                "display_name": "string", // provider display name
                "end_date": "string", // provider job end date: format MM-DD-YYYY
                    "tally": { // tally count for each day type
                        "Regular1": "number",
                        "Regular2": "number",
                        "Regular3": "number",
                        "Regular4": "number",
                        "Noxious1": "number",
                        "Noxious2": "number",
                        "Weekend1": "number",
                        "Weekend2": "number",
                        "holidays": "number",
                        "sec_holidays": "number"
    
                    }
                }
            ],
            "job": {
                "name": "string" // name of job option selected
            }
        }
    }
    

    Current tally for all active providers of a selected job.

    URL:

    /api/tally/current_tally.cgi

    Method:

    POST

    Parameters as FormData

    Parameter Type Required Description
    groupid number yes a user's group id
    jobid number no a job's unique id
    start_month number yes start month number: { 1 - 12 } - January - December
    start_year number yes start day number: { 1 - 31 } - day of month
    year number yes start year: format YYYY
    end_month number yes end month number: { 1 - 12 } - January - December
    end_day number yes end day number: { 1 - 31 } - day of month
    end_year number yes end year: format YYYY

    Error Response:

    Day Off Tally

    Day Off Response:

     { 
            "data": {
                "group": {
                    "groupid": "number", // group id
                    "name": "string", // group name
                    "abbrev": "string", // group abbreviation
                    "clinicid": "number", // clinic id
                    "priority": "number", // group priority
                    "classic_rules": "number", // boolean: 0 - false, 1 - true
                    "classic_algorithm": "number", // boolean: 0 - false, 1 - true
                    "group_key": "string" // unique group key
                },
                "tally": [
                    {
                        "userid": "number", // provider user id
                        "providerid": "number", // provider id
                        "firstname": "string", // provider first name
                        "middleint": "string", // provider middle initial
                        "lastname": "string", // provider last name
                        "name": "string", // provider full name
                        "display_name": "string", // provider display name
                        "username": "string", // provider username
                        "addr1": "string", // provider address
                        "city": "string", // provider city
                        "state": "string", // provider state name
                        "stateid": "number", // application related state id
                        "zipcode": "string", // provider zipcode
                        "country": "string", // provider country
                        "phone": "string", // provider phone
                        "email": "string", // provider email
                        "start_year": "number", // provider start year
                        "start_monthid": "number", // provider start month: {1 - 12} January - February
                        "end_date": "string", // provider job end date: format MM-DD-YYYY
                        "provider_inactive": "number", // active provider: boolean 0 - false, 1 - true
                        "priority": "number", // provider priority
                        "job_typeid": "number", // job type id
                        "provider_typeid": "number", // provider type id
                        "provider_type": "string", // provider type name
                        "type_abbrev": "string", // provider type abbreviation
                        "procedure_email": "number", // appears to be null
                        "procedure_reports": "number", // appears to be null
                        "tally": { // day off days and tallies
                            "Vacation": "number",
                            "Day Off":  "number",
                            "Meeting":  "number",
                            "Unavailable":  "number",
                            "1/2 Day Vacation AM":  "number",
                            "CME":  "number",
                            "1/2 Day Meeting AM":  "number",
                            "1/2 Day Off AM":  "number",
                            "1/2 Day Meeting PM":  "number",
                            "Off Call Day":  "number",
                            "1/2 Day Vacation PM":  "number",
                            "Leave of Absence":  "number",
                            "Admin":  "number",
                            "1/2 Day CME PM":  "number",
                            "1/2 Day Off PM":  "number",
                            "1/2 Day CME AM":  "number",
                            "Sick Day":  "number",
                            "1/2 Day Sick AM":  "number",
                            "1/2 Day Sick PM":  "number"
                        }
                    }
                ]
            }
        }
    

    Day off tally for all active providers.

    URL:

    /api/tally/dayoff_tally.cgi

    Method:

    POST

    Parameters as FormData

    Parameter Type Required Description
    groupid number yes a user's group id
    providerid number no a provider's unique id
    start_month number yes start month number: { 1 - 12 } - January - December
    start_year number yes start day number: { 1 - 31 } - day of month
    year number yes start year: format YYYY
    end_month number yes end month number: { 1 - 12 } - January - December
    end_day number yes end day number: { 1 - 31 } - day of month
    end_year number yes end year: format YYYY

    Error Response: