NAV
json

API Documentation

Welcome to the iBuildApp API documentation! You can use our API to access iBuildApp API endpoints for our solutions and features.

You can view code examples in the dark area to the right, and you can switch the programming language or format of the examples with the tabs in the top right (where available).

This is also intended to be an open doc, in that when developers create new features, they will be able to add any documentation here as well.

iBuildApp Timesheets

INTRO

Basic API for registering/authorizing a user, getting dashboard data and user history, starting/stopping time tracking, and adding new time sheet entries.

User Authorization

Request body (application/json):

{
    "email": "test@test.com",
    "password": "12345678"
}

Request data: JSON string with the following elements

Parameter Type Description
email String (Required) Login (e-mail)
password String (Required) User password

Response body (application/json):

{
   "status": "SUCCESS",
   "message": "Successfully authorized.",
   "token": "$2y$10$UP8aZvonwuqnaSBrdpiB4eq5NI3VHZtzcFhC73o0Slf/6uSBU3.je"
}

Response data: JSON string with the following elements

Parameter Type Description
status String SUCCESS
message String Error description or successful info message
token String Auth token of user session. Will be used to sign every next request.
status String from list: ACTIVE, PENDING User status active / pending activation (Unable to login and use the system)

User Registration

Request body (application/json):

{
    "email": "test@test.com",
    "password": "12345678",
    "first_name": "John",
    "last_name": "Doe"
}

Request data: JSON string with the following elements

Parameter Type Description
email String (Required) Login (email)
password String (Required) Password. >=8 and <=16 characters
first_name String First name
last_name String Last name

Response body (application/json):

{
   "status": "SUCCESS",
   "message": "Successfully registered.",
   "token": "$2y$10$qhqCrGv2f6vxxnyy4PCWqe9OAmjjqNRDkfB4F8J6qV2mXq/wpQXni"
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message
token String Auth token of user session. Will be used to sign every next request.
status String from list: ACTIVE, PENDING User status active / pending activation (Unable to login and use the system)

USER

User API for iBuildApp Timesheets, handling getting user information, creating/deleting/updating a user, and searching for user(s)

Get User Info

Request body (application/json):

{
    "user_id": 1
}

HTTP Request

POST /api/{APP_CODE}/user

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request data: JSON string with the following elements

Parameter Type Description
user_id Integer User ID. If not specified, current user’s id is used.

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message
data Object packed to JSON string User object with all fields

Data:

id (Integer) -
email (String) -
first_name (String) -
last_name (String) -
sex (String) - male or female
position (String) - specialization, profession
hourly_rate (Float) - hourly rate of user
roles (Array) - role in app. Default - ROLE_USER
created (Timestamp) -
updated (Timestamp) -
exported (Timestamp) - Date + Time of export to QBO,Xero,ADP
settings (Array) - user properties for application
picture (String) - link to user avatar
paid_hours (Float) - total number of paid hours
unapproved_hours (Float) - total number of unapproved hours
teams (Array) - IDs of usergroups
notes (String) - Notes fo admin. Visible only for admin.
birth_date (Date) - YYYY-MM-DD

200 Response body (application/json):

{
   "status": "SUCCESS",
   "data": {
       "id": 1,
       "email": "test@test.com",
       "first_name": "John",
       "last_name": "Doe",
       "sex": "male",
        "position": "Manager",
        "hourly_rate": 5.5,
        "roles": [
          "ROLE_USER"
        ],
        "created": 1583905200,
        "updated": 1583905200,
        "exported": 1583905200,
        "activated": true,
        "settings": [
          {}
        ],
        "picture": "url_to_user_avatar",
        "paid_hours": 0,
        "unapproved_hours": 0,
        "teams": [
          0
        ],
        "notes": "description",
        "birth_date": "1988-11-22"
   }
}

401 Unauthorized. Response body (application/json):

{
     "status": "ERROR",
     "message": "Auth token not specified or incorrect.",
     "error_code": 9
}

404 User not found. Response body (application/json):

{
     "status": "ERROR",
      "message": "User not found.",
      "error_code": 5
}

Create New User

Request body (application/json):

{
    "email": "test2@test.com",
    "password": "string",
     "first_name": "John",
     "last_name": "Doe",
     "sex": "male",
     "position": "Manager",
     "hourly_rate": 10.5,
     "settings": [
        {}
      ],
     "notes": "string",
     "birth_date": "1988-11-22"
}

HTTP Request

POST /api/{APP_CODE}/user/create

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request data: JSON string with the following elements

Parameter Type Description
email String (Required)
password String
first_name String
last_name String
sex String male,female
hourly_rate Float
settings Array
notes String
birth_date String YYYY-MM-DD
position String

Data:

email (String. REQUIRED) -
password (String) - Lengh need >=8 and <=15 characters
first_name (String) -
last_name (String) -
sex (String) - male or female
position (String) - specialization, profession
hourly_rate (Float) - hourly rate of user
settings (Array) - user properties for application
notes (String) - Notes fo admin. Visible only for admin.
birth_date (Date) - YYYY-MM-DD

200 Response body (application/json):

{
   "status": "SUCCESS",
   "message": "Successfully created.",
   "id": 2
}

401 Response body (application/json):

{
   "status": "ERROR",
    "message": "Auth token not specified or incorrect.",
    "error_code": 9
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message
id Integer ID of the new user

Update User

Request body (application/json):

{
    "user_id": 2,
    "first_name": "Jack"
}

HTTP Request

POST /api/{APP_CODE}/user/update

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request data: JSON string with the following elements

Parameter Type Description
user_id Integer User ID. If not specified, current user’s id is used.
email String
password String 8<= password <=15
first_name String
last_name String
sex String male, female
birth_date String YYYY-MM-DD
position String
settings Array
is_active Boolean

200 Response body (application/json):

{
   "status": "SUCCESS",
   "message": "Successfully updated."
}

401 Unauthorized. Response body (application/json):

{
   "status": "ERROR",
   "message": "Auth token not specified or incorrect.",
   "error_code": 9
}

404 User not found. Response body (application/json):

{
   "status": "ERROR",
    "message": "User not found.",
    "error_code": 5
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message

Search Users

Request body (application/json):

{
    "email": "test"
}

HTTP Request

POST /api/{APP_CODE}/user/search

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request data: JSON string with the following elements

Parameter Type Description
user_id Integer User ID
email String
first_name String
last_name String
position String
is_active Boolean
limit Integer
offset Integer

200 Response body (application/json):

{
   "status": "SUCCESS",
   "message": "2 user(s) found.",
   "data": [
       {
           "id": 1,
           "email": "test@test.com",
           "first_name": "John",
           "last_name": "Doe"
       },
       {
           "id": 2,
           "email": "test2@test.com",
           "first_name": "Jack",
           "last_name": "Smith"
       }
   ],
  "count": 2
}

401 Unauthorized. Response body (application/json):

{
   "status": "ERROR",
   "message": "Auth token not specified or incorrect.",
   "error_code": 9
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message
data Object packed to JSON string User object with all fields or empty object
count Integer Count of Objects

Data (Array) - array of User objects:

Search Users with Grouping

Request body (application/json):

{
    "group_by": "is_active",
    "order": "asc"
}

HTTP Request

POST /api/{APP_CODE}/user/search_group

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request data: JSON string with the following elements

Parameter Type Description
user_id Integer User ID
email String
first_name String
last_name String
position String
is_active Boolean
group_by String field for grouping
order String (asc, desc) - sorting order for grouped field
limit Integer
offset Integer

200 Response body (application/json):

{
  "status": "SUCCESS",
  "message": "1 group(s) found.",
  "data": {
    "groups": [
      {
        "value": true,
        "count": 1,
        "items": [
          {
            "id": 0,
            "email": "email@domain.com",
            "first_name": "John",
            "last_name": "Smith",
            "sex": "male",
            "position": "Manager",
            "hourly_rate": 5.1,
            "roles": [
              "ROLE_USER"
            ],
            "created": 1583905200,
            "updated": 1583905200,
            "exported": 1583905200,
            "activated": true,
            "settings": [
              {}
            ],
            "picture": "url_to_user_avatar",
            "paid_hours": 0,
            "unapproved_hours": 0,
            "teams": [
              0
            ],
            "notes": "notes",
            "birth_date": "1988-11-22"
          }
        ]
      }
    ]
  },
  "count": 1
}

401 Unauthorized. Response body (application/json):

{
   "status": "ERROR",
   "message": "Auth token not specified or incorrect.",
   "error_code": 9
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message
data Object packed to JSON string User object with all fields or empty object
count Integer Count of Objects

Data:

Delete User

Request body (application/json):

{
    "user_id": 2
}

HTTP Request

POST /api/{APP_CODE}/user/delete

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request data: JSON string with the following elements

Parameter Type Description
user_id Integer User ID. If not specified, current user’s id is used.

200 Response body (application/json):

{
   "status": "SUCCESS",
   "message": "Successfully deleted."
}

401 Unauthorized. Response body (application/json):

{
   "status": "ERROR",
   "message": "Auth token not specified or incorrect.",
   "error_code": 9
}

404 User not found. Response body (application/json):

{
   "status": "ERROR",
    "message": "User not found.",
    "error_code": 5
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message

Get User Dashboard Data

Request body (application/json):

{
    "user_id":1,
    "last_update":1565768191
}

HTTP Request

POST /api/{APP_CODE}/user/dashboard

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request data: JSON string with the following elements

Parameter Type Description
user_id Integer User ID. If not specified, current user’s id is used.
last_update Datetime Timestamp of last update data in the time_entry entity

200 Response body (application/json):

{
   "status": "SUCCESS",
   "message": "1 task(s) found.",
   "data": {
       "current_tasks": [
           {
               "id": 1,
               "name": "testTask",
               "status": "in-progress",
               "project": 1,   
               "duration": 10,
               "users": [
                 0
               ]
           }
       ],
       "current_time_entry": {
           "id": 3,
           "user_id": 1,
           "task_id": 1,
           "schedule_id": 1,
           "status": "in-progress",
           "start_time": 1565687043,
            "payment_status": "pending",
            "breaks": 2,
            "comments": "",
            "duration": 10
       }
   },
   "timestamp": 1565954217
}

401 Unauthorized. Response body (application/json):

{
   "status": "ERROR",
   "message": "Auth token not specified or incorrect.",
   "error_code": 9
}

404 User not found. Response body (application/json):

{
   "status": "ERROR",
    "message": "User not found.",
    "error_code": 5
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR, NOT-MODIFIED Operation result successful / execution error / data hasn’t been modified on the server from last request
message String Error description or successful info message
data JSON String with array of time_entry records for current user Data for showing in the table part
timestamp Integer Current server Unix timestamp

Data:

Get User History

Request body (application/json):

{
    "user_id":1,
    "last_update":1565768191,
    "with": ["users", "tasks", "projects"],
    "filters": {"task_id": {"value": 2, "operand": "<"}, "status":"done"},
    "sorts": {"task_id": "desc"}
}

HTTP Request

POST /api/{APP_CODE}/user/history

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request data: JSON string with the following elements

Parameter Type Description
user_id Integer User ID. If not specified, current user’s id is used.
last_update Integer Timestamp of the last data update.
with Array from possible values: users, tasks, projects The list of linked entities that should be returned from the server in one response.
filters Object The list of filters - fields, values and operands.
sorts Object The list of sorts - fields and orders (asc, desc).

200 Response body (application/json):

{
   "status": "SUCCESS",
   "message": "1 time entries found.",
   "data": {
       "time_entries": [
           {
               "id": 3,
               "user_id": 1,
               "task_id": 1,
               "status": "done",
               "start_time": "2019-08-13 12:04:03"
           }
       ],
       "tasks": {
           "1": {
               "id": 1,
               "project": 2,
               "name": "Test task 1",
               "status": "in-progress"
           }
       },
        "users": {
           "1": {
               "id": 1,
               "first_name": "John",
               "last_name": "Smith",
               "picture": "url_to_user_avatar"
           }
               },
       "projects": {
           "2": {
               "id": 2,
               "name": "Test project 1",
               "status": "in-progress"
           }
       }
   },
  "count": 1,
  "timestamp": 1565954217
}

401 Unauthorized. Response body (application/json):

{
   "status": "ERROR",
   "message": "Auth token not specified or incorrect.",
   "error_code": 9
}

404 User not found. Response body (application/json):

{
   "status": "ERROR",
    "message": "User not found.",
    "error_code": 5
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS: ERROR, NOT-MODIFIED Operation result successful / execution error / data hasn’t been modified on the server from last request
message String Error description or successful info message
data Array packed into JSON string JSON string with array of time_entry and other records for current user
timestamp Int Current server Unix timestamp

if("with"=["tasks"]) :

if("with"=["users"]) :

if("with"=["projects"]) :

GROUP

Group/Team API for iBuildApp Timesheets, handling getting group/team information, creating/deleting/updating a group/team, getting user(s) in a group/team, adding/deleting user(s) from group/team, and searching for group/team(s)

Get Group Info

Request body (application/json):

{
    "group_id":1
}

HTTP Request

POST /api/{app_path}/group

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request data: JSON string with the following elements

Parameter Type Description
group_id Integer (Required) Group ID

200 Response body (application/json):

{
    "status": "SUCCESS",
    "message": "Successfully found.",
    "data": {
        "id": 1,
        "name": "Group 1",
        "status": "active",
        "pay_rate": 10
    }
}

404 Not found. Response body (application/json):

{
   "status": "ERROR",
    "message": "Group not found.",
    "error_code": 5
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message
data Object packed to JSON string Group object with all fields or empty object

data (Group object):

Create New Group

Request body (application/json):

{
    "name":"nameTest"
}

HTTP Request

POST /api/{app_path}/group/create

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request data: JSON string with the following elements

Parameter Type Description
name String (Required)
description String
notes String
pay_rate Float
status Boolean

Response body (application/json):

{
   "status": "SUCCESS",
   "message": "Successfully created.",
   "id": 1
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message
id Integer ID created group

Update Group

Request body (application/json):

{
    "group_id": 1,
    "name": "New_name",
    "description": "New_description"
}

HTTP Request

POST /api/{app_path}/group/update

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request data: JSON string with the following elements

Parameter Type Description
group_id Integer (Required) Group ID
name String (Required ?) Must be new name
description String (Required ?) OR new description
notes String
status String of list: active, inactive

200 Response body (application/json):

{
   "status": "SUCCESS",
   "message": "Successfully updated."
}

404 Not found. Response body (application/json):

{
   "status": "ERROR",
    "message": "Group not found.",
    "error_code": 5
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message

Search Groups

Request body (application/json):

{
    "group_id":1
}

HTTP Request

POST /api/{app_path}/group/search

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request data: JSON string with the following elements

Must be at least one of parameters: group_id, name, keyword

Parameter Type Description
group_id Integer (Required ?) Group ID
name String (Required ?)
keyword String (Required ?) Find in name
limit Integer
offset Integer

Response 200 body (application/json):

{
    "status": "SUCCESS",
    "message": "1 group(s) found.",
    "data": [
        {
            "id": 1,
            "name": "Group 1",
            "status": "active",
            "pay_rate": 10
        }
    ],
    "count": 1
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message
data Array of group objects packed to JSON string Group objects array with all fields or empty array
count Integer

Data:

Add User to Group

Request body (application/json):

{
    "group_id":1,
    "user_id":2
}

HTTP Request

POST /api/{app_path}/group/add_user

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request data: JSON string with the following elements

Parameter Type Description
group_id Integer (Required)
user_id Integer (Required)

200 Response body (application/json):

{
   "status": "SUCCESS",
   "message": "Successfully added."
}

404 Not found. Response body (application/json):

{
   "status": "ERROR",
    "message": "Group not found.",
    "error_code": 5
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message

Delete User from Group

Request body (application/json): json { "group_id":1, "user_id":2 }

HTTP Request

POST /api/{app_path}/group/delete_user

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request data: JSON string with the following elements

Parameter Type Description
group_id Integer (Required)
user_id Integer (Required)

200 Response body (application/json):

{
   "status": "SUCCESS",
   "message": "Successfully deleted."
}

404 Not found. Response body (application/json):

{
   "status": "ERROR",
    "message": "Group not found.",
    "error_code": 5
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message

Get Users in Group

Request body (application/json):

{
    "group_id":1
}

HTTP Request

POST /api/{app_path}/group/get_users

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request data: JSON string with the following elements

Parameter Type Description
group_id Integer (Required)

200 Response body (application/json):

{
    "status": "SUCCESS",
    "message": "1 user(s) found.",
    "data": [
        {
            "id": 111,
            "email": "222@222.ru",
            "first_name": "222",
            "last_name": "2222",
            "hourly_rate": 0,
            "roles": ["ROLE_USER"],
            "created": 1591787712,
            "exported": 946684800,
            "updated": 1593163617,
            "activated": true,
            "settings": {
                "datetime_format": "d/m/Y h:ia"
            },
            "paid_hours": 0,
            "unapproved_hours": 4.01,
            "teams": [1],
            "birth_date": "1990-05-01"
        }
    ],
    "count": 1
}

404 Not found. Response body (application/json):

{
   "status": "ERROR",
    "message": "Group not found.",
    "error_code": 5
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message
data Array of User Object
count Integer Count of finded users

Data: array of User object:

Delete Group

Request body (application/json):

{
    "group_id":1
}

HTTP Request

POST /api/{app_path}/group/delete

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request data: JSON string with the following elements

Parameter Type Description
group_id Integer (Required) Group ID

200 Response body (application/json):

{
   "status": "SUCCESS",
   "message": "Successfully deleted."
}

404 Not found. Response body (application/json):

{
   "status": "ERROR",
   "message": "Group not found.",
   "error_code": 5
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message

CLIENT

Client/Customer API for iBuildApp Timesheets, handling getting client/customer information, creating/deleting/updating a client/customer, and searching for client/customer(s)

Get Client Info

Request body (application/json):

{
    "client_id":1
}

HTTP Request

POST /api/{APP_CODE}/client

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request data: JSON string with the following elements

Parameter Type Description
client_id Integer (Required) Client ID

200 Response body (application/json):

{
  "status": "SUCCESS",
  "data": {
    "id": 0,
    "name": "Client Name",
    "email": "email@client.com",
    "contact_info": "contact_info...",
    "address": "address...",
    "state": "State",
    "website": "site...",
    "notes": "Descriptions...",
    "status": "active"
  }
}

404 Not found. Response body (application/json):

{
   "status": "ERROR",
    "message": "Client not found.",
    "error_code": 5
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message
data Object packed to JSON string Client object with all fields or empty object

Data: Client object:

Create New Client

Request body (application/json):

{
    "name": "John Smith",
    "phone": 12345678912,
    "email": "mail@mail.com",
    "contact_info": "contact_info",
    "address": "test city, test street, test house",
    "city": "New-York",
    "state": "NY",
    "industry": "Finance",
    "website": "website.com",
    "notes": "Descriptions...",
    "status": true
}

HTTP Request

POST /api/{APP_CODE}/client/create

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request data: JSON string with the following elements

Parameter Type Description
name String (Required)
phone String
email String
contact_info String
address String
city String
state String
industry String
website String
notes String Admin comments.
status Boolean

Response 200 body (application/json):

{
   "status": "SUCCESS",
   "message": "Successfully created.",
   "id": 1
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message
id Integer New client id

Update Client

HTTP Request

POST /api/{APP_CODE}/client/update

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
  "client_id": 1,
  "name": "John Doe"
}

Request data: JSON string with the following elements

Parameter Type Description
client_id Integer (Required) Client ID
name String
phone String
email String
contact_info String
address String
city String
state String
industry String
website String
notes String Admin comments.
status Boolean

200 Response body (application/json):

{
   "status": "SUCCESS",
   "message": "Successfully updated."
}

404 Not found. Response body (application/json): json { "status": "ERROR", "message": "Client not found.", "error_code": 5 }

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message

Search Clients

HTTP Request

POST /api/{APP_CODE}/client/search

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
    "name": "John",
    "with": ["projects"]
}

Request data: JSON string with the following elements

Parameter Type Description
user_id Integer User ID
client_ids Array of Integer Client IDs
email String
name String
contact_info String
address String
keyword String
limit Integer Default: 10
offset Integer
with Array[String] from list: projects

Response body (application/json):

{
  "status": "SUCCESS",
  "message": "1 client(s) found.",
  "data": {
    "clients":[
    {
        "id": 0,
        "name": "John Smith",
        "phone": 12345678912,
        "email": "mail@mail.com",
        "contact_info": "contact_info",
        "address": "test city, test street, test house",
        "city": "New-York",
        "state": "NY",
        "industry": "Finance",
        "website": "website.com",
        "notes": "Descriptions...",
        "status": "active",
        "projects": [4,3,1]
    }
  ],
      "projects": {
      "1": {
          "id": 1,
          "name": "Project #1",
          "status": "in-progress"
      },
      "4": {
          "id": 4,
          "name": "Brand Launch Event",
          "status": "in-progress"
      },
      "3": {
          "id": 3,
          "name": "Project #3",
          "status": "in-progress"
      }
    }
},
  "count": 1
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message
data Array of objects packed to JSON string Client objects array with all fields or empty array
count Integer Count of finded objects

Data:

if ("with"=["projects"]):

Search Clients with Grouping

HTTP Request

POST /api/{APP_CODE}/client/search_group

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
    "group_by": "industry",
    "with": ["projects"]
}

Request data: JSON string with the following elements

Parameter Type Description
client_ids Array of Integer IDs of clients
name String if needed search with name
industry String if needed search with industry
state String if needed search with state
city String if needed search with city
description String if needed search with
keyword String Search in name
status Boolean
limit Integer
offset Integer
with Array[String] from list: projects
group_by String field for grouping: status, industry, state, city
order_by String from list: asc, desc sorting order for grouped field

Response body (application/json):

{
    "status": "SUCCESS",
    "message": "3 group(s) found.",
    "count": 3,
    "data": {
        "groups": [
            {
                "value": "IT",
                "count": 1,
                "items": [
                    {
                        "id": 146,
                        "email": "xero_customer_fa52f698-1244-47cd-8fb9-5f32b6490a55@mail.com",
                        "name": "City Agency",
                        "address": ";1237;;Oaktown;P O Box 4321 Central Mailing Centre  ",
                        "state": "",
                        "city": "Oaktown",
                        "industry": "IT"
                    }
                ]
            },
            {
                "value": "education",
                "count": 2,
                "items": [
                    {
                        "id": 142,
                        "email": "xero_customer_47f61ab1-5245-40a2-a3a5-bc224c850c8d@mail.com",
                        "name": "Bank West",
                        "address": ";9876;;Pinehaven;Procurement Services\n GPO 1234  ",
                        "state": "",
                        "city": "Pinehaven",
                        "industry": "education"
                    },
                    {
                        "id": 145,
                        "email": "xero_customer_37918a06-92f6-4edb-bfe0-1fc041c90f8b@mail.com",
                        "name": "Boom FM",
                        "address": ";;;;   ",
                        "industry": "education"
                    }
                ]
            },
            {
                "value": "?",
                "count": 2,
                "items": [
                    {
                        "id": 155,
                        "email": "xero_customer_021b18f8-b62f-4d8a-889e-71fd5427892a@mail.com",
                        "name": "Young Bros Transport",
                        "address": ";;;;   ",
                        "state": "",
                        "city": ""
                    },
                    {
                        "id": 156,
                        "email": "Birds@Intuit.com",
                        "name": "Amy's Bird Sanctuary",
                        "address": ";94326;CA;Bayshore;4581 Finch St.    ",
                        "state": "CA",
                        "city": "Bayshore",
                        "notes": "Imported from QBO as Customer 'Amy's Bird Sanctuary'",
                        "status": "active"
                    }
                ]
            }
        ],
        "projects": {
            "2": {
                "id": 2,
                "name": "Project #2",
                "status": "in-progress",
                "tasks": [10,8,6,4,2]
            },
            "6": {
                "id": 6,
                "name": "Brand Launch Event",
                "status": "in-progress"
            },
            "1": {
                "id": 1,
                "name": "Project #1",
                "status": "in-progress",
                "tasks": [9,7,5,3,1]
            }
        }
    }
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message
data Array of Object packed to JSON string objects with all fields or empty object
count Integer Count of finded groups

Data:

if ("with"=["projects"]):

Export Clients to CSV

HTTP Request

POST /api/{APP_CODE}/client/export_csv

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
    "city": "Bayshore",
    "with": ["projects"]
}

Request data: JSON string with the following elements

Parameter Type Description
client_ids Array of Integer IDs of clients
name String if needed search with name
industry String if needed search with industry
state String if needed search with state
city String if needed search with city
description String if needed search with
keyword String Search in name
status Boolean
limit Integer Default = 10
offset Integer

Response data: file

Parameter Type Description
file text/csv

Format of CSV:

id
email
name
contact_info
address
state
city
industry
website
notes
status - "active" OR not present
(if "with"=["projects"]):
projects - Array of IDs related projects

Delete Client

HTTP Request

POST /api/{APP_CODE}/client/delete

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
    "client_id": 1
}

Request data: JSON string with the following elements

Parameter Type Description
client_id Integer (Required) Client ID

200 Response body (application/json):

{
   "status": "SUCCESS",
   "message": "Successfully deleted."
}

404 Not found. Response body (application/json):

{
   "status": "ERROR",
    "message": "Client not found.",
    "error_code": 5
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message

INVOICE

Invoice API for iBuildApp Timesheets, handling getting invoice information, creating/deleting/updating an invoice, changing invoice status, and searching for invoice(s).

Get Invoice Info

HTTP Request

POST /api/{app_path}/invoice

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
    "invoice_id":1
}

Request data: JSON string with the following elements

Parameter Type Description
invoice_id Integer (Required) Invoice ID

Response body 200 (application/json):

{
    "status": "SUCCESS",
    "message": "Successfully found.",
    "data": {
        "id": 1,
        "due_date": "1587340800",
        "payed_date": "1587340800",
        "amount": 100,
        "status": "paid"
    }
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message
data Object packed to JSON string Invoice object with all fields or empty object

Data:

Create New Invoice

Request body (application/json):

{
    "client_id":1,
    "task_ids":[1,2]
}

HTTP Request

POST /api/{app_path}/invoice/create

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request data: JSON string with the following elements

Parameter Type Description
client_id Integer (Required)
task_ids Array of Integer (Required)
due_date Timestamp Default = current Timestamp
status String of: new, paid Initial status. Default = 'new'
amount Float

200 Response body (application/json):

{
   "status": "SUCCESS",
   "message": "Successfully created.",
   "id": 2
}

404 Not found. Response body (application/json):

{
   "status": "ERROR",
   "message": "Client not found.",
   "error_code": 5
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message
id Integer ID of created invoice

Update Invoice

Request body (application/json):

{
    "invoice_id":1,
    "amount":30.5
}

HTTP Request

POST /api/{app_path}/invoice/update

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request data: JSON string with the following elements

Parameter Type Description
invoice_id Integer (Required)
due_date Timestamp
status String of: new, paid
amount Float

200 Response body (application/json):

{
   "status": "SUCCESS",
   "message": "Successfully updated."
}

404 Not found. Response body (application/json):

{
   "status": "ERROR",
   "message": "Invoice not found.",
   "error_code": 5
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message

Set Invoice Status (Paid)

Set payed this invoice and all his timeEntries. ADMIN_ACCESS_ONLY

Request body (application/json):

{
    "invoice_id":2,
    "payed_date":1587081600
}

HTTP Request

POST /api/{app_path}/invoice/set_payed

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request data: JSON string with the following elements

Parameter Type Description
invoice_id Integer (Required)
payed_date Timestamp (Required)

Response body (application/json):

{
   "status": "SUCCESS",
   "message": "Successfully payed."
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message

Search Invoices

Request body (application/json):

{
    "client_id":[1]
}

HTTP Request

POST /api/{app_path}/invoice/search

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request data: JSON string with the following elements

Parameter Type Description
client_id Array of Integer (Required)
due_date Timestamp <= due_date
payed_date Timestamp <= payed_date
limit Integer Default = 10
offset Integer

Response body (application/json):

{
    "status": "SUCCESS",
    "message": "1 invoice(s) found.",
    "data": [
        {
            "id": 1,
            "due_date": "1587340800",
            "payed_date": "1587340800",
            "amount": 100,
            "status": "paid"
        }
    ],
    "count": 1
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message
data Array of objects packed to JSON string Invoice object with all fields or empty object
count Integer Count of objects

Data (Array): array of Invoice object:

Search Invoices with Grouping

Request body (application/json):

{
    "client_id":[1],
    "group_by": "status",
    "order_by": "asc"
}

HTTP Request

POST /api/{app_path}/invoice/search_group

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request data: JSON string with the following elements

Parameter Type Description
client_id Array of Integer (Required)
due_date Timestamp <= due_date
payed_date Timestamp <= payed_date
limit Integer
offset Integer
group_by String field for grouping
order_by String from list: asc, desc sorting order for grouped field

Response body (application/json):

{
    "status": "SUCCESS",
    "message": "1 group(s) found.",
    "data": {
        "groups": [
            {
                "value": "paid",
                "count": 1,
                "items": [
                    {
                        "id": 1,
                        "due_date": "1587340800",
                        "payed_date": "1587340800",
                        "amount": 100,
                        "status": "paid"
                    }
                ]
            }
        ]
    },
    "count": 1
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message
data Array of groups of objects packed to JSON string Invoice object with all fields or empty object
count Integer Count of groups

Data:

Delete Invoice

Request body (application/json):

{
    "invoice_id":1
}

HTTP Request

POST /api/{app_path}/invoice/delete

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request data: JSON string with the following elements

Parameter Type Description
invoice_id Integer (Required)

200 Response body (application/json):

{
   "status": "SUCCESS",
   "message": "Successfully deleted."
}

404 Not found. Response body (application/json):

{
   "status": "ERROR",
   "message": "Invoice not found.",
   "error_code": 5
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message

Add comment to invoice

Request body (application/json):

{
  "invoice_id": 1,
  "content": "content text"
}

HTTP Request

POST /api/{APP_CODE}/invoice/add_comment

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request data: JSON string with the following elements

Parameter Type Description
invoice_id Integer (Required)
content String (Required)

200 Response body (application/json):

{
  "status": "SUCCESS",
  "id": 1
}

404 Not found. Response body (application/json):

{
   "status": "ERROR",
   "message": "Invoice not found.",
   "error_code": 5
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
id Integer ID of created comment

Get comments of invoice

Request body (application/json):

{
    "invoice_id": 1,
    "with": ["users"]
}

HTTP Request

POST /api/{APP_CODE}/invoice/comments

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request data: JSON string with the following elements

Parameter Type Description
invoice_id Integer (Required)
with Array of String "users"

200 Response body (application/json):

{
  "status": "SUCCESS",
  "data": {
    "comments": [
      {
        "id": 0,
        "commentator": 1,
        "content": "Comment text",
        "date": 1566402943
      }
    ],
    "users": {
      "1": {
        "id": 1,
        "first_name": "John",
        "last_name": "Smith",
        "picture": "url_to_user_avatar"
      }
    }
  },
  "count": 1
}

404 Not found. Response body (application/json):

{
   "status": "ERROR",
   "message": "Invoice not found.",
   "error_code": 5
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
data Array of Connemt object
count Integer Count of finded comments

Data:

TASK

Task API for iBuildApp Timesheets, handling getting task information, creating/deleting/updating a task, setting task status, adding/deleting user(s) from a task, and searching for task(s).

Get Task Info

Request body (application/json):

{
  "task_id": 1,
  "with": ["users","projects"]
}

HTTP Request

POST /timesheets/task

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request data: JSON string with the following elements

Parameter Type Description
task_id Integer (Required) Task ID
with Array[String] from list: users, projects

200 Response body (application/json):

{
  "status": "SUCCESS",
  "message": "string",
  "data": {
    "tasks": [
      {
        "id": 1,
        "name": "Task name",
        "project": 0,
        "duration": 100,
        "estimate": 100,
        "estimate_unit": "minutes",
        "estimate_hours": 3.2,
        "description": "description",
        "status": "new",
        "users": [0],
        "entries": [
          {
            "id": 0,
            "user_id": 0,
            "task_id": 0,
            "start_time": 1583905200,
            "end_time": 1583905200,
            "approve_date": 1583905200,
            "breaks": 0,
            "comments": 0,
            "duration": 0,
            "status": "in-progress",
            "payment_status": "pending",
            "start_location": [
              37.270248,
              -119.989356
            ],
            "end_location": [
              37.270248,
              -119.989356
            ]
          }
        ]
      }
    ],
    "users": {
      "0": {
        "id": 0,
        "email": "email@domain.com",
        "first_name": "John",
        "last_name": "Smith",
        "hourly_rate": 0,
        "picture": "url_to_user_avatar",
        "birth_date": "1988-11-22"
      }
    },
    "projects": {
      "0": {
        "id": 0,
        "name": "Project name",
        "description": "description...",
        "client_id": 0,
        "duration_unit": "minutes",
        "status": "new",
        "planned_start_date": 1583905200,
        "actual_start_date": 1583905200,
        "planned_end_date": 1583905200,
        "actual_end_date": 1583905200,
        "estimated_duration": 100,
        "actual_duration": 100,
        "tasks": [0]
      }
    }
  }
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
data Object packed to JSON string object with all fields or empty object

Data:

if "with" = ["users"]:

if "with" = ["projects"]:

Create New Task

HTTP Request

POST /api/{app_path}/task/create

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
    "project_id": 1,
    "name": "Task name",
    "estimate": 30,
    "estimate_unit": "minutes",
    "description": "description..."
}

Request data: JSON string with the following elements

Parameter Type Description
project_id Integer (Required) Project ID
name String (Required)
description String
estimate Float
estimate_unit String from the list:minutes, hours, days, weeks, months, years
status String of list: new, in-progress, cancelled, done

200 Response body (application/json):

{
   "status": "SUCCESS",
   "message": "Successfully created.",
   "id": 2
}

404 Not found. Response body (application/json):

{
     "status": "ERROR",
      "message": "Project not found.",
      "error_code": 5
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message
id Integer ID of created task

Update Task

HTTP Request

POST /timesheets/task/update

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
  "task_id": 1,
  "name": "New name",
  "estimate": 32,
  "estimate_unit": "hours"
}

Request data: JSON string with the following elements

Parameter Type Description
task_id Integer (Required)
name String
description String
estimate Float
estimate_unit String from the list:minutes, hours, days, weeks, months, years
status String of list: new, in-progress, cancelled, done

200 Response body (application/json):

{
  "status": "SUCCESS",
  "message": "Successfully updated."
}

404 Not found. Response body (application/json):

{
     "status": "ERROR",
      "message": "Task not found.",
      "error_code": 5
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message

Search Tasks

HTTP Request

POST /api/{app_path}/task/search

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
  "project_id": 0,
  "with": ["users","projects"]
}

Request data: JSON string with the following elements

Parameter Type Description
task_id Integer probably don't need to search by task_id, similar to get_task_info
project_id Integer
user_id Integer
name String if needed search with name
keyword String search in name
limit Integer
offset Integer
with Array[String] from list: users, projects

Response body (application/json):

{
  "status": "SUCCESS",
  "message": "1 task(s) found.",
  "data": {
    "tasks": [
      {
        "id": 0,
        "name": "Task name",
        "project": 0,
        "duration": 10,
        "status": "new",
        "users": [0],
        "entries": {
          "0": {
            "start_datetime": 1583905200,
            "end_datetime": 1583905200,
            "duration": 3600
          }
        }
      }
    ],
    "users": {
      "0": {
        "id": 0,
        "email": "email@mail.com",
        "first_name": "John",
        "last_name": "Smith",
        "hourly_rate": 10,
        "picture": "url_to_user_avatar",
        "birth_date": "1988-11-22",
        "teams": [0]
      }
    },
    "teams": {
      "0": {
        "id": 0,
        "name": "Group name",
        "description": "description...",
        "notes": "notes...",
        "status": "new",
        "pay_rate": 10.5
      }
    },
    "projects": {
      "0": {
        "id": 0,
        "name": "Project name",
        "description": "description...",
        "client_id": 0,
        "duration_unit": "minutes",
        "status": "new",
        "planned_start_date": 1583905200,
        "actual_start_date": 1583905200,
        "planned_end_date": 1583905200,
        "actual_end_date": 1583905200,
        "estimated_duration": 100,
        "actual_duration": 100,
        "tasks": [0]
      }
    },
    "count": 1
  }
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message
data Array of objects packed to JSON string Task objects with all fields or empty
count Integer Count of finded objects

Data:

if "with" = ["users"]:

if "with" = ["users"]:

if "with" = ["projects"]:

Search Tasks with Grouping

HTTP Request

POST /api/{APP_CODE}/task/search_group

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
  "project_id": 0,
  "with": ["users","projects"],
  "group_by": "status"
}

Request data: JSON string with the following elements

Parameter Type Description
client_id Integer
name String if needed search with name
category String if needed search with category
description String if needed search with
keyword String Search in name, description, category
duration_unit String from the list:minutes, hours, days, weeks, months, years if needed search with duration_unit
status String from list: new, in-progress, cancelled, done if needed search with status
limit Integer
offset Integer
with Array[String] from list: users, projects
group_by String field for grouping
order_by String from list: asc, desc sorting order for grouped field

200 Response body (application/json):

{
  "status": "SUCCESS",
  "message": "1 group(s) found.",
  "data": {
    "groups": [
      {
        "value": true,
        "count": 1,
        "items": [
          {
            "id": 0,
            "name": "Task name",
            "project": 0,
            "duration": 3600,
            "status": "new",
            "users": [0],
            "entries": {
              "0": {
                "start_datetime": 1583905200,
                "end_datetime": 1583905200,
                "duration": 3600
              }
            }
          }
        ]
      }
    ],
    "users": {
      "0": {
        "id": 0,
        "email": "email@dom.com",
        "first_name": "John",
        "last_name": "Smith",
        "hourly_rate": 10,
        "picture": "url_to_user_avatar",
        "teams": [0],
        "birth_date": "1988-11-22"
      }
    },
    "teams": {
      "0": {
        "id": 0,
        "name": "Group name",
        "description": "description..",
        "notes": "notes..",
        "status": "active",
        "pay_rate": 10.5
      }
    },
    "projects": {
      "0": {
        "id": 0,
        "name": "Project name",
        "description": "description...",
        "client_id": 0,
        "duration_unit": "minutes",
        "status": "new",
        "planned_start_date": 1583905200,
        "actual_start_date": 1583905200,
        "planned_end_date": 1583905200,
        "actual_end_date": 1583905200,
        "estimated_duration": 100,
        "actual_duration": 100,
        "tasks": [0]
      }
    }
  },
  "count": 1
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message
data Array of Object packed to JSON string objects with all fields or empty object
count Integer Count of finded groups

Data:

if "with" = ["users"]:

if "with" = ["users"]:

if "with" = ["projects"]:

Delete Task

HTTP Request

POST /timesheets/task/delete

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
  "task_id": 1
}

Request data: JSON string with the following elements

Parameter Type Description
task_id Integer (Required)

200 Response body (application/json):

{
  "status": "SUCCESS",
  "message": "Successfully deleted."
}

404 Not found. Response body (application/json):

{
     "status": "ERROR",
      "message": "Task not found.",
      "error_code": 5
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message

Add User to Task

HTTP Request

POST /api/{app_path}/task/add_user

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json): json { "task_id":1, "user_id":2 }

Request data: JSON string with the following elements

Parameter Type Description
task_id Integer (Required) Task ID
user_id Integer (Required) User ID

200 Response body (application/json):

{
   "status": "SUCCESS",
   "message": "User successfully added to task."
}

404 Not found. Response body (application/json):

{
     "status": "ERROR",
      "message": "Task not found.",
      "error_code": 5
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message

Delete User from Task

HTTP Request

POST /api/{app_path}/task/delete_user

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
  "task_id":1,
  "user_id":2
}

Request data: JSON string with the following elements

Parameter Type Description
task_id Integer (Required) Task ID
user_id Integer (Required) User ID

200 Response body (application/json):

{
   "status": "SUCCESS",
   "message": "User successfully deleted from task."
}

404 Not found. Response body (application/json):

{
     "status": "ERROR",
      "message": "Task not found.",
      "error_code": 5
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message

History of changes task.

HTTP Request

POST /api/{app_path}/task/history

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
  "task_id": 1
}

Request data: JSON string with the following elements

Parameter Type Description
task_id Integer (Required)

200 Response body (application/json):

{
    "status": "SUCCESS",
    "message": "3 history record(s) found.",
    "data": [
        {
            "status": "in-progress",
            "date": "1590652717",
            "user": {
                "first_name": "Member",
                "last_name": "Userov"
            }
        },
        {
            "status": "cancelled",
            "date": "1590652717",
            "user": {
                "first_name": "Member",
                "last_name": "Userov"
            }
        },
        {
            "status": "done",
            "date": "1590652717",
            "user": {
                "first_name": "Member",
                "last_name": "Userov"
            }
        }
    ]
}

404 Not found. Response body (application/json):

{
     "status": "ERROR",
      "message": "Task not found.",
      "error_code": 5
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message
data Array of entity packed to JSON string object with all fields or empty object

Data: array of objects:

History of changes task.

HTTP Request

POST /api/{app_path}/task/work_history

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
  "task_id": 1,
  "with": ["users", "tasks", "projects"]
}

Request data: JSON string with the following elements

Parameter Type Description
task_id Integer (Required)
user_id Integer
with Array[String] from list: users, tasks, projects

200 Response body (application/json):

{
    "status": "SUCCESS",
    "message": "2 time entries found.",
    "data": {
        "time_entries": [
            {
                "id": 2,
                "user_id": 111,
                "task_id": 3,
                "status": "rejected",
                "start_time": "1566486923",
                "breaks": 0,
                "comments": 0,
                "duration": 6020,
                "approve_date": "1590652717",
                "end_time": "1566492943",
                "start_location": [37.270241, -119.989356],
                "end_location": [37.537152,-118.857427]
            },
            {
                "id": 3,
                "user_id": 111,
                "task_id": 3,
                "status": "approved",
                "start_time": "1566492323",
                "breaks": 0,
                "comments": 0,
                "duration": 4220,
                "approve_date": "1590652717",
                "end_time": "1566496543",
                "start_location": [37.270242,-119.989356],
                "end_location": [37.537153,-118.857427]
            }
        ],
        "users": {
            "111": {
                "id": 111,
                "first_name": "John",
                "last_name": "Smith"
            }
        },
        "tasks": {
            "3": {
                "id": 3,
                "project": 1,
                "name": "Task #3",
                "status": "in-progress"
            }
        },
        "projects": {
            "1": {
                "id": 1,
                "name": "Project #1",
                "status": "in-progress",
                "client_id": 1,
                "tasks": [9,7,5,3,1]
            }
        }
    },
    "timestamp": 1594127815
}

404 Not found. Response body (application/json):

{
     "status": "ERROR",
      "message": "Task not found.",
      "error_code": 5
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message
data Array of entity packed to JSON string object with all fields or empty object
timestamp Timestamp

Data:

Add comment to task

HTTP Request

POST /api/{APP_CODE}/task/add_comment

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
  "task_id": 1,
  "content": "content text"
}

Request data: JSON string with the following elements

Parameter Type Description
task_id Integer (Required)
content String (Required)

200 Response body (application/json):

{
  "status": "SUCCESS",
  "id": 1
}

404 Not found. Response body (application/json):

{
   "status": "ERROR",
   "message": "Task not found.",
   "error_code": 5
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
id Integer ID of created comment

Get comments of task

HTTP Request

POST /api/{APP_CODE}/task/comments

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
    "task_id": 1,
    "with": ["users"]
}

Request data: JSON string with the following elements

Parameter Type Description
task_id Integer (Required)
with Array of String "users"

200 Response body (application/json):

{
  "status": "SUCCESS",
  "data": {
    "comments": [
      {
        "id": 0,
        "commentator": 1,
        "content": "Comment text",
        "date": 1566402943
      }
    ],
    "users": {
      "1": {
        "id": 1,
        "first_name": "John",
        "last_name": "Smith",
        "picture": "url_to_user_avatar"
      }
    }
  },
  "count": 1
}

404 Not found. Response body (application/json):

{
   "status": "ERROR",
   "message": "Task not found.",
   "error_code": 5
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
data Array of Comment object
count Integer Count of finded comments

Data:

PROJECT

Project API for iBuildApp Timesheets, handling getting project information, creating/deleting/updating a project, and searching for projects.

Get Project Info

HTTP Request

POST /api/{APP_CODE}/project

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
    "project_id":1
}

Request data: JSON string with the following elements

Parameter Type Description
project_id Integer (Required) Project ID

200 Response body (application/json):

{
  "status": "SUCCESS",
  "data": {
        "id": 1,
        "name": "project_name",
        "description": "description",
        "client_id": 21,
        "duration_unit": "minutes",
        "status": "done",
        "planned_start_date": 1565687043,
        "actual_start_date": 1565687043,
        "planned_end_date": 1565687043,
        "actual_end_date": 1565687043,
        "estimated_duration": 1000,
        "actual_duration": 1200,
        "tasks": [0,1,2]
  }
}

404 Not found. Response body (application/json):

{
     "status": "ERROR",
      "message": "Project not found.",
      "error_code": 5
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
data Object packed to JSON string User object with all fields or empty object

Data: object of Project:

Create New Project

HTTP Request

POST /api/{APP_CODE}/project/create

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
    "client_id": 1,
    "name": "Test",
    "description": "test project"
}

Request data: JSON string with the following elements

Parameter Type Description
client_id Integer (Required)
name String (Required)
description String
category String
status String from list: new, in-progress, cancelled, done
planned_start_date Date
actual_start_date Date
planned_end_date Date
actual_end_date Date
estimated_duration Float
actual_duration Float
duration_unit String from the list:minutes, hours, days, weeks, months, years

200 Response body (application/json):

{
   "status": "SUCCESS",
   "message": "Successfully created.",
   "id": 1
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message
id Integer New project id

Update Project

HTTP Request

POST /api/{APP_CODE}/project/update

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
    "project_id": 1,
    "description": "my project"
}

Request data: JSON string with the following elements

Parameter Type Description
client_id Integer (Required)
project_id Integer
name String
description String
category String
status String from list: new, in-progress, cancelled, done
planned_start_date Timestamp
actual_start_date Timestamp
planned_end_date Timestamp
actual_end_date Timestamp
estimated_duration Float
actual_duration Float
duration_unit String from the list:minutes, hours, days, weeks, months, years

200 Response body (application/json):

{
   "status": "SUCCESS",
   "message": "Successfully updated."
}

404 Not found. Response body (application/json):

{
   "status": "ERROR",
    "message": "Project not found.",
    "error_code": 5
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message

Search Projects

HTTP Request

POST /api/{APP_CODE}/project/search

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
    "name": "test",
    "limit": 10,
    "offset": 0,
    "with": ["tasks" ,"clients"]
}

Request data: JSON string with the following elements

Parameter Type Description
client_id Integer
name String if needed search with name
category String if needed search with category
description String if needed search with
keyword String Search in name, description, category
duration_unit String from the list:minutes, hours, days, weeks, months, years if needed search with duration_unit
status String from list: new, in-progress, cancelled, done if needed search with status
limit Integer
offset Integer
with Array[String] from list: tasks, clients

Response body (application/json):

{
  "status": "SUCCESS",
  "message": "1 project(s) found.",
  "data": {
    "projects": [
      {
        "id": 0,
        "name": "test project",
        "description": "description",
        "client_id": 11,
        "duration_unit": "minutes",
        "status": "new",
        "planned_start_date": 1565687043,
        "actual_start_date": 1565687043,
        "planned_end_date": 1565687043,
        "actual_end_date": 1565687043,
        "estimated_duration": 20,
        "actual_duration": 10,
        "tasks": [0]
      }
    ],
    "tasks": {
      "0": {
        "id": 0,
        "name": "task name",
        "duration": 10,
        "status": "new",
        "users": [0]
      }
    },
    "clients": {
      "11": {
        "id": 11,
        "name": "Client name",
        "status": "active"
      }
    }
  },
  "count": 1
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message
data Array of Object packed to JSON string objects with all fields or empty object
count Integer Count of finded objects

Data:

Search Projects with Grouping

HTTP Request

POST /api/{APP_CODE}/project/search_group

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
    "name": "test",
    "group_by": "client",
    "limit": 10,
    "offset": 0,
    "with": ["tasks" ,"clients"]
}

Request data: JSON string with the following elements

Parameter Type Description
client_id Integer
name String if needed search with name
category String if needed search with category
description String if needed search with
keyword String Search in name, description, category
duration_unit String from the list:minutes, hours, days, weeks, months, years if needed search with duration_unit
status String from list: new, in-progress, cancelled, done if needed search with status
limit Integer
offset Integer
with Array[String] from list: tasks, clients
group_by String field for grouping: client, status, category
order_by String from list: asc, desc sorting order for grouped field

Response body (application/json):

{
    "status": "SUCCESS",
    "message": "2 group(s) found.",
    "data": {
        "groups": [
            {
                "value": 1,
                "count": 4,
                "items": [
                    {
                        "id": 4,
                        "name": "Project #4",
                        "status": "cancelled",
                        "client_id": 1
                    },
                    {
                        "id": 3,
                        "name": "Project #3",
                        "status": "in-progress",
                        "client_id": 1
                    },
                    {
                        "id": 2,
                        "name": "Project #2",
                        "status": "in-progress",
                        "client_id": 1,
                        "tasks": [
                            4,
                            2
                        ]
                    },
                    {
                        "id": 1,
                        "name": "Project #1",
                        "status": "in-progress",
                        "client_id": 1,
                        "tasks": [
                            3,
                            1
                        ]
                    }
                ]
            },
            {
                "value": 142,
                "count": 2,
                "items": [
                    {
                        "id": 5,
                        "name": "Project #5",
                        "status": "new",
                        "client_id": 142
                    },
                    {
                        "id": 6,
                        "name": "Brand Launch Event",
                        "status": "in-progress",
                        "updated": "1595578497",
                        "planned_end_date": "1597449600",
                        "client_id": 142,
                        "tasks": [
                            14
                        ]
                    }
                ]
            }
        ],
        "clients": {
            "1": {
                "id": 1,
                "name": "Test Client"
            },
            "142": {
                "id": 142,
                "name": "Bank West"
            }
        },
        "tasks": {
            "4": {
                "id": 4,
                "name": "Task #4",
                "duration": 4220,
                "status": "done",
                "users": [
                    2
                ]
            },
            "2": {
                "id": 2,
                "name": "Task #2",
                "duration": 0,
                "status": "cancelled",
                "users": [
                    2
                ]
            },
            "3": {
                "id": 3,
                "name": "Task #3",
                "duration": 10240,
                "status": "in-progress",
                "users": [
                    2
                ]
            },
            "1": {
                "id": 1,
                "name": "Task #1",
                "duration": 10560,
                "status": "new",
                "users": [
                    1,
                    2
                ]
            },
            "14": {
                "id": 14,
                "name": "AV Setup",
                "duration": 0,
                "status": "new",
                "users": []
            }
        }
    },
    "count": 2
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message
data Array of Object packed to JSON string objects with all fields or empty object
count Integer Count of finded groups

Data:

Delete Project

HTTP Request

POST /api/{APP_CODE}/project/delete

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
    "project_id": 1
}

Request data: JSON string with the following elements

Parameter Type Description
project_id Integer (Required)

200 Response body (application/json):

{
   "status": "SUCCESS",
   "message": "Successfully deleted."
}

404 Not found. Response body (application/json):

{
   "status": "ERROR",
    "message": "Project not found.",
    "error_code": 5
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message

SCHEDULE

Get Schedule Info

HTTP Request

POST /api/{APP_CODE}/schedule

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
  "shedule_id": 1
}

Request data: JSON string with the following elements

Parameter Type Description
schedule_id Integer (Required) Schedule ID

Response body (application/json):

{
  "status": "SUCCESS",
  "data": {
    "id": 1,
    "name": "Schedule_name",
    "days_of_week": {
      "monday": true,
      "tuesday": true,
      "wednesday": true,
      "thursday": true,
      "friday": true,
      "saturday": true,
      "sunday": true
    },
    "start_time": "10:00",
    "end_time": "19:59",
    "is_holiday": true,
    "is_overnight": true
  }
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
data Object packed to JSON string Schedule object with all fields or empty object

Create New Schedule

HTTP Request

POST /api/{APP_CODE}/schedule/create

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
  "name": "Name of schedule",
  "days_of_week": {
    "monday": true,
    "tuesday": true,
    "wednesday": true,
    "thursday": true,
    "friday": true,
    "saturday": true,
    "sunday": true
  },
  "start_time": "10:00",
  "end_time": "19:59",
  "is_holiday": true,
  "is_overnight": true
}

Request data: JSON string with the following elements

Parameter Type Description
name String (Required)
days_of_week Array of days (Boolean) (Required) "monday": Boolean,"tuesday": Boolean,"wednesday": Boolean,"thursday": Boolean,"friday": Boolean,"saturday": Boolean,"sunday": Boolean
start_time String (Required) (HH:mm)
end_time String (Required) (HH:mm)
is_holiday Boolean (Required)
is_overnight Boolean (Required)

Response body (application/json):

{
  "status": "SUCCESS",
  "message": "Successfully created.",
  "id": 0
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message
id Integer New Schedule id

Update Schedule

HTTP Request

POST /api/{APP_CODE}/schedule/update

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
  "schedule_id": 1,
  "name": "Name of schedule",
  "days_of_week": {
    "monday": true,
    "tuesday": true,
    "wednesday": true,
    "thursday": true,
    "friday": true,
    "saturday": true,
    "sunday": true
  },
  "start_time": "10:00",
  "end_time": "19:59",
  "is_holiday": true,
  "is_overnight": true
}

Request data: JSON string with the following elements

Parameter Type Description
schedule_id Integer (Required)
name String
days_of_week Array of days (Boolean) "monday": Boolean,"tuesday": Boolean,"wednesday": Boolean,"thursday": Boolean,"friday": Boolean,"saturday": Boolean,"sunday": Boolean
start_time String (HH:mm)
end_time String (HH:mm)
is_holiday Boolean
is_overnight Boolean

200 Response body (application/json):

{
  "status": "SUCCESS",
  "message": "Successfully updated."
}

404 Not found. Response body (application/json):

{
   "status": "ERROR",
    "message": "Schedule not found.",
    "error_code": 5
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message

Search Schedules

HTTP Request

POST /api/{APP_CODE}/schedule/search

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
  "name": "test"
}

Request data: JSON string with the following elements

Must be at least one of parameters: name, keyword

Parameter Type Description
name String (Required ?)
keyword String (Required ?) search in name
limit Integer
offset Integer

200 Response body (application/json):

{
  "status": "SUCCESS",
  "message": "1 schedule(s) found.",
  "data": [
    {
      "id": 0,
      "name": "test name",
      "days_of_week": {
        "monday": true,
        "tuesday": true,
        "wednesday": true,
        "thursday": true,
        "friday": true,
        "saturday": true,
        "sunday": true
      },
      "start_time": "10:00",
      "end_time": "19:59",
      "is_holiday": true,
      "is_overnight": true
    }
  ],
  "count": 1
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message
data Array of objects packed to JSON string Schedule objects with all fields or empty
count Integer Count of finded objects

Delete Schedule

HTTP Request

POST /api/{APP_CODE}/schedule/delete

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
  "schedule_id": 1
}

Request data: JSON string with the following elements

Parameter Type Description
schedule_id Integer (Required)

200 Response body (application/json):

{
  "status": "SUCCESS",
  "message": "Successfully deleted."
}

404 Not found. Response body (application/json):

{
   "status": "ERROR",
    "message": "Schedule not found.",
    "error_code": 5
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message

RATE

Rate API for iBuildApp Timesheets, handling getting rate information, creating/deleting/updating a rate, and searching for rates.

Get Rate Info

HTTP Request

POST /api/{APP_CODE}/rate

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
    "rate_id": 1
}

Request data: JSON string with the following elements

Parameter Type Description
rate_id Integer (Required) ID Rate

200 Response body (application/json):

{
    "status": "SUCCESS",
    "data": {
        "id": 1,
        "name": "test_rate",
        "schedule_id": 1,
        "user_id": 1,
        "amount": 100,
        "duration_unit": "days"
    }
}

404 Not found. Response body (application/json):

{
   "status": "ERROR",
    "message": "Rate not found.",
    "error_code": 5
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message
data Object packed to JSON string Rate object with all fields or empty object

Create New Rate

HTTP Request

POST /api/{APP_CODE}/rate/create

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
    "user_id": 1,
    "schedule_1": 1,
    "name": "test_rate",
    "duration_unit": "days",
    "amount": 100
}

Request data: JSON string with the following elements

Parameter Type Description
user_id Integer (Required)
schedule_id Integer (Required)
name String (Required)
amount Float
duration_unit String from the list: minutes, hours, days, weeks, months, years (Required)

200 Response body (application/json):

{
   "status": "SUCCESS",
   "message": "Successfully created.",
   "id": 1
}

404 Not found. Response body (application/json):

{
   "status": "ERROR",
    "message": "User not found.",
    "error_code": 5
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message
id Integer ID of the new Rate entity

Update Rate

HTTP Request

POST /api/{APP_CODE}/rate/update

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
    "rate_id": 1,
    "name": "test_rate1"
}

Request data: JSON string with the following elements

Parameter Type Description
rate_id Integer (Required)
user_id Integer
schedule_id Integer
name String
amount Float
duration_unit String from the list: minutes, hours, days, weeks, months, years

Response body (application/json):

{
   "status": "SUCCESS",
   "message": "Successfully updated."
}

404 Not found. Response body (application/json):

{
   "status": "ERROR",
    "message": "User not found.",
    "error_code": 5
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message

Search Rates

HTTP Request

POST /api/{APP_CODE}/rate/search

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
    "name": "test"
}

Request data: JSON string with the following elements

Parameter Type Description
user_id Integer
schedule_id Integer
name String if needed search with name
amount Float
duration_unit String from the list: minutes, hours, days, weeks, months
limit Integer
offset Integer

Response body (application/json):

{
   "status": "SUCCESS",
   "message": "1 rate(s) found.",
   "data": [
      {
          "id": 1,
          "schedule_id": 1,
          "user_id": 1,
          "name": "test_rate",
          "amount": 100,
          "duration_unit": "days"
      }
   ],
  "count": 1
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message
data Object packed to JSON string User object with all fields or empty object
count Integer Count of finded objects

Data - array of Rate objects:

id (Integer) Rate ID
schedule_id (Integer) Schedule ID
user_id (Integer) User ID
name (String)
amount (Integer) Duration in duration unit
duration_unit (String) May be: minutes, hours, days, weeks, months, years

Delete Rate

HTTP Request

POST /api/{APP_CODE}/rate/delete

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
    "rate_id": 1
}

Request data: JSON string with the following elements

Parameter Type Description
rate_id Integer (Required)

200 Response body (application/json):

{
   "status": "SUCCESS",
   "message": "Successfully deleted."
}

404 Not found. Response body (application/json):

{
   "status": "ERROR",
    "message": "Rate not found.",
    "error_code": 5
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message

TIME ENTRY

Time Entry API for iBuildApp Timesheets, handling getting time entry information, creating/deleting/updating a time entry, getting time entry status history, setting time entry status, and searching for time entries.

Start Time Tracking

HTTP Request

POST /api/{APP_CODE}/ts/start

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
    "task_id":18,
    "location":[-37.270245, -119.989356],
    "comment":"my comment"
}

Request data: JSON string with the following elements

Parameter Type Description
task_id Integer Task id
location Array Location [latitude,longitude]
comment String

200 Response body (application/json):

{
   "status": "SUCCESS",
   "message": "Starteed."
}

401 Unauthorized. Response body (application/json):

{
   "status": "ERROR",
   "message": "Auth token not specified or incorrect.",
   "error_code": 9
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message: "Successfully started.","Task not found.","Found started TimeEntry.”

Stop Time Tracking

HTTP Request

POST /api/{APP_CODE}/ts/stop

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
    "task_id":18,
    "comment":"my comment2",
    "location":[-37.270245, -119.989356]
}

Request data: JSON string with the following elements

Parameter Type Description
task_id Integer Task id
location Array Location [latitude,longitude]
comment String

200 Response body (application/json):

{
  "status": "SUCCESS",
  "message": "Stopped."
}

401 Unauthorized. Response body (application/json):

{
   "status": "ERROR",
   "message": "Auth token not specified or incorrect.",
   "error_code": 9
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message

Create New Timesheet Entry

HTTP Request

POST /api/{APP_CODE}/ts/create

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
    "user_id":1,
    "task_id":18,
    "start_time":1565687043,
    "end_time":1565688043,
    "location":[-37.270245, -119.989356],
    "comment":"my comment"
}

Request data: JSON string with the following elements

Parameter Type Description
user_id Integer (Required) User ID
task_id Integer Task ID
start_time Timestamp Period start date and time. Current Timestamp if empty
end_time Timestamp Period end date and time
comment String comment

200 Response body (application/json):

{
  "status": "SUCCESS",
  "message": "Successfully created.",
  "id": 2
}

401 Unauthorized. Response body (application/json):

{
   "status": "ERROR",
   "message": "Auth token not specified or incorrect.",
   "error_code": 9
}

404 Task found. Response body (application/json):

{
   "status": "ERROR",
    "message": "Task not found.",
    "error_code": 5
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message
id Integer ID of created TimeEntry

Get Time Entry Info

HTTP Request

POST /api/{APP_CODE}/ts/get

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
  "time_entry_id": 1,
  "with": [
    "users",
    "projects",
    "comments",
    "breaks"
  ]
}

Request data: JSON string with the following elements

Parameter Type Description
time_entry_id Integer (Required) TimeEntry ID

200 Response body (application/json):

{
  "status": "SUCCESS",
  "message": "1 time entries found.",
  "data": {
    "time_entry": {
      "id": 0,
      "user_id": 0,
      "task_id": 0,
      "start_time": 1583905200,
      "end_time": 1583905200,
      "duration": 600,
      "approve_date": 1583905200,
      "breaks": 1,
      "status": "in-progress"
    },
    "users": {
      "0": {
        "id": 0,
        "first_name": "John",
        "last_name": "Smith",
        "hourly_rate": 0,
        "picture": "url_user_avatar",
        "birth_date": "1988-11-22"
      }
    },
    "breaks": [
      {
        "id": 0,
        "start_time": 1583905200,
        "end_time": 1583905800,
        "duration": 600
      }
    ],
    "comments": [
      {
        "id": 0,
        "commentator": 0,
        "content": "content",
        "date": 1566402943
      }
    ],
    "commentators": {
      "0": {
        "id": 0,
        "first_name": "John",
        "last_name": "Smith",
        "picture": "url_user_avatar"
      }
    },
    "tasks": {
      "0": {
        "id": 0,
        "project": 0,
        "name": "Task #0",
        "description": "description",
        "estimate_hours": 10.1,
        "duration": 111,
        "status": "new"
      }
    },
    "projects": {
      "0": {
        "id": 0,
        "name": "Project name",
        "description": "description",
        "client_id": 0,
        "duration_unit": "minutes",
        "status": "new",
        "planned_start_date": 0,
        "actual_start_date": 0,
        "planned_end_date": 0,
        "actual_end_date": 0,
        "estimated_duration": 10,
        "actual_duration": 10,
        "tasks": [
          0
        ]
      }
    },
    "customers": {
      "0": {
        "id": 0,
        "name": "Customer #0",
        "status": "active"
      }
    }
  },
  "count": 1
}

401 Unauthorized. Response body (application/json):

{
   "status": "ERROR",
   "message": "Auth token not specified or incorrect.",
   "error_code": 9
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message
data Object packed to JSON string TimeEntry Object with all fields or empty object

Update Time Entry

HTTP Request

POST /api/{app_path}/ts/update

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
    "time_entry_id": 1,
    "task_id": 2
}

Request data: JSON string with the following elements

Parameter Type Description
time_entry_id Integer (Required)
task_id Integer
start_datetime Timestamp
end_datetime Timestamp

200 Response body (application/json):

{
   "status": "SUCCESS",
   "message": "Successfully updated."
}

401 Unauthorized. Response body (application/json):

{
   "status": "ERROR",
   "message": "Auth token not specified or incorrect.",
   "error_code": 9
}

404 Not found. Response body (application/json):

{
     "status": "ERROR",
      "message": "TimeEntry  not found.",
      "error_code": 5
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message

Search Time Entries

HTTP Request

POST /api/{app_path}/ts/search

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
  "time_entry_ids": [
    0, 10
  ],
  "user_id": 1,
  "task_id": 1,
  "project_id": 1,
  "payment_status": "pending",
  "keywords": "string",
  "with": [
    "users",
    "tasks",
    "projects"
  ]
}

Request data: JSON string with the following elements

Parameter Type Description
time_entry_ids Array[Integer] TimeEntry IDs
task_id Integer
user_id Integer Optional for admin.
start_datetime Timestamp
end_datetime Timestamp
status String from list: in-progress, rejected, approved
keywords String
limit Integer
offset Integer
with Array[String] from list: "users","tasks","projects"

200 Response body (application/json):

{
  "status": "SUCCESS",
  "message": "1 time entries found.",
  "data": {
    "time_entries": [
      {
        "id": 0,
        "user_id": 0,
        "task_id": 0,
        "start_time": 1583905200,
        "end_time": 1583905200,
        "approve_date": 1583905200,
        "breaks": 0,
        "comments": 0,
        "duration": 0,
        "status": "in-progress",
        "payment_status": "pending",
        "start_location": [
          37.270248,
          -119.989356
        ],
        "end_location": [
          37.270248,
          -119.989356
        ]
      }
    ],
    "users": {
      "0": {
        "id": 0,
        "email": "string",
        "first_name": "string",
        "last_name": "string",
        "hourly_rate": 0,
        "picture": "string",
        "birth_date": "1988-11-22"
      }
    },
    "tasks": {
      "0": {
        "id": 0,
        "name": "string",
        "project": 0,
        "duration": 0,
        "status": "new",
        "users": [
          0
        ]
      }
    },
    "projects": {
      "0": {
        "id": 0,
        "name": "string",
        "description": "string",
        "client_id": 0,
        "duration_unit": "minutes",
        "status": "new",
        "planned_start_date": 0,
        "actual_start_date": 0,
        "planned_end_date": 0,
        "actual_end_date": 0,
        "estimated_duration": 0,
        "actual_duration": 0,
        "tasks": [
          0
        ]
      }
    }
  },
  "count": 1
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message
data Object packed to JSON string TimeEntry Object with all fields or empty object

Search Time Entries with Grouping

HTTP Request

POST /api/{app_path}/ts/search_group

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
  "project_id": 1,
  "group_by": "status",
  "with": [
    "users",
    "tasks",
    "projects"
  ]
}

Request data: JSON string with the following elements

Parameter Type Description
time_entry_ids Array[Integer] TimeEntry IDs
task_id Integer
user_id Integer
start_datetime Timestamp
end_datetime Timestamp
status String from list: in-progress, rejected, approved
keywords String
with Array[String] from list: "users","tasks","projects"
group_by String field for grouping: user, task, status, payment_status, schedule
order_by String from list: asc, desc sorting order for grouped field
limit Integer
offset Integer

200 Response body (application/json):

{
  "status": "SUCCESS",
  "message": "1 group(s) found.",
  "data": {
    "groups": [
      {
        "value": true,
        "count": 1,
        "items": [
          {
            "id": 0,
            "user_id": 0,
            "task_id": 0,
            "start_time": 1583905200,
            "end_time": 1583905200,
            "approve_date": 1583905200,
            "breaks": 0,
            "comments": 0,
            "duration": 0,
            "status": "in-progress",
            "payment_status": "pending",
            "start_location": [
              37.270248,
              -119.989356
            ],
            "end_location": [
              37.270248,
              -119.989356
            ]
          }
        ]
      }
    ],
    "users": {
      "0": {
        "id": 0,
        "email": "string",
        "first_name": "string",
        "last_name": "string",
        "hourly_rate": 0,
        "picture": "string",
        "birth_date": "1988-11-22"
      }
    },
    "tasks": {
      "0": {
        "id": 0,
        "name": "string",
        "project": 0,
        "duration": 0,
        "status": "new",
        "users": [
          0
        ]
      }
    },
    "projects": {
      "0": {
        "id": 0,
        "name": "string",
        "description": "string",
        "client_id": 0,
        "duration_unit": "minutes",
        "status": "new",
        "planned_start_date": 0,
        "actual_start_date": 0,
        "planned_end_date": 0,
        "actual_end_date": 0,
        "estimated_duration": 0,
        "actual_duration": 0,
        "tasks": [
          0
        ]
      }
    }
  },
  "count": 1
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message
data Object packed to JSON string User object with all fields or empty object
count Integer Count of Objects

Data:

count (Integer): - Count of finded groups
groups: - array of objects:
    • value - Value of grouping field
    • count (Integer) - Count of items in group
    • items - Array of object:
        • id (Integer)
        • user_id (Integer) User ID
        • task_id (Integer) Task ID
        • start_time (Timestamp)
        • end_time (Timestamp)
        • approve_date (Timestamp) Date of approve TimeEntry
        • breaks (Integer) Count of breaks
        • comments (Integer) Count of comments
        • duration (Integer) Duration in seconds
        • status (String) May be: in-progress, rejected, approved
        • payment_status (String) - May be: pending, payed
        • start_location (Array) - array of coordinates
        • end_location (Array) - array of coordinates

if "with" = ["users"]:
users: - array of *[key:object]** related Clients:
    • **key
* - ID of User
    • object - User
        • id (Integer)
        • email (String)
        • first_name (String)
        • last_name (String)
        • hourly_rate (Float)
        • picture (String)
        • birth_date (String) - YYYY-MM-DD

if "with" = ["tasks"]:
tasks: - array of *[key:object]** :
    • **key
* - ID of Task
    • object - Task
        • id (Integer)
        • name (String)
        • project (String)
        • duration (Integer)
        • status (String) - May be: new, in-progress, cancelled, done
        • users (Array) - Array of related User ID

if "with" = ["projects"]:
projects: - array of *[key:object]** related Projects:
    • **key
* - ID of Project
    • object - Project
        • id (Integer)
        • name (String)
        • description (String)
        • client_id (Integer) - Client ID
        • duration_unit (String) - May be: minutes, hours, days, weeks, months, years
        • status (String) - May be: new, in-progress, cancelled, done
        • planned_start_date (Timestamp)
        • actual_start_date (Timestamp)
        • planned_end_date (Timestamp)
        • actual_end_date (Timestamp)
        • estimated_duration (Float)
        • actual_duration (Float)
        • tasks (Array) - Array of related Task ID

Delete Time Entry

HTTP Request

POST /api/{app_path}/ts/delete

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
    "time_entry_id": 1
}

Request data: JSON string with the following elements

Parameter Type Description
time_entry_id Integer (Required)

200 Response body (application/json):

{
   "status": "SUCCESS",
   "message": "Successfully deleted."
}

404 User not found. Response body (application/json):

{
     "status": "ERROR",
      "message": "Time entry not found.",
      "error_code": 5
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message

Get Status History of Time Entry

HTTP Request

POST /api/{app_path}/ts/history

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
    "time_entry_id": 1
}

Request data: JSON string with the following elements

Parameter Type Description
time_entry_id Integer (Required)

Response body (application/json):

{
   "status": "SUCCESS",
   "message": "2 time entries found.",
   "data": [
       {
           "status": "in-progress",
           "event_date": "2019-08-28 12:56:03",
           "user": {
               "first_name": "Root",
               "last_name": "Adminson"
           }
       },
       {
           "status": "approved",
           "event_date": "2019-08-28 13:07:14",
           "user": {
               "first_name": "Root",
               "last_name": "Adminson"
           }
       }
   ]
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message
data Array of object packed to JSON string Approval History object with all fields or empty object

Start Break of Time Entry

HTTP Request

POST /api/{app_path}/ts/break_start

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
    "time_entry_id": 1
}

Request data: JSON string with the following elements

Parameter Type Description
time_entry_id Integer (Required)

200 Response body (application/json):

{
  "status": "SUCCESS",
  "message": "Successfully started.",
  "id": 0
}

404 Not found. Response body (application/json):

{
     "status": "ERROR",
      "message": "Started TimeEntry not found.",
      "error_code": 5
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message
id Integer ID of Break

Stop Break of Time Entry

HTTP Request

POST /api/{app_path}/ts/break_stop

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
    "time_entry_id": 1
}

Request data: JSON string with the following elements

Parameter Type Description
time_entry_id Integer (Required)

200 Response body (application/json):

{
  "status": "SUCCESS",
  "message": "Stopped."
}

404 Not found. Response body (application/json):

{
     "status": "ERROR",
      "message": "Started Break not found.",
      "error_code": 5
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message

Breaks of Time Entry

Return duration of breaks in seconds

HTTP Request

POST /api/{app_path}/ts/breaks

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
    "time_entry_id":26
}

Request data: JSON string with the following elements

Parameter Type Description
time_entry_id Integer (Required)

200 Response body (application/json):

{
    "status": "SUCCESS",
    "message": "2 break(s) found.",
    "data": [
        {
            "id": 1,
            "start_datetime": "1566391583",
            "end_datetime": "1566391703",
            "time_entry": 1,
            "duration": 120
        },
        {
            "id": 2,
            "start_datetime": "1566392183",
            "end_datetime": "1566392303",
            "time_entry": 1,
            "duration": 120
        }
    ],
    "count": 2
}

404 Not found. Response body (application/json):

{
     "status": "ERROR",
      "message": "TimeEntry not found.",
      "error_code": 5
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message
data Array of object packed to JSON string Approval History object with all fields or empty object
count Integer Count of breaks

Approve Time Entries

Return duration of breaks in seconds

HTTP Request

POST /api/{app_path}/ts/approve

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
    "time_entry_ids":[22,23,24]
}

Request data: JSON string with the following elements

Parameter Type Description
time_entry_ids ArrayInteger

200 Response body (application/json):

{
  "status": "SUCCESS",
  "message": "Successfully approved.",
  "data": [1,3],
  "count": 2
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message
data Array of object packed to JSON string Array of ID of approved time entry
count Integer Count of approved time entry

Export Time Entries

HTTP Request

POST /api/{app_path}/ts/export

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
  "time_entry_ids": [0, 10],
  "with_headers": true
}

Request data: JSON string with the following elements

Parameter Type Description
time_entry_ids Array[Integer] TimeEntry IDs
task_id Integer
user_id Integer
status String from list: in-progress, rejected, approved
with_headers Boolean Include headers to csv ? default = false

200 Response body (text/csv):

Response data: file

Parameter Type Description
file text/csv

Calculate a cost of selected time_entries for invoice.

Return duration in seconds and cost for selected APPROVED time entry

HTTP Request

POST /api/{app_path}/ts/calc

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
    "time_entry_ids":[22,23,24]
}

Request data: JSON string with the following elements

Parameter Type Description
time_entry_ids ArrayInteger

200 Response body (application/json):

{
  "status": "SUCCESS",
  "message": "Successfully calculated.",
  "data": {
    "duration": 12257,
    "sum": 10.5
  }
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message
data: duration Integer Duration in seconds
data: sum Float Full cost (with minus breaks)

Add comment to Time Entry

HTTP Request

POST /api/{APP_CODE}/ts/add_comment

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
  "time_entry_id": 1,
  "content": "content text"
}

Request data: JSON string with the following elements

Parameter Type Description
time_entry_id Integer (Required)
content String (Required)

200 Response body (application/json):

{
  "status": "SUCCESS",
  "id": 1
}

404 Not found. Response body (application/json):

{
   "status": "ERROR",
   "message": "Time Entry not found.",
   "error_code": 5
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
id Integer ID of created comment

Get comments of Time Entry

HTTP Request

POST /api/{APP_CODE}/ts/comments

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
    "time_entry_id": 1,
    "with": ["users"]
}

Request data: JSON string with the following elements

Parameter Type Description
time_entry_id Integer (Required)
with Array of String "users"

200 Response body (application/json):

{
  "status": "SUCCESS",
  "data": {
    "comments": [
      {
        "id": 0,
        "commentator": 1,
        "content": "Comment text",
        "date": 1566402943
      }
    ],
    "users": {
      "1": {
        "id": 1,
        "first_name": "John",
        "last_name": "Smith",
        "picture": "url_to_user_avatar"
      }
    }
  },
  "count": 1
}

404 Not found. Response body (application/json):

{
   "status": "ERROR",
   "message": "Time Entry not found.",
   "error_code": 5
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
data Array of Comment object
count Integer Count of finded comments

INTEGRATION

Integration with QBO

Set/update information for integration

Request body (application/json):

{
    "client_id":"*****t1oz6xr7yDyxLqpvK*****",
    "client_secret":"****dXaXtc0QiI3E223Q54****"
}

HTTP Request

POST /api/{APP_CODE}/integration/{INTEGRATION}/update

{INTEGRATION} - string of list: qbo, xero, adp

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

200 Response body (application/json):

{
    "status": "SUCCESS",
    "message": "Update success"
}

Request data: JSON string with the following elements

Must be at least one of parameters: client_id, client_secret, settings

Parameter Type Description
client_id String
client_secret String
settings Array of String "import_employees" => true,"import_employee_rates" => true,"import_vendors_as_employees" => true,"import_customers" => true

401 Unauthorized. Response body (application/json):

{
     "status": "ERROR",
     "message": "Auth token not specified or incorrect.",
     "error_code": 9
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message

Get Auth URL for integration

Return link for GET-request.

HTTP Request

POST /api/{APP_CODE}/integration/{INTEGRATION}/authorize

{INTEGRATION} - string of list: qbo, xero, adp

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{

}

Request data: JSON string with the following elements

Parameter Type Description

200 Response body (application/json):

{
    "status": "SUCCESS",
    "data": {
        "url": "https://appcenter.intuit.com/connect/oauth2?client_id=ABO2st1oz6xr7yDyxLqpvKWWlNbFtG9CFJOd9YxbBqSbkXUDgF&scope=com.intuit.quickbooks.accounting&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2Foauth%2Fqbo&response_type=code&state=KIKKY"
    }
}

401 Unauthorized. Response body (application/json):

{
     "status": "ERROR",
     "message": "Auth token not specified or incorrect.",
     "error_code": 9
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
data Array ['url'] Array with key 'url' - link for GET-request

Delete for integration

Delete information of this integration from TimeSheets

HTTP Request

POST /api/{APP_CODE}/integration/{INTEGRATION}/disconnect

{INTEGRATION} - string of list: qbo, xero, adp

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{

}

Request data: JSON string with the following elements

Must be at least one of parameters: client_id, client_secret, settings

Parameter Type Description

200 Response body (application/json):

{
    "status": "SUCCESS",
    "message": "Disconnect success"
}

401 Unauthorized. Response body (application/json):

{
     "status": "ERROR",
     "message": "Auth token not specified or incorrect.",
     "error_code": 9
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
message String Error description or successful info message

Import Employees

Import Employees as Users. Import Employee rates as User rates (optional). Import Customers as Clients (optional). For Xero: import Vendors as Users.

HTTP Request

POST /api/{APP_CODE}/integration/xero/import_employees

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{

}

Request data: JSON string with the following elements

Must be at least one of parameters: client_id, client_secret, settings

Parameter Type Description

200 Response body (application/json):

{
    "status": "SUCCESS",
    "data": {
        "imported": {
            "114": {
                "first_name": "Nick",
                "last_name": "Fury",
                "email": "xero_employee_65fb097b-6128-4afe-8b30-04be9d80cf66@mail.com"
            },
            "115": {
                "first_name": "Nick",
                "last_name": "Fury6",
                "email": "xero_employee_2b2b3a26-3af5-4528-a00e-dbabe4047672@mail.com"
            }
        },
        "updated": {
            "2": {
                "first_name": "John",
                "last_name": "Johnson",
                "email": "member@user.site"
            }
        }
    }
}

401 Unauthorized. Response body (application/json):

{
     "status": "ERROR",
     "message": "Auth token not specified or incorrect.",
     "error_code": 9
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
data Array: imported=>[], updated=>[]

Data:

    • imported[key:object]: - list of successfully imported Employees as Users
        • key - ID New User
        • object:
            • first_name - user first name
            • last_name - user last name
            • email - user email (generated if empty)
    • updated[key:object]: - list of successfully updated Users
        • key - New User ID
        • object:
            • first_name - user first name
            • last_name - user last name
            • email - user email

Import Customers

Import Customers as Clients. Import linked Projects and Tasks. Xero: Projects and tasks can not be updated, only imported (if not present).

HTTP Request

POST /api/{APP_CODE}/integration/xero/import_customers

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{

}

Request data: JSON string with the following elements

Must be at least one of parameters: client_id, client_secret, settings

Parameter Type Description

200 Response body (application/json):

{
    "status": "SUCCESS",
    "data": {
        "customers": {
            "imported": [],
            "updated": [],
            "passed": {
                "142": {
                    "name": "Bank West"
                },
                "143": {
                    "name": "Basket Case"
                }
            }
        },
        "projects": {
            "imported": [],
            "updated": [],
            "passed": {
                "6": {
                    "name": "Brand Launch Event",
                    "tasks": [
                        16,
                        15,
                        14
                    ]
                }
            }
        },
        "tasks": {
            "imported": [],
            "updated": [],
            "passed": {
                "14": {
                    "name": "AV Setup"
                },
                "15": {
                    "name": "Interior Decoration"
                },
                "16": {
                    "name": "Lighting"
                }
            }
        }
    }
}

401 Unauthorized. Response body (application/json):

{
     "status": "ERROR",
     "message": "Auth token not specified or incorrect.",
     "error_code": 9
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
data Array [customers=>[], projects=>[], tasks=>[] Keys is IDs of entry(client, project, task)

Data :

customers:
    • imported[key:object]: - list of successfully imported clients as Customers
        • key - ID Client
        • object: - New Client
            • name - Client name
    • updated[key:object]: - list of updated clients
        • key - ID Client
        • object: - Client
            • name - Client name
    • passed[key:object]:- list of passed clients (if TimeSheets has newer information)
        • key - ID Customer
        • object: - Client
            • name - Client name

projects:
    • imported[key:object]: - list of successfully imported projects
        • key - ID TimeSheets Project
        • object: - New TimeSheets Project
            • name - Project name
    • passed[key:object]:- list of passed projects (if this project was imported to TimeSheets)
        • key - ID TimeSheets Project
        • object: - TimeSheets Project
            • name - Project name

tasks:
    • imported[key:object]: - list of successfully imported tasks
        • key - ID TimeSheets Task
        • object: - New TimeSheets Task
            • name - Task name
    • passed[key:object]:- list of passed tasks (if this task was imported to TimeSheets)
        • key - ID TimeSheets Task
        • object: - TimeSheets Task
            • name - Task name

Export TimeEntries

HTTP Request

POST /api/{APP_CODE}/integration/qbo/export_timeentries

HEADER: “Authorization” = Bearer {token} (Auth token. String. Required)

Request body (application/json):

{
  "time_entry_ids":[1,2]
}

Request data: JSON string with the following elements

Must be at least one of parameters: client_id, client_secret, settings

Parameter Type Description
time_entry_ids Array if Integer IDs of TimeEntry for export

200 Response body (application/json):

{
    "status": "SUCCESS",
    "data": {
        "users": {
            "exported": [],
            "passed": {
                "111": {
                    "id": "78",
                    "name": "222 2222",
                    "hourly_rate": 0
                }
            },
            "fail": []
        },
        "time_entries": {
            "exported": [
                {
                    "1": "10"
                }
            ],
            "updated": [],
            "passed": [],
            "fail": {
                        "2": "Invalid multiple time durationsInvalid multiple time durations. Provide either hours:minutes or start time, endtime "
                    }
        }
    }
}

401 Unauthorized. Response body (application/json):

{
     "status": "ERROR",
     "message": "Auth token not specified or incorrect.",
     "error_code": 9
}

Response data: JSON string with the following elements

Parameter Type Description
status String from list: SUCCESS, ERROR Operation result successful / execution error
data Array [users=>[exported, passed, fail], time_entries=>[exported, passed, fail] Keys is IDs of entry(user, time_entry)

Data :

users:
    • exported[key:object]: - list of successfully exported users
        • key - user_id
        • object:
            • id - ID of new employee in QBO
            • name - user_name
            • hourly_rate - user hourly_rate
    • passed[key:object]:- list of passed users (if TimeSheets has older information)
        • key - user_id
        • object:
            • id - ID of employee in QBO
            • name - user_name
            • hourly_rate - user hourly_rate
    • fail[key:value]: - list of users that could not be exported
        • key - user_id
        • value - error text from QBO server

time_entries:
    • exported[key:value]:- list of successfully exported time_entries
        • key - ID TimeEntry
        • value - ID of new TimeActivity in QBO
    • passed:- array of passed time_entries (for fail exported users or if TimeSheets has older information)
    • fail [key:value]:
        • key - ID TimeEntry
        • value - error text from QBO server

Changelog

Widgets

For the widgets we have available, we pass data around using JSON. This section covers this with explanations and examples, to help with expanding and using this with new widgets.

CustomForm Widget

Overview

Custom Form widget is intended for construction and displaying of a form for filling information and sending it's result by eMail. Management elements: text area, entry field, checkbox, radio button, dropdown list, datapicker - can be divided by groups.

Data

body (application/json):

{
    "widgetid": "36555161",
    "type": "customform",
    "data": {
        "title": "My custom form",
        "colorskin": {
            "background": "#000000",
            "primary": "#ffffff",
            "secondary": "#ffffff",
            "text": "#ffffff",
            "accent": "#ff6f28"
        },
        "form": {
            "email": {
                "#address": "123@gmail.com",
                "#subject": "",
                "button": {
                    "#label": "Send it!"
                }
            },
            "groups": [
                {
                    "#title": "Reality",
                    "fields": [
                        {
                            "@format": "number",
                            "#label": "789",
                            "#value": "000",
                            "type": "entryfield"
                        },
                        {
                            "@format": "general",
                            "#label": "123",
                            "#value": "456",
                            "type": "entryfield"
                        },
                        {
                            "#label": "Text",
                            "#value": "test",
                            "type": "textarea"
                        },
                        {
                            "#label": "yes",
                            "#value": "checked",
                            "type": "checkbox"
                        },
                        {
                            "#label": "No",
                            "#value": "",
                            "type": "checkbox"
                        },
                        {
                            "#label": "Hi",
                            "#value": "checked",
                            "type": "radiobutton"
                        },
                        {
                            "#label": "Hello",
                            "#value": "",
                            "type": "radiobutton"
                        },
                        {
                            "#label": "Choose the number",
                            "value": [
                                "One",
                                "two",
                                "three",
                                "four",
                                "five",
                                "six",
                                "seven"
                            ],
                            "type": "dropdown"
                        },
                        {
                            "#label": "date",
                            "#value": "10/08/2019",
                            "type": "datepicker"
                        }
                    ]
                },
                {
                    "#title": "0 group",
                    "fields": [
                        {
                            "@format": "general",
                            "#label": "one",
                            "#value": "one",
                            "type": "entryfield"
                        }
                    ]
                },
                {
                    "#title": "New group",
                    "fields": [
                        {
                            "@format": "general",
                            "#label": "empty",
                            "#value": "empty",
                            "type": "entryfield"
                        },
                        {
                            "@format": "general",
                            "#label": "full",
                            "#value": "full",
                            "type": "entryfield"
                        }
                    ]
                },
                {
                    "#title": "xxx",
                    "fields": [
                        {
                            "#label": "",
                            "#value": "10/14/2019",
                            "type": "datepicker"
                        },
                        {
                            "@format": "general",
                            "#label": "",
                            "#value": "",
                            "type": "entryfield"
                        },
                        {
                            "#label": "Image",
                            "#value": "Add Image",
                            "limit": "2",
                            "type": "photopicker"
                        }
                    ]
                }
            ]
        }
    }
}

Data parameters:
• title - widget name. Title is being displayed on navigation panel when widget is launched.
• colorskin - color scheme. Contains 5 elements: background, primary, secondary, text and accent colors. If the default color scheme is used, this parameter is missing.
• form - the form object including email, all groups and fields.
• form.email - the object of email for sending form data:
    ◘ #address - email address
    ◘ subject - email subject
    ◘ button - button parameters (#label - button label)
• form.groups - an array of form groups, each form has parameters such as:
    ◘ #title - the section title/name
    ◘ fields - an array of the form fields, each field has parameters:
        • #label - the field name/label
        • #value - the defaul value, the set of the available values (for dropdowns) or the placeholder(for entryfields and textareas) of the field
        • type - the type of the field from the list:
            ◘ entryfield - text or number field
            ◘ textarea
            ◘ checkbox
            ◘ radiobutton
            ◘ dropdown
            ◘ datepicker
            ◘ photopicker - the image file attacment, one or many files can be attached
        • @format (only for entryfields) - general (text) or number field
        • limit (only for photopicker) - the limit of attachments number

Changelog

Release Notes
1.0 (Current) Initial release into open source

QR Scanner Widget

Overview

The module immediately opens up the phone's camera and takes you to a screen that allows for the scanning of barcodes. The scanner will automatically detect which type of code it is scanning and, upon completion of the scan, it will display the content so you can view the scanned URL/text/product code before the module launches the phone's browser. The module offers sharing feature that allows users to share scanned content via SMS or email. You may view the scanned content in a web browser: it will search for scanned text on the web or open a website for scanned URL.

Data

{
    "widgetid": "36556631",
    "type": "qrscaner",
    "data": {
        "title": "QR-Code Scaner"
    }
}

This widget JSON does not contain any special information except for the widget title.

Changelog

Release Notes
1.0 (Current) Initial release into open source

Phonecall Widget

Overview

Tap to Call widget allows users to make calls on predefined phone number. General features: call on predefined phone number Widget implementation: mTapToCall.a library (iOS); CallPlugin library (Android).

Data

{
    "widgetid": "36556535",
    "type": "taptocall",
    "data": {
        "title": "Button",
        "#phone": "+47(345)4356234523"
    }
}

Data parameters:
• title - button name
• #phone - phone number

Changelog

Release Notes
1.0 (Current) Initial release into open source

HTML Widget

Overview

Web widget is designed to display web-content, located under provided web-link. User provides the link while creating the app on website. If a user provides HTML-content manually then this content should be displayed in the app. Widget implementation: mWebVC.a library (iOS); WebPlugin library (Android).

Data

Web Example

{
    "widgetid": "36556977",
    "type": "htmlurl",
    "data": {
        "#title": "Website",
        "content": {
            "@src": "http://m.ibuildapp.com"
        }
    }
}

HTML Example

{
    "widgetid": "36557059",
    "type": "htmlcode",
    "data": {
        "#title": "Content Management",
        "#content": "<html><head></head><body> Hello, world!<div>:)</div> </body></html>"
    }
}

Data parameters:
• #title - widget name. Title is being displayed on navigation panel when widget is launched.
• content - widget content with URL or HTML string

Changelog

Release Notes
1.0 (Current) Initial release into open source

E-Mail Widget

Overview

The main features: Call the mail-client with predefined settings Widget implementation: mWebVC.a library (iOS); EmailPlugin library (Android).

Data

Example

{
    "widgetid": "36557168",
    "type": "taptoemail",
    "data": {
        "title": "Button",
        "#mailto": "test@test.com",
        "#subject": "",
        "#message": ""
    }
}

Data parameters:
• title - button name
• #mailto - email address of the recipient
• #subject - text of the letter
• #message - default message text

Changelog

Release Notes
1.0 (Current) Initial release into open source

PDF Reader Widget

Overview

This widget is used for viewing PDF or text documents on the mobile phone.

Data

Example

{
    "widgetid": "36559206",
    "type": "ebook",
    "data": {
        "title": "PDF Reader Content Management",
        "colorskin": {
            "background": "#000000",
            "primary": "#ffffff",
            "secondary": "#ffffff",
            "text": "#ffffff",
            "accent": "#ff6f28"
        },
        "row": [
            {
                "#url": "https://ibuildapp.com/gethtml.php?url=http://ibuildapp.s3-website-us-east-1.amazonaws.com/assets/data/02312/2312789/apps/2568578/36559206/1571755089.txt",
                "#title": "Chapter 1"
            },
            {
                "#url": "http://ibuildapp.s3-website-us-east-1.amazonaws.com/assets/data/02312/2312789/apps/2568578/36559206/upload-5daf146ac4c8a6.35940948.pdf",
                "#title": "Chapter 2"
            },
            {
                "#url": "https://google.com",
                "#title": "Chapter 3"
            }
        ]
    }
}

Data parameters:
• title - widget name. Title is being displayed on navigation panel when widget is launched.
• colorskin - color scheme. Contains 5 elements: background, primary, secondary, text and accent colors. If the default color scheme is used, this parameter is missing.
• row - an array of widget sections. Each section has parameters:
    ◘ #url - URL of the content (PDF or text file on our server or external URL).
    ◘ #title - section name.

Changelog

Release Notes
1.0 (Current) Initial release into open source

Camera Widget

Overview

Allow customers to take pictures from camera and share it.

Data

Example

{
    "widgetid": "36573784",
    "type": "takepicture",
    "data": {
        "title": "Take a Picture",
        "button": {
            "type": "share",
            "email": "",
            "label": "Share"
        }
    }
}

Data parameters:
• title - widget name. Title is being displayed on navigation panel when widget is launched.
• button - button object with the properties:
    ◘ type - the button type from the list:
        • share - for sharing picture via standard sharing services available on device.
        • email - for sending pictures to email.
    ◘ email - email address for sending pictures (with email type button).
    ◘ label - button label.

Changelog

Release Notes
1.0 (Current) Initial release into open source

Bookstore Widget

Overview

BookStore Widget provides the opportunity to customize catalog of books for sale. The main features: View the list of books; View detail page of separate book (Title, Descriprion, Price, etc.); Filtering books (filters are defined by application author on the app creation stage); Jump to the shop website in embedded browser (if appropriate link was specified on the app creation stage) Widget implementation: mDBViewer.a library (iOS); SkCataloguePlugin library (Android).

Data

Example

{
    "widgetid": "36574049",
    "type": "catalogbooks",
    "data": {
        "menu": [
            {
                "name": "Genre",
                "tag": "Category",
                "icon": "https://ibuildapp.com/media/wdefaults/catalog/images/categories@2x.png",
                "items": [
                    "Action and Adventure",
                    "Art & Photography",
                    "Biography & Memories",
                    "Business & Finance",
                    "Celebrity & Pop Culture",
                    "Children's",
                    "Cookbooks",
                    "Cultural/Social Issues",
                    "Fantasy",
                    "Food & Lifestyle",
                    "Gardening",
                    "Graphic Novels",
                    "History & Military",
                    "Horror",
                    "Home Decorating & Design",
                    "How To",
                    "Humour & Gift Books",
                    "Journalism",
                    "Medical, Health & Fitness",
                    "Music, Film & Entertainment",
                    "Mystery",
                    "Nature & Ecology",
                    "Offbeat or Quirky",
                    "Parenting",
                    "Pets",
                    "Picture Books",
                    "Psychology",
                    "Religion & Spirituality",
                    "Romance",
                    "Science Fiction",
                    "Short Story Collections",
                    "Thrillers and Suspense",
                    "Travel",
                    "Western"
                ]
            },
            {
                "name": "Recommended",
                "tag": "Recommended",
                "icon": "https://ibuildapp.com/media/wdefaults/catalog/images/featured@2x.png"
            },
            {
                "name": "New Releases",
                "tag": "Releases",
                "icon": "https://ibuildapp.com/media/wdefaults/catalog/images/new@2x.png"
            },
            {
                "name": "Bestsellers",
                "tag": "Bestsellers",
                "icon": "https://ibuildapp.com/media/wdefaults/catalog/images/bestsellers@2x.png"
            }
        ],
        "colorskin": {
            "background": "#000000",
            "primary": "#ffffff",
            "secondary": "#ffffff",
            "text": "#ffffff",
            "accent": "#ff6f28"
        },
        "content": [
            {
                "title": "The Atlatis Gene",
                "description": "The Immari are good at keeping secrets. For 2,000 years, they've hidden the truth about human evolution. They've also searched for an ancient enemy - a threat that could wipe out the human race. Now the search is over.nOff the coast of Antarctica, a research vessel discovers a mysterious structure buried deep in an iceberg. It has been there for thousands of years, and something is guarding it.",
                "author": "A.G. Riddle",
                "authorDescription": "Author Bio",
                "thumbnailAuthor": "http://ibuildapp.s3-website-us-east-1.amazonaws.com/assets/data/02312/2312789/apps/2568578/36574049/5db19401cc791.jpg",
                "thumbnail": "http://ibuildapp.s3-website-us-east-1.amazonaws.com/assets/data/02312/2312789/apps/2568578/36574049/5db16f3c26da53.34363284.jpg",
                "url": "https://ibuildapp.com",
                "price": "5",
                "category": "Science Fiction",
                "recommended": 1,
                "releases": 0,
                "bestsellers": 0
            },
            {
                "title": "Towers of Midnight",
                "description": "The Immari are good at keeping secrets. For 2,000 years, they've hidden the truth about human evolution. They've also searched for an ancient enemy - a threat that could wipe out the human race. Now the search is over.nOff the coast of Antarctica, a research vessel discovers a mysterious structure buried deep in an iceberg. It has been there for thousands of years, and something is guarding it.",
                "author": "Robert Jordan, Brandon Sanders",
                "authorDescription": "",
                "thumbnailAuthor": "",
                "thumbnail": "http://ibuildapp.s3-website-us-east-1.amazonaws.com/assets/data/02312/2312789/apps/2568578/36574049/5db16f3c5c3067.75405551.jpg",
                "url": "",
                "price": "",
                "category": "Science Fiction",
                "recommended": 0,
                "releases": 0,
                "bestsellers": 0
            },
            {
                "title": "The Girl Dragon Tattoo",
                "description": "The Immari are good at keeping secrets. For 2,000 years, they've hidden the truth about human evolution. They've also searched for an ancient enemy - a threat that could wipe out the human race. Now the search is over.nOff the coast of Antarctica, a research vessel discovers a mysterious structure buried deep in an iceberg. It has been there for thousands of years, and something is guarding it.",
                "author": "Stieg Larsson",
                "authorDescription": "",
                "thumbnailAuthor": "",
                "thumbnail": "http://ibuildapp.s3-website-us-east-1.amazonaws.com/assets/data/02312/2312789/apps/2568578/36574049/5db16f3c76d575.09594041.jpg",
                "url": "",
                "price": "",
                "category": "Science Fiction",
                "recommended": 0,
                "releases": 0,
                "bestsellers": 0
            }
        ]
    }
}

Data parameters:
• colorskin - color scheme. Contains 5 elements: background, primary, secondary, text and accent colors. If the default color scheme is used, this parameter is missing.
• menu - an array of menu items, each item has parameters:
    ◘ name - item name.
    ◘ tag - item type: Category, Recommended, Releases or Bestsellers.
    ◘ icon - item icon link.
    ◘ items (only for Category tag) - an array of categories.
• content - an array of book objects, each book has properties:
    ◘ title - the book name.
    ◘ description - the book description.
    ◘ thumbnail - the book thumbnail link.
    ◘ price - the book price.
    ◘ category - the book category.
    ◘ url - web store URL.
    ◘ author - author name.
    ◘ authorDescription - author bio.
    ◘ thumbnailAuthor - author photo link.
    ◘ recommended - boolean parameter for filtering by recommended, 1 or 0.
    ◘ releases - boolean parameter for filtering by releases, 1 or 0.
    ◘ bestsellers - boolean parameter for filtering by bestsellers, 1 or 0.

Changelog

Release Notes
1.0 (Current) Initial release into open source

Dashboard Widget

Overview

The widget with main menu of the app.

Data

Example

{
    "type": "dashboard",
    "widgetid": "-1",
    "data": {
        "title": "dashboard",
        "image": [
            {
                "x": 185,
                "y": 71,
                "width": 80,
                "height": 144,
                "data": {
                    "#url": "http://ibuildapp.s3-website-us-east-1.amazonaws.com/assets/data/02312/2312789/apps/3495705/images/1571919334.2.png"
                }
            }
        ],
        "button": [
            {
                "x": 20,
                "y": 237,
                "width": 160,
                "height": 40,
                "icon": "http://ibuildapp.s3-website-us-east-1.amazonaws.com/assets/data/02312/2312789/apps/3495705/buttons/1571919334.3.png",
                "#label": "Button1",
                "#title": "Button1",
                "size": 18,
                "align": "center",
                "color": "#ffffff",
                "style": "normal",
                "widget_id": "36575814",
                "type": "htmlcode"
            },
            {
                "x": 157,
                "y": 305,
                "width": 160,
                "height": 40,
                "icon": "http://ibuildapp.s3-website-us-east-1.amazonaws.com/assets/data/02312/2312789/apps/3495705/buttons/1571919334.4.png",
                "#label": "Button2",
                "#title": "Button2",
                "size": 18,
                "align": "center",
                "color": "#ffffff",
                "style": "normal",
                "widget_id": "36575815",
                "type": "htmlcode"
            }
        ],
        "label": [
            {
                "x": 21,
                "y": 76,
                "width": 160,
                "height": 40,
                "data": {
                    "#title": "My label",
                    "size": 18,
                    "align": "center",
                    "color": "#999999",
                    "style": "normal"
                }
            }
        ]
    }
}

Data parameters:
• title - widget name.
• image - an array of the dashboard images, each image has properties:
    ◘ x - x-offset of the image.
    ◘ y - y-offest of the image.
    ◘ width - image width.
    ◘ height - image height.
    ◘ data.#url - image link.
• button - an array of dashboard buttons, each button has properties:
    ◘ x - x-offset of the button.
    ◘ y - y-offest of the button.
    ◘ width - button width.
    ◘ height - button height.
    ◘ icon - icon URL.
    ◘ #label - button label.
    ◘ #title - button title.
    ◘ size - button font size.
    ◘ align - button text align.
    ◘ color - button text color.
    ◘ style - button text style: normal, bol, italic or italic bold.
    ◘ widget_id - id of the widget running by this button.
    ◘ type - widget type.
• label - an array of dashboard labels, each label has properties:
    ◘ x - x-offset of the label.
    ◘ y - y-offest of the label.
    ◘ width - label width.
    ◘ height - label height.
    ◘ data - contains button properties, such as:
        • #title - label title.
        • size - label font size.
        • align - label text align.
        • color - label text color.
        • style - label text style: normal, bol, italic or italic bold.

Changelog

Release Notes
1.0 (Current) Initial release into open source

Photogallery Widget

Overview

PhotoGallery widget is intended for images viewing, placed into albums, which links are defined in XML configuration of a widget. General features: viewing images/albums; making comments on images; "Share" feature using Facebook, Twitter, SMS, Email; "Like" feature using Facebook account.

Data

Example

{
    "widgetid": "36573880",
    "type": "photogallery",
    "data": {
        "title": "Photos & Instagram",
        "allowsharing": "on",
        "allowcomments": "on",
        "allowsaving": "on",
        "style": {
            "columns": 2,
            "type": "list"
        },
        "colorskin": {
            "background": "#000000",
            "primary": "#ffffff",
            "secondary": "#ffffff",
            "text": "#ffffff",
            "accent": "#ff6f28"
        },
        "album": [
            {
                "#title": "My album",
                "#allowcomments": "on",
                "#allowsharing": "on",
                "#allowsaving": "on",
                "#url": "",
                "#id": 1648263286121670,
                "#cover": "http://ibuildapp.s3-website-us-east-1.amazonaws.com/assets/data/02312/2312789/apps/2568578/36573880/upload-5db16338d30ad6.jpg",
                "image": [
                    {
                        "#title": "image1",
                        "#description": "description1",
                        "#url": "http://ibuildapp.s3-website-us-east-1.amazonaws.com/assets/data/02312/2312789/apps/2568578/36573880/upload-5db16338d30ad6.jpg",
                        "thumbnail": {
                            "color": "#e0d8cb",
                            "url": "http://ibuildapp.s3-website-us-east-1.amazonaws.com/assets/data/02312/2312789/apps/2568578/36573880/thumb_upload-5db16338d30ad6.jpg"
                        },
                        "#cover": "http://ibuildapp.s3-website-us-east-1.amazonaws.com/assets/data/02312/2312789/apps/2568578/36573880/upload-5db16338d30ad6.jpg",
                        "#id": 1648263286121875
                    },
                    {
                        "#title": "image2",
                        "#description": "description2",
                        "#url": "http://ibuildapp.s3-website-us-east-1.amazonaws.com/assets/data/02312/2312789/apps/2568578/36573880/upload-5db16338ec2d67.jpg",
                        "thumbnail": {
                            "color": "#fefefe",
                            "url": "http://ibuildapp.s3-website-us-east-1.amazonaws.com/assets/data/02312/2312789/apps/2568578/36573880/thumb_upload-5db16338ec2d67.jpg"
                        },
                        "#cover": "http://ibuildapp.s3-website-us-east-1.amazonaws.com/assets/data/02312/2312789/apps/2568578/36573880/upload-5db16338d30ad6.jpg",
                        "#id": 1648263286334677
                    }
                ]
            }
        ]
    }
}

Data parameters:
• title - widget name. Title is being displayed on navigation panel when widget is launched.
• colorskin - color scheme. Contains 5 elements: background, primary, secondary, text and accent colors. If the default color scheme is used, this parameter is missing.
• allowsharing - parameter allowing/disallowing to share image in social networks or by email.
Values:
on - enabled;
off - disabled.
• allowcomments - parameter allowing/disallowing for app users make comments for images.
Values:
on - enabled;
off - disabled.
• allowsaving - parameter allowing/disallowing to save images on mobile device.
Values:
on - enabled;
off - disabled.
• style - albums displaying parameters:
    ◘ columns - number of columns: 2, 3 or 4.
    ◘ type - grid or list.
• album - an array of album objects, each object contains properties:
    ◘ #title - album title.
    ◘ #url - media URL, containing images. Specified optionally.
    ◘ #id - album identifier in iBuildApp system.
    ◘ #cover - album cover image URL.
    ◘ #allow_sharing - parameter defining opportunity to share image from album in social networks or by email.
Values:
on - enabled;
off - disabled.
    ◘ #allow_comments - parameter allowing/disallowing for app users make comments for images in album.
Values:
on - enabled;
off - disabled.
    ◘ #allow_saving - parameter allowing/disallowing to save images from album on mobile device.
Values:
on - enabled;
off - disabled.
    ◘ image - an array of image objects in the albumdeclares image in album, each image has properties:
        • #description - short image description.
        • #title - image title.
        • #id - image identifier in iBuildApp system.
        • #url - contains link on resource with image.
        • #cover - image cover URL.
        • thumbnail - an image thumbnail object with properties:
            ◘ color - RGB color.
            ◘ url - thumbnail URL.

Changelog

Release Notes
1.0 (Current) Initial release into open source

AudioListWidget

Overview

Audio widget is implemented to play back audios. Audio links are provided in widget XML-configuration. General features: audio play back; commenting; share function via Facebook, Twitter, SMS, Email; Facebook like function. Widget implementation: mAudioPlayer.a library (iOS); AudioPlugin library (Android).

Data

Example

{
    "widgetid": "36567915",
    "type": "audioplayer",
    "data": {
        "title": "Audio List",
        "module_id": "9",
        "allowsharing": "on",
        "allowcomments": "on",
        "#cover_image": "http://ibuildapp.s3-website-us-east-1.amazonaws.com/assets/data/02312/2312789/apps/2568578/36567915/1571836533.png",
        "colorskin": {
            "background": "#000000",
            "primary": "#ffffff",
            "secondary": "#ffffff",
            "text": "#ffffff",
            "accent": "#ff6f28"
        },
        "track": [
            {
                "#title": "My track",
                "#description": "My track description",
                "#cover_image": "http://ibuildapp.s3-website-us-east-1.amazonaws.com/assets/data/02312/2312789/apps/2568578/36567915/1571836649.png",
                "#permalink_url": "http://www.WebSite.com/MyMusicFile.mp3",
                "#stream_url": "http://www.WebSite.com/MyMusicFile.mp3",
                "#id": 1648190169118250
            },
            {
                "#title": "My stream",
                "#description": "My stream description",
                "#cover_image": "",
                "#permalink_url": "http://dir.xiph.org/listen/190856/listen.m3u",
                "#stream_url": "http://master01-ent.shoutcast.com:8000/foxnews",
                "#id": 1648190303988620
            }
        ]
    }
}

Data parameters:
• title - widget name. Title is being displayed on navigation panel when widget is launched.
• colorskin - color scheme. Contains 5 elements: background, primary, secondary, text and accent colors. If the default color scheme is used, this parameter is missing.
• module_id - widget identifier in iBuildApp system.
• allow_sharing - parameter defining the opportunity to share audio in social networks or by email.
Values:
on - enabled;
off - disabled.
• allow_comments - parameter defining the opportunity for app users comment audios.
Values:
on - enabled;
off - disabled.
• #cover_image - cover image URL.
• track - an array of track objects. Each object has parameters:
    ◘ #stream_url - audio resource URL (audio link, audio flow).
    ◘ #description - track description.
    ◘ #title - track title.
    ◘ #id - audio ID in iBuildApp system.
    ◘ #permalink_url - track resource link to be used for sharing.
    ◘ #cover_image - track thumbnail URL.

Changelog

Release Notes
1.0 (Current) Initial release into open source

VideoList Widget

Overview

Video widget is implemented to play back videos. Video links are provided in widget XML-configuration. General features: video play back; commenting; share function via Facebook, Twitter, SMS, Email; Facebook like function. Widget implementation: mVideoPlayer.a library (iOS); VideoPlugin library (Android).

Data

Example

{
    "widgetid": "36563353",
    "type": "videoplayer",
    "data": {
        "title": "Video List",
        "module_id": "9",
        "allowsharing": "on",
        "allowcomments": "on",
        "allowlikes": "on",
        "colorskin": {
            "background": "#000000",
            "primary": "#ffffff",
            "secondary": "#ffffff",
            "text": "#ffffff",
            "accent": "#ff6f28"
        },
        "video": [
            {
                "#url": "http://www.youtube.com/watch?v=ArpfZWW_-IQ",
                "#description": "\"Вступительный ролик Starcraft II: Wings of Liberty был показан на салоне Blizzard Worldwide Invitational в 2007 в Сеуле.\nhttp://StarCraft.com\"",
                "#title": "Тизер StarCraft II (RU)",
                "#duration": "00:04:01",
                "#creation_time": "1281122058",
                "#cover": "https://i.ytimg.com/vi/ArpfZWW_-IQ/maxresdefault.jpg",
                "#id": 1648164510185175
            },
            {
                "#url": "http://vimeo.com/70479332",
                "#description": "Create your own site design",
                "#title": "Reseller Site Customization",
                "#duration": "00:01:09",
                "#creation_time": "1374051720",
                "#cover": "http://i.vimeocdn.com/video/443754212_640.jpg",
                "#id": 1648164549686466
            }
        ]
    }
}

Data parameters:
• title - widget name. Title is being displayed on navigation panel when widget is launched.
• colorskin - color scheme. Contains 5 elements: background, primary, secondary, text and accent colors. If the default color scheme is used, this parameter is missing.
• module_id - widget identifier in iBuildApp system.
• allowsharing - parameter defining the opportunity to share video in social networks or by email.
Values:
on - enabled;
off - disabled.
• allowcomments - parameter defining the opportunity for app users to comment videos.
Values:
on - enabled;
off - disabled.
• allowlikes - parameter defining the opportunity for app users to like videos.
Values:
on - enabled;
off - disabled.
• video - contains an array of video objects, each video has parameters:
    ◘ #url - video resource URL (video link, video flow link, Youtube page link or Vimeo page link).
    ◘ #description - video description.
    ◘ #title - video title.
    ◘ #id - video ID in iBuildApp system.
    ◘ #duration - video duration.
    ◘ #creation_time - video creation timestamp.
    ◘ #cover - video cover.

Changelog

Release Notes
1.0 (Current) Initial release into open source

Errors

The iBuildApp API uses the following error codes:

Error Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your token is invalid (expired/incorrect).
403 Forbidden -- The entry requested is hidden for administrators only.
404 Not Found -- The specified entry could not be found.
405 Method Not Allowed -- You tried to access an entry with an invalid method.
406 Not Acceptable -- You requested a format that isn't json.
410 Gone -- The requested entry has been removed from our servers.
429 Too Many Requests -- You're sending too many requests.
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.