{
    "swagger": "2.0",
    "info":
    {
        "version": "v1",
        "title": "Schedules API",
        "description": "With the Schedules API you can retrieve the most recently published schedules in Fourth. You can request schedules by start and end date, or by the number of days in the future (or past) from the current date. <br /><br />For more information about how this API works, see the [Schedules API Guide](https://developer.fourth.com/en-gb/docs/schedules-api/guide). <br /><br /><b>Testing:</b> Test environment is available; however, you can test this API against live.<br /><br /><b>Availability:</b> All customers using Workforce Management solutions.<br /><br /><b>Updates:</b> See the [Release Notes page](https://developer.fourth.com/en-gb/docs/schedules-api/release-notes) for this API.<br /><br /> "
    },
    "host": "localhost:54707",
    "schemes":
    [
        "http"
    ],
    "paths":
    {
        "/shifts":
        {
            "get":
            {
                "tags":
                [
                    "Shift"
                ],
                "summary": "Get the most recently published schedule",
                "description": "Returns the most recently published schedule from Fourth as an array. Request must include a pair of query parameters, either `fromDate` and `toDate` **OR** `daysInPast` and `daysInFuture`.",
                "operationId": "Shift_GetShiftsInPeriodAsync",
                "consumes":
                [],
                "produces":
                [
                    "application/json",
                    "text/json",
                    "application/xml",
                    "text/xml"
                ],
                "parameters":
                [
                    {
                        "name": "fromDate",
                        "in": "query",
                        "description": "Start date for schedule, specified using format yyyy-mm-dd. The date is inclusive.",
                        "required": false,
                        "type": "string",
                        "format": "date-time"
                    },
                    {
                        "name": "toDate",
                        "in": "query",
                        "description": "End date for schedule, specified using format yyyy-mm-dd. The date is inclusive.",
                        "required": false,
                        "type": "string",
                        "format": "date-time"
                    },
                    {
                        "name": "daysInPast",
                        "in": "query",
                        "description": "Start date for schedule, compared to the current date. The date is inclusive and value can be positive, negative or zero.",
                        "required": false,
                        "type": "integer",
                        "format": "int32"
                    },
                    {
                        "name": "daysInFuture",
                        "in": "query",
                        "description": "End date for schedule, compared to the current date. The date is inclusive and the value can be positive, negative or zero.",
                        "required": false,
                        "type": "integer",
                        "format": "int32"
                    }
                ],
                "responses":
                {
                    "200":
                    {
                        "description": "OK",
                        "schema":
                        {
                            "type": "array",
                            "items":
                            {
                                "$ref": "#/definitions/ShiftDto"
                            }
                        }
                    }
                }
            }
        }
    },
    "definitions":
    {
        "ShiftDto":
        {
            "type": "object",
            "properties":
            {
                "locationTnAId":
                {
                    "description": "System identifier for a time and attendance clock.",
                    "type": "string"
                },
                "fourthAccountId":
                {
                    "description": "Fourth Account ID for the employee. This ID is globally unique in Fourth, and is an 18-digit alphanumeric string.",
                    "type": "string"
                },
                "workDate":
                {
                    "format": "date-time",
                    "description": "Charge (working) day of the shift, in UTC. This is normally the same as the start date for shifts spanning multiple days. <br /> Format: yyyy-mm-dd-Thh:mm:ss:ffff",
                    "type": "string"
                },
                "startDateTime":
                {
                    "format": "date-time",
                    "description": "Time and date when the shift starts, in UTC. <br /> Format: yyyy-mm-dd-Thh:mm:ss:ffff",
                    "type": "string"
                },
                "endDateTime":
                {
                    "format": "date-time",
                    "description": "Time and date when the shift ends, in UTC. <br /> Format: yyyy-mm-dd-Thh:mm:ss:ffff",
                    "type": "string"
                },
                "breakMinutes":
                {
                    "format": "int32",
                    "description": "Combined value of all breaks during this shift for the employee. This is in minutes; for example, `60` is 60 minutes.",
                    "type": "integer"
                },
                "roleName":
                {
                    "description": "Job title for the employee on this shift; for example: `Duty manager`.",
                    "type": "string"
                },
                "locationName":
                {
                    "description": "Physical location where the shift occurs; for example: `34th Street Hotel`.",
                    "type": "string"
                },
                "departmentName":
                {
                    "description": "Department at the location; for example: `Front of House`.",
                    "type": "string"
                }
            }
        }
    },
    "securityDefinitions":
    {
        "basic":
        {
            "type": "basic",
            "description": "Basic HTTP Authentication"
        }
    }
}