NAV
Api Response

Introduction

Welcome to the Shooble Scheduler API! You can use our API to access Shooble Scheduler API endpoints

Authentication

Login

The command returns JSON structured like this:

{
    "data": {
        "user": {
            "id": 58,
            "email": "andrei.arba@yopmail.com",
            "phone": null,
            "language": "nl",
            "invited": 1,
            "email_confirmed": 1,
            "phone_confirmed": 0,
            "deleted_at": null,
            "created_at": "2018-04-29 13:37:13",
            "updated_at": "2018-04-29 13:37:13",
            "is_admin": 0,
            "profile": {
                "id": 58,
                "user_id": 58,
                "first_name": "Andrei",
                "last_name": "Arba",
                "date_of_birth": null,
                "avatar_id": null,
                "address": null,
                "city": null,
                "country_id": null,
                "zipcode": null,
                "timezone_id": null,
                "deleted_at": null,
                "created_at": "2018-04-29 13:37:13",
                "updated_at": "2018-04-29 13:37:13"
            }
        },
        "token": "e7f663da8badaaa1fec1969c10404c5e7a741313",
        "refresh_token": "325599a50f9624a9099a1d8be81e7465a1b20668"
    },
    "code": 92,
    "status": "success"
}

This endpoint is used for authentication. On a successful attempt, a token will be send on response, used for the future api calls.

The refresh token is a long lived one and will be used to obtain new auth tokens - created especially for the back office integration.

HTTP Request

POST /api/v1/login

Headers

This request must contain the security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)

POST Parameters

Parameter Optional Description Type
email false email email
password false password string
remember_me true remember my password for 7 days numeric(1 or 0)
device_id true id of the device, only from mobile string
device_type true type of the device, only from mobile(ios or android) string

Refresh token

The command returns JSON structured like this:

{
    "data": {
        "user": {
            "id": 58,
            "email": "andrei.arba@yopmail.com",
            "phone": null,
            "language": "nl",
            "invited": 1,
            "email_confirmed": 1,
            "phone_confirmed": 0,
            "deleted_at": null,
            "created_at": "2018-04-29 13:37:13",
            "updated_at": "2018-04-29 13:37:13",
            "is_admin": 0,
            "profile": {
                "id": 58,
                "user_id": 58,
                "first_name": "Andrei",
                "last_name": "Arba",
                "date_of_birth": null,
                "avatar_id": null,
                "address": null,
                "city": null,
                "country_id": null,
                "zipcode": null,
                "timezone_id": null,
                "deleted_at": null,
                "created_at": "2018-04-29 13:37:13",
                "updated_at": "2018-04-29 13:37:13"
            }
        },
        "token": "a702ef1cdae9251c291e23416a8d9c92c16b00bd"
    },
    "code": 92,
    "status": "success"
}

This endpoint is used to obtain new auth tokens - created especially for the back office integration. Just a refresh token - with 1 year validity(can be changed) needs to be passed and this will return an auth token and user details.

HTTP Request

POST /api/v1/refresh

Headers

This request must contain the security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)

POST Parameters

Parameter Optional Description Type
token false stored refresh token string

Logout

The command returns JSON structured like this:

{
  "data": [],
  "code": 92,
  "status": "success"
}

This endpoint is used to logout an user

HTTP Request

POST /api/v1/logout

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token

Remind password

The command returns JSON structured like this:

{
  "data": [],
  "code": 92,
  "status": "success"
}

This endpoint is used to generate the reset password link. The reset token needs to be added in the following reset request.

HTTP Request

POST /api/v1/remind

Headers

This request must contain the security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)

POST Parameters

Parameter Optional Description Type
email false must be a valid email string

Reset password

The command returns JSON structured like this:

{
  "data": [],
  "code": 92,
  "status": "success"
}

This endpoint is used to reset an user password.

HTTP Request

POST /api/v1/reset

Headers

This request must contain the security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)

POST Parameters

Parameter Optional Description Type
password false password, minim 6 characters string
confirm_password false same as password string
reset_token false reset token from the link received in email string

Confirm account

The command returns JSON structured like this:

{
  "data": [],
  "code": 110,
  "status": "success"
}

This endpoint is used to confirm user account

HTTP Request

POST /api/v1/confirm-account

Headers

This request must contain the security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)

POST Parameters

Parameter Optional Description Type
confirmation_token false confirmation token from the link received in email string
first_name false first name string
last_name false last name string
password false password, minimum 6 characters string
confirm_password false same as password string
invite_id false id from the link received in the email integer

Logged in user companies

The command returns JSON structured like this:

{
  "data": [
      {
          "name": "Bitstone 1",
          "id": 1
      },
      {
          "name": "BitStone 2",
          "id": 2
      }
  ],
  "code": 92,
  "status": "success"
}

This endpoint is used to get logged in user companies, for header.

HTTP Request

GET /api/v1/init-companies

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token

Logged in user sidebar filters

The command returns JSON structured like this:

{
    "data": {
        "locations": [
            {
                "id": 1,
                "name": "Location 1"
            }
        ],
        "departments": [
            {
                "id": 1,
                "name": "Loc 1 Department 1",
                "location_id": 1,
                "color": 1
            },
            {
                "id": 2,
                "name": "Loc 1 Department 2",
                "location_id": 1,
                "color": 2
            },
            {
                "id": 3,
                "name": "Loc 1 Department 3",
                "location_id": 1,
                "color": 3
            }
        ],
        "pools": [],
        "functions": [
            {
                "id": 3,
                "name": "Function 3",
                "description": "Function 3 description",
                "color": 15
            },
            {
                "id": 6,
                "name": "Function 6",
                "description": "Function 6 description",
                "color": 14
            },
            {
                "id": 7,
                "name": "Function 7",
                "description": "Function 7 description",
                "color": 13
            }
        ],
        "users": [
            {
                "id": 8,
                "email": "dana.employee@yopmail.com",
                "phone": null,
                "language": "nl",
                "profile": {
                    "first_name": "Dana",
                    "last_name": "Employee",
                    "date_of_birth": "1993-01-03",
                    "address": "Calea Turzii",
                    "city": "Cluj-Napoca",
                    "country": "",
                    "country_id": null,
                    "zipcode": "400121",
                    "timezone": "",
                    "timezone_id": null,
                    "avatar": "https://s3.eu-central-1.amazonaws.com/shooble-scheduler/test/uploads/users/8/photo-1510582844246-bf7aab1477cd-vowlafz6qqklvbtr.jpg",
                    "flex_worker": 0
                },
                "departments": [
                    {
                        "id": 1,
                        "name": "Loc 1 Department 1",
                        "location_id": 1
                    },
                    {
                        "id": 5,
                        "name": "Loc 2 Department 2",
                        "location_id": 2
                    }
                ],
                "locations": [
                    {
                        "id": 1,
                        "name": "Location 1"
                    },
                    {
                        "id": 2,
                        "name": "Location 2"
                    }
                ]
            },
            {
                "id": 9,
                "email": "sorin.employee@yopmail.com",
                "phone": null,
                "language": "nl",
                "profile": {
                    "first_name": "Sorin",
                    "last_name": "Test",
                    "date_of_birth": null,
                    "address": null,
                    "city": null,
                    "country": "",
                    "country_id": null,
                    "zipcode": null,
                    "timezone": "",
                    "timezone_id": null,
                    "avatar": "https://s3.eu-central-1.amazonaws.com/shooble-scheduler/test/uploads/users/6/green-01-glwf12sr1gwqjyri.jpg",
                    "flex_worker": 0
                },
                "departments": [
                    {
                        "id": 2,
                        "name": "Loc 1 Department 2",
                        "location_id": 1
                    }
                ],
                "locations": [
                    {
                        "id": 1,
                        "name": "Location 1"
                    }
                ]
            },
            {
                "id": 11,
                "email": "amalia.employee@yopmail.com",
                "phone": null,
                "language": "nl",
                "profile": {
                    "first_name": "Amalia",
                    "last_name": "Employee",
                    "date_of_birth": null,
                    "address": null,
                    "city": null,
                    "country": "",
                    "country_id": null,
                    "zipcode": null,
                    "timezone": "",
                    "timezone_id": null,
                    "avatar": "",
                    "flex_worker": 0
                },
                "departments": [
                    {
                        "id": 2,
                        "name": "Loc 1 Department 2",
                        "location_id": 1
                    }
                ],
                "locations": [
                    {
                        "id": 1,
                        "name": "Location 1"
                    }
                ]
            },
            {
                "id": 12,
                "email": "oana.employee@yopmail.com",
                "phone": null,
                "language": "nl",
                "profile": {
                    "first_name": "Oana",
                    "last_name": "Employee",
                    "date_of_birth": null,
                    "address": null,
                    "city": null,
                    "country": "",
                    "country_id": null,
                    "zipcode": null,
                    "timezone": "",
                    "timezone_id": null,
                    "avatar": "",
                    "flex_worker": 0
                },
                "departments": [
                    {
                        "id": 1,
                        "name": "Loc 1 Department 1",
                        "location_id": 1
                    }
                ],
                "locations": [
                    {
                        "id": 1,
                        "name": "Location 1"
                    }
                ]
            },
            {
                "id": 13,
                "email": "corina.employee@yopmail.com",
                "phone": null,
                "language": "nl",
                "profile": {
                    "first_name": "Corina",
                    "last_name": "Employee",
                    "date_of_birth": null,
                    "address": null,
                    "city": null,
                    "country": "",
                    "country_id": null,
                    "zipcode": null,
                    "timezone": "",
                    "timezone_id": null,
                    "avatar": "",
                    "flex_worker": 0
                },
                "departments": [
                    {
                        "id": 2,
                        "name": "Loc 1 Department 2",
                        "location_id": 1
                    }
                ],
                "locations": [
                    {
                        "id": 1,
                        "name": "Location 1"
                    }
                ]
            },
            {
                "id": 14,
                "email": "andrei.employee@yopmail.com",
                "phone": null,
                "language": "nl",
                "profile": {
                    "first_name": "Andrei",
                    "last_name": "Employee",
                    "date_of_birth": null,
                    "address": null,
                    "city": null,
                    "country": "",
                    "country_id": null,
                    "zipcode": null,
                    "timezone": "",
                    "timezone_id": null,
                    "avatar": "",
                    "flex_worker": 0
                },
                "departments": [
                    {
                        "id": 3,
                        "name": "Loc 1 Department 3",
                        "location_id": 1
                    },
                    {
                        "id": 1,
                        "name": "Loc 1 Department 1",
                        "location_id": 1
                    },
                    {
                        "id": 2,
                        "name": "Loc 1 Department 2",
                        "location_id": 1
                    }
                ],
                "locations": [
                    {
                        "id": 1,
                        "name": "Location 1"
                    }
                ]
            },
            {
                "id": 15,
                "email": "vlad.employee@yopmail.com",
                "phone": null,
                "language": "nl",
                "profile": {
                    "first_name": "Vlad",
                    "last_name": "Employee",
                    "date_of_birth": null,
                    "address": null,
                    "city": null,
                    "country": "",
                    "country_id": null,
                    "zipcode": null,
                    "timezone": "",
                    "timezone_id": null,
                    "avatar": "",
                    "flex_worker": 0
                },
                "departments": [
                    {
                        "id": 1,
                        "name": "Loc 1 Department 1",
                        "location_id": 1
                    }
                ],
                "locations": [
                    {
                        "id": 1,
                        "name": "Location 1"
                    }
                ]
            },
            {
                "id": 16,
                "email": "stefan.employee@yopmail.com",
                "phone": null,
                "language": "nl",
                "profile": {
                    "first_name": "Stefannnnn",
                    "last_name": "Employee",
                    "date_of_birth": null,
                    "address": null,
                    "city": null,
                    "country": "",
                    "country_id": null,
                    "zipcode": null,
                    "timezone": "",
                    "timezone_id": null,
                    "avatar": "",
                    "flex_worker": 0
                },
                "departments": [
                    {
                        "id": 3,
                        "name": "Loc 1 Department 3",
                        "location_id": 1
                    }
                ],
                "locations": [
                    {
                        "id": 1,
                        "name": "Location 1"
                    }
                ]
            },
            {
                "id": 65,
                "email": "oana.newuser@yopmail.com",
                "phone": "123546568768",
                "language": "nl",
                "profile": {
                    "first_name": "Oana",
                    "last_name": "Vlad",
                    "date_of_birth": null,
                    "address": null,
                    "city": null,
                    "country": "",
                    "country_id": null,
                    "zipcode": null,
                    "timezone": "",
                    "timezone_id": null,
                    "avatar": "",
                    "flex_worker": 0
                },
                "departments": [
                    {
                        "id": 1,
                        "name": "Loc 1 Department 1",
                        "location_id": 1
                    }
                ],
                "locations": [
                    {
                        "id": 1,
                        "name": "Location 1"
                    }
                ]
            },
            {
                "id": 97,
                "email": null,
                "phone": null,
                "language": "nl",
                "profile": {
                    "first_name": "On",
                    "last_name": "the fly",
                    "date_of_birth": null,
                    "address": null,
                    "city": null,
                    "country": "",
                    "country_id": null,
                    "zipcode": null,
                    "timezone": "",
                    "timezone_id": null,
                    "avatar": "",
                    "flex_worker": 0
                },
                "departments": [
                    {
                        "id": 1,
                        "name": "Loc 1 Department 1",
                        "location_id": 1
                    }
                ],
                "locations": [
                    {
                        "id": 1,
                        "name": "Location 1"
                    }
                ]
            },
            {
                "id": 107,
                "email": null,
                "phone": null,
                "language": "nl",
                "profile": {
                    "first_name": "oanaonthefly",
                    "last_name": "",
                    "date_of_birth": null,
                    "address": null,
                    "city": null,
                    "country": "",
                    "country_id": null,
                    "zipcode": null,
                    "timezone": "",
                    "timezone_id": null,
                    "avatar": "",
                    "flex_worker": 0
                },
                "departments": [
                    {
                        "id": 1,
                        "name": "Loc 1 Department 1",
                        "location_id": 1
                    }
                ],
                "locations": [
                    {
                        "id": 1,
                        "name": "Location 1"
                    }
                ]
            },
            {
                "id": 108,
                "email": null,
                "phone": null,
                "language": "nl",
                "profile": {
                    "first_name": "oanaonthefly2",
                    "last_name": "",
                    "date_of_birth": null,
                    "address": null,
                    "city": null,
                    "country": "",
                    "country_id": null,
                    "zipcode": null,
                    "timezone": "",
                    "timezone_id": null,
                    "avatar": "",
                    "flex_worker": 0
                },
                "departments": [
                    {
                        "id": 2,
                        "name": "Loc 1 Department 2",
                        "location_id": 1
                    }
                ],
                "locations": [
                    {
                        "id": 1,
                        "name": "Location 1"
                    }
                ]
            },
            {
                "id": 109,
                "email": "oana.vlad222@yopmail.com",
                "phone": null,
                "language": "nl",
                "profile": {
                    "first_name": "oanaonthefly3",
                    "last_name": "test",
                    "date_of_birth": "1990-11-28",
                    "address": "ssss",
                    "city": "Tets",
                    "country": "",
                    "country_id": null,
                    "zipcode": "333",
                    "timezone": "",
                    "timezone_id": null,
                    "avatar": "",
                    "flex_worker": 0
                },
                "departments": [
                    {
                        "id": 2,
                        "name": "Loc 1 Department 2",
                        "location_id": 1
                    }
                ],
                "locations": [
                    {
                        "id": 1,
                        "name": "Location 1"
                    }
                ]
            },
            {
                "id": 111,
                "email": "andreeifly@yopmail.com",
                "phone": "sss",
                "language": "nl",
                "profile": {
                    "first_name": "Andrei",
                    "last_name": "User",
                    "date_of_birth": "1991-03-08",
                    "address": "ssss",
                    "city": "sss",
                    "country": "Algeria",
                    "country_id": 3,
                    "zipcode": "44444",
                    "timezone": "",
                    "timezone_id": null,
                    "avatar": "",
                    "flex_worker": 0
                },
                "departments": [
                    {
                        "id": 3,
                        "name": "Loc 1 Department 3",
                        "location_id": 1
                    }
                ],
                "locations": [
                    {
                        "id": 1,
                        "name": "Location 1"
                    }
                ]
            }
        ]
    },
    "code": 92,
    "status": "success"
}

This endpoint is used to get logged in user sidebar filters.

HTTP Request

GET /api/v1/access-levels

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

Current user details

The command returns JSON structured like this:

{
  "data": {
      "email": "oana.vlad@bitstone.eu",
      "phone": null,
      "language": "nl",
      "id": 6,
      "profile": {
          "first_name": "Oaannna",
          "last_name": "Vlad",
          "date_of_birth": null,
          "address": "Calea Turzi nr 36",
          "city": "Cluj",
          "country": "Afghanistan",
          "country_id": 1,
          "zipcode": "123456",
          "timezone": "Niue",
          "timezone_id": 1,
          "avatar": "https://s3.../5507692-cat-m9SnUuRDp7WyxMruf.jpg"
      },
      "role": "employee",
      "role_id": 1,
      "flex_worker": 1,
      "full_company": true,
      "function_id": 1,
      "editable": true,
      "hours": 6,
      "hour_price": 0,
      "end_date": "2018-04-27",
      "nr_holidays": 0
  },
  "code": 92,
  "status": "success"
}

This endpoint is used to get logged in user details.

HTTP Request

GET /api/v1/current-user

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

Roles

Get list of roles

The command returns JSON structured like this:

{
  "data": {
      "items": [
          {
              "id": 1,
              "name": "scheduler"
          },
          {
              "id": 2,
              "name": "employee"
          }
      ]
  },
  "code": 92,
  "status": "success"
}

This endpoint is used to get list of roles.

HTTP Request

GET /api/v1/role

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token

Contracts

Create contract

The command returns JSON structured like this:

{
  "data": [],
  "code": 144,
  "status": "success"
}

This endpoint is used to create a contract.

HTTP Request

POST /api/v1/contract

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

POST Parameters

Parameter Optional Description Type
user_id false id of the user that owns the contract integer
hours false number of hours integer
start_date false start_date of the contract date, format Y-M-D
end_date false end_date of the contract date, format Y-M-D
flex_worker true if user is flex worker then 1, otherwise 0 integer
file true path of the file obtained after upload string

Update contract

The command returns JSON structured like this:

{
  "data": {
      "id": 4,
      "user_id": 1,
      "company_id": 1,
      "hours": 6,
      "start_date": "2017-10-28",
      "end_date": "2017-11-05",
      "flex_worker": 0,
      "file": "https://s3.eu-central-1.amazonaws.com/.../contract.pdf"
  },
  "code": 145,
  "status": "success"
}

This endpoint is used to update a contract.

HTTP Request

PUT /api/v1/contract/<CONTRACT_ID>

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

POST Parameters

Parameter Optional Description Type
user_id false id of the user that owns the contract integer
hours false number of hours integer
start_date false start_date of the contract date, format Y-M-D
end_date false end_date of the contract date, format Y-M-D
flex_worker true if user is flex worker then 1, otherwise 0 integer
file true path of the file obtained after upload string

Contract details

The command returns JSON structured like this:

{
  "data": {
        "id": 4,
        "user_id": 1,
        "company_id": 1,
        "hours": 6,
        "start_date": "2017-10-28",
        "end_date": "2017-11-05",
        "flex_worker": 0,
        "file": "https://s3.eu-central-1.amazonaws.com/.../contract.pdf"
    },
    "code": 92,
    "status": "success"
}

This endpoint is used to get contract details.

HTTP Request

GET /api/v1/contract/<CONTRACT_ID>

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

List of contracts

The command returns JSON structured like this:

{
  "data": {
      "pagination": {
          "total": 4,
          "per_page": 10,
          "current_page": 1,
          "last_page": 1,
          "next_page": null,
          "from": 1,
          "to": 4
      },
      "items": [
          {
              "id": 1,
              "user_id": 1,
              "company_id": 1,
              "hours": 3,
              "start_date": "2017-09-12",
              "end_date": "2017-09-13",
              "flex_worker": 0,
              "file": "https://s3.eu-central-1.amazonaws.com/.../contract1.pdf"
          },
          {
              "id": 4,
              "user_id": 6,
              "company_id": 1,
              "hours": 6,
              "start_date": "2017-10-28",
              "end_date": "2017-11-05",
              "flex_worker": 0,
              "file": "https://s3.eu-central-1.amazonaws.com/.../contract.pdf"
          }
      ]
  },
  "code": 92,
  "status": "success"
}

This endpoint is used to get a list of contracts.

HTTP Request

GET /api/v1/contract

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

Query Parameters

Parameter Optional Description Type
per_page true number of items per page, default 10 integer
page true page number, default 1 integer

Delete contract

The command returns JSON structured like this:

{
  "data": [],
  "code": 146,
  "status": "success"
}

This endpoint is used to delete a contract.

HTTP Request

DELETE /api/v1/contract/<CONTRACT_ID>

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

List of employee contracts

The command returns JSON structured like this:

{
  "data": {
      "items": [
          {
              "id": 1,
              "user_id": 1,
              "company_id": 1,
              "hours": 3,
              "start_date": "2017-09-12",
              "end_date": "2017-09-13",
              "flex_worker": 0,
              "file": "https://s3.eu-central-1.amazonaws.com/.../contract1.pdf"
          },
          {
              "id": 4,
              "user_id": 1,
              "company_id": 1,
              "hours": 6,
              "start_date": "2017-10-28",
              "end_date": "2017-11-05",
              "flex_worker": 0,
              "file": "https://s3.eu-central-1.amazonaws.com/.../contract.pdf"
          }
      ]
  },
  "code": 92,
  "status": "success"
}

This endpoint is used to get a list of employee contracts.

HTTP Request

GET /api/v1/employee/contract

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token

Users management

Invite user

The command returns JSON structured like this:

{
  "data": [],
  "code": 115,
  "status": "success"
}

This endpoint is used to invite a user to your company.

HTTP Request

POST /api/v1/invite

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

POST Parameters

Parameter Optional Description Type
email false email email
first_name false first name string
last_name false last name string
date_of_birth true date of birth date, format Y-M-D
address true address string
city true city string
country_id true country id integer
zipcode true zipcode string
phone true phone string
language true user language, default nl string
role_id false role id numeric
full_company false if is scheduler for all company true, otherwise false, ONLY for scheduler boolean
locations false locations ids(empty array if no locations), set location id only if permissions are for all location, ONLY for scheduler array
departments false departments ids(empty array if no departments), set department id only if permissions are only for this specific department array
pools false pools ids(empty array if no pools) array
function_id false required for employee, function id numeric
hours true hours per week(used for contract with company), default value 0 integer
flex_worker true employee is a flex worker or not(used for contract with company), default value false boolean
hour_price true price per hours(used for contract with company), default value 0 integer
end_date true contract end date(used for contract with company), default value one year from now date, format: Y-m-d
nr_holidays true contract number of holidays, default value 0 integer

Change password

The command returns JSON structured like this:

{
  "data": [],
  "code": 117,
  "status": "success"
}

This endpoint is used to change password.

HTTP Request

POST /api/v1/change-password

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token

POST Parameters

Parameter Optional Description Type
old_password false old password string
new_password false new password, minimum 6 characters string
confirm_password false confirm password, same as new_password string

Update user

The command returns JSON structured like this:

{
  "data": {
      "email": "oana.vlad@bitstone.eu",
      "phone": "83257438832",
      "language" : "nl",
      "id": 1,
      "profile": {
          "first_name": "Oaannna",
          "last_name": "Vllaaad",
          "date_of_birth": null,
          "address": "Calea Turzii nr 36",
          "city": "Cluj",
          "country": "Romania",
          "country_id": 1,
          "zipcode": "123456",
          "timezone": "Romania",
          "timezone_id": 1,
          "avatar": "https://s3.eu-central-1.amazonaws.com/.../avatar.jpg"
      }
  },
  "code": 120,
  "status": "success"
}

This endpoint is used to update user details.

HTTP Request

PUT /api/v1/user/<USER_ID>

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token

POST Parameters

Parameter Optional Description Type
first_name false first name string
last_name false last name string
avatar true path of file obtained after upload string
date_of_birth true date of birth date, format Y-M-D
address true address string
city true city string
country_id true country id integer
zipcode true zipcode string
timezone_id true timezone id integer
language true user language, default nl string
role_id false role id integer
full_company false if is scheduler for all company true, otherwise false, ONLY for scheduler boolean
locations false locations ids(empty array if no locations), set location id only if permissions are for all location, ONLY for scheduler array
departments false departments ids(empty array if no departments), set department id only if permissions are only for this specific department array
pools false pools ids(empty array if no pools) array
function_id false function id required for employee, 0 for scheduler integer
hours false hours per week(used for contract with company), default value 0 integer
flex_worker false employee is a flex worker or not(used for contract with company), default value false boolean
hour_price false price per hours(used for contract with company), default value 0 integer
end_date false contract end date(used for contract with company), default value empty string(if empty will be added automatically by backend, one year) date, format: Y-m-d
nr_holidays true contract number of holidays, default value 0 integer

User details

The command returns JSON structured like this:

{
  "data": {
      "id": 6,
      "email": "oana.vlad@bitstone.eu",
      "phone": null,
      "language": "nl",
      "profile": {
          "first_name": "Oaannna",
          "last_name": "Vlad",
          "date_of_birth": null,
          "address": "Calea Turzii nr 36",
          "city": "Cluj",
          "country": "",
          "country_id": null,
          "zipcode": "123456",
          "timezone": "",
          "timezone_id": null,
          "avatar": "https://..2u8apsk-nlntzzazunpainzo.jpg"
      },
      "role": "employee",
      "role_id": 2,
      "full_company": false,
      "function_id": null,
      "editable": true,
      "hours": 6,
      "hour_price": 0,
      "flex_worker": 1,
      "end_date": "2018-04-09",
      "nr_holidays": 22,
      "locations": [
          {
              "id": 3,
              "name": "HHH location edited",
              "company_id": 2,
              "currency_id": 1,
              "currency": "US Dollar",
              "country_id": 1,
              "country": "Afghanistan",
              "timezone_id": 1,
              "timezone": "Niue",
              "city": "Cluj-napoca",
              "address": "Calea Turzii nr 36 edited",
              "zipcode": "65432122",
              "full_location": false,
              "departments": [
                  {
                      "id": 2,
                      "location_id": 3,
                      "name": "Magento",
                      "description": "Lorem Ipsum is simply dummy text of the printing..."
                  },
                  {
                      "id": 3,
                      "location_id": 3,
                      "name": "Php 2",
                      "description": null
                  }
              ]
          },
          {
              "id": 4,
              "name": "HHH Location",
              "company_id": 2,
              "currency_id": 1,
              "currency": "US Dollar",
              "country_id": 1,
              "country": "Afghanistan",
              "timezone_id": 1,
              "timezone": "Niue",
              "city": "Cluj-Napoca",
              "address": "Calea Turzii nr 36",
              "zipcode": "123456",
              "full_location": false,
              "departments": [
                  {
                      "id": 4,
                      "location_id": 4,
                      "name": "Php 2",
                      "description": null
                  }
              ]
          }
      ],
      "pools": [
          {
              "id": 5,
              "company_id": 2,
              "name": "PHP 2",
              "description": "Super awesome team",
              "is_function": 1
          }
      ]
  },
  "code": 92,
  "status": "success"
}

This endpoint is used to get user details.

HTTP Request

GET /api/v1/user/<USER_ID>

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

List of users

The command returns JSON structured like this:

{
    "data": {
        "items": [
            {
                "id": 7,
                "email": "andrei.arba@bitstone.eu",
                "profile": {
                    "first_name": "Andrei",
                    "last_name": "Test",
                    "date_of_birth": null,
                    "address": null,
                    "avatar": "https://scontent.fsbz1-2.fna.fbcdn.net/v/t1.0-1/p160x160/22489812_1611662888897776_7072069402692698729_n.jpg?oh=d5b6e38125bf4cf2cbb01769c1ea6b70&oe=5B00E919"
                },
                "first_name": "Andrei",
                "last_name": "Test",
                "date_of_birth": null,
                "address": null,
                "avatar": "https://scontent.fsbz1-2.fna.fbcdn.net/v/t1.0-1/p160x160/22489812_1611662888897776_7072069402692698729_n.jpg?oh=d5b6e38125bf4cf2cbb01769c1ea6b70&oe=5B00E919",
                "invited": 1,
                "flex_worker": 0,
                "function": "Function 7",
                "role": "scheduler",
                "max_access": "pool",
                "language": "nl"
            },
            {
                "id": 14,
                "email": "andrei.employee@yopmail.com",
                "profile": {
                    "first_name": "Andrei",
                    "last_name": "Employee",
                    "date_of_birth": null,
                    "address": null,
                    "avatar": "https://scontent.fsbz1-2.fna.fbcdn.net/v/t1.0-1/p160x160/22489812_1611662888897776_7072069402692698729_n.jpg?oh=d5b6e38125bf4cf2cbb01769c1ea6b70&oe=5B00E919"
                },
                "first_name": "Andrei",
                "last_name": "Employee",
                "date_of_birth": null,
                "address": null,
                "avatar": "https://scontent.fsbz1-2.fna.fbcdn.net/v/t1.0-1/p160x160/22489812_1611662888897776_7072069402692698729_n.jpg?oh=d5b6e38125bf4cf2cbb01769c1ea6b70&oe=5B00E919",
                "invited": 1,
                "flex_worker": 0,
                "function": "Function 4",
                "role": "employee",
                "max_access": "department",
                "language": "nl"
            }
        ]
    },
    "code": 92,
    "status": "success"
}

This endpoint is used to get a list of users from the users that the logged in user has access to .

HTTP Request

GET /api/v1/user

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id
location valid locations ids, separated by comma(optional)
department valid departments ids, separated by comma(optional)
pool valid pools ids, separated by comma(optional)

Query Parameters

Parameter Optional Description Type
employees_only true filter to show only employees or both employees and schedulers boolean
confirmed_only true filter to show only confirmed users boolean
keyword true the search field - will check in first_name, last_name, email string
pagination true default value false, true if pagination is required boolean
per_page true number of items per page, default 10(only if pagination is true) integer
page true page number, default 1(only if pagination is true) integer

Delete user

The command returns JSON structured like this:

{
  "data": [],
  "code": 124,
  "status": "success"
}

This endpoint is used to delete an user.

HTTP Request

DELETE /api/v1/user/<USER_ID>

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token

User suggestions

The command returns JSON structured like this:

{
    "data": {
        "items": {
            "function_users": [],
            "users": [
                {
                    "id": 9,
                    "email": "sorin.employee@yopmail.com",
                    "phone": null,
                    "profile": {
                        "first_name": "Sorin",
                        "last_name": "Employee",
                        "date_of_birth": null,
                        "address": null,
                        "city": null
                    },
                    "flex_worker": 1,
                    "function_id": 4,
                    "availabilities": {
                        "2018-02-25": {
                            "n": 0,
                            "m": 1,
                            "a": 1,
                            "e": 1
                        }
                    }
                },
                {
                    "id": 11,
                    "email": "amalia.employee@yopmail.com",
                    "phone": null,
                    "profile": {
                        "first_name": "Amalia",
                        "last_name": "Employee",
                        "date_of_birth": null,
                        "address": null,
                        "city": null
                    },
                    "flex_worker": 0,
                    "function_id": 4
                }
            ]
        }
    },
    "code": 92,
    "status": "success"
}

This endpoint is used to get user suggestions from the users that the logged in user has access to.

HTTP Request

GET /api/v1/user-suggestions

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

Query Parameters

Parameter Optional Description Type
function_id true the function id to get first suggestions by integer
location_id true the location id to get first suggestions by integer
department_id true the department id to get first suggestions by integer
start_date true the date in format Y-m-d string
start_time true the start time in format H:i string
end_time true the end time in format H:i string
employees_only true filter to show only employees or both employees and schedulers - default true boolean

Companies

Create company

The command returns JSON structured like this:

{
  "data" : [],
  "code": 125,
  "status": "success"
}

This endpoint is used to create a company.

HTTP Request

POST /api/v1/company

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token

POST Parameters

Parameter Optional Description Type
name false name of the entity string
description true description of the entity string
logo true path of the logo string

Update company

The command returns JSON structured like this:

{
  "data": {
      "id": 4,
      "name": "Bitstone",
      "description": "Bitstone description",
      "logo": "https://s3.eu-central-1.amazonaws.com/../logo.jpg"
  },
  "code": 126,
  "status": "success"
}

This endpoint is used to update a company.

HTTP Request

PUT /api/v1/company/<COMPANY_ID>

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token

POST Parameters

Parameter Optional Description Type
name false name of the entity string
description true description of the entity string
logo true path of the logo string

Company details

The command returns JSON structured like this:

{
  "data": {
      "id": 4,
      "name": "Bitstone",
      "description": "Bitstone description",
      "logo": "https://s3.eu-central-1.amazonaws.com/../logo.jpg",
      "locations": [
          {
              "id": 1,
              "name": "Location edited",
              "company_id": 1,
              "currency_id": 1,
              "currency": "US Dollar",
              "country_id": 1,
              "country": "Romania",
              "timezone_id": 1,
              "timezone": "Niue",
              "city": "Cluj-Napoca",
              "address": "Calea Turzii nr 36",
              "zipcode": "123456",
              "departments": [
                  {
                      "id": 1,
                      "location_id": 1,
                      "name": "Magento",
                      "description": "Lorem Ipsum is simply dummy text of the printing and typesetting ..."
                  }
              ]
          }
      ],
      "pools": [
          {
              "id": 1,
              "company_id": 1,
              "name": "devs",
              "description": "grup with the devs",
              "is_function": 0
          }
      ],
      "functions": [
          {
              "id": 5,
              "company_id": 1,
              "name": "PHP 2",
              "description": "Super awesome team",
              "is_function": 1
          }
      ]
  },
  "code": 92,
  "status": "success"
}

This endpoint is used to get company details.

HTTP Request

GET /api/v1/company/<COMPANY_ID>

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token

List of companies

The command returns JSON structured like this:

{
  "data": {
      "pagination": {
          "total": 4,
          "per_page": 10,
          "current_page": 1,
          "last_page": 1,
          "next_page": null,
          "from": 1,
          "to": 4
      },
      "items": [
          {
              "id": 1,
              "name": "Bitstone1",
              "description": null,
              "logo": "https://s3.eu-central-1.amazonaws.com/../new-logo.jpg"
          },
          {
              "id": 4,
              "name": "Bitstone",
              "description": "Bitstone description",
              "logo": "https://s3.eu-central-1.amazonaws.com/../logo.jpg"
          }
      ]
  },
  "code": 92,
  "status": "success"
}

This endpoint is used to get a list of companies.

HTTP Request

GET /api/v1/company

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token

Query Parameters

Parameter Optional Description Type
name true filter companies by name string
per_page true number of items per page, default 10 integer
page true page number, default 1 integer

Delete company

The command returns JSON structured like this:

{
  "data": [],
  "code": 127,
  "status": "success"
}

This endpoint is used to delete a company.

HTTP Request

DELETE /api/v1/company/<COMPANY_ID>

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token

Create company account

The command returns JSON structured like this:

{
  "data": [],
  "code": 204,
  "status": "success"
}

This endpoint is used to create a company account.

HTTP Request

POST /api/v1/register

This request must contain the security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)

POST Parameters

Parameter Optional Description Type
name false name of the company string
first_name false first name of the scheduler string
last_name false last name of the scheduler string
email false email of the scheduler string, email
password false scheduler password string, min 6 characters
confirm_password false confirm password, same as user password string, min 6 characters

Confirm company account

The command returns JSON structured like this:

{
  "data": [],
  "code": 205,
  "status": "success"
}

This endpoint is used to confirm a company account.

HTTP Request

POST /api/v1/confirm-company-account

Headers

This request must contain the security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)

POST Parameters

Parameter Optional Description Type
token false confirmation token, from create company account email string

Locations

Create location

The command returns JSON structured like this:

{
  "data" : [],
  "code": 134,
  "status": "success"
}

This endpoint is used to create a location for a company.

HTTP Request

POST /api/v1/location

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

POST Parameters

Parameter Optional Description Type
currency_id false currency id of the location integer
country_id false country id of the location integer
timezone_id false timezone id of the location integer
name false name of the location string
city true city of the location string
address true address of the location string
zipcode true zipcode of the location string

Update location

The command returns JSON structured like this:

{
  "data": {
      "id": 2,
      "company_id": 4,
      "currency_id": 1,
      "currency": "lei",
      "country_id": 1,
      "country": "Romania",
      "timezone_id": 1,
      "timezone": "Romania",
      "city": "Cluj-napoca",
      "address": "Calea Turzii nr 36 edited",
      "zipcode": "65432122",
      "name" : "Location 1",
      "company": {
          "id": 4,
          "name": "Bitstone",
          "description": "Bitstone description",
          "logo": "https://s3.eu-central-1.amazonaws.com/.../logo.jpg"
      },
      "departments": [
          {
              "id": 2,
              "location_id": 2,
              "name": "Magento",
              "description": "Lorem Ipsum..."
          }
      ]
  },
  "code": 132,
  "status": "success"
}

This endpoint is used to update a location.

HTTP Request

PUT /api/v1/location/<LOCATION_ID>

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

POST Parameters

Parameter Optional Description Type
currency_id false currency id of the location integer
country_id false country id of the location integer
timezone_id false timezone id of the location integer
name false name of the location string
city true city of the location string
address true address of the location string
zipcode true zipcode of the location string

Location details

The command returns JSON structured like this:

{
  "data": {
        "id": 2,
        "company_id": 4,
        "currency_id": 1,
        "currency": "lei",
        "country_id": 1,
        "country": "Romania",
        "timezone_id": 1,
        "timezone": "Romania",
        "city": "Cluj-napoca",
        "address": "Calea Turzii nr 36 edited",
        "zipcode": "65432122",
        "name" : "Location 1",
        "company": {
            "id": 4,
            "name": "Bitstone",
            "description": "Bitstone description",
            "logo": "https://s3.eu-central-1.amazonaws.com/.../logo.jpg"
        },
        "departments": [
            {
                "id": 2,
                "location_id": 2,
                "name": "Magento",
                "description": "Lorem Ipsum..."
            }
        ]
  },
  "code": 92,
  "status": "success"
}

This endpoint is used to get location details.

HTTP Request

GET /api/v1/location/<LOCATION_ID>

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

List of locations

The command returns JSON structured like this:

{
  "data": {
      "items" : [
          {
              "id": 1,
              "name": "Location 1"
          },
          {
              "id": 2,
              "name": "Location 2"
          }
      ]
  },
  "code": 92,
  "status": "success"
}

This endpoint is used to get a list of locations.

HTTP Request

GET /api/v1/location

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

Delete location

The command returns JSON structured like this:

{
  "data": [],
  "code": 133,
  "status": "success"
}

This endpoint is used to delete a location.

HTTP Request

DELETE /api/v1/location/<LOCATION_ID>

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

Departments

Create department

The command returns JSON structured like this:

{
  "data": [],
  "code": 138,
  "status": "success"
}

This endpoint is used to create a department.

HTTP Request

POST /api/v1/department

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

POST Parameters

Parameter Optional Description Type
location_id false the location id of the department integer
name false name of the entity string
description true description of the entity string
hex_color true explicit color - overwrites auto-generated string

Update department

The command returns JSON structured like this:

{
  "data": {
      "id": 2,
      "location_id": 2,
      "name": "Magento",
      "description": "Lorem Ipsum ...",
      "color": 1,
      "hex_color": ""
  },
  "code": 139,
  "status": "success"
}

This endpoint is used to update a department.

HTTP Request

PUT /api/v1/department/<DEPARTMENT_ID>

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

POST Parameters

Parameter Optional Description Type
location_id false the location id of the department integer
name false name of the entity string
description true description of the entity string
hex_color true explicit color - overwrites auto-generated string

Department details

The command returns JSON structured like this:

{
  "data": {
      "id": 2,
      "location_id": 2,
      "name": "Magento",
      "description": "Lorem Ipsum ...",
      "color": 1,
      "hex_color": ""
  },
  "code": 92,
  "status": "success"
}

This endpoint is used to get department details.

HTTP Request

GET /api/v1/department/<DEPARTMENT_ID>

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

List of departments

The command returns JSON structured like this:

{
  "data": {
      "items" : [
        {
            "id": 1,
            "name": "PHP",
            "color": 1,
            "hex_color": ""
        },
        {
            "id": 2,
            "name": "Magento",
            "color": 2,
            "hex_color": ""
        }
      ]
  },
    "code": 92,
    "status": "success"
}

This endpoint is used to get a list of departments.

HTTP Request

GET /api/v1/department

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

Query Parameters

Parameter Optional Description Type
name true filter departments by name string

Delete department

The command returns JSON structured like this:

{
  "data": [],
  "code": 140,
  "status": "success"
}

This endpoint is used to delete a department.

HTTP Request

DELETE /api/v1/department/<DEPARTMENT_ID>

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

Pools/Functions

Create pool/function

The command returns JSON structured like this:

{
  "data": [],
  "code": 161,
  "status": "success"
}

This endpoint is used to create a pool/function.

HTTP Request

POST /api/v1/pool

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

POST Parameters

Parameter Optional Description Type
name false pool/function name string
description true pool/function description string
is_function false 1 if is function, default value 0 integer
users true array of users ids array
hex_color true explicit color - overwrites auto-generated string

Update pool/function

The command returns JSON structured like this:

{
  "data": {
      "id": 4,
      "company_id": 1,
      "name": "PHP",
      "description": "Super awesome team",
      "is_function": 0,
      "color": 1,
      "hex_color": "#CCC",
      "users": [
          {
              "email": "oana.vlad@bitstone.eu",
              "phone": null,
              "id": 6,
              "profile": {
                  "first_name": "Oana",
                  "last_name": "Vlad",
                  "date_of_birth": null,
                  "address": null,
                  "city": null,
                  "country": "",
                  "country_id": null,
                  "zipcode": null,
                  "timezone": "",
                  "timezone_id": null,
                  "avatar": ""
              }
          },
          {
              "email": "oana.vlad1@bitstone.eu",
              "phone": null,
              "id": 7,
              "profile": {
                  "first_name": "O",
                  "last_name": "V",
                  "date_of_birth": null,
                  "address": null,
                  "city": null,
                  "country": "",
                  "country_id": null,
                  "zipcode": null,
                  "timezone": "",
                  "timezone_id": null,
                  "avatar": ""
              }
          }
      ]
  },
  "code": 162,
  "status": "success"
}

This endpoint is used to update a pool/function.

HTTP Request

PUT /api/v1/pool/<POOL_ID>

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

POST Parameters

Parameter Optional Description Type
name false pool/function name string
description false pool/function description string
is_function false 1 if is function, default value 0 integer
users true array of users ids array
hex_color true explicit color - overwrites auto-generated string

Pool/function details

The command returns JSON structured like this:

{
  "data": {
      "id": 4,
      "company_id": 1,
      "name": "PHP",
      "description": "Super awesome team",
      "is_function": 1,
      "color": 1,
      "hex_color": "#CCC",
      "users": [
          {
              "email": "oana.vlad@bitstone.eu",
              "phone": null,
              "id": 6,
              "profile": {
                  "first_name": "Oana",
                  "last_name": "Vlad",
                  "date_of_birth": null,
                  "address": null,
                  "city": null,
                  "country": "",
                  "country_id": null,
                  "zipcode": null,
                  "timezone": "",
                  "timezone_id": null,
                  "avatar": ""
              }
          },
          {
              "email": "oana.vlad1@bitstone.eu",
              "phone": null,
              "id": 7,
              "profile": {
                  "first_name": "O",
                  "last_name": "V",
                  "date_of_birth": null,
                  "address": null,
                  "city": null,
                  "country": "",
                  "country_id": null,
                  "zipcode": null,
                  "timezone": "",
                  "timezone_id": null,
                  "avatar": ""
              }
          }
      ]
  },
  "code": 92,
  "status": "success"
}

This endpoint is used to get pool/function details.

HTTP Request

GET /api/v1/pool/<POOL_ID>

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

List of pools/functions

The command returns JSON structured like this:

{
   "data": {
      "items" : [
           {
               "id": 1,
               "name": "devs",
               "color": 1,
               "hex_color": ""
           },
           {
               "id": 3,
               "name": "Magento",
               "color": 1,
               "hex_color": ""
           }
       ]
   },
   "code": 92,
   "status": "success"
}

This endpoint is used to get a list of pools/functions.

HTTP Request

GET /api/v1/pool

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

Query Parameters

Parameter Optional Description Type
name true filter pools/functions by name string
functions true filter pools by taken only functions, 1 for functions, 0 for pools integer

Delete pool/function

The command returns JSON structured like this:

{
  "data": [],
  "code": 163,
  "status": "success"
}

This endpoint is used to delete a pool/function.

HTTP Request

DELETE /api/v1/pool/<POOL_ID>

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

Shifts

Create simple/repetitive shift

The command returns JSON structured like this for simple shift:

{
    "data": {
        "id": 393,
        "pool_id": null,
        "company_id": 14,
        "location_id": 52,
        "function_id": 59,
        "department_id": 172,
        "no_slots": 3,
        "remaining_slots": 3,
        "start_date": "2020-03-14",
        "end_date": "2020-03-14",
        "repetitive_end_date": null,
        "start_time": "11:30",
        "end_time": "21:45",
        "break": 15,
        "paid_breaks": true,
        "hours_registration": true,
        "is_publish": 1,
        "note": "test",
        "briefing": "test",
        "repetitive": 0,
        "repeat_type": 0,
        "weekdays": null,
        "sequence_id": 0,
        "open": 1,
        "unassigned": true,
        "requires_approval": 1,
        "until_closing": 1,
        "schedules": []
    },
    "code": 167,
    "status": "success"
}

and like this for repetitive:

{
    "data": {
        "id": 33,
        "pool_id": null,
        "company_id": 14,
        "location_id": 52,
        "function_id": 59,
        "department_id": 171,
        "no_slots": 2,
        "remaining_slots": -3,
        "start_date": "2020-03-19",
        "end_date": "2020-03-25",
        "repetitive_end_date": null,
        "start_time": "07:15",
        "end_time": "13:45",
        "break": 15,
        "paid_breaks": true,
        "hours_registration": true,
        "is_publish": 1,
        "note": "test repetitive note edited",
        "briefing": null,
        "repetitive": null,
        "repeat_type": 0,
        "weekdays": null,
        "sequence_id": null,
        "open": 1,
        "unassigned": true,
        "requires_approval": 1,
        "until_closing": 1,
        "schedules": [
            {
                "id": 330,
                "shift_id": 394,
                "user_id": 65,
                "company_id": 14,
                "function_id": 59,
                "pool_id": null,
                "type_id": 1,
                "estimated_cost": 32.5,
                "calculated_cost": 0,
                "delay_time": 0,
                "log_start_time": null,
                "log_end_time": null,
                "log_break": null,
                "start_date": "2020-03-19",
                "conflict": 0,
                "end_date": "2020-03-19",
                "start_time": "07:15:00",
                "end_time": "13:45:00",
                "holiday_conflict": 0,
                "sick_conflict": 0,
                "until_closing": 1,
                "break": 15,
                "note": "test repetitive note edited",
                "briefing": null,
                "absent": 0,
                "sick": 0,
                "hours_logged": 0,
                "calculated": 0,
                "created_at": "2020-03-06 15:59:45",
                "updated_at": "2020-03-06 15:59:45",
                "deleted_at": null,
                "hours_approval_status": 0,
                "availability_handled": 1,
                "notification_triggered": 1,
                "estimated": 1,
                "estimated_hours": 6.5,
                "calculated_hours": 0,
                "hours_registration": 1,
                "paid_breaks": 1,
                "external": 0,
                "external_pool": null,
                "evaluation": null,
                "evaluation_note": null,
                "logged_via_api": 0,
                "sequence_id": 33
            },... 
        ]
    },
    "code": 167,
    "status": "success"
}

This endpoint is used to create a simple/repetitive shift.

HTTP Request

POST /api/v1/shift

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

POST Parameters

Parameter Optional Description Type
location_id false a valid location id integer
department_id false a valid department id integer
pool_id true pool id integer
function_id false function id integer
start_date false shift start date date, format Y-M-D
end_date false shift end date only for repetitive date, format Y-M-D
start_time false shift start time time, format: HH:MM
end_time false shift end time time, format: HH:MM
no_slots false number of employees per shift integer
note true short note string
briefing true note visible to the employee as well string
estimated_cost true estimated cost value string
calculated_cost true calculated cost value string
reference_number true reference number string
project_number true project number string
paid_breaks false paid breaks flag boolean
hours_registration false hours registration flag boolean
is_publish false is publish flag boolean
break false shift break (see options) string
repeat_type false repeat type: 0 for simple shift (see options) string
weekdays true selected weekdays separated by comma (see options) string
open true open shift flag boolean
requires_approval true for open shift, 0 means that employee can schedule himself to open shift, 1 means employee has to apply first numeric
users true existing and new users array e.g. { “existing”: [1, 2], “new”: [“X”, “Y”] }
external true sent from API only boolean
external_pool true sent from API only string
until_closing false hide end time boolean

Update simple/repetitive shift

The command returns JSON structured like this:

{
    "data": {
        "id": 67,
        "pool_id": "1",
        "company_id": "1",
        "location_id": "1",
        "function_id": 1,
        "department_id": "1",
        "no_slots": "2",
        "start_date": "2017-12-18",
        "end_date": "2017-12-19",
        "start_time": "21:30",
        "end_time": "02:00",
        "break": "30",
        "paid_breaks": "1",
        "hours_registration": 0,
        "is_publish": "0",
        "note": "simple shift",
        "briefing": "briefing visible to employee",
        "repetitive": "0",
        "sequence_id": "0"
    },
    "code": 169,
    "status": "success"
}

and like this for repetitive:

{
  "data": [],
  "code": 174,
  "status": "success"
}

This endpoint is used to update a simple/repetitive shift.

HTTP Request

PUT /api/v1/shift/<SHIFT_ID>

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

POST Parameters

Parameter Optional Description Type
location_id false a valid location id integer
department_id false a valid department id integer
pool_id true pool id integer
function_id false function id integer
start_date false shift start date date, format Y-M-D
end_date false shift end date only for repetitive date, format Y-M-D
start_time false shift start time time, format: HH:MM
end_time false shift end time time, format: HH:MM
no_slots false number of employees per shift integer
note true short note string
briefing true note visible to employee as well string
estimated_cost true estimated cost value string
calculated_cost true calculated cost value string
reference_number true reference number string
project_number true project number string
paid_breaks false paid breaks flag boolean
hours_registration false hours registration flag boolean
is_publish false is publish flag boolean
repetitive false repetitive shift flag boolean
break false shift break (see options) string
repeat_type false repeat type: 0 for simple shift (see options) string
weekdays false selected weekdays separated by comma (see options) string
only false update only this shift or all starting with this one boolean
sequence_id false sequence id (repetitive shift id) integer
open true open shift flag boolean
requires_approval true for open shift, 0 means that employee can schedule himself to open shift, 1 means employee has to apply first numeric
users true existing and new users array e.g. { “existing”: [1, 2], “new”: [“X”, “Y”] }
external true sent from API only boolean
external_pool true sent from API only string
until_closing false hide end time boolean

Shift details

The command returns JSON structured like this:

{
    "data": {
        "id": 102,
        "pool_id": 1,
        "company_id": 1,
        "location_id": 1,
        "function_id": 1,
        "department_id": 1,
        "no_slots": 2,
        "remaining_slots": 1,
        "start_date": "2018-03-14",
        "end_date": "2018-03-14",
        "repetitive_end_date": "2018-03-21",
        "start_time": "10:30:00",
        "end_time": "16:00:00",
        "break": 45,
        "paid_breaks": 0,
        "hours_registration": 0,
        "is_publish": 0,
        "note": "test",
        "briefing": "briefing visible to employee",
        "repetitive": 1,
        "repeat_type": 1,
        "weekdays": "3",
        "sequence_id": 11,
        "open": 0,
        "unassigned": 0,
        "requires_approval" : 0,
        "until_closing": 0,
        "schedules": [
            {
                "id": 173,
                "shift_id": 102,
                "user_id": 55,
                "company_id": 1,
                "type_id": 1,
                "estimated_cost": 0,
                "calculated_cost": 0,
                "delay_time": 0,
                "log_start_time": null,
                "log_end_time": null,
                "log_break": null,
                "start_date": "2018-03-14",
                "absent": 0,
                "hours_logged": 0,
                "calculated": 0,
                "sick": 0,
                "created_at": null,
                "updated_at": null,
                "deleted_at": null,
                "end_date": "2018-03-14",
                "break": 45,
                "note": "test",
                "start_time": "10:30:00",
                "end_time": "16:00:00",
                "hours_approval_status": 0,
                "availability_handled": 0,
                "external": 0,
                "external_pool": null,
                "user": {
                    "id": 55,
                    "email": null,
                    "phone": null,
                    "invited": 0,
                    "email_confirmed": 0,
                    "phone_confirmed": 0,
                    "deleted_at": null,
                    "created_at": "2018-01-24 14:07:14",
                    "updated_at": "2018-01-24 14:07:14",
                    "is_admin": 0,
                    "profile": {
                        "id": 53,
                        "user_id": 55,
                        "first_name": "feb",
                        "last_name": "",
                        "date_of_birth": null,
                        "avatar_id": null,
                        "address": null,
                        "city": null,
                        "country_id": null,
                        "zipcode": null,
                        "timezone_id": null,
                        "deleted_at": null,
                        "created_at": "2018-01-24 14:07:14",
                        "updated_at": "2018-01-24 14:07:14"
                    }
                }
            }
        ]
    },
    "code": 92,
    "status": "success"
}

This endpoint is used to get shift details.

HTTP Request

GET /api/v1/shift/<SHIFT_ID>

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

Delete shift

The command returns JSON structured like this:

{
  "data": [],
  "code": 179,
  "status": "success"
}

This endpoint is used to delete one or more shifts.

HTTP Request

DELETE /api/v1/shift/<SHIFT_ID>

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

DELETE Parameters - only for repetitive shifts

Parameter Optional Description Type
sequence_id false sequence id (repetitive shift id) integer
only false delete only this shift or all starting with this one boolean

Publish shift

The command returns JSON structured like this:

{
  "data": [],
  "code": 178,
  "status": "success"
}

This endpoint is used to publish a shift.

HTTP Request

POST /api/v1/shift/publish/<SHIFT_ID>

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

Publish all

The command returns JSON structured like this:

{
  "data": [],
  "code": 178,
  "status": "success"
}

This endpoint is used to publish all shifts between date range and filters.

HTTP Request

POST /api/v1/shift/publish

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

POST Parameters

Parameter Optional Description Type
start false shift start date date, format Y-M-D
end false shift end date date, format Y-M-D
filters false filters array for access levels array e.g. { “locations”: [1, 2], “departments”: [3, 4], “functions”: [5, 6], “employees”: [7, 8] }

Shift options

The command returns JSON structured like this:

{
    "data": {
        "weekdays": [
            0,
            1,
            2,
            3,
            4,
            5,
            6
        ],
        "breaks": [
            0,
            10,
            15,
            20,
            30,
            45,
            60
        ],
        "repeat_type": {
            "never": "0",
            "every-1-week": "1",
            "every-2-week": "2",
            "every-3-week": "3",
            "every-4-week": "4",
            "every-5-week": "5",
            "every-6-week": "6",
            "every-7-week": "7",
            "every-8-week": "8"
        }
    },
    "code": 92,
    "status": "success"
}

This endpoint is used to get shift options. For example weekdays codes: 0 = Sunday, 1 = Monday …, 6 = Saturday.

HTTP Request

GET /api/v1/shift-options

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

Apply/schedule open shift

The command returns JSON structured like this:

{
  "data": [],
  "code": 246,
  "status": "success"
}

This endpoint is used to apply to an open shift is shift requires application otherwise to schedule to an open.

HTTP Request

POST /api/v1/shift/<SHIFT_ID>/application

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

Approve/Decline open shift application

The command returns JSON structured like this:

{
  "data": [],
  "code": 238,
  "status": "success"
}

This endpoint is used to approve/decline an open shift application.

HTTP Request

POST /api/v1/shift/<SHIFT_ID>/application/<APPLICATION_ID>

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

POST Parameters

Parameter Optional Description Type
status false should be 1(approve) or -1(decline) integer

Export calendar state

The command returns JSON structured like this:

{
    "data": "http://shooble-scheduler.s3.eu-central-1.amazonaws.com/local/uploads/calendar-exports/CalendarExport%202018-04-26%2016-38-57%20Ckompania.xls?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAI5EBLPVFVBY5GD7Q%2F20180426%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20180426T143857Z&X-Amz-SignedHeaders=host&X-Amz-Expires=1200&X-Amz-Signature=c275ee48fb4b8934a7aaaf28c80bd89bd1c50cd69a61728bc9db06b4ad5b6d45",
    "code": 315,
    "status": "success"
}

This endpoint is used to snapshot the current calendar page and export it into an excel.

HTTP Request

POST /api/v1/shift/export

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

POST Parameters

Parameter Optional Description Type
start false shift start date date, format Y-M-D
end false shift end date date, format Y-M-D
filters false filters array for access levels array e.g. { “locations”: [1, 2], “departments”: [3, 4], “functions”: [5, 6], “employees”: [7, 8] }

Copy shifts

The command returns JSON structured like this:

{
    "data": [],
    "code": 324,
    "status": "success"
}

This endpoint is used to copy a list of shifts from a week in another week

HTTP Request

POST /api/v1/shift/copy

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

POST Parameters

Parameter Optional Description Type
selected_week false selected week integer
year_selected_week false year selected week year, integer
specified_week false specified week integer
year_specified_week false year specified week year, integer
without_employee true copy with schedules or no boolean

Get weeks for copy

The command returns JSON structured like this:

{
    "data": [
        {
            "weekNumber": 16,
            "startDate": "2020-04-13",
            "endDate": "2020-04-19"
        },
        {
            "weekNumber": 17,
            "startDate": "2020-04-20",
            "endDate": "2020-04-26"
        },
        {
            "weekNumber": 18,
            "startDate": "2020-04-27",
            "endDate": "2020-05-03"
        },
        {
            "weekNumber": 19,
            "startDate": "2020-05-04",
            "endDate": "2020-05-10"
        }...
    ],
    "code": 92,
    "status": "success"
}

This endpoint is used to get a list with the number of week for the next (nr_of_weeks) weeks.

HTTP Request

GET /api/v1/shift/copy

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

POST Parameters

Parameter Optional Description Type
year true year year, integer
selected_week true selected week integer
nr_of_weeks true the number of weeks that are selected integer

Shift Templates

Shift template details

The command returns JSON structured like this:

{
    "data": {
        "id": 1,
        "pool_id": null,
        "company_id": 14,
        "location_id": 52,
        "function_id": 59,
        "department_id": 172,
        "no_slots": 3,
        "start_time": "11:30",
        "end_time": "21:45",
        "break": 15,
        "paid_breaks": 1,
        "hours_registration": 1,
        "note": "test",
        "briefing": "test",
        "repetitive": 0,
        "weekdays": "",
        "open": 1,
        "requires_approval": 1,
        "until_closing": 1,
        "template_name": "Template 2",
        "repeat_type": 0
    },
    "code": 92,
    "status": "success"
}

This endpoint is used to get shift templates details.

HTTP Request

GET /api/v1/shift-templates/<SHIFT_TEMPLATE_ID>

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

List shift templates

The command returns JSON structured like this:

{
    "data": {
        "items": [
            {
                "id": 1,
                "pool_id": null,
                "company_id": 14,
                "location_id": 52,
                "function_id": 59,
                "department_id": 172,
                "no_slots": 3,
                "start_time": "11:30",
                "end_time": "21:45",
                "break": 15,
                "paid_breaks": 1,
                "hours_registration": 1,
                "note": "test",
                "briefing": "test",
                "repetitive": 0,
                "weekdays": "",
                "open": 1,
                "requires_approval": 1,
                "until_closing": 1,
                "template_name": "Template 2",
                "repeat_type": 0
            },
            {
                "id": 4,
                "pool_id": null,
                "company_id": 14,
                "location_id": 52,
                "function_id": 59,
                "department_id": 172,
                "no_slots": 3,
                "start_time": "11:30",
                "end_time": "21:45",
                "break": 15,
                "paid_breaks": 1,
                "hours_registration": 1,
                "note": "test",
                "briefing": "test",
                "repetitive": 0,
                "weekdays": "",
                "open": 1,
                "requires_approval": 1,
                "until_closing": 1,
                "template_name": "Template 32",
                "repeat_type": 0
            },
            {
                "id": 6,
                "pool_id": null,
                "company_id": 14,
                "location_id": 52,
                "function_id": 59,
                "department_id": 172,
                "no_slots": 3,
                "start_time": "11:30",
                "end_time": "21:45",
                "break": 15,
                "paid_breaks": 1,
                "hours_registration": 1,
                "note": "test",
                "briefing": "test",
                "repetitive": 0,
                "weekdays": "",
                "open": 1,
                "requires_approval": 1,
                "until_closing": 1,
                "template_name": "Template 1",
                "repeat_type": 0
            }
        ]
    },
    "code": 92,
    "status": "success"
}

This endpoint is used to get a list with shift templates

HTTP Request

GET /api/v1/shift-templates

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

Store shift template

The command returns JSON structured like this:

{
    "data": {
        "id": 8,
        "pool_id": null,
        "company_id": 14,
        "location_id": 52,
        "function_id": 59,
        "department_id": 172,
        "no_slots": 3,
        "start_time": "11:30",
        "end_time": "21:45",
        "break": 15,
        "paid_breaks": true,
        "hours_registration": true,
        "note": "test",
        "briefing": "test",
        "repetitive": null,
        "weekdays": null,
        "open": 1,
        "requires_approval": 1,
        "until_closing": 1,
        "template_name": "Template 1",
        "repeat_type": 3
    },
    "code": 325,
    "status": "success"
}

This endpoint is used to store a new shift template

HTTP Request

POST /api/v1/shift-templates

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

POST Parameters

Parameter Optional Description Type
‘location_id’ false location integer
'department_id’ false department integer
'pool_id’ true pool integer
'start_time’ false start time format H:i (09:30)
'end_time’ false end time format H:i (11:30)
'no_slots’ false number of slots integer
'break’ true break integer
'paid_breaks’ true paid breaks boolean
'hour_registration’ true hour registration boolean
'open’ true open shift boolean
'open’ true open boolean
'requires_approval’ false(if open=1) requires approval boolean
'until_closing’ false until closing boolean
'template_name’ false template name string

Update shift template

The command returns JSON structured like this:

{
    "data": {
        "id": 8,
        "pool_id": null,
        "company_id": 14,
        "location_id": 52,
        "function_id": 59,
        "department_id": 172,
        "no_slots": 3,
        "start_time": "11:30",
        "end_time": "21:45",
        "break": 15,
        "paid_breaks": true,
        "hours_registration": true,
        "note": "test2",
        "briefing": "test2",
        "repetitive": 0,
        "weekdays": "",
        "open": 1,
        "requires_approval": 1,
        "until_closing": 1,
        "template_name": "Template 2",
        "repeat_type": 3
    },
    "code": 326,
    "status": "success"
}

This endpoint is used to update a shift template

HTTP Request

PUT /api/v1/shift-templates/{SHIFT_TEMPLATE_ID}

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

PUT Parameters

Parameter Optional Description Type
'location_id’ true location integer
'department_id’ true department integer
'pool_id’ true pool integer
'start_time’ true start time format H:i (09:30)
'end_time’ true end time format H:i (11:30)
'no_slots’ true number of slots integer
'break’ true break integer
'paid_breaks’ true paid breaks boolean
'hour_registration’ true hour registration boolean
'open’ true open shift boolean
'open’ true open boolean
'requires_approval’ true requires approval boolean
'until_closing’ true until closing boolean
'template_name’ true template name string

Delete shift template

The command returns JSON structured like this:

{
    "data": [],
    "code": 327,
    "status": "success"
}

This endpoint is used to delete a shift template

HTTP Request

DELETE /api/v1/shift-templates/{SHIFT_TEMPLATE_ID}

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

Calendar Templates

List calendar templates

The command returns JSON structured like this:

{
    "data": {
        "items": [
            {
                "id": 5,
                "template_name": "Test 1"
            },
            {
                "id": 6,
                "template_name": "Test 2"
            },
            {
                "id": 7,
                "template_name": "Test 3"
            },
            {
                "id": 8,
                "template_name": "Test 4"
            }
        ]
    },
    "code": 92,
    "status": "success"
}

This endpoint is used to get a list with calendar templates

HTTP Request

GET /api/v1/calendar-templates

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

POST Parameters

Parameter Optional Description Type
‘type’ true view mode string

Store calendar template

The command returns JSON structured like this:

{
    "data": {
        "id": 8,
        "pool_id": null,
        "company_id": 14,
        "location_id": 52,
        "function_id": 59,
        "department_id": 172,
        "no_slots": 3,
        "start_time": "11:30",
        "end_time": "21:45",
        "break": 15,
        "paid_breaks": true,
        "hours_registration": true,
        "note": "test",
        "briefing": "test",
        "repetitive": null,
        "weekdays": null,
        "open": 1,
        "requires_approval": 1,
        "until_closing": 1,
        "template_name": "Template 1",
        "repeat_type": 3
    },
    "code": 325,
    "status": "success"
}

This endpoint is used to store a new calendar template

HTTP Request

POST /api/v1/calendar-templates

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

POST Parameters

Parameter Optional Description Type
'start_date’ false start date date
'end_date’ false end date date
'template_name’ false template name string
'type’ false view mode string

Delete calendar template

The command returns JSON structured like this:

{
    "data": [],
    "code": 331,
    "status": "success"
}

This endpoint is used to delete a calendar template

HTTP Request

DELETE /api/v1/calendar-templates/{CALENDAR_TEMPLATE_ID}

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

Copy calendar templates

The command returns JSON structured like this:

{
    "data": [],
    "code": 333,
    "status": "success"
}

This endpoint is used to copy a week to another week

HTTP Request

POST /api/v1/calendar-templates/{CALENDAR_TEMPLATE_ID}

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id
Parameter Optional Description Type
'start_date’ false start date date

Schedules

List full schedule

The command returns JSON structured like this:

{
    "data": {
        "schedules": {
            "locations": {
                "52": [
                    {
                        "id": 130,
                        "shift_id": 105,
                        "user_id": 28,
                        "company_id": 14,
                        "location_id": 52,
                        "department_id": 182,
                        "pool_id": null,
                        "function_id": 60,
                        "type_id": 1,
                        "start_date": "2019-07-19",
                        "end_date": "2019-07-19",
                        "start_time": "05:45:00",
                        "end_time": "15:15:00",
                        "is_publish": 1,
                        "log_start_time": null,
                        "log_end_time": null,
                        "log_break": null,
                        "delay_time": 0,
                        "estimated_hours": 9.5,
                        "calculated_hours": 0,
                        "estimated_cost": 47.5,
                        "calculated_cost": 0,
                        "note": "test single note edited",
                        "briefing": "test single briefing",
                        "repetitive": 0,
                        "open": 0,
                        "unassigned": 0,
                        "no_slots": 3,
                        "function_name": "Developer",
                        "hours_logged": 0,
                        "paid_breaks": 1,
                        "hours_registration": 1,
                        "external": 0,
                        "external_pool": null,
                        "created_at": "2019-04-22 16:45:37",
                        "updated_at": "2019-04-22 16:45:37"
                    }
                ]
            }
        },
        "open-shifts": {
            "locations": []
        },
        "unassigned-shifts": {
            "locations": {
                "52": [
                    {
                        "id": 105,
                        "company_id": 14,
                        "location_id": 52,
                        "department_id": 182,
                        "pool_id": null,
                        "function_id": 60,
                        "start_date": "2019-07-19",
                        "end_date": "2019-07-19",
                        "start_time": "05:45:00",
                        "end_time": "15:15:00",
                        "note": "test single note edited",
                        "briefing": "test single briefing",
                        "is_publish": 1,
                        "repetitive": 0,
                        "open": 0,
                        "unassigned": 1,
                        "function_name": "Developer",
                        "requires_approval": 0,
                        "no_slots": 2,
                        "total_slots": 3,
                        "estimated_cost": 0,
                        "estimated_hours": 0,
                        "calculated_cost": 0,
                        "calculated_hours": 0,
                        "created_at": "2019-04-22 16:45:37",
                        "updated_at": "2019-04-22 16:45:37"
                    }
                ]
            }
        },
        "holidays": [],
        "locations": [
        {
            "id": 52,
            "name": "Calea Turzii",
            "company_id": 14,
            "currency_id": 92,
            "currency": "Romanian Leu",
            "country_id": 176,
            "country": "Romania",
            "timezone_id": 141,
            "timezone": "Bucharest",
            "city": "Cluj-Napoca",
            "address": "Calea Turzii 36",
            "zipcode": "3077",
            "company": {
                "id": 14,
                "name": "Bitstone",
                "branch_id": null,
                "description": "Bitstone monitoring test company",
                "logo": ""
            },
            "departments": [
                {
                    "id": 170,
                    "location_id": 52,
                    "name": "TTW/TA",
                    "description": "TTW/TA department",
                    "deleted_at": null,
                    "created_at": "2018-06-21 12:25:16",
                    "updated_at": "2018-06-21 12:25:16",
                    "company_id": 14,
                    "color": 1,
                    "hex_color": "",
                    "users": [
                        {
                            "id": 28,
                            "email": "aurelian.pop@yopmail.com",
                            "phone": null,
                            "language": "nl",
                            "profile": {
                                "first_name": "Aurelian",
                                "last_name": "Pop",
                                "date_of_birth": null,
                                "address": null,
                                "city": null,
                                "country": "",
                                "country_id": null,
                                "zipcode": null,
                                "timezone": "",
                                "timezone_id": null,
                                "avatar": "",
                                "flex_worker": 0
                            }
                        },
                        {
                            "id": 29,
                            "email": "dan.brinzaru@yopmail.com",
                            "phone": null,
                            "language": "nl",
                            "profile": {
                                "first_name": "Dan",
                                "last_name": "Brinzaru",
                                "date_of_birth": null,
                                "address": null,
                                "city": null,
                                "country": "",
                                "country_id": null,
                                "zipcode": null,
                                "timezone": "",
                                "timezone_id": null,
                                "avatar": "",
                                "flex_worker": 0
                            }
                        },
                        {
                            "id": 30,
                            "email": "andrei.luca@yopmail.com",
                            "phone": null,
                            "language": "nl",
                            "profile": {
                                "first_name": "Andrei",
                                "last_name": "Luca",
                                "date_of_birth": null,
                                "address": null,
                                "city": null,
                                "country": "",
                                "country_id": null,
                                "zipcode": null,
                                "timezone": "",
                                "timezone_id": null,
                                "avatar": "",
                                "flex_worker": 0
                            }
                        },
                        {
                            "id": 31,
                            "email": "silviu.suciu@yopmail.com",
                            "phone": null,
                            "language": "nl",
                            "profile": {
                                "first_name": "Silviu",
                                "last_name": "Suciu",
                                "date_of_birth": null,
                                "address": null,
                                "city": null,
                                "country": "",
                                "country_id": null,
                                "zipcode": null,
                                "timezone": "",
                                "timezone_id": null,
                                "avatar": "",
                                "flex_worker": 0
                            }
                        },
                        {
                            "id": 32,
                            "email": "dumitru.horge@yopmail.com",
                            "phone": null,
                            "language": "nl",
                            "profile": {
                                "first_name": "Dumitru",
                                "last_name": "Horge",
                                "date_of_birth": null,
                                "address": null,
                                "city": null,
                                "country": "",
                                "country_id": null,
                                "zipcode": null,
                                "timezone": "",
                                "timezone_id": null,
                                "avatar": "",
                                "flex_worker": 0
                            }
                        },
                        {
                            "id": 33,
                            "email": "ionut.sipetean@yopmail.com",
                            "phone": null,
                            "language": "nl",
                            "profile": {
                                "first_name": "Ionut",
                                "last_name": "Sipetean",
                                "date_of_birth": null,
                                "address": null,
                                "city": null,
                                "country": "",
                                "country_id": null,
                                "zipcode": null,
                                "timezone": "",
                                "timezone_id": null,
                                "avatar": "",
                                "flex_worker": 0
                            }
                        }
                    ]
                },
                {
                    "id": 171,
                    "location_id": 52,
                    "name": "Thrive themes",
                    "description": "Thrive themes department",
                    "deleted_at": null,
                    "created_at": "2018-06-21 12:25:16",
                    "updated_at": "2018-06-21 12:25:16",
                    "company_id": 14,
                    "color": 2,
                    "hex_color": "",
                    "users": [
                        {
                            "id": 31,
                            "email": "silviu.suciu@yopmail.com",
                            "phone": null,
                            "language": "nl",
                            "profile": {
                                "first_name": "Silviu",
                                "last_name": "Suciu",
                                "date_of_birth": null,
                                "address": null,
                                "city": null,
                                "country": "",
                                "country_id": null,
                                "zipcode": null,
                                "timezone": "",
                                "timezone_id": null,
                                "avatar": "",
                                "flex_worker": 0
                            }
                        },
                        {
                            "id": 44,
                            "email": "andrei.salagean.scheduler@yopmail.com",
                            "phone": null,
                            "language": "nl",
                            "profile": {
                                "first_name": "Andrei",
                                "last_name": "Salagean Scheduler",
                                "date_of_birth": null,
                                "address": null,
                                "city": null,
                                "country": "",
                                "country_id": null,
                                "zipcode": null,
                                "timezone": "",
                                "timezone_id": null,
                                "avatar": "",
                                "flex_worker": 0
                            }
                        },
                        {
                            "id": 45,
                            "email": "andrei.salagean@yopmail.com",
                            "phone": null,
                            "language": "nl",
                            "profile": {
                                "first_name": "Andrei",
                                "last_name": "Salagean",
                                "date_of_birth": null,
                                "address": null,
                                "city": null,
                                "country": "",
                                "country_id": null,
                                "zipcode": null,
                                "timezone": "",
                                "timezone_id": null,
                                "avatar": "",
                                "flex_worker": 0
                            }
                        },
                        {
                            "id": 46,
                            "email": "dragos.petcu@yopmail.com",
                            "phone": null,
                            "language": "nl",
                            "profile": {
                                "first_name": "Dragos",
                                "last_name": "Petcu",
                                "date_of_birth": null,
                                "address": null,
                                "city": null,
                                "country": "",
                                "country_id": null,
                                "zipcode": null,
                                "timezone": "",
                                "timezone_id": null,
                                "avatar": "",
                                "flex_worker": 0
                            }
                        }]
                }
            ]   
        }],
        "availabilities": [],
        "conflicts": {
            "2020-02-20": [
                {
                    "id": 236,
                    "first_name": "Teodora",
                    "last_name": "Clepea",
                    "user_id": 66,
                    "department_id": 171,
                    "start_date": "2020-02-20",
                    "end_date": "2020-02-20",
                    "start_time": "07:15:00",
                    "end_time": "13:45:00",
                    "conflict_type": "conflict"
                },
                {
                    "id": 245,
                    "first_name": "Teodora",
                    "last_name": "Clepea",
                    "user_id": 66,
                    "department_id": 171,
                    "start_date": "2020-02-20",
                    "end_date": "2020-02-20",
                    "start_time": "07:15:00",
                    "end_time": "13:45:00",
                    "conflict_type": "conflict"
                }
            ]
        },
        "holiday_conflicts": {
            "2020-02-26": [
                {
                    "id": 274,
                    "first_name": "Teodora",
                    "last_name": "Clepea",
                    "user_id": 66,
                    "department_id": 172,
                    "start_date": "2020-02-26",
                    "end_date": "2020-02-26",
                    "start_time": "13:30:00",
                    "end_time": "18:45:00",
                    "conflict_type": "holiday_conflict"
                },
                {
                    "id": 277,
                    "first_name": "Teodora",
                    "last_name": "Clepea",
                    "user_id": 66,
                    "department_id": 172,
                    "start_date": "2020-02-26",
                    "end_date": "2020-02-26",
                    "start_time": "14:30:00",
                    "end_time": "21:45:00",
                    "conflict_type": "holiday_conflict"
                }
            ],
        },
        "sick_conflicts": {
            "2020-02-21": [
                {
                    "id": 237,
                    "first_name": "Teodora",
                    "last_name": "Clepea",
                    "user_id": 66,
                    "department_id": 171,
                    "start_date": "2020-02-21",
                    "end_date": "2020-02-21",
                    "start_time": "07:15:00",
                    "end_time": "13:45:00",
                    "conflict_type": "sick_conflict"
                },
                {
                    "id": 246,
                    "first_name": "Teodora",
                    "last_name": "Clepea",
                    "user_id": 66,
                    "department_id": 171,
                    "start_date": "2020-02-21",
                    "end_date": "2020-02-21",
                    "start_time": "07:15:00",
                    "end_time": "13:45:00",
                    "conflict_type": "sick_conflict"
                }
            ]
        }
    },
    "code": 92,
    "status": "success"
}

This endpoint is used to get the list of schedules. It will return the schedules, open-shift and unassigned-shifts grouped by locations, the user holidays and also a helper structure locations that contains the details of the locations/departments and users that the user that makes the request can view or manage.

Important note: for employee users, the cost related fields won’t be displayed for privacy reasons

Also this endpoint returns the conflicts between schedule and another schedule/time off/sick status.

HTTP Request

GET /api/v1/schedule

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

Query Parameters

Parameter Optional Description Type
list_type false - day type will return the schedules that start or end in the date given by start parameter
- week type will return the schedules that start in the given interval
- month type will return the shifts that start in the given interval
string (day, week, month)
mode false - use manage mode for scheduling view
- use view mode for employee schedule list
string (view, manage)
start false report start date date, format:Y-M-D
end true report end date (optional for list_type = day) date, format:Y-M-D
created_at true all schedules after this created_at date, format:Y-M-D
updated_at true all schedules after this updated_at date, format:Y-M-D
pool true id of the corresponding pool integer
external true external schedules filtering 0/1, true/false
is_publish true published schedules filtering 0/1, true/false

Log hours

The command returns JSON structured like this:

{
  "data": [],
  "code": 206,
  "status": "success"
}

This endpoint is used to log hours.

HTTP Request

POST /api/v1/log-hours/<SCHEDULE_ID>

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token

POST Parameters

Parameter Optional Description Type
start_time false start time date, format: Y-M-D H:M
end_time false end time date, format: Y-M-D H:M
break false break(in minutes) numeric
logged_via_api true used when logging hours via API, 0 default, 1 when log via API boolean

Hour logs approval

The command returns JSON structured like this:

{
    "data": [],
    "code": 303,
    "status": "success"
}

This endpoint is used to approved or not the logged hours. Only a scheduler that manages the department/pool/location where the shift is placed can approve this Once approved/decline, it cannot be changed

HTTP Request

PUT /api/v1/hours-approval/<SCHEDULE_ID>

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token

POST Parameters

Parameter Optional Description Type
status false approval status, needs to be -1 or 2 integer: -1 or 2

Set job presence

The command returns JSON structured like this:

{
  "data": [],
  "code": 207,
  "status": "success"
}

This endpoint is used to set job presence or delay time.

HTTP Request

POST /api/v1/job-presence/<SCHEDULE_ID>

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

POST Parameters

Parameter Optional Description Type
absent true if user was absent 1, otherwise 0 numeric
sick true if user was sick 1, otherwise 0 numeric
delay_time true if user is not absent but has a delay time, number of minutes numeric

Export logged hours

The command returns JSON structured like this:

{
  "data": {
      "path": "https://s3.../hours-export-151370011719852_19-12-2017.json"
  },
  "code": 92,
  "status": "success"
}

This endpoint is used export a json file with logged hours.

HTTP Request

GET /api/v1/export-hours

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id
location valid locations ids, separated by comma(optional)
department valid departments ids, separated by comma(optional)

Query Parameters

Parameter Optional Description Type
shift_id true filter data after shift id integer

Schedule details

The command returns JSON structured like this:

{
    "data": {
        "id": 156,
        "shift_id": 95,
        "user_id": 68,
        "company_id": 1,
        "location_id": 1,
        "department_id": 1,
        "pool_id": 1,
        "function_id": 1,
        "type_id": 1,
        "start_time": "22:30:00",
        "end_time": "10:00:00",
        "note": "note visible only to scheduler",
        "briefing": "briefing visible to both",
        "break": 0,
        "delay_time": 0,
        "estimated_cost": 0,
        "calculated_cost": 0,
        "start_date": "2018-03-06",
        "end_date": "2018-03-07",
        "repetitive_end_date": null,
        "is_publish": 1,
        "sequence_id": 0,
        "repetitive": 0,
        "repeat_type": 0,
        "weekdays": null,
        "external": 0,
        "external_pool": null,
        "shift": {
            "id": 95,
            "company_id": 1,
            "location_id": 1,
            "department_id": 1,
            "pool_id": 1,
            "function_id": 1,
            "start_date": "2018-03-06",
            "end_date": "2018-03-07",
            "start_time": "22:30:00",
            "end_time": "10:00:00",
            "break": 0,
            "no_slots": 2,
            "note": "miercuri schedule update",
            "briefing": "briefing sample",
            "estimated_cost": 0,
            "calculated_cost": 0,
            "reference_number": null,
            "project_number": null,
            "sequence_id": 0,
            "paid_breaks": 1,
            "hours_registration": 0,
            "repetitive": 0,
            "is_publish": 1,
            "unassigned": 1,
            "open": 0,
            "deleted_at": null,
            "created_at": "2018-01-31 15:52:25",
            "updated_at": "2018-01-31 15:52:25",
            "locked": 0
        },
        "user": {
            "id": 68,
            "email": null,
            "phone": null,
            "invited": 0,
            "email_confirmed": 0,
            "phone_confirmed": 0,
            "deleted_at": null,
            "created_at": "2018-01-26 17:03:29",
            "updated_at": "2018-01-26 17:03:29",
            "is_admin": 0,
            "profile": {
                "id": 66,
                "user_id": 68,
                "first_name": "daniela",
                "last_name": "",
                "date_of_birth": null,
                "avatar_id": null,
                "address": null,
                "city": null,
                "country_id": null,
                "zipcode": null,
                "timezone_id": null,
                "deleted_at": null,
                "created_at": "2018-01-26 17:03:29",
                "updated_at": "2018-01-26 17:03:29"
            }
        },
        "email": "amalia.employee@yopmail.com",
        "log_start_time": null,
        "log_end_time": null,
        "log_break": null,
        "hours_logged": 0,
        "profile": {
            "first_name": "Amalia",
            "last_name": "Employee",
            "date_of_birth": null,
            "address": null,
            "city": null,
            "country": "",
            "country_id": null,
            "zipcode": null,
            "timezone": "",
            "timezone_id": null,
            "avatar": ""
        }
    },
    "code": 92,
    "status": "success"
}

This endpoint is used to get schedule details.

HTTP Request

GET /api/v1/schedule/<SCHEDULE_ID>

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

Delete schedule

The command returns JSON structured like this:

{
  "data": [],
  "code": 235,
  "status": "success"
}

This endpoint is used to delete one or more schedules.

HTTP Request

DELETE /api/v1/schedule/<SCHEDULE_ID>

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id
Parameter Optional Description Type
sequence_id false sequence id (repetitive shift id) integer
only false delete only this schedule or all having the same employee starting with this one boolean

Evaluate employee

The command returns JSON structured like this:

{
  "data": [],
  "code": 256,
  "status": "success"
}

This endpoint is used to evaluate employee on schedule.

HTTP Request

POST /api/v1/schedule/<SCHEDULE_ID>/evaluate

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

POST Parameters

Parameter Optional Description Type
evaluation false evaluation mark 1-5 numeric
evaluation_note false evaluation note string

Declaration types

Create declaration type

The command returns JSON structured like this:

{
  "data": [],
  "code": 209,
  "status": "success"
}

This endpoint is used to create a declaration type

HTTP Request

POST /api/v1/declaration-type

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

POST Parameters

Parameter Optional Description Type
name false name of declaration type string
default_amount false default amount integer
default_price false default price float
allowed_fields true list of allowed fields(from allowed fields endpoint), separated by “;” string

Update declaration type

The command returns JSON structured like this:

{
   "data": {
         "id": 6,
         "company_id": 1,
         "name": "Type 14",
         "default_amount": 10,
         "default_price": 20,
         "allowed_fields": [
             "price",
             "description"
         ]
   },
   "code": 92,
   "status": "success"
}

This endpoint is used to update an announcement.

HTTP Request

PUT /api/v1/declaration-type/<DECLARATION_TYPE_ID>

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token

POST Parameters

Parameter Optional Description Type
name false name of declaration type string
default_amount false default amount integer
default_price false default price float
allowed_fields true list of allowed fields(from allowed fields endpoint), separated by “;” string

Declaration type details

The command returns JSON structured like this:

{
  "data": {
      "id": 6,
      "company_id": 1,
      "name": "Type 14",
      "default_amount": 10,
      "default_price": 20,
      "allowed_fields": [
          "price",
          "description"
      ]
  },
  "code": 92,
  "status": "success"
}

This endpoint is used to get declaration type details.

HTTP Request

GET /api/v1/declaration-type/<DECLARATION_TYPE_ID>

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token

List of declaration types

The command returns JSON structured like this:

{
   "data": {
       "items": [
           {
               "id": 3,
               "company_id": 2,
               "name": "Type 1",
               "default_amount": 10,
               "default_price": 20,
               "allowed_fields": [
                   "price",
                   "description"
               ]
           }
       ]
   },
   "code": 92,
   "status": "success"
}

This endpoint is used to get a list of declaration types.

HTTP Request

GET /api/v1/declaration-type

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

Delete declaration type

The command returns JSON structured like this:

{
  "data": [],
  "code": 211,
  "status": "success"
}

This endpoint is used to delete a declaration type.

HTTP Request

DELETE /api/v1/declaration-type/<DECLARATION_TYPE_ID>

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token

List of allowed types

The command returns JSON structured like this:

{
   "data": {
       "items": [
           "amount",
           "description",
           "price",
           "upload"
       ]
   },
   "code": 92,
   "status": "success"
}

This endpoint is used to get a list of allowed fields.

HTTP Request

GET /api/v1/allowed-fields

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token

Declarations

Create declaration

Files array should look like this:

[
  {
    "path" : "https://s3.eu-central-1.../cats-images-5v0xPKXlOaAlYMxrl.jpg"
  },
  {
    "path" : "https://s3.eu-central-1.../cute-cat-babydjuW5kLQqPHgjYZH.jpg"
  }
]

The command returns JSON structured like this:

{
  "data": [],
  "code": 215,
  "status": "success"
}

This endpoint is used to create a declaration

HTTP Request

POST /api/v1/schedule/<SCHEDULE_ID>/declaration

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token

POST Parameters

Parameter Optional Description Type
type_id false id of declaration type numeric
amount false amount integer
price false price float
description true description string
files true array of files array

Update declaration

Files array should look like this:

[
  {
    "path" : "https://s3.eu-central-1.../cats-images-5v0xPKXlOaAlYMxrl.jpg"
  },
  {
    "path" : "https://s3.eu-central-1.../cute-cat-babydjuW5kLQqPHgjYZH.jpg"
  }
]

The command returns JSON structured like this:

{
   "data": {
       "id": 11,
       "schedule_id": 2,
       "type_id": 4,
       "amount": 222,
       "price": 32,
       "description": "description updated",
       "type": {
           "id": 4,
           "company_id": 1,
           "name": "Type 1 edited",
           "default_amount": 20,
           "default_price": 10,
           "allowed_fields": [
               "price",
               "description",
               "upload"
           ]
       },
       "files": [
           {
               "id": 12,
               "url": "https://s3.eu-central-1.../47060553-images-of-cute-catsgVfOr5eBFooWe3e3.jpg"
           },
           {
               "id": 13,
               "url": "https://s3.eu-central-1.../2u8apskxCU0SJ0Hmm1iTRzM.jpg"
           }
       ]
   },
   "code": 216,
   "status": "success"
}

This endpoint is used to update a declaration.

HTTP Request

PUT /api/v1/schedule/<SCHEDULE_ID>/declaration/<DECLARATION_ID>

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token

POST Parameters

Parameter Optional Description Type
type_id false id of declaration type numeric
amount false amount integer
price false price float
description true description string
files true array of files array

Declaration details

The command returns JSON structured like this:

{
  "data": {
      "id": 11,
      "schedule_id": 2,
      "type_id": 4,
      "amount": 1003,
      "price": 202,
      "description": "description description",
      "type": {
          "id": 4,
          "company_id": 1,
          "name": "Type 1 edited",
          "default_amount": 20,
          "default_price": 10,
          "allowed_fields": [
              "price",
              "description",
              "upload"
          ]
      },
      "files": [
          {
              "id": 6,
              "url": "https://s3.eu-central-1.../cats-images-5v0xPKXlOaAlYMxrl.jpg"
          },
          {
              "id": 7,
              "url": "https://s3.eu-central-1.../cute-cat-babydjuW5kLQqPHgjYZH.jpg"
          }
      ]
  },
  "code": 92,
  "status": "success"
}

This endpoint is used to get declaration details.

HTTP Request

GET /api/v1/schedule/<SCHEDULE_ID>/declaration/<DECLARATION_ID>

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token

List of declarations

The command returns JSON structured like this:

{
   "data": {
       "items": [
           {
               "id": 2,
               "schedule_id": 2,
               "type_id": 4,
               "amount": 100,
               "price": 20,
               "description": "Test test",
               "type": {
                   "id": 4,
                   "company_id": 1,
                   "name": "Type 1 edited",
                   "default_amount": 20,
                   "default_price": 10,
                   "allowed_fields": [
                       "price",
                       "description",
                       "upload"
                   ]
               },
               "files": []
           },
           {
               "id": 3,
               "schedule_id": 2,
               "type_id": 4,
               "amount": 100,
               "price": 20,
               "description": "Test description",
               "type": {
                   "id": 4,
                   "company_id": 1,
                   "name": "Type 2 edited",
                   "default_amount": 20,
                   "default_price": 10,
                   "allowed_fields": [
                       "price",
                       "description",
                       "upload"
                   ]
               },
               "files": []
           }
       ]
   },
   "code": 92,
   "status": "success"
}

This endpoint is used to get a list of declarations.

HTTP Request

GET /api/v1/schedule/<SCHEDULE_ID>/declaration

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token

Delete declaration

The command returns JSON structured like this:

{
  "data": [],
  "code": 217,
  "status": "success"
}

This endpoint is used to delete a declaration.

HTTP Request

DELETE /api/v1/schedule/<SCHEDULE_ID>/declaration/<DECLARATION_ID>

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token

Announcements

Create announcement

The command returns JSON structured like this:

{
  "data": [],
  "code": 182,
  "status": "success"
}

This endpoint is used to create an announcement

HTTP Request

POST /api/v1/announcement

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

POST Parameters

Parameter Optional Description Type
date false announcement date date, format Y-M-D H:i:s
name false announcement name string
location_id true id of the location integer
department_id true id of the department integer
description true announcement description string

Update announcement

The command returns JSON structured like this:

{
   "data": {
      "id": 28,
      "date": "2017-11-20 20:00:00",
      "description": "Super awesome announcement 1 edited",
      "name": "Announcement 1 edited",
      "company_id": 1,
      "location_id": null,
      "department_id": null
  },
  "code": 183,
  "status": "success"
}

This endpoint is used to update an announcement.

HTTP Request

PUT /api/v1/announcement/<ANNOUNCEMENT_ID>

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

POST Parameters

Parameter Optional Description Type
date false announcement date date, format Y-M-D H:i:s
name false announcement name string
description true announcement description string

Announcement details

The command returns JSON structured like this:

{
  "data": {
      "id": 28,
      "date": "2017-11-20 20:00:00",
      "description": "Super awesome announcement 1 edited",
      "name": "Announcement 1 edited",
      "company_id": 1,
      "location_id": null,
      "department_id": null
  },
  "code": 92,
  "status": "success"
}

This endpoint is used to get announcement details.

HTTP Request

GET /api/v1/announcement/<ANNOUNCEMENT_ID>

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

List of announcements

The command returns JSON structured like this:

{
   "data": {
      "pagination": {
          "total": 4,
          "per_page": 10,
          "current_page": 1,
          "last_page": 1,
          "next_page": null,
          "from": 1,
          "to": 4
      },
      "items": [
          {
              "id": 28,
              "date": "2017-11-20 20:00:00",
              "description": "Super awesome announcement 1 edited",
              "name": "Announcement 1 edited",
              "company_id": 1,
              "location_id": 1,
              "department_id": null
          },
          {
              "id": 29,
              "date": "2017-11-20 20:00:00",
              "description": "Super awesome announcement 2",
              "name": "Announcement 2",
              "company_id": 1,
              "location_id": 1,
              "department_id": null
          }
      ]
  },
  "code": 92,
  "status": "success"
}

This endpoint is used to get a list of announcements.

HTTP Request

GET /api/v1/announcement

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id
location valid locations ids, separated by comma(optional)
department valid departments ids, separated by comma(optional)

Query Parameters

Parameter Optional Description Type
name true name filter string
per_page true number of items per page, default 10 integer
page true page number, default 1 integer

Delete announcement

The command returns JSON structured like this:

{
  "data": [],
  "code": 184,
  "status": "success"
}

This endpoint is used to delete an announcement.

HTTP Request

DELETE /api/v1/announcement/<ANNOUNCEMENT_ID>

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

User holidays

Create holiday

The command returns JSON structured like this:

{
  "data": [],
  "code": 152,
  "status": "success"
}

This endpoint is used to create a holiday.

HTTP Request

POST /api/v1/holiday

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

POST Parameters

Parameter Optional Description Type
user_id false id of the user integer
type_id false id of holiday type integer
start_date false start_date of the holiday date, format Y-M-D
end_date false end_date of the holiday date, format Y-M-D

Update holiday

The command returns JSON structured like this:

{
  "data": {
      "user_id": 1,
      "company_id": 1,
      "type_id": 1,
      "type": "concediu de odihna",
      "start_date": "2017-10-29",
      "end_date": "2017-11-06",
      "status": 1,
      "user": {
          "email": "oana.vlad@bitstone.eu",
          "phone": "83257438832",
          "id": 1,
          "profile": {
              "first_name": "Oaannna",
              "last_name": "Vllaaad",
              "date_of_birth": null,
              "address": "Calea Turzi nr 36",
              "city": "Cluj",
              "country": "Romania",
              "country_id": 1,
              "zipcode": "123456",
              "timezone": "Romania",
              "timezone_id": 1,
              "avatar": "https://s3.eu-central-1.amazonaws.com/.../photo.jpg"
          }
      }
  },
  "code": 153,
  "status": "success"
}

This endpoint is used to update user holiday.

HTTP Request

PUT /api/v1/holiday/<HOLIDAY_ID>

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

POST Parameters

Parameter Optional Description Type
user_id false id of the user integer
type_id false id of holiday type integer
start_date false start_date of the holiday date, format Y-M-D
end_date false end_date of the holiday date, format Y-M-D

Holiday details

The command returns JSON structured like this:

{
  "data": {
      "user_id": 1,
      "company_id": 1,
      "type_id": 1,
      "type": "concediu de odihna",
      "start_date": "2017-10-29",
      "end_date": "2017-11-06",
      "status": 1,
      "user": {
            "email": "oana.vlad@bitstone.eu",
            "phone": "83257438832",
            "id": 1,
            "profile": {
                "first_name": "Oaannna",
                "last_name": "Vllaaad",
                "date_of_birth": null,
                "address": "Calea Turzi nr 36",
                "city": "Cluj",
                "country": "Romania",
                "country_id": 1,
                "zipcode": "123456",
                "timezone": "Romania",
                "timezone_id": 1,
                "avatar": "https://s3.eu-central-1.amazonaws.com/.../photo.jpg"
            }
      }
  },
  "code": 92,
  "status": "success"
}

This endpoint is used to get holiday details.

HTTP Request

GET /api/v1/holiday/<HOLIDAY_ID>

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

List of holidays

The command returns JSON structured like this:

{
  "data": {
      "pagination": {
          "total": 2,
          "per_page": 10,
          "current_page": 1,
          "last_page": 1,
          "next_page": null,
          "from": 1,
          "to": 2
      },
      "items": [
          {
              "id": 4,
              "user_id": 1,
              "company_id": 1,
              "type_id": 1,
              "type": "concediu de odihna",
              "start_date": "2017-10-21",
              "end_date": "2017-10-23",
              "status": 1,
              "user": {
                  "email": "oana.vlad@bitstone.eu",
                  "phone": "83257438832",
                  "id": 1,
                  "profile": {
                      "first_name": "Oaannna",
                      "last_name": "Vllaaad",
                      "date_of_birth": null,
                      "address": "Calea Turzi nr 36",
                      "city": "Cluj",
                      "country": "Romania",
                      "country_id": 1,
                      "zipcode": "123456",
                      "timezone": "Romania",
                      "timezone_id": 1,
                      "avatar": "https://s3.eu-central-1.amazonaws.com/.../photo.jpg"
                  }
              }
          },
          {
              "id": 6,
              "user_id": 1,
              "company_id": 1,
              "type_id": 1,
              "type": "concediu de odihna",
              "start_date": "2017-11-07",
              "end_date": "2017-11-23",
              "status": 1,
              "user": {
                  "email": "oana.vlad@bitstone.eu",
                  "phone": "83257438832",
                  "id": 1,
                  "profile": {
                      "first_name": "Oaannna",
                      "last_name": "Vllaaad",
                      "date_of_birth": null,
                      "address": "Calea Turzi nr 36",
                      "city": "Cluj",
                      "country": "Romania",
                      "country_id": 1,
                      "zipcode": "123456",
                      "timezone": "Romania",
                      "timezone_id": 1,
                      "avatar": "https://s3.eu-central-1.amazonaws.com/.../photo.jpg"
                  }
              }
          }
      ]
  },
  "code": 92,
  "status": "success"
}

This endpoint is used to get a list of holidays.

HTTP Request

GET /api/v1/holiday

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id
location valid locations ids, separated by comma(optional)
department valid departments ids, separated by comma(optional)
pool valid pools ids, separated by comma(optional)

Query Parameters

Parameter Optional Description Type
per_page true number of items per page, default 10 integer
page true page number, default 1 integer
status true filter holidays by status integer
type_id true filter holidays by type id integer
start_date true filter holidays by start date date, format Y-M-D
end_date true filter holidays by end date date, format Y-M-D

List of employee holidays

The command returns JSON structured like this:

{
  "data": {
      "items": [
          {
              "id": 1,
              "user_id": 6,
              "company_id": 1,
              "type_id": 1,
              "type": "concediu de odihna",
              "start_date": "2017-11-30",
              "end_date": "2017-12-04",
              "status": 3
          }
      ]
  },
  "code": 92,
  "status": "success"
}

This endpoint is used to get a list of employee holidays.

HTTP Request

GET /api/v1/employee/holiday

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token

Query Parameters

Parameter Optional Description Type
per_page true number of items per page, default 10 integer
page true page number, default 1 integer
status true filter holidays by status integer
type_id true filter holidays by type id integer
start_date true filter holidays by start date date, format Y-M-D
end_date true filter holidays by end date date, format Y-M-D

Delete holiday

The command returns JSON structured like this:

{
  "data": [],
  "code": 154,
  "status": "success"
}

This endpoint is used to delete a holiday.

HTTP Request

DELETE /api/v1/holiday/<HOLIDAY_ID>

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

Cancel holiday request

The command returns JSON structured like this:

{
  "data": [],
 "code": 159,
 "status": "success"
}

This endpoint is used to cancel a holiday request. Only the owner of the request is allowed to do this action.

HTTP Request

POST /api/v1/holiday/<HOLIDAY_ID>/cancel

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token

Accept/decline holiday request

The command returns JSON structured like this:

{
  "data": [],
  "code": 160,
  "status": "success"
}

This endpoint is used to accept/decline a holiday request. Only company admins are allowed to do this action.

HTTP Request

POST /api/v1/holiday/<HOLIDAY_ID>/approval

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

POST Parameters

Parameter Optional Description Type
status false accept = 2 and decline = -1 integer

Get holiday types

The command returns JSON structured like this:

{
 "data": {
     "items": [
         {
             "id": 1,
             "name": "concediu de odihna"
         }
     ]
 },
 "code": 92,
 "status": "success"
}

This endpoint is used to get all holiday types.

HTTP Request

GET /api/v1/holiday-type

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token

National holidays

Import holidays

The command returns JSON structured like this:

{
  "data": [],
  "code": 180,
  "status": "success"
}

This endpoint is used to import an excel file with national holidays.

HTTP Request

POST /api/v1/national-holiday/import

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

POST Parameters

Parameter Optional Description Type
locations_id false id of the locations, separated with comma array
file true file(required if template_id is not set) mime types: xls, xlsx
template_id true template id(required if file is not set) numeric

List of national holidays

The command returns JSON structured like this:

{
  "data": {
      "items": [
          {
              "id": 1,
              "company_id": 1,
              "name": "Ziua copilului",
              "date": "2001-07-20",
              "location_id": 1
          },
          {
              "id": 2,
              "company_id": 1,
              "name": "Ziua nationala",
              "date": "2001-12-20",
              "location_id": 1
          },
          {
              "id": 3,
              "company_id": 1,
              "name": "Sfanta Maria",
              "date": "2015-08-20",
              "location_id": 1
          }
      ]
  },
  "code": 92,
  "status": "success"
}

This endpoint is used to get a list of all national holidays.

HTTP Request

GET /api/v1/national-holiday

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id
location a valid location id ( filter for national holidays based on location, not mandatory)

National holidays templates

The command returns JSON structured like this:

{
  "data": {
      "items": [
          {
              "id": 1,
              "name": "Holidays BE",
              "path": "https://s3.eu-central-1..../holidays/holidaysBE.csv"
          },
          {
              "id": 2,
              "name": "Holidays BE - Fr",
              "path": "https://s3.eu-central-1..../holidays/holidaysBE_fr.csv"
          },
          {
              "id": 3,
              "name": "Holidays DE",
              "path": "https://s3.eu-central-1..../holidays/holidaysDE.csv"
          },
          {
              "id": 4,
              "name": "Holidays FR",
              "path": "https://s3.eu-central-1..../holidays/holidaysFR.csv"
          },
          {
              "id": 5,
              "name": "Holidays LU",
              "path": "https://s3.eu-central-1..../holidays/holidaysLU.csv"
          },
          {
              "id": 6,
              "name": "Holidays NL",
              "path": "https://s3.eu-central-1..../holidays/holidaysNL.csv"
          },
          {
              "id": 7,
              "name": "Holidays RO",
              "path": "https://s3.eu-central-1..../holidays/holidaysRO.csv"
          }
      ]
  },
  "code": 92,
  "status": "success"
}

This endpoint is used to get a list of all national holidays templates.

HTTP Request

GET /api/v1/national-holiday/templates

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token

Notifications

Get list of notifications

The command returns JSON structured like this:

{
    "data": [
        {
            "id": 13,
            "company_id": 1,
            "entity_type": "UserHoliday",
            "entity_id": 5,
            "icon": "holiday_blue",
            "dismissable": 1,
            "action_type": 1,
            "action": "",
            "archived": 0,
            "is_system": 0,
            "message": {
                "code": 603,
                "parameters": {
                    "user": "Oana Vlad",
                    "start_date": "2018-01-23",
                    "end_date": "2018-01-25",
                    "type": "paid"
                }
            },
            "details": {
                "user_id": 6,
                "type_id": 1,
                "start_date": "2018-01-23",
                "end_date": "2018-01-25",
                "company_id": 1,
                "status": 1,
                "updated_at": "2018-01-18 16:57:46",
                "created_at": "2018-01-18 16:57:46",
                "id": 5
            },
            "notification_type": "holiday-acknowledgement"
        },
        {
            "id": 4,
            "company_id": 1,
            "entity_type": "UserHoliday",
            "entity_id": 5,
            "icon": "holiday_blue",
            "dismissable": 0,
            "action_type": 1,
            "action": "",
            "archived": 0,
            "is_system": 1,
            "message": {
                "code": 600,
                "parameters": {
                    "user": "Oana Vlad",
                    "start_date": "2018-01-23",
                    "end_date": "2018-01-25",
                    "type": "paid"
                }
            },
            "details": {
                "user_id": 6,
                "type_id": 1,
                "start_date": "2018-01-23",
                "end_date": "2018-01-25",
                "company_id": 1,
                "status": 1,
                "updated_at": "2018-01-18 16:57:46",
                "created_at": "2018-01-18 16:57:46",
                "id": 5
            },
            "notification_type": "holiday-request"
        }
    ],
    "code": 92,
    "status": "success"
}

This endpoint is used to get a list of all in app notifications.

HTTP Request

GET /api/v1/notification

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

Query Parameters

Parameter Optional Description Type
archived true this will be passed if we need to include also archived notifications any - needs to be set(1)

Dismiss notification

The command returns JSON structured like this:

{
  "data": [],
  "code": 245,
  "status": "success"
}

This endpoint is used to dismiss a list of notifications.

HTTP Request

POST /api/v1/notification-dismiss

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

POST Parameters

Parameter Optional Description Type
ids false array of notification ids array

Notes

Create note

The command returns JSON structured like this:

{
  "data": [],
  "code": 195,
  "status": "success"
}

This endpoint is used to create a note

HTTP Request

POST /api/v1/note

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

POST Parameters

Parameter Optional Description Type
date false note date date, format Y-M-D
text false note description string
location_id true id of the location integer
department_id true id of the department integer

Update note

The command returns JSON structured like this:

{
   "data": {
       "id": 3,
       "company_id": 2,
       "location_id": 1,
       "department_id": null,
       "text": "Tri-tip ham strip steak tongue shank beef ribs. Pig chuck filet mignon, bresaola leberkas ham ...",
       "date": "2017-11-19",
       "owner_id": 6
   },
   "code": 196,
   "status": "success"
}

This endpoint is used to update a note.

HTTP Request

PUT /api/v1/note/<NOTE_ID>

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

POST Parameters

Parameter Optional Description Type
date false note date date, format Y-M-D
text false note description string

Note details

The command returns JSON structured like this:

{
  "data": {
      "id": 3,
      "company_id": 2,
      "location_id": 1,
      "department_id": null,
      "text": "Tri-tip ham strip steak tongue shank beef ribs. Pig chuck filet mignon, bresaola...",
      "date": "2017-11-19",
      "owner_id": 6
  },
  "code": 92,
  "status": "success"
}

This endpoint is used to get note details.

HTTP Request

GET /api/v1/note/<NOTE_ID>

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token

List of notes

The command returns JSON structured like this:

{
  "data": {
      "pagination": {
          "total": 3,
          "per_page": 10,
          "current_page": 1,
          "last_page": 1,
          "next_page": null,
          "from": 1,
          "to": 3
      },
      "items": [
          {
              "id": 2,
              "company_id": 2,
              "location_id": null,
              "department_id": null,
              "text": "Tri-tip ham strip steak tongue shank beef ribs. Pig chuck filet mignon...",
              "date": "2017-11-19",
              "owner_id": 6
          },
          {
              "id": 3,
              "company_id": 2,
              "location_id": 1,
              "department_id": null,
              "text": "Tri-tip ham strip steak tongue shank beef ribs. Pig chuck filet mignon...",
              "date": "2017-11-19",
              "owner_id": 6
          }
      ]
  },
  "code": 92,
  "status": "success"
}

This endpoint is used to get a list of notes.

HTTP Request

GET /api/v1/note

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id
location valid locations ids, separated by comma(optional)
department valid departments ids, separated by comma(optional)

Query Parameters

Parameter Optional Description Type
start_date true start date date, format:Y-M-D
type true view type, must be:day, week, month string
per_page true number of items per page, default 10 integer
page true page number, default 1 integer

Delete note

The command returns JSON structured like this:

{
  "data": [],
  "code": 197,
  "status": "success"
}

This endpoint is used to delete a note.

HTTP Request

DELETE /api/v1/note/<NOTE_ID>

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

Settings

Get company settings

The command returns JSON structured like this:

{
    "data": {
        "minutes_before_shift": 60,
        "shift_reminders": 1,
        "hour_log_approval": 1,
        "allow_declarations": 1,
        "paid_breaks": 0,
        "default_break_length": 30,
        "allow_breaks": 1,
        "allow_hour_registration": 0,
        "name": "Bitstone",
        "description": "Bitstone monitoring test company"
    },
    "code": 92,
    "status": "success"
}

This endpoint is used to get company settings.

HTTP Request

GET /api/v1/company-settings

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

Update company settings

The command returns JSON structured like this:

{
    "data": {
        "minutes_before_shift": 60,
        "shift_reminders": 1,
        "hour_log_approval": 1,
        "allow_declarations": 1,
        "paid_breaks": 0,
        "default_break_length": 30,
        "allow_breaks": 1,
        "allow_hour_registration": 0,
        "name": "Bitstone",
        "description": "Bitstone monitoring test company"
    },
    "code": 241,
    "status": "success"
}

This endpoint is used to update company settings.

HTTP Request

`POST /api/v1/company-settings

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

POST Parameters

Parameter Optional Description Type
minutes_before_shift true number of minutes before the shift for shift reminders integer
shift_reminders true company allows or not shift reminders boolean
hour_log_approval true company requires or not hour log approvals boolean
allow_declarations true company allows or not declarations boolean
paid_breaks true company has or not paid breaks boolean
default_break_length true default break length in minutes integer
allow_breaks true company allows or not breaks boolean
allow_hour_registration true company allows or not hour registration boolean
name true company name string
description true company description string

Availabilities

Create/Update availabilities

Example of availability json:

[
    {
        "date": "2018-01-15",
        "intervals" : {
            "n": 0,
            "m": 1,
            "a": 1,
            "e": 1
        },
        "id": 0
    },
    {
        "date": "2018-01-17",
        "intervals" : {
            "n": 0,
            "m": 1,
            "a": -1,
            "e": 1
        },
        "id": 5
    }
]

The command returns JSON structured like this:

{
  "data": [
      {
          "2021-04-26": {
              "n": 0,
              "m": 1,
              "a": 1,
              "e": 1
          },
          "id": 26,
          "locked": 0,
          "note": null
      },
      {
          "2021-04-05": {
              "n": 0,
              "m": 0,
              "a": 0,
              "e": 0
          },
          "id": 23,
          "locked": 0,
          "note": null
      },
      {
          "2018-05-12": {
              "n": -1,
              "m": -1,
              "a": -1,
              "e": -1
          },
          "id": 1,
          "locked": 0,
          "note": null
      }
  ],
  "code": 224,
  "status": "success"
}

This endpoint is used to create or update an availability

HTTP Request

POST /api/v1/availability

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

POST Parameters

Parameter Optional Description Type

See json example in the right side

List of availabilities

The command returns JSON structured like this:

{
  "data": {
      "items": [
          {
              "2018-01-15": {
                  "m": 1,
                  "a": 1,
                  "e": 1,
                  "n": 0
              },
              "id": 15,
              "locked": 0,
              "note" : "Test"
          },
          {
              "2018-01-16": {
                  "m": 1,
                  "a": 1,
                  "e": 1,
                  "n": 0
              },
              "id": 15,
              "locked": 0,
              "note" : null
          }
      ]
  },
  "code": 92,
  "status": "success"
}

This endpoint is used to get a list of availabilities

HTTP Request

GET /api/v1/availability

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

GET Parameters

Parameter Optional Description Type
user_id true user id(if not set default will be logged in user id) integer
start_date true start date(if not set default will be current date) date (format: Y-m-d)
end_date true end date - if this is set, it has priority over period and will return for (start_date, end_date) date (format: Y-m-d)
period true day, week, month(if not set default will be day) string

Add/Update note

The command returns JSON structured like this:

{
  "data": [],
  "code": 243,
  "status": "success"
}

This endpoint is used to add/update availability note

HTTP Request

POST/PUT /api/v1/availability/note

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

PUT Parameters

Parameter Optional Description Type
note false availability note string
date false availability valid date date
user_id true user_id if set by employee integer

Logs

List of company activities

The command returns JSON structured like this:

{
    "data": {
        "pagination": {
            "total": 163,
            "per_page": 10,
            "current_page": 1,
            "last_page": 17,
            "next_page": "http://scheduler.local/api/v1/company-activities?page=2",
            "from": 1,
            "to": 10
        },
        "items": [
            {
                "id": 863,
                "description": "entity Access level  was created by Ckompania Test, ckompania@gmail.com at 06:17, March 6, 2018 ",
                "log_name": "created",
                "user_email": "ckompania@gmail.com",
                "user_browser": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36",
                "date": "06:17, March 6, 2018 "
            },
            {
                "id": 864,
                "description": "entity Access level  was created by Ckompania Test, ckompania@gmail.com at 06:17, March 6, 2018 ",
                "log_name": "created",
                "user_email": "ckompania@gmail.com",
                "user_browser": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36",
                "date": "06:17, March 6, 2018 "
            },
            {
                "id": 865,
                "description": "entity User  was invited by Ckompania Test, ckompania@gmail.com at 06:17, March 6, 2018 ",
                "log_name": "invited",
                "user_email": "ckompania@gmail.com",
                "user_browser": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36",
                "date": "06:17, March 6, 2018 "
            },
            {
                "id": 860,
                "description": "entity Access level  was departmentupdated: access level changed  by Ckompania Test, ckompania@gmail.com at 06:53, March 5, 2018 ",
                "log_name": "departmentupdated: access level changed ",
                "user_email": "ckompania@gmail.com",
                "user_browser": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36",
                "date": "06:53, March 5, 2018 "
            },
            {
                "id": 861,
                "description": "entity Access level  was poolupdated: access level changed  by Ckompania Test, ckompania@gmail.com at 06:53, March 5, 2018 ",
                "log_name": "poolupdated: access level changed ",
                "user_email": "ckompania@gmail.com",
                "user_browser": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36",
                "date": "06:53, March 5, 2018 "
            },
            {
                "id": 862,
                "description": "entity User  was invited by Ckompania Test, ckompania@gmail.com at 06:53, March 5, 2018 ",
                "log_name": "invited",
                "user_email": "ckompania@gmail.com",
                "user_browser": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36",
                "date": "06:53, March 5, 2018 "
            },
            {
                "id": 859,
                "description": "entity Holiday  was created by Stefan Employee, stefan.employee@yopmail.com at 06:50, March 5, 2018 ",
                "log_name": "created",
                "user_email": "stefan.employee@yopmail.com",
                "user_browser": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36",
                "date": "06:50, March 5, 2018 "
            },
            {
                "id": 858,
                "description": "entity Holiday  was updated: the new status is  pending by Stefan Employee, stefan.employee@yopmail.com at 06:49, March 5, 2018 ",
                "log_name": "updated: the new status is  pending",
                "user_email": "stefan.employee@yopmail.com",
                "user_browser": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36",
                "date": "06:49, March 5, 2018 "
            },
            {
                "id": 857,
                "description": "entity schedule  was updated by Ckompania Test, ckompania@gmail.com at 06:42, March 5, 2018 ",
                "log_name": "updated",
                "user_email": "ckompania@gmail.com",
                "user_browser": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36",
                "date": "06:42, March 5, 2018 "
            },
            {
                "id": 856,
                "description": "entity shift  was published by Ckompania Test, ckompania@gmail.com at 06:42, March 5, 2018 ",
                "log_name": "published",
                "user_email": "ckompania@gmail.com",
                "user_browser": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36",
                "date": "06:42, March 5, 2018 "
            }
        ]
    },
    "code": 92,
    "status": "success"
}

This endpoint is used to get a list of company activities.

HTTP Request

GET /api/v1/company-activities

Headers

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token
company a valid company id

Query Parameters

Parameter Optional Description Type
per_page true number of items per page, default 10 integer
page true page number, default 1 integer

Countries

Get countries

The command returns JSON structured like this:

{
 "data": {
      "items": [
         {
             "id": 1,
             "iso": "AF",
             "name": "Afghanistan"
         },
         {
             "id": 2,
             "iso": "AL",
             "name": "Albania"
         }
      ]
 },
 "code": 92,
 "status": "success"
}

This endpoint is used to get all countries.

HTTP Request

GET /api/v1/country

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token

Currencies

Get currencies

The command returns JSON structured like this:

{
 "data": {
     "items": [
         {
             "id": 1,
             "iso": "USD",
             "name": "US Dollar",
             "symbol": "$"
         },
         {
             "id": 2,
             "iso": "CAD",
             "name": "Canadian Dollar",
             "symbol": "$"
         },
         {
             "id": 3,
             "iso": "EUR",
             "name": "Euro",
             "symbol": "€"
         }
     ]
 },
 "code": 92,
 "status": "success"
}

This endpoint is used to get all currencies.

HTTP Request

GET /api/v1/currency

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token

Timezones

Get timezones

The command returns JSON structured like this:

{
  "data": {
      "items": [
         {
             "id": 1,
             "name": "Niue",
             "offset": "GMT-11:00",
             "dst": 0
         },
         {
             "id": 2,
             "name": "Pago Pago",
             "offset": "GMT-11:00",
             "dst": 0
         },
         {
             "id": 3,
             "name": "Hawaii Time",
             "offset": "GMT-10:00",
             "dst": 0
         }
      ]
  },
  "code": 92,
  "status": "success"
}

This endpoint is used to get all timezones.

HTTP Request

GET /api/v1/timezone

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token

Upload

Upload files

The command returns JSON structured like this:

{
  "data": {
      "path": "https://s3.eu-central-1.amazonaws.com/.../file.jpg"
  },
  "code": 92,
  "status": "success"
}

This endpoint is used to upload files.

HTTP Request

POST /api/v1/upload

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token

POST Parameters

Parameter Optional Description Type
id false id of the entity( for avatar, contract, company: user id; for declarations: schedule id) integer
type false type must be: avatar(for user), logo(for company), contract(for contract), declaration(for declarations) string
file false file mime types: png,jpg,jpeg,gif,JPG,JPEG,GIF,PNG,pdf,doc,docx,xml,xls,xlsx,ppt,pptx,DOC,PPT,PPTX,DOCX,XLS,XLSX (it depends on the type)

Languages

Get languages

The command returns JSON structured like this:

{
    "data": {
        "en": {
            "name": "EN",
            "value": "en"
        },
        "nl": {
            "name": "NL",
            "value": "nl"
        },
        "ro": {
            "name": "RO",
            "value": "ro"
        }
    },
    "code": 92,
    "status": "success"
}

This endpoint is used to get all languages.

HTTP Request

GET /api/v1/language

This request must contain the auth-token and security-token header with a valid token in order to be performed.

Header Value
security-token a security token(the value of the token will be provided by us)
auth-token a valid token

Statuses

The Shooble API uses the following statuses:

Status Meaning
200 Success
401 Unauthorized
500 Server error

Errors

The Shooble API uses the following error codes:

Error Code Meaning
91 100
92 200
93 300
94 400
95 500
96 401
97 403
98 404
99 422
1 permissions
101 user-not-found
102 email-not-confirmed
103 invalid-credentials
104 auth-token-required
105 auth-token-not-valid
106 email-sent-with-reset-link
107 reset-token-not-found
108 reset-token-expired
109 reset-password-successfully
110 confirm-account-successfully
111 confirmation-token-not-found
112 confirmation-token-expired
113 must-be-an-array
114 invitation-not-found
115 invite-successfully
116 wrong-old-password
117 change-password-successfully
118 account-not-confirmed
119 file-can-not-be-uploaded
120 user-updated-successfully
121 unauthorized-for-this-action
122 create-avatar-failed
123 avatar-not-found
124 user-deleted-successfully
125 company-created-successfully
126 company-updated-successfully
127 company-deleted-successfully
128 company-can-not-be-created
129 company-not-found
130 logo-not-found
131 company-can-not-be-updated
132 location-updated-successfully
133 location-deleted-successfully
134 location-created-successfully
135 location-can-not-be-created
136 location-can-not-be-updated
137 location-not-found
138 department-created-successfully
139 department-updated-successfully
140 department-deleted-successfully
141 department-not-found
142 department-can-not-be-created
143 department-can-not-be-updated
144 contract-created-successfully
145 contract-updated-successfully
146 contract-deleted-successfully
147 contract-not-found
148 contract-can-not-be-created
149 contract-can-not-be-updated
150 create-file-failed
151 file-not-found
152 holiday-created-successfully
153 holiday-updated-successfully
154 holiday-deleted-successfully
155 holiday-not-found
156 holiday-can-not-be-created
157 holiday-can-not-be-updated
158 holiday-already-exists
159 holiday-request-cancelled-successfully
160 holiday-request-successfully-updated
161 pool-created-successfully
162 pool-updated-successfully
163 pool-deleted-successfully
164 pool-not-found
165 pool-can-not-be-created
166 pool-can-not-be-updated
167 shift-created-successfully
168 shift-can-no-be-created
169 shift-updated-successfully
170 shift-can-no-be-updated
171 shift-not-found
172 repetitive-shift-can-not-be-created
173 repetitive-shift-no-possibilities
174 repetitive-shift-updated-successfully
175 repetitive-shift-can-not-be-updated
176 repetitive-shift-not-found
177 shift-can-not-be-publish
178 shift-publish-successfully
179 shift-deleted-successfully
180 holiday-import-successfully
181 import-document-failed
182 announcement-created-successfully
183 announcement-updated-successfully
184 announcement-deleted-successfully
185 announcement-not-found
186 announcement-can-not-be-created
187 announcement-can-not-be-updated
188 announcement-type-updated-successfully
189 notification-created-successfully
190 notification-updated-successfully
191 notification-deleted-successfully
192 notification-not-found
193 notification-can-not-be-created
194 notification-can-not-be-updated
195 note-created-successfully
196 note-updated-successfully
197 note-deleted-successfully
198 note-not-found
199 note-can-not-be-created
200 note-can-not-be-updated
201 role-not-found
202 user-can-not-be-created
203 user-role-not-found
204 company-account-created-successfully
205 company-account-successfully-confirmed
206 log-hours-successfully
207 job-presence-successfully-set
208 access-denied
209 declaration-type-created-successfully
210 declaration-type-updated-successfully
211 declaration-type-deleted-successfully
212 declaration-type-not-found
213 declaration-type-can-not-be-created
214 declaration-type-can-not-be-updated
215 declaration-created-successfully
216 declaration-updated-successfully
217 declaration-deleted-successfully
218 declaration-not-found
219 declaration-can-not-be-created
220 declaration-can-not-be-updated
221 security-token-required
222 security-token-must-match
223 contract-already-exists
224 availability-created-successfully
225 availability-updated-successfully
226 availability-deleted-successfully
227 availability-not-found
228 availability-can-not-be-created
229 availability-can-not-be-updated
230 schedule-not-found
231 schedule-updated-successfully
232 schedule-can-not-be-created
233 schedule-can-not-be-deleted
234 schedule-can-not-be-updated
235 schedule-deleted-successfully
236 application-already-exist
237 application-already-handled
238 application-successfully-handled
239 shift-not-open-anymore
240 shift-can-not-be-deleted
241 company-settings-saved-successfully
242 function-not-found
243 note-submitted-successfully
244 not-allowed-to-log-hours
245 notification-dismissed-successfully
246 open-shift-application-successfully
247 open-shift-application-not-found
248 not-allowed-to-add-declarations
249 not-allowed-to-update-declarations
250 missing-company-header
251 function-can-not-be-created
252 function-required-for-employee
253 user-already-invited
254 invalid-template-id
255 user-already-exists
256 evaluation-successfully
301 holiday-already-processed
302 no-hour-registration
303 log-hours-marked
315 shift-export-successfully
600 holiday-request-notification
601 holiday-approved-notification
602 holiday-declined-notification
603 holiday-acknowledgement-notification
604 hour-log-request-notification
605 hour-log-approved-notification
606 hour-log-declined-notification
607 hour-log-acknowledgement-notification
608 open-shift-request-notification
609 open-shift-acknowledgement-notification
610 open-shift-approved-notification
611 open-shift-declined-notification
612 open-shift-available-notification
613 announcement-notification
614 user-joined-notification
615 contract-reminder-notification
616 shift-assigned-notification
617 shift-updated-notification
618 shift-unassigned-notification
619 uninvited-employees-notification
620 shift-reminder-notification
621 contract-reminder-for-company-notification
622 open-shift-repetitive-available-notification
623 repetitive-shift-assigned-notification
624 repetitive-shift-unassigned-notification