Productive V2 API

API Endpoint

This api is implemented according to JSON API spec.


API Endpoint

The latest API endpoint is https://api.productive.io/api/v2


Authorization

Most resources have authorization on them. If successfully authorized, you will get a response containing the resource; however, if you aren’t authorized then you will be given HTTP status of 401, and an error message.


Authentication

To authenticate yourself, add your API token to the X-Auth-Token header for every request.

To access your organization data, add your organzation ID to the X-Organization-Id header for every request.


Pagination

Pagination has to be set in the following style:

?page[number]=2&page[size]=20

Where page[number]= is the page you want to view, and page[size]= is the number of resources you want to return.


Filter

If you would like to add filtration to your query, you can do that by setting the supported filter parameters in the following way:

  • ?filter[person_id]=24


Activities

Activities

Supported filter params

  • task_id

  • project_id

  • deal_id

  • invoice_id

  • company_id

  • person_id

  • creator_id

  • pinned

  • has_attachments

  • parent_type (1: Comment, 2: Changeset, 3: Email)

  • root_type (1: Comment, 2: Changeset, 3: Email)

  • after

  • before

GET /api/v2/activities
Requestsreturns activities

GET  /api/v2/activities?filter[task_id]=21

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": [
    {
      "id": "1",
      "type": "activities",
      "attributes": {
        "event": "create",
        "changes": "",
        "changeset": [],
        "item_id": 21,
        "item_type": "task",
        "item_name": "#1: Ticket title",
        "item_deleted_at": null,
        "parent_id": 70,
        "parent_type": "project",
        "parent_name": "test project",
        "parent_deleted_at": null,
        "root_id": 70,
        "root_type": "project",
        "root_name": "test project",
        "root_deleted_at": null,
        "deal_is_budget": false,
        "task_id": 21,
        "deal_id": null,
        "invoice_id": null,
        "company_id": null,
        "person_id": null,
        "created_at": "2018-12-06T15:22:13.177+01:00"
      },
      "relationships": {
        "creator": {
          "data": {
            "type": "people",
            "id": "379"
          }
        },
        "comment": {
          "data": null
        },
        "email": {
          "data": null
        }
      }
    }
  ],
  "included": [
    {
      "id": "379",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user87@email.com",
        "title": null,
        "joined_at": "2018-12-06T15:22:13.000+01:00",
        "last_seen_at": "2018-12-06T15:22:13.195+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "522"
          }
        }
      }
    },
    {
      "id": "522",
      "type": "companies",
      "attributes": {
        "name": "Organization62",
        "default_currency": "USD",
        "created_at": "2018-12-06T15:22:12.681+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ],
  "links": {
    "first": "http://test.host/api/v2/activities?filter%5Btask_id%5D=21&page%5Bnumber%5D=1&page%5Bsize%5D=30"
  },
  "meta": {
    "current_page": 1,
    "page_size": 30,
    "max_page_size": 200
  }
}

Get activities
GET/api/v2/activities


GET /api/v2/activities/1
Requestsreturns activity

GET  /api/v2/activities/6

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "6",
    "type": "activities",
    "attributes": {
      "event": "create",
      "changes": "",
      "changeset": [],
      "item_id": 26,
      "item_type": "task",
      "item_name": "#1: Ticket title",
      "item_deleted_at": null,
      "parent_id": 85,
      "parent_type": "project",
      "parent_name": "test project",
      "parent_deleted_at": null,
      "root_id": 85,
      "root_type": "project",
      "root_name": "test project",
      "root_deleted_at": null,
      "deal_is_budget": false,
      "task_id": 26,
      "deal_id": null,
      "invoice_id": null,
      "company_id": null,
      "person_id": null,
      "created_at": "2018-12-06T15:22:16.072+01:00"
    },
    "relationships": {
      "creator": {
        "data": {
          "type": "people",
          "id": "409"
        }
      },
      "comment": {
        "data": null
      },
      "email": {
        "data": null
      }
    }
  },
  "included": [
    {
      "id": "409",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user117@email.com",
        "title": null,
        "joined_at": "2018-12-06T15:22:16.000+01:00",
        "last_seen_at": "2018-12-06T15:22:16.081+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "567"
          }
        }
      }
    },
    {
      "id": "567",
      "type": "companies",
      "attributes": {
        "name": "Organization65",
        "default_currency": "USD",
        "created_at": "2018-12-06T15:22:15.635+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ]
}

Gets a activity
GET/api/v2/activities/{id}

URI Parameters
HideShow
id
number (required) Example: 1

activity id


Attachments

Attachments

Supported filter params

  • comment_id

  • page_id

  • task_id

GET /api/v2/attachments
Requestsreturns attachments

GET  /api/v2/attachments?filter[comment_id]=10

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": [
    {
      "id": "13",
      "type": "attachments",
      "attributes": {
        "name": "img.png",
        "type": "image/png",
        "content_type": "image/png",
        "size": 3479,
        "url": "/system/attachments/files/000/000/013/original/img.png?1544106136",
        "thumb": "/system/attachments/files/000/000/013/thumb/img.png?1544106136",
        "temp_url": null,
        "processed": false,
        "attachable_type": "comment",
        "aws_policy": {
          "key": "uploads/3e3d999412b1a96601f15e8ab49c7311/img.png",
          "AWSAccessKeyId": "AKIAIFEOTRNFHR6QRCQQ",
          "acl": "public-read",
          "success_action_status": "201",
          "policy": "eyJleHBpcmF0aW9uIjoiMjAxOC0xMi0wN1QwMDoyMjoxNloiLCJjb25kaXRpb25zIjpbeyJidWNrZXQiOiJpbmZpbnVtLnByb2R1Y3RpdmUuZGV2ZWxvcG1lbnQifSx7ImFjbCI6InB1YmxpYy1yZWFkIn0seyJzdWNjZXNzX2FjdGlvbl9zdGF0dXMiOiIyMDEifSxbInN0YXJ0cy13aXRoIiwiJGtleSIsInVwbG9hZHMvIl0sWyJzdGFydHMtd2l0aCIsIiRDb250ZW50LVR5cGUiLCIiXV19",
          "signature": "0IFyTMjiO+Obq4UlB34jUm0AQKQ=",
          "Content-Type": "image/png"
        }
      },
      "relationships": {
        "creator": {
          "data": {
            "type": "people",
            "id": "415"
          }
        }
      }
    }
  ],
  "included": [
    {
      "id": "415",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user123@email.com",
        "title": null,
        "joined_at": "2018-12-06T15:22:16.000+01:00",
        "last_seen_at": "2018-12-06T15:22:16.366+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "576"
          }
        }
      }
    },
    {
      "id": "576",
      "type": "companies",
      "attributes": {
        "name": "Organization66",
        "default_currency": "USD",
        "created_at": "2018-12-06T15:22:16.157+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ],
  "links": {
    "first": "http://test.host/api/v2/attachments?filter%5Bcomment_id%5D=10&page%5Bnumber%5D=1&page%5Bsize%5D=30",
    "last": "http://test.host/api/v2/attachments?filter%5Bcomment_id%5D=10&page%5Bnumber%5D=1&page%5Bsize%5D=30"
  },
  "meta": {
    "current_page": 1,
    "total_pages": 1,
    "total_count": 1,
    "page_size": 30,
    "max_page_size": 200
  }
}

Get attachments
GET/api/v2/attachments


GET /api/v2/attachments/1
Requestsreturns attachment

GET  /api/v2/attachments/14

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "14",
    "type": "attachments",
    "attributes": {
      "name": "img.png",
      "type": "image/png",
      "content_type": "image/png",
      "size": 3479,
      "url": "/system/attachments/files/000/000/014/original/img.png?1544106136",
      "thumb": "/system/attachments/files/000/000/014/thumb/img.png?1544106136",
      "temp_url": null,
      "processed": false,
      "attachable_type": "comment",
      "aws_policy": {
        "key": "uploads/5cd8fe447e87c794494fe09dc2fa3b39/img.png",
        "AWSAccessKeyId": "AKIAIFEOTRNFHR6QRCQQ",
        "acl": "public-read",
        "success_action_status": "201",
        "policy": "eyJleHBpcmF0aW9uIjoiMjAxOC0xMi0wN1QwMDoyMjoxNloiLCJjb25kaXRpb25zIjpbeyJidWNrZXQiOiJpbmZpbnVtLnByb2R1Y3RpdmUuZGV2ZWxvcG1lbnQifSx7ImFjbCI6InB1YmxpYy1yZWFkIn0seyJzdWNjZXNzX2FjdGlvbl9zdGF0dXMiOiIyMDEifSxbInN0YXJ0cy13aXRoIiwiJGtleSIsInVwbG9hZHMvIl0sWyJzdGFydHMtd2l0aCIsIiRDb250ZW50LVR5cGUiLCIiXV19",
        "signature": "0IFyTMjiO+Obq4UlB34jUm0AQKQ=",
        "Content-Type": "image/png"
      }
    },
    "relationships": {
      "creator": {
        "data": {
          "type": "people",
          "id": "416"
        }
      }
    }
  },
  "included": [
    {
      "id": "416",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user124@email.com",
        "title": null,
        "joined_at": "2018-12-06T15:22:16.000+01:00",
        "last_seen_at": "2018-12-06T15:22:16.639+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "578"
          }
        }
      }
    },
    {
      "id": "578",
      "type": "companies",
      "attributes": {
        "name": "Organization67",
        "default_currency": "USD",
        "created_at": "2018-12-06T15:22:16.465+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ]
}

Gets a attachment
GET/api/v2/attachments/{id}

URI Parameters
HideShow
id
number (required) Example: 1

attachment id


POST /api/v2/attachments
Requestscreates attachmentreturns error

POST  /api/v2/attachments

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "attachments",
    "attributes": {
      "name": "img.png",
      "attachable_id": "12",
      "attachable_type": "comment"
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "16",
    "type": "attachments",
    "attributes": {
      "name": "img.png",
      "type": null,
      "content_type": null,
      "size": null,
      "url": "/system/attachments/files/000/000/016/original/img.png",
      "thumb": null,
      "temp_url": null,
      "processed": false,
      "attachable_type": "comment",
      "aws_policy": {
        "key": "uploads/8bd9742bc6cc8999a0098577648ffc2d/img.png",
        "AWSAccessKeyId": "AKIAIFEOTRNFHR6QRCQQ",
        "acl": "public-read",
        "success_action_status": "201",
        "policy": "eyJleHBpcmF0aW9uIjoiMjAxOC0xMi0wN1QwMDoyMjoxNloiLCJjb25kaXRpb25zIjpbeyJidWNrZXQiOiJpbmZpbnVtLnByb2R1Y3RpdmUuZGV2ZWxvcG1lbnQifSx7ImFjbCI6InB1YmxpYy1yZWFkIn0seyJzdWNjZXNzX2FjdGlvbl9zdGF0dXMiOiIyMDEifSxbInN0YXJ0cy13aXRoIiwiJGtleSIsInVwbG9hZHMvIl0sWyJzdGFydHMtd2l0aCIsIiRDb250ZW50LVR5cGUiLCIiXV19",
        "signature": "0IFyTMjiO+Obq4UlB34jUm0AQKQ=",
        "Content-Type": null
      }
    },
    "relationships": {
      "creator": {
        "data": {
          "type": "people",
          "id": "417"
        }
      }
    }
  },
  "included": [
    {
      "id": "417",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user125@email.com",
        "title": null,
        "joined_at": "2018-12-06T15:22:16.000+01:00",
        "last_seen_at": "2018-12-06T15:22:16.917+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "580"
          }
        }
      }
    },
    {
      "id": "580",
      "type": "companies",
      "attributes": {
        "name": "Organization68",
        "default_currency": "USD",
        "created_at": "2018-12-06T15:22:16.715+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ]
}

POST  /api/v2/attachments

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "attachments",
    "attributes": {
      "attachable_type": ""
    }
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/name"
      }
    },
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/attachable_type"
      }
    },
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "is not included in the list",
      "source": {
        "pointer": "data/attributes/attachable_type"
      }
    }
  ]
}

Create a attachment
POST/api/v2/attachments

URI Parameters
HideShow
name
string (required) Example: name

name

id
string (required) Example: Comment

attachable_type


PATCH /api/v2/attachments/1
Requestsupdates attachmentreturns error

PATCH  /api/v2/attachments/18

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "attachments",
    "attributes": {
      "temp_url": "https://s3.amazonaws.com/infinum.productive.test/uploads/1418301662608/dummyfile.pdf"
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "18",
    "type": "attachments",
    "attributes": {
      "name": "img.png",
      "type": "image/png",
      "content_type": "image/png",
      "size": 3479,
      "url": "/system/attachments/files/000/000/018/original/img.png?1544106137",
      "thumb": "/system/attachments/files/000/000/018/thumb/img.png?1544106137",
      "temp_url": "https://s3.amazonaws.com/infinum.productive.test/uploads/1418301662608/dummyfile.pdf",
      "processed": false,
      "attachable_type": "comment",
      "aws_policy": {
        "key": "uploads/44008059bea463f27eccd70be968b054/img.png",
        "AWSAccessKeyId": "AKIAIFEOTRNFHR6QRCQQ",
        "acl": "public-read",
        "success_action_status": "201",
        "policy": "eyJleHBpcmF0aW9uIjoiMjAxOC0xMi0wN1QwMDoyMjoxN1oiLCJjb25kaXRpb25zIjpbeyJidWNrZXQiOiJpbmZpbnVtLnByb2R1Y3RpdmUuZGV2ZWxvcG1lbnQifSx7ImFjbCI6InB1YmxpYy1yZWFkIn0seyJzdWNjZXNzX2FjdGlvbl9zdGF0dXMiOiIyMDEifSxbInN0YXJ0cy13aXRoIiwiJGtleSIsInVwbG9hZHMvIl0sWyJzdGFydHMtd2l0aCIsIiRDb250ZW50LVR5cGUiLCIiXV19",
        "signature": "Uk5vORkhkb4A2UQnnzwO5LAl81M=",
        "Content-Type": "image/png"
      }
    },
    "relationships": {
      "creator": {
        "data": {
          "type": "people",
          "id": "419"
        }
      }
    }
  },
  "included": [
    {
      "id": "419",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user127@email.com",
        "title": null,
        "joined_at": "2018-12-06T15:22:17.000+01:00",
        "last_seen_at": "2018-12-06T15:22:17.366+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "584"
          }
        }
      }
    },
    {
      "id": "584",
      "type": "companies",
      "attributes": {
        "name": "Organization70",
        "default_currency": "USD",
        "created_at": "2018-12-06T15:22:17.206+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ]
}

PATCH  /api/v2/attachments/19

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "attachments",
    "attributes": {
      "attachable_type": ""
    }
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/attachable_type"
      }
    },
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "is not included in the list",
      "source": {
        "pointer": "data/attributes/attachable_type"
      }
    }
  ]
}

Update a attachment
PATCH/api/v2/attachments/{id}

URI Parameters
HideShow
id
number (required) Example: 1

attachment id


DELETE /api/v2/attachments/1
Requestsdeletes attachment

DELETE  /api/v2/attachments/20

Headers
Content-Type: application/vnd.api+json
Responses204
This response has no content.

Deletes a attachment
DELETE/api/v2/attachments/{id}

URI Parameters
HideShow
id
number (required) Example: 1

attachment id


Boards

Boards

Supported filter params

  • id

  • project_id

GET /api/v2/boards
Requestsreturns boards

GET  /api/v2/boards?filter[project_id]=88

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": [
    {
      "id": "27",
      "type": "boards",
      "attributes": {
        "name": "board name",
        "position": 1,
        "archived_at": null
      },
      "relationships": {
        "project": {
          "data": {
            "type": "projects",
            "id": "88"
          }
        }
      }
    }
  ],
  "included": [
    {
      "id": "88",
      "type": "projects",
      "attributes": {
        "name": "test project",
        "project_type_id": 2,
        "last_activity_at": null,
        "public_access": true,
        "time_on_tasks": false,
        "tag_colors": {},
        "archived_at": null,
        "board_count": 1,
        "budget_count": 0,
        "worked_time": 0,
        "estimated_time": 0,
        "profit_margin": 0,
        "budget_closing_date": null,
        "budget_invoicing_date": null,
        "invoice_payment_due": null,
        "currency": "USD",
        "currency_default": "USD",
        "currency_normalized": "USD",
        "revenue": 0,
        "revenue_default": 0,
        "revenue_normalized": 0,
        "cost": 0,
        "cost_default": 0,
        "cost_normalized": 0,
        "profit": 0,
        "profit_default": 0,
        "profit_normalized": 0,
        "pending_invoicing": 0,
        "pending_invoicing_default": 0,
        "pending_invoicing_normalized": 0
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "592"
          }
        },
        "project_manager": {
          "data": {
            "type": "people",
            "id": "423"
          }
        },
        "last_actor": {
          "data": null
        }
      }
    },
    {
      "id": "592",
      "type": "companies",
      "attributes": {
        "name": "Client92",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:18.005+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "423",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user131@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-12-06T15:22:17.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "591"
          }
        }
      }
    },
    {
      "id": "591",
      "type": "companies",
      "attributes": {
        "name": "Client91",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:17.994+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ],
  "links": {
    "first": "http://test.host/api/v2/boards?filter%5Bproject_id%5D=88&page%5Bnumber%5D=1&page%5Bsize%5D=30",
    "last": "http://test.host/api/v2/boards?filter%5Bproject_id%5D=88&page%5Bnumber%5D=1&page%5Bsize%5D=30"
  },
  "meta": {
    "current_page": 1,
    "total_pages": 1,
    "total_count": 1,
    "page_size": 30,
    "max_page_size": 200
  }
}

Get boards
GET/api/v2/boards


GET /api/v2/boards/1
Requestsreturns board

GET  /api/v2/boards/28

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "28",
    "type": "boards",
    "attributes": {
      "name": "board name",
      "position": 1,
      "archived_at": null
    },
    "relationships": {
      "project": {
        "data": {
          "type": "projects",
          "id": "89"
        }
      }
    }
  },
  "included": [
    {
      "id": "89",
      "type": "projects",
      "attributes": {
        "name": "test project",
        "project_type_id": 2,
        "last_activity_at": null,
        "public_access": true,
        "time_on_tasks": false,
        "tag_colors": {},
        "archived_at": null,
        "board_count": 1,
        "budget_count": 0,
        "worked_time": 0,
        "estimated_time": 0,
        "profit_margin": 0,
        "budget_closing_date": null,
        "budget_invoicing_date": null,
        "invoice_payment_due": null,
        "currency": "USD",
        "currency_default": "USD",
        "currency_normalized": "USD",
        "revenue": 0,
        "revenue_default": 0,
        "revenue_normalized": 0,
        "cost": 0,
        "cost_default": 0,
        "cost_normalized": 0,
        "profit": 0,
        "profit_default": 0,
        "profit_normalized": 0,
        "pending_invoicing": 0,
        "pending_invoicing_default": 0,
        "pending_invoicing_normalized": 0
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "595"
          }
        },
        "project_manager": {
          "data": {
            "type": "people",
            "id": "425"
          }
        },
        "last_actor": {
          "data": null
        }
      }
    },
    {
      "id": "595",
      "type": "companies",
      "attributes": {
        "name": "Client94",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:18.327+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "425",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user133@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-12-06T15:22:18.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "594"
          }
        }
      }
    },
    {
      "id": "594",
      "type": "companies",
      "attributes": {
        "name": "Client93",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:18.318+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ]
}

Gets a board
GET/api/v2/boards/{id}

URI Parameters
HideShow
id
number (required) Example: 1

board id


POST /api/v2/boards
Requestscreates boardreturns error

POST  /api/v2/boards

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "boards",
    "attributes": {
      "name": "test name"
    },
    "relationships": {
      "project": {
        "data": {
          "type": "projects",
          "id": "90"
        }
      }
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "30",
    "type": "boards",
    "attributes": {
      "name": "test name",
      "position": 2,
      "archived_at": null
    },
    "relationships": {
      "project": {
        "data": {
          "type": "projects",
          "id": "90"
        }
      }
    }
  },
  "included": [
    {
      "id": "90",
      "type": "projects",
      "attributes": {
        "name": "test project",
        "project_type_id": 2,
        "last_activity_at": null,
        "public_access": true,
        "time_on_tasks": false,
        "tag_colors": {},
        "archived_at": null,
        "board_count": 2,
        "budget_count": 0,
        "worked_time": 0,
        "estimated_time": 0,
        "profit_margin": 0,
        "budget_closing_date": null,
        "budget_invoicing_date": null,
        "invoice_payment_due": null,
        "currency": "USD",
        "currency_default": "USD",
        "currency_normalized": "USD",
        "revenue": 0,
        "revenue_default": 0,
        "revenue_normalized": 0,
        "cost": 0,
        "cost_default": 0,
        "cost_normalized": 0,
        "profit": 0,
        "profit_default": 0,
        "profit_normalized": 0,
        "pending_invoicing": 0,
        "pending_invoicing_default": 0,
        "pending_invoicing_normalized": 0
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "598"
          }
        },
        "project_manager": {
          "data": {
            "type": "people",
            "id": "427"
          }
        },
        "last_actor": {
          "data": null
        }
      }
    },
    {
      "id": "598",
      "type": "companies",
      "attributes": {
        "name": "Client96",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:18.592+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "427",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user135@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-12-06T15:22:18.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "597"
          }
        }
      }
    },
    {
      "id": "597",
      "type": "companies",
      "attributes": {
        "name": "Client95",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:18.582+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ]
}

POST  /api/v2/boards

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "boards",
    "attributes": {
      "name": ""
    }
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/name"
      }
    }
  ]
}

Create a board
POST/api/v2/boards

URI Parameters
HideShow
name
string (required) Example: Name

name


PATCH /api/v2/boards/1
Requestsupdates boardreturns error

PATCH  /api/v2/boards/33

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "boards",
    "attributes": {
      "name": "new name"
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "33",
    "type": "boards",
    "attributes": {
      "name": "new name",
      "position": 1,
      "archived_at": null
    },
    "relationships": {
      "project": {
        "data": {
          "type": "projects",
          "id": "93"
        }
      }
    }
  },
  "included": [
    {
      "id": "93",
      "type": "projects",
      "attributes": {
        "name": "test project",
        "project_type_id": 2,
        "last_activity_at": null,
        "public_access": true,
        "time_on_tasks": false,
        "tag_colors": {},
        "archived_at": null,
        "board_count": 1,
        "budget_count": 0,
        "worked_time": 0,
        "estimated_time": 0,
        "profit_margin": 0,
        "budget_closing_date": null,
        "budget_invoicing_date": null,
        "invoice_payment_due": null,
        "currency": "USD",
        "currency_default": "USD",
        "currency_normalized": "USD",
        "revenue": 0,
        "revenue_default": 0,
        "revenue_normalized": 0,
        "cost": 0,
        "cost_default": 0,
        "cost_normalized": 0,
        "profit": 0,
        "profit_default": 0,
        "profit_normalized": 0,
        "pending_invoicing": 0,
        "pending_invoicing_default": 0,
        "pending_invoicing_normalized": 0
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "607"
          }
        },
        "project_manager": {
          "data": {
            "type": "people",
            "id": "433"
          }
        },
        "last_actor": {
          "data": null
        }
      }
    },
    {
      "id": "607",
      "type": "companies",
      "attributes": {
        "name": "Client102",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:19.273+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "433",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user141@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-12-06T15:22:19.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "606"
          }
        }
      }
    },
    {
      "id": "606",
      "type": "companies",
      "attributes": {
        "name": "Client101",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:19.262+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ]
}

PATCH  /api/v2/boards/34

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "boards",
    "attributes": {
      "name": ""
    }
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/name"
      }
    }
  ]
}

Update a board
PATCH/api/v2/boards/{id}

URI Parameters
HideShow
id
number (required) Example: 1

board id


PATCH /api/v2/boards/1/archive
Requestsarchives board

PATCH  /api/v2/boards/36/archive

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "36",
    "type": "boards",
    "attributes": {
      "name": "board name",
      "position": null,
      "archived_at": "2018-12-06T14:22:20.159Z"
    },
    "relationships": {
      "project": {
        "data": {
          "type": "projects",
          "id": "96"
        }
      }
    }
  },
  "included": [
    {
      "id": "96",
      "type": "projects",
      "attributes": {
        "name": "test project",
        "project_type_id": 2,
        "last_activity_at": null,
        "public_access": true,
        "time_on_tasks": false,
        "tag_colors": {},
        "archived_at": null,
        "board_count": 0,
        "budget_count": 0,
        "worked_time": 0,
        "estimated_time": 0,
        "profit_margin": 0,
        "budget_closing_date": null,
        "budget_invoicing_date": null,
        "invoice_payment_due": null,
        "currency": "USD",
        "currency_default": "USD",
        "currency_normalized": "USD",
        "revenue": 0,
        "revenue_default": 0,
        "revenue_normalized": 0,
        "cost": 0,
        "cost_default": 0,
        "cost_normalized": 0,
        "profit": 0,
        "profit_default": 0,
        "profit_normalized": 0,
        "pending_invoicing": 0,
        "pending_invoicing_default": 0,
        "pending_invoicing_normalized": 0
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "616"
          }
        },
        "project_manager": {
          "data": {
            "type": "people",
            "id": "439"
          }
        },
        "last_actor": {
          "data": null
        }
      }
    },
    {
      "id": "616",
      "type": "companies",
      "attributes": {
        "name": "Client108",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:20.015+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "439",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user147@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-12-06T15:22:20.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "615"
          }
        }
      }
    },
    {
      "id": "615",
      "type": "companies",
      "attributes": {
        "name": "Client107",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:20.000+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ]
}

Archives a board
PATCH/api/v2/boards/{id}/archive

URI Parameters
HideShow
id
number (required) Example: 1

board id


PATCH /api/v2/boards/1/restore
Requestsrestores board

PATCH  /api/v2/boards/37/restore

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "37",
    "type": "boards",
    "attributes": {
      "name": "Board11",
      "position": 2,
      "archived_at": null
    },
    "relationships": {
      "project": {
        "data": {
          "type": "projects",
          "id": "97"
        }
      }
    }
  },
  "included": [
    {
      "id": "97",
      "type": "projects",
      "attributes": {
        "name": "test project",
        "project_type_id": 2,
        "last_activity_at": null,
        "public_access": true,
        "time_on_tasks": false,
        "tag_colors": {},
        "archived_at": null,
        "board_count": 1,
        "budget_count": 0,
        "worked_time": 0,
        "estimated_time": 0,
        "profit_margin": 0,
        "budget_closing_date": null,
        "budget_invoicing_date": null,
        "invoice_payment_due": null,
        "currency": "USD",
        "currency_default": "USD",
        "currency_normalized": "USD",
        "revenue": 0,
        "revenue_default": 0,
        "revenue_normalized": 0,
        "cost": 0,
        "cost_default": 0,
        "cost_normalized": 0,
        "profit": 0,
        "profit_default": 0,
        "profit_normalized": 0,
        "pending_invoicing": 0,
        "pending_invoicing_default": 0,
        "pending_invoicing_normalized": 0
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "619"
          }
        },
        "project_manager": {
          "data": {
            "type": "people",
            "id": "441"
          }
        },
        "last_actor": {
          "data": null
        }
      }
    },
    {
      "id": "619",
      "type": "companies",
      "attributes": {
        "name": "Client110",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:20.325+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "441",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user149@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-12-06T15:22:20.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "618"
          }
        }
      }
    },
    {
      "id": "618",
      "type": "companies",
      "attributes": {
        "name": "Client109",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:20.315+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ]
}

Restores a board
PATCH/api/v2/boards/{id}/restore

URI Parameters
HideShow
id
number (required) Example: 1

board id


Bookings

Bookings

Supported filter params

  • person_id

  • event_id

  • project_id

  • tags

  • after

  • before

GET /api/v2/bookings
Requestsreturns bookings

GET  /api/v2/bookings

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": [
    {
      "id": "1",
      "type": "bookings",
      "attributes": {
        "hours": 6,
        "time": 360,
        "started_on": "2018-12-06",
        "ended_on": "2018-12-06",
        "note": null,
        "total_hours": 0,
        "total_time": 0,
        "created_at": "2018-12-06T15:22:20.635+01:00",
        "updated_at": "2018-12-06T15:22:20.635+01:00"
      },
      "relationships": {
        "service": {
          "data": null
        },
        "event": {
          "data": {
            "type": "events",
            "id": "1"
          }
        },
        "person": {
          "data": {
            "type": "people",
            "id": "443"
          }
        },
        "creator": {
          "data": {
            "type": "people",
            "id": "442"
          }
        },
        "updater": {
          "data": {
            "type": "people",
            "id": "442"
          }
        }
      }
    }
  ],
  "included": [
    {
      "id": "1",
      "type": "events",
      "attributes": {
        "name": "test name",
        "event_type_id": 2,
        "deleted_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 146
          }
        }
      }
    },
    {
      "id": "443",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user151@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-12-06T15:22:20.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "621"
          }
        }
      }
    },
    {
      "id": "442",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user150@email.com",
        "title": null,
        "joined_at": "2018-12-06T15:22:20.000+01:00",
        "last_seen_at": "2018-12-06T15:22:20.652+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "620"
          }
        }
      }
    },
    {
      "id": "621",
      "type": "companies",
      "attributes": {
        "name": "Client111",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:20.600+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "620",
      "type": "companies",
      "attributes": {
        "name": "Organization83",
        "default_currency": "USD",
        "created_at": "2018-12-06T15:22:20.503+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ],
  "links": {
    "first": "http://test.host/api/v2/bookings?page%5Bnumber%5D=1&page%5Bsize%5D=30",
    "last": "http://test.host/api/v2/bookings?page%5Bnumber%5D=1&page%5Bsize%5D=30"
  },
  "meta": {
    "current_page": 1,
    "total_pages": 1,
    "total_count": 1,
    "page_size": 30,
    "max_page_size": 200
  }
}

Get bookings
GET/api/v2/bookings


GET /api/v2/bookings/1
Requestsreturns booking

GET  /api/v2/bookings/2

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "2",
    "type": "bookings",
    "attributes": {
      "hours": 6,
      "time": 360,
      "started_on": "2018-12-06",
      "ended_on": "2018-12-06",
      "note": null,
      "total_hours": 0,
      "total_time": 0,
      "created_at": "2018-12-06T15:22:20.822+01:00",
      "updated_at": "2018-12-06T15:22:20.822+01:00"
    },
    "relationships": {
      "service": {
        "data": null
      },
      "event": {
        "data": {
          "type": "events",
          "id": "2"
        }
      },
      "person": {
        "data": {
          "type": "people",
          "id": "445"
        }
      },
      "creator": {
        "data": {
          "type": "people",
          "id": "444"
        }
      },
      "updater": {
        "data": {
          "type": "people",
          "id": "444"
        }
      }
    }
  },
  "included": [
    {
      "id": "2",
      "type": "events",
      "attributes": {
        "name": "test name",
        "event_type_id": 2,
        "deleted_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 147
          }
        }
      }
    },
    {
      "id": "445",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user153@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-12-06T15:22:20.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "623"
          }
        }
      }
    },
    {
      "id": "444",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user152@email.com",
        "title": null,
        "joined_at": "2018-12-06T15:22:20.000+01:00",
        "last_seen_at": "2018-12-06T15:22:20.831+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "622"
          }
        }
      }
    },
    {
      "id": "623",
      "type": "companies",
      "attributes": {
        "name": "Client112",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:20.809+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "622",
      "type": "companies",
      "attributes": {
        "name": "Organization84",
        "default_currency": "USD",
        "created_at": "2018-12-06T15:22:20.737+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ]
}

Gets a booking
GET/api/v2/bookings/{id}

URI Parameters
HideShow
id
number (required) Example: 1

booking id


POST /api/v2/bookings
Requestscreates the bookingreturns error

POST  /api/v2/bookings

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "bookings",
    "attributes": {
      "started_on": "Dec  6, 2018",
      "ended_on": "Dec  6, 2018",
      "time": "360"
    },
    "relationships": {
      "event": {
        "data": {
          "type": "events",
          "id": "3"
        }
      },
      "person": {
        "data": {
          "type": "people",
          "id": "447"
        }
      }
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "4",
    "type": "bookings",
    "attributes": {
      "hours": 6,
      "time": 360,
      "started_on": "2018-12-06",
      "ended_on": "2018-12-06",
      "note": null,
      "total_hours": 0,
      "total_time": 0,
      "created_at": "2018-12-06T15:22:21.035+01:00",
      "updated_at": "2018-12-06T15:22:21.035+01:00"
    },
    "relationships": {
      "service": {
        "data": null
      },
      "event": {
        "data": {
          "type": "events",
          "id": "3"
        }
      },
      "person": {
        "data": {
          "type": "people",
          "id": "447"
        }
      },
      "creator": {
        "data": {
          "type": "people",
          "id": "446"
        }
      },
      "updater": {
        "data": {
          "type": "people",
          "id": "446"
        }
      }
    }
  },
  "included": [
    {
      "id": "3",
      "type": "events",
      "attributes": {
        "name": "test name",
        "event_type_id": 2,
        "deleted_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 148
          }
        }
      }
    },
    {
      "id": "447",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user155@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-12-06T15:22:20.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "625"
          }
        }
      }
    },
    {
      "id": "446",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user154@email.com",
        "title": null,
        "joined_at": "2018-12-06T15:22:21.000+01:00",
        "last_seen_at": "2018-12-06T15:22:21.014+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "624"
          }
        }
      }
    },
    {
      "id": "625",
      "type": "companies",
      "attributes": {
        "name": "Client113",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:20.988+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "624",
      "type": "companies",
      "attributes": {
        "name": "Organization85",
        "default_currency": "USD",
        "created_at": "2018-12-06T15:22:20.914+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ]
}

POST  /api/v2/bookings

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "bookings",
    "attributes": {
      "time": ""
    }
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/person"
      }
    },
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/started_on"
      }
    },
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "is not a date",
      "source": {
        "pointer": "data/attributes/started_on"
      }
    },
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/ended_on"
      }
    },
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "is not a date",
      "source": {
        "pointer": "data/attributes/ended_on"
      }
    },
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/time"
      }
    }
  ]
}

Create a booking
POST/api/v2/bookings

URI Parameters
HideShow
person_id
number (required) Example: 1

person id

started_on
date (required) Example: 2018-01-01

started on

ended_on
date (required) Example: 2018-01-31

ended on

time
number (required) Example: 60

time


PATCH /api/v2/bookings/1
Requestsupdates bookingreturnes error

PATCH  /api/v2/bookings/6

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "bookings",
    "attributes": {
      "time": "120"
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "6",
    "type": "bookings",
    "attributes": {
      "hours": 2,
      "time": 120,
      "started_on": "2018-12-06",
      "ended_on": "2018-12-06",
      "note": null,
      "total_hours": 0,
      "total_time": 0,
      "created_at": "2018-12-06T15:22:21.342+01:00",
      "updated_at": "2018-12-06T15:22:21.364+01:00"
    },
    "relationships": {
      "service": {
        "data": null
      },
      "event": {
        "data": {
          "type": "events",
          "id": "5"
        }
      },
      "person": {
        "data": {
          "type": "people",
          "id": "451"
        }
      },
      "creator": {
        "data": {
          "type": "people",
          "id": "450"
        }
      },
      "updater": {
        "data": {
          "type": "people",
          "id": "450"
        }
      }
    }
  },
  "included": [
    {
      "id": "5",
      "type": "events",
      "attributes": {
        "name": "test name",
        "event_type_id": 2,
        "deleted_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 150
          }
        }
      }
    },
    {
      "id": "451",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user159@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-12-06T15:22:21.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "629"
          }
        }
      }
    },
    {
      "id": "450",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user158@email.com",
        "title": null,
        "joined_at": "2018-12-06T15:22:21.000+01:00",
        "last_seen_at": "2018-12-06T15:22:21.352+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "628"
          }
        }
      }
    },
    {
      "id": "629",
      "type": "companies",
      "attributes": {
        "name": "Client115",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:21.329+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "628",
      "type": "companies",
      "attributes": {
        "name": "Organization87",
        "default_currency": "USD",
        "created_at": "2018-12-06T15:22:21.259+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ]
}

PATCH  /api/v2/bookings/7

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "bookings",
    "attributes": {
      "time": ""
    }
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/time"
      }
    }
  ]
}

Update a booking
PATCH/api/v2/bookings/{id}

URI Parameters
HideShow
id
number (required) Example: 1

booking id


DELETE /api/v2/bookings/1
Requestsdeletes booking

DELETE  /api/v2/bookings/8

Headers
Content-Type: application/vnd.api+json
Responses204
This response has no content.

Deletes a booking
DELETE/api/v2/bookings/{id}

URI Parameters
HideShow
id
number (required) Example: 1

booking id


Comments

Comments

GET /api/v2/comments/1
Requestsreturns comment

GET  /api/v2/comments/17

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "17",
    "type": "comments",
    "attributes": {
      "commentable_type": "company",
      "body": "blah",
      "created_at": "2018-12-06T15:22:21.769+01:00",
      "pinned_at": null,
      "edited_at": null,
      "deleted_at": null
    },
    "relationships": {
      "creator": {
        "data": {
          "type": "people",
          "id": "456"
        }
      },
      "pinned_by": {
        "data": null
      },
      "person": {
        "data": null
      },
      "company": {
        "data": {
          "type": "companies",
          "id": "635"
        }
      },
      "deal": {
        "data": null
      },
      "task": {
        "data": null
      },
      "invoice": {
        "data": null
      },
      "attachments": {
        "data": []
      }
    }
  },
  "included": [
    {
      "id": "456",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user164@email.com",
        "title": null,
        "joined_at": "2018-12-06T15:22:21.000+01:00",
        "last_seen_at": "2018-12-06T15:22:21.779+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "634"
          }
        }
      }
    },
    {
      "id": "635",
      "type": "companies",
      "attributes": {
        "name": "Client118",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:21.765+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "634",
      "type": "companies",
      "attributes": {
        "name": "Organization90",
        "default_currency": "USD",
        "created_at": "2018-12-06T15:22:21.699+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ]
}

Gets a comment
GET/api/v2/comments/{id}

URI Parameters
HideShow
id
number (required) Example: 1

comment id


POST /api/v2/comments
Requestscreates staged commentreturns error

POST  /api/v2/comments

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "comments",
    "attributes": {
      "commentable_type": "task"
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "19",
    "type": "comments",
    "attributes": {
      "commentable_type": "task",
      "body": null,
      "created_at": "2018-12-06T15:22:21.970+01:00",
      "pinned_at": null,
      "edited_at": null,
      "deleted_at": null
    },
    "relationships": {
      "creator": {
        "data": {
          "type": "people",
          "id": "457"
        }
      },
      "pinned_by": {
        "data": null
      },
      "person": {
        "data": null
      },
      "company": {
        "data": null
      },
      "deal": {
        "data": null
      },
      "task": {
        "data": null
      },
      "invoice": {
        "data": null
      },
      "attachments": {
        "data": []
      }
    }
  },
  "included": [
    {
      "id": "457",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user165@email.com",
        "title": null,
        "joined_at": "2018-12-06T15:22:21.000+01:00",
        "last_seen_at": "2018-12-06T15:22:21.960+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "636"
          }
        }
      }
    },
    {
      "id": "636",
      "type": "companies",
      "attributes": {
        "name": "Organization91",
        "default_currency": "USD",
        "created_at": "2018-12-06T15:22:21.881+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ]
}

POST  /api/v2/comments

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "comments",
    "attributes": {
      "commentable_type": "invalid"
    }
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "is not included in the list",
      "source": {
        "pointer": "data/attributes/commentable_type"
      }
    }
  ]
}

Create a comment
POST/api/v2/comments


PATCH /api/v2/comments/1
Requestsupdates comment

PATCH  /api/v2/comments/21

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "comments",
    "attributes": {
      "body": "new body"
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "21",
    "type": "comments",
    "attributes": {
      "commentable_type": "company",
      "body": "new body",
      "created_at": "2018-12-06T15:22:22.203+01:00",
      "pinned_at": null,
      "edited_at": "2018-12-06T15:22:22.224+01:00",
      "deleted_at": null
    },
    "relationships": {
      "creator": {
        "data": {
          "type": "people",
          "id": "459"
        }
      },
      "pinned_by": {
        "data": null
      },
      "person": {
        "data": null
      },
      "company": {
        "data": {
          "type": "companies",
          "id": "641"
        }
      },
      "deal": {
        "data": null
      },
      "task": {
        "data": null
      },
      "invoice": {
        "data": null
      },
      "attachments": {
        "data": []
      }
    }
  },
  "included": [
    {
      "id": "459",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user167@email.com",
        "title": null,
        "joined_at": "2018-12-06T15:22:22.000+01:00",
        "last_seen_at": "2018-12-06T15:22:22.212+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "640"
          }
        }
      }
    },
    {
      "id": "641",
      "type": "companies",
      "attributes": {
        "name": "Client121",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:22.198+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "640",
      "type": "companies",
      "attributes": {
        "name": "Organization93",
        "default_currency": "USD",
        "created_at": "2018-12-06T15:22:22.135+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ]
}

Update a comment
PATCH/api/v2/comments/{id}

URI Parameters
HideShow
id
number (required) Example: 1

comment id


PATCH /api/v2/comments/1/pin
Requestspins the commentdoes not pin the comment

PATCH  /api/v2/comments/23/pin

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "23",
    "type": "comments",
    "attributes": {
      "commentable_type": "company",
      "body": "blah",
      "created_at": "2018-12-06T15:22:22.520+01:00",
      "pinned_at": "2018-12-06T15:22:22.534+01:00",
      "edited_at": null,
      "deleted_at": null
    },
    "relationships": {
      "creator": {
        "data": {
          "type": "people",
          "id": "461"
        }
      },
      "pinned_by": {
        "data": {
          "type": "people",
          "id": "461"
        }
      },
      "person": {
        "data": null
      },
      "company": {
        "data": {
          "type": "companies",
          "id": "645"
        }
      },
      "deal": {
        "data": null
      },
      "task": {
        "data": null
      },
      "invoice": {
        "data": null
      },
      "attachments": {
        "data": []
      }
    }
  },
  "included": [
    {
      "id": "461",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user169@email.com",
        "title": null,
        "joined_at": "2018-12-06T15:22:22.000+01:00",
        "last_seen_at": "2018-12-06T15:22:22.529+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "644"
          }
        }
      }
    },
    {
      "id": "645",
      "type": "companies",
      "attributes": {
        "name": "Client123",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:22.516+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "644",
      "type": "companies",
      "attributes": {
        "name": "Organization95",
        "default_currency": "USD",
        "created_at": "2018-12-06T15:22:22.448+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ]
}

PATCH  /api/v2/comments/24/pin

Headers
Content-Type: application/vnd.api+json
Responses403
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": 403,
      "title": "Access Denied",
      "detail": "You are not authorized to access this resource"
    }
  ]
}

Pins a comment
PATCH/api/v2/comments/{id}/pin

URI Parameters
HideShow
id
number (required) Example: 1

comment id


PATCH /api/v2/comments/1/unpin
Requestsunpins the commentdoes not unpin the comment

PATCH  /api/v2/comments/25/unpin

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "25",
    "type": "comments",
    "attributes": {
      "commentable_type": "company",
      "body": "blah",
      "created_at": "2018-12-06T15:22:22.788+01:00",
      "pinned_at": null,
      "edited_at": null,
      "deleted_at": null
    },
    "relationships": {
      "creator": {
        "data": {
          "type": "people",
          "id": "463"
        }
      },
      "pinned_by": {
        "data": null
      },
      "person": {
        "data": null
      },
      "company": {
        "data": {
          "type": "companies",
          "id": "649"
        }
      },
      "deal": {
        "data": null
      },
      "task": {
        "data": null
      },
      "invoice": {
        "data": null
      },
      "attachments": {
        "data": []
      }
    }
  },
  "included": [
    {
      "id": "463",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user171@email.com",
        "title": null,
        "joined_at": "2018-12-06T15:22:22.000+01:00",
        "last_seen_at": "2018-12-06T15:22:22.800+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "648"
          }
        }
      }
    },
    {
      "id": "649",
      "type": "companies",
      "attributes": {
        "name": "Client125",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:22.785+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "648",
      "type": "companies",
      "attributes": {
        "name": "Organization97",
        "default_currency": "USD",
        "created_at": "2018-12-06T15:22:22.718+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ]
}

PATCH  /api/v2/comments/26/unpin

Headers
Content-Type: application/vnd.api+json
Responses403
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": 403,
      "title": "Access Denied",
      "detail": "You are not authorized to access this resource"
    }
  ]
}

Unpins a comment
PATCH/api/v2/comments/{id}/unpin

URI Parameters
HideShow
id
number (required) Example: 1

comment id


DELETE /api/v2/comments/1
Requestsarchives comment

DELETE  /api/v2/comments/27

Headers
Content-Type: application/vnd.api+json
Responses204
This response has no content.

Deletes a comment
DELETE/api/v2/comments/{id}

URI Parameters
HideShow
id
number (required) Example: 1

comment id


Companies

Companies

Supported filter params

  • id

  • status (1: active, 2: archived)

  • tags

  • query

GET /api/v2/companies
Requestsreturns companies

GET  /api/v2/companies

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": [
    {
      "id": "655",
      "type": "companies",
      "attributes": {
        "name": "Client128",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:23.167+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "654",
      "type": "companies",
      "attributes": {
        "name": "Organization100",
        "default_currency": "USD",
        "created_at": "2018-12-06T15:22:23.098+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ],
  "links": {
    "first": "http://test.host/api/v2/companies?page%5Bnumber%5D=1&page%5Bsize%5D=30",
    "last": "http://test.host/api/v2/companies?page%5Bnumber%5D=1&page%5Bsize%5D=30"
  },
  "meta": {
    "current_page": 1,
    "total_pages": 1,
    "total_count": 2,
    "page_size": 30,
    "max_page_size": 200
  }
}

Get companies
GET/api/v2/companies


GET /api/v2/companies/1
Requestsreturns company

GET  /api/v2/companies/657

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "657",
    "type": "companies",
    "attributes": {
      "name": "Client129",
      "default_currency": null,
      "created_at": "2018-12-06T15:22:23.354+01:00",
      "archived_at": null,
      "avatar_url": null,
      "invoice_email_recipients": {},
      "description": null,
      "due_days": null,
      "tag_list": []
    },
    "relationships": {
      "bill_to": {
        "data": null
      }
    }
  }
}

Gets a company
GET/api/v2/companies/{id}

URI Parameters
HideShow
id
number (required) Example: 1

company id


POST /api/v2/companies
Requestscreates companyreturns error

POST  /api/v2/companies

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "companies",
    "attributes": {
      "name": "test name"
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "660",
    "type": "companies",
    "attributes": {
      "name": "test name",
      "default_currency": null,
      "created_at": "2018-12-06T15:22:23.520+01:00",
      "archived_at": null,
      "avatar_url": null,
      "invoice_email_recipients": {},
      "description": null,
      "due_days": null,
      "tag_list": []
    },
    "relationships": {
      "bill_to": {
        "data": null
      }
    }
  }
}

POST  /api/v2/companies

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "companies",
    "attributes": {
      "name": ""
    }
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/name"
      }
    }
  ]
}

Create a company
POST/api/v2/companies

URI Parameters
HideShow
name
string (required) Example: Name

name


PATCH /api/v2/companies/1
Requestsupdates companyreturns error

PATCH  /api/v2/companies/664

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "companies",
    "attributes": {
      "name": "new name",
      "tag_list": [
        "design",
        "IT"
      ]
    },
    "relationships": {
      "subscribers": {
        "data": [
          {
            "type": "people",
            "id": "471"
          },
          {
            "type": "people",
            "id": "472"
          }
        ]
      }
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "664",
    "type": "companies",
    "attributes": {
      "name": "new name",
      "default_currency": null,
      "created_at": "2018-12-06T15:22:23.786+01:00",
      "archived_at": null,
      "avatar_url": null,
      "invoice_email_recipients": {},
      "description": null,
      "due_days": null,
      "tag_list": [
        "design",
        "IT"
      ]
    },
    "relationships": {
      "bill_to": {
        "data": null
      }
    }
  }
}

PATCH  /api/v2/companies/668

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "companies",
    "attributes": {
      "name": ""
    }
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/name"
      }
    }
  ]
}

Update a company
PATCH/api/v2/companies/{id}

URI Parameters
HideShow
id
number (required) Example: 1

company id


PATCH /api/v2/companies/1/archive
Requestsarchives companyreturns error

PATCH  /api/v2/companies/670/archive

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "670",
    "type": "companies",
    "attributes": {
      "name": "Client136",
      "default_currency": null,
      "created_at": "2018-12-06T15:22:24.156+01:00",
      "archived_at": "2018-12-06T15:22:24.000+01:00",
      "avatar_url": null,
      "invoice_email_recipients": {},
      "description": null,
      "due_days": null,
      "tag_list": []
    },
    "relationships": {
      "bill_to": {
        "data": null
      }
    }
  }
}

PATCH  /api/v2/companies/672/archive

Headers
Content-Type: application/vnd.api+json
Responses403
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": 403,
      "title": "Access Denied",
      "detail": "You are not authorized to access this resource"
    }
  ]
}

Archives a company
PATCH/api/v2/companies/{id}/archive

URI Parameters
HideShow
id
number (required) Example: 1

company id


PATCH /api/v2/companies/1/restore
Requestsreturns errorrestores company

PATCH  /api/v2/companies/674/restore

Headers
Content-Type: application/vnd.api+json
Responses403
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": 403,
      "title": "Access Denied",
      "detail": "You are not authorized to access this resource"
    }
  ]
}

PATCH  /api/v2/companies/676/restore

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "676",
    "type": "companies",
    "attributes": {
      "name": "Client139",
      "default_currency": null,
      "created_at": "2018-12-06T15:22:24.482+01:00",
      "archived_at": null,
      "avatar_url": null,
      "invoice_email_recipients": {},
      "description": null,
      "due_days": null,
      "tag_list": []
    },
    "relationships": {
      "bill_to": {
        "data": null
      }
    }
  }
}

Restores a company
PATCH/api/v2/companies/{id}/restore

URI Parameters
HideShow
id
number (required) Example: 1

company id


Contact Entries

Contact Entries

Supported filter params

  • person_id

  • company_id

  • invoice_id

GET /api/v2/contact_entries
Requestsreturns contact entries

GET  /api/v2/contact_entries

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": [
    {
      "id": "44",
      "type": "contact_entries",
      "attributes": {
        "contactable_type": "company",
        "type": "email",
        "name": "Personal",
        "email": "contact1@email.com",
        "phone": null,
        "website": null,
        "address": null,
        "city": null,
        "state": null,
        "zipcode": null,
        "country": null,
        "vat": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "678"
          }
        },
        "person": {
          "data": null
        },
        "invoice": {
          "data": null
        },
        "subsidiary": {
          "data": null
        },
        "organization": {
          "data": {
            "type": "organizations",
            "id": 173
          }
        }
      }
    }
  ],
  "included": [
    {
      "id": "678",
      "type": "companies",
      "attributes": {
        "name": "Client140",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:24.598+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ],
  "links": {
    "first": "http://test.host/api/v2/contact_entries?page%5Bnumber%5D=1&page%5Bsize%5D=30",
    "last": "http://test.host/api/v2/contact_entries?page%5Bnumber%5D=1&page%5Bsize%5D=30"
  },
  "meta": {
    "current_page": 1,
    "total_pages": 1,
    "total_count": 1,
    "page_size": 30,
    "max_page_size": 200
  }
}

Get contact entries
GET/api/v2/contact_entries


GET /api/v2/contact_entries/1
Requestsreturns contact_entry

GET  /api/v2/contact_entries/45

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "45",
    "type": "contact_entries",
    "attributes": {
      "contactable_type": "company",
      "type": "email",
      "name": "Personal",
      "email": "contact2@email.com",
      "phone": null,
      "website": null,
      "address": null,
      "city": null,
      "state": null,
      "zipcode": null,
      "country": null,
      "vat": null
    },
    "relationships": {
      "company": {
        "data": {
          "type": "companies",
          "id": "680"
        }
      },
      "person": {
        "data": null
      },
      "invoice": {
        "data": null
      },
      "subsidiary": {
        "data": null
      },
      "organization": {
        "data": {
          "type": "organizations",
          "id": 174
        }
      }
    }
  },
  "included": [
    {
      "id": "680",
      "type": "companies",
      "attributes": {
        "name": "Client141",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:24.752+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ]
}

Gets a contact entry
GET/api/v2/contact_entries/{id}

URI Parameters
HideShow
id
number (required) Example: 1

contact entry id


POST /api/v2/contact_entries
Requestscreates contact_entryreturns error

POST  /api/v2/contact_entries

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "contact_entries",
    "attributes": {
      "contactable_type": "company",
      "type": "email",
      "name": "Work",
      "email": "contact@email.com"
    },
    "relationships": {
      "company": {
        "data": {
          "type": "companies",
          "id": "682"
        }
      }
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "47",
    "type": "contact_entries",
    "attributes": {
      "contactable_type": "company",
      "type": "email",
      "name": "Work",
      "email": "contact@email.com",
      "phone": null,
      "website": null,
      "address": null,
      "city": null,
      "state": null,
      "zipcode": null,
      "country": null,
      "vat": null
    },
    "relationships": {
      "company": {
        "data": {
          "type": "companies",
          "id": "682"
        }
      },
      "person": {
        "data": null
      },
      "invoice": {
        "data": null
      },
      "subsidiary": {
        "data": null
      },
      "organization": {
        "data": {
          "type": "organizations",
          "id": 175
        }
      }
    }
  },
  "included": [
    {
      "id": "682",
      "type": "companies",
      "attributes": {
        "name": "Client142",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:24.896+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ]
}

POST  /api/v2/contact_entries

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "contact_entries",
    "attributes": {
      "type": ""
    }
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/type"
      }
    },
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "is not included in the list",
      "source": {
        "pointer": "data/attributes/type"
      }
    },
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/name"
      }
    },
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/contactable_type"
      }
    },
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "is not included in the list",
      "source": {
        "pointer": "data/attributes/contactable_type"
      }
    }
  ]
}

Create a contact entry
POST/api/v2/contact_entries

URI Parameters
HideShow
name
string (required) Example: Name

name

type
string (required) Example: Address

type

contactable_type
string (required) Example: Client

contactable type


PATCH /api/v2/contact_entries/1
Requestsupdates contact_entryreturns error

PATCH  /api/v2/contact_entries/56

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "contact_entries",
    "attributes": {
      "name": "new name"
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "56",
    "type": "contact_entries",
    "attributes": {
      "contactable_type": "company",
      "type": "email",
      "name": "new name",
      "email": "contact9@email.com",
      "phone": null,
      "website": null,
      "address": null,
      "city": null,
      "state": null,
      "zipcode": null,
      "country": null,
      "vat": null
    },
    "relationships": {
      "company": {
        "data": {
          "type": "companies",
          "id": "695"
        }
      },
      "person": {
        "data": null
      },
      "invoice": {
        "data": null
      },
      "subsidiary": {
        "data": null
      },
      "organization": {
        "data": {
          "type": "organizations",
          "id": 181
        }
      }
    }
  },
  "included": [
    {
      "id": "695",
      "type": "companies",
      "attributes": {
        "name": "Client149",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:26.089+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ]
}

PATCH  /api/v2/contact_entries/57

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "contact_entries",
    "attributes": {
      "name": ""
    }
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/name"
      }
    }
  ]
}

Update a contact entry
PATCH/api/v2/contact_entries/{id}

URI Parameters
HideShow
id
number (required) Example: 1

contact entry id


DELETE /api/v2/contact_entries/1
Requestsdeletes contact_entry

DELETE  /api/v2/contact_entries/59

Headers
Content-Type: application/vnd.api+json
Responses204
This response has no content.

Deletes a contact entry
DELETE/api/v2/contact_entries/{id}

URI Parameters
HideShow
id
number (required) Example: 1

contact entry id


Contracts

Contracts

GET /api/v2/contracts
Requestsreturns contracts

GET  /api/v2/contracts

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": [
    {
      "id": "1",
      "type": "contracts",
      "attributes": {
        "ends_on": null,
        "next_occurrence_on": "2017-02-01",
        "interval_id": 1
      },
      "relationships": {
        "template": {
          "data": {
            "type": "deals",
            "id": "48"
          }
        }
      }
    }
  ],
  "included": [
    {
      "id": "48",
      "type": "deals",
      "attributes": {
        "name": "test name",
        "date": "2018-12-06",
        "end_date": null,
        "number": 1,
        "suffix": null,
        "time_approval": true,
        "client_access": false,
        "deal_type_id": 2,
        "budget": false,
        "sales_status_id": 1,
        "sales_status_updated_at": null,
        "tag_list": [],
        "origin_deal_id": null,
        "profit_margin": 0,
        "discount": null,
        "email_key": "6ba3e078721fb3e1952fdf472c50dba0",
        "purchase_order_number": null,
        "probability": 50,
        "budget_warning": null,
        "billable_time": 0,
        "estimated_time": 0,
        "budgeted_time": 0,
        "worked_time": 0,
        "time_to_close": null,
        "unapproved_entries_count": 0,
        "estimated_remaining_time": 0,
        "lost_comment": null,
        "closed_at": null,
        "last_activity_at": null,
        "deleted_at": null,
        "created_at": "2018-12-06T15:22:26.774+01:00",
        "note": null,
        "note_interpolated": null,
        "todo_count": 0,
        "todo_due_date": null,
        "currency": "EUR",
        "currency_default": "USD",
        "currency_normalized": "EUR",
        "revenue": 0,
        "revenue_default": 0,
        "revenue_normalized": 0,
        "services_revenue": 0,
        "services_revenue_default": 0,
        "services_revenue_normalized": 0,
        "cost": 0,
        "cost_default": 0,
        "cost_normalized": 0,
        "work_cost": 0,
        "work_cost_default": 0,
        "work_cost_normalized": 0,
        "profit": 0,
        "profit_default": 0,
        "profit_normalized": 0,
        "invoiced": 0,
        "invoiced_default": 0,
        "invoiced_normalized": 0,
        "pending_invoicing": 0,
        "pending_invoicing_default": 0,
        "pending_invoicing_normalized": 0,
        "paid": 0,
        "paid_default": 0,
        "paid_normalized": 0,
        "expense": 0,
        "expense_default": 0,
        "expense_normalized": 0,
        "expense_reimbursable": 0,
        "expense_reimbursable_default": 0,
        "expense_reimbursable_normalized": 0,
        "expense_paid": 0,
        "expense_paid_default": 0,
        "expense_paid_normalized": 0,
        "budget_total": 0,
        "budget_total_default": 0,
        "budget_total_normalized": 0,
        "budget_used": 0,
        "budget_used_default": 0,
        "budget_used_normalized": 0,
        "actual_rate": 0,
        "actual_rate_default": 0,
        "actual_rate_normalized": 0
      },
      "relationships": {
        "creator": {
          "data": {
            "type": "people",
            "id": "493"
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "706"
          }
        },
        "document_type": {
          "data": null
        },
        "responsible": {
          "data": {
            "type": "people",
            "id": "494"
          }
        },
        "deal_status": {
          "data": {
            "type": "deal_statuses",
            "id": "954"
          }
        },
        "project": {
          "data": null
        },
        "lost_reason": {
          "data": null
        },
        "contract": {
          "data": null
        }
      }
    },
    {
      "id": "493",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user201@email.com",
        "title": null,
        "joined_at": "2017-01-01T15:00:00.000+01:00",
        "last_seen_at": "2017-01-01T15:00:00.000+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "705"
          }
        }
      }
    },
    {
      "id": "706",
      "type": "companies",
      "attributes": {
        "name": "Client155",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:26.746+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "494",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user202@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-12-06T15:22:26.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "707"
          }
        }
      }
    },
    {
      "id": "954",
      "type": "deal_statuses",
      "attributes": {
        "name": "prospective",
        "position": 6,
        "deleted_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 186
          }
        }
      }
    },
    {
      "id": "705",
      "type": "companies",
      "attributes": {
        "name": "Organization123",
        "default_currency": "USD",
        "created_at": "2018-12-06T15:22:26.661+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "707",
      "type": "companies",
      "attributes": {
        "name": "Client156",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:26.755+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ],
  "links": {
    "first": "http://test.host/api/v2/contracts?page%5Bnumber%5D=1&page%5Bsize%5D=30",
    "last": "http://test.host/api/v2/contracts?page%5Bnumber%5D=1&page%5Bsize%5D=30"
  },
  "meta": {
    "current_page": 1,
    "total_pages": 1,
    "total_count": 1,
    "page_size": 30,
    "max_page_size": 200
  }
}

Get contracts
GET/api/v2/contracts


GET /api/v2/contracts/1
Requestsreturns contract

GET  /api/v2/contracts/2

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "2",
    "type": "contracts",
    "attributes": {
      "ends_on": null,
      "next_occurrence_on": "2017-02-01",
      "interval_id": 1
    },
    "relationships": {
      "template": {
        "data": {
          "type": "deals",
          "id": "49"
        }
      }
    }
  },
  "included": [
    {
      "id": "49",
      "type": "deals",
      "attributes": {
        "name": "test name",
        "date": "2018-12-06",
        "end_date": null,
        "number": 1,
        "suffix": null,
        "time_approval": true,
        "client_access": false,
        "deal_type_id": 2,
        "budget": false,
        "sales_status_id": 1,
        "sales_status_updated_at": null,
        "tag_list": [],
        "origin_deal_id": null,
        "profit_margin": 0,
        "discount": null,
        "email_key": "0ce783623a0984bf4d0d62a3726d1c36",
        "purchase_order_number": null,
        "probability": 50,
        "budget_warning": null,
        "billable_time": 0,
        "estimated_time": 0,
        "budgeted_time": 0,
        "worked_time": 0,
        "time_to_close": null,
        "unapproved_entries_count": 0,
        "estimated_remaining_time": 0,
        "lost_comment": null,
        "closed_at": null,
        "last_activity_at": null,
        "deleted_at": null,
        "created_at": "2018-12-06T15:22:27.056+01:00",
        "note": null,
        "note_interpolated": null,
        "todo_count": 0,
        "todo_due_date": null,
        "currency": "EUR",
        "currency_default": "USD",
        "currency_normalized": "EUR",
        "revenue": 0,
        "revenue_default": 0,
        "revenue_normalized": 0,
        "services_revenue": 0,
        "services_revenue_default": 0,
        "services_revenue_normalized": 0,
        "cost": 0,
        "cost_default": 0,
        "cost_normalized": 0,
        "work_cost": 0,
        "work_cost_default": 0,
        "work_cost_normalized": 0,
        "profit": 0,
        "profit_default": 0,
        "profit_normalized": 0,
        "invoiced": 0,
        "invoiced_default": 0,
        "invoiced_normalized": 0,
        "pending_invoicing": 0,
        "pending_invoicing_default": 0,
        "pending_invoicing_normalized": 0,
        "paid": 0,
        "paid_default": 0,
        "paid_normalized": 0,
        "expense": 0,
        "expense_default": 0,
        "expense_normalized": 0,
        "expense_reimbursable": 0,
        "expense_reimbursable_default": 0,
        "expense_reimbursable_normalized": 0,
        "expense_paid": 0,
        "expense_paid_default": 0,
        "expense_paid_normalized": 0,
        "budget_total": 0,
        "budget_total_default": 0,
        "budget_total_normalized": 0,
        "budget_used": 0,
        "budget_used_default": 0,
        "budget_used_normalized": 0,
        "actual_rate": 0,
        "actual_rate_default": 0,
        "actual_rate_normalized": 0
      },
      "relationships": {
        "creator": {
          "data": {
            "type": "people",
            "id": "495"
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "709"
          }
        },
        "document_type": {
          "data": null
        },
        "responsible": {
          "data": {
            "type": "people",
            "id": "496"
          }
        },
        "deal_status": {
          "data": {
            "type": "deal_statuses",
            "id": "960"
          }
        },
        "project": {
          "data": null
        },
        "lost_reason": {
          "data": null
        },
        "contract": {
          "data": null
        }
      }
    },
    {
      "id": "495",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user203@email.com",
        "title": null,
        "joined_at": "2017-01-01T15:00:00.000+01:00",
        "last_seen_at": "2017-01-01T15:00:00.000+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "708"
          }
        }
      }
    },
    {
      "id": "709",
      "type": "companies",
      "attributes": {
        "name": "Client157",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:27.026+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "496",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user204@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-12-06T15:22:27.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "710"
          }
        }
      }
    },
    {
      "id": "960",
      "type": "deal_statuses",
      "attributes": {
        "name": "prospective",
        "position": 6,
        "deleted_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 187
          }
        }
      }
    },
    {
      "id": "708",
      "type": "companies",
      "attributes": {
        "name": "Organization124",
        "default_currency": "USD",
        "created_at": "2018-12-06T15:22:26.923+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "710",
      "type": "companies",
      "attributes": {
        "name": "Client158",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:27.035+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ]
}

Gets a contract
GET/api/v2/contracts/{id}

URI Parameters
HideShow
id
number (required) Example: 1

contract id


POST /api/v2/contracts
Requestscreates contract and starts recurringreturns error

POST  /api/v2/contracts

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "contracts",
    "attributes": {
      "interval_id": "1",
      "next_occurrence_on": "01.02.2017"
    },
    "relationships": {
      "template": {
        "data": {
          "type": "deals",
          "id": "51"
        }
      }
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "4",
    "type": "contracts",
    "attributes": {
      "ends_on": null,
      "next_occurrence_on": "2017-02-01",
      "interval_id": 1
    },
    "relationships": {
      "template": {
        "data": {
          "type": "deals",
          "id": "6"
        }
      }
    }
  },
  "included": [
    {
      "id": "51",
      "type": "deals",
      "attributes": {
        "name": "test name",
        "date": "2017-01-01",
        "end_date": "2017-01-31",
        "number": 2,
        "suffix": "2017/01",
        "time_approval": true,
        "client_access": false,
        "deal_type_id": 2,
        "budget": true,
        "sales_status_id": null,
        "sales_status_updated_at": null,
        "tag_list": [],
        "origin_deal_id": null,
        "profit_margin": 0,
        "discount": null,
        "email_key": "55eb9811f6cb7b96d29f27bf5cfd9edd",
        "purchase_order_number": null,
        "probability": 50,
        "budget_warning": null,
        "billable_time": 0,
        "estimated_time": 0,
        "budgeted_time": 0,
        "worked_time": 0,
        "time_to_close": null,
        "unapproved_entries_count": 0,
        "estimated_remaining_time": 0,
        "lost_comment": null,
        "closed_at": null,
        "last_activity_at": null,
        "deleted_at": null,
        "created_at": "2017-01-01T15:00:00.000+01:00",
        "note": null,
        "note_interpolated": null,
        "todo_count": 0,
        "todo_due_date": null,
        "currency": "EUR",
        "currency_default": "USD",
        "currency_normalized": "EUR",
        "revenue": 0,
        "revenue_default": 0,
        "revenue_normalized": 0,
        "services_revenue": 0,
        "services_revenue_default": 0,
        "services_revenue_normalized": 0,
        "cost": 0,
        "cost_default": 0,
        "cost_normalized": 0,
        "work_cost": 0,
        "work_cost_default": 0,
        "work_cost_normalized": 0,
        "profit": 0,
        "profit_default": 0,
        "profit_normalized": 0,
        "invoiced": 0,
        "invoiced_default": 0,
        "invoiced_normalized": 0,
        "pending_invoicing": 0,
        "pending_invoicing_default": 0,
        "pending_invoicing_normalized": 0,
        "paid": 0,
        "paid_default": 0,
        "paid_normalized": 0,
        "expense": 0,
        "expense_default": 0,
        "expense_normalized": 0,
        "expense_reimbursable": 0,
        "expense_reimbursable_default": 0,
        "expense_reimbursable_normalized": 0,
        "expense_paid": 0,
        "expense_paid_default": 0,
        "expense_paid_normalized": 0,
        "budget_total": 0,
        "budget_total_default": 0,
        "budget_total_normalized": 0,
        "budget_used": 0,
        "budget_used_default": 0,
        "budget_used_normalized": 0,
        "actual_rate": 0,
        "actual_rate_default": 0,
        "actual_rate_normalized": 0
      },
      "relationships": {
        "creator": {
          "data": {
            "type": "people",
            "id": "497"
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "714"
          }
        },
        "document_type": {
          "data": null
        },
        "responsible": {
          "data": {
            "type": "people",
            "id": "499"
          }
        },
        "deal_status": {
          "data": null
        },
        "project": {
          "data": null
        },
        "lost_reason": {
          "data": null
        },
        "contract": {
          "data": {
            "type": "contracts",
            "id": "4"
          }
        }
      }
    },
    {
      "id": "497",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user205@email.com",
        "title": null,
        "joined_at": "2017-01-01T15:00:00.000+01:00",
        "last_seen_at": "2017-01-01T15:00:00.000+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "711"
          }
        }
      }
    },
    {
      "id": "714",
      "type": "companies",
      "attributes": {
        "name": "Client161",
        "default_currency": null,
        "created_at": "2017-01-01T15:00:00.000+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "499",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user207@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2017-01-01T15:00:00.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "715"
          }
        }
      }
    },
    {
      "id": "711",
      "type": "companies",
      "attributes": {
        "name": "Organization125",
        "default_currency": "USD",
        "created_at": "2018-12-06T15:22:27.184+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "715",
      "type": "companies",
      "attributes": {
        "name": "Client162",
        "default_currency": null,
        "created_at": "2017-01-01T15:00:00.000+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ]
}

POST  /api/v2/contracts

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "contracts",
    "attributes": {
      "interval_id": "1",
      "next_occurrence_on": "2017-02-01"
    },
    "relationships": {
      "template": {
        "data": {
          "type": "deals",
          "id": "0"
        }
      }
    }
  }
}
Responses403
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": 403,
      "title": "Access Denied",
      "detail": "You are not authorized to access this resource"
    }
  ]
}

Create a contract
POST/api/v2/contracts


PATCH /api/v2/contracts/1
Requestsupdates contractreturns error

PATCH  /api/v2/contracts/8

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "contracts",
    "attributes": {
      "ends_on": "31.12.2017"
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "8",
    "type": "contracts",
    "attributes": {
      "ends_on": "2017-12-31",
      "next_occurrence_on": "2017-02-01",
      "interval_id": 1
    },
    "relationships": {
      "template": {
        "data": {
          "type": "deals",
          "id": "11"
        }
      }
    }
  },
  "included": [
    {
      "id": "56",
      "type": "deals",
      "attributes": {
        "name": "test name",
        "date": "2018-12-06",
        "end_date": null,
        "number": 1,
        "suffix": null,
        "time_approval": true,
        "client_access": false,
        "deal_type_id": 2,
        "budget": false,
        "sales_status_id": 1,
        "sales_status_updated_at": null,
        "tag_list": [],
        "origin_deal_id": null,
        "profit_margin": 0,
        "discount": null,
        "email_key": "e33b387e16b728d4ee109405b51884b0",
        "purchase_order_number": null,
        "probability": 50,
        "budget_warning": null,
        "billable_time": 0,
        "estimated_time": 0,
        "budgeted_time": 0,
        "worked_time": 0,
        "time_to_close": null,
        "unapproved_entries_count": 0,
        "estimated_remaining_time": 0,
        "lost_comment": null,
        "closed_at": null,
        "last_activity_at": null,
        "deleted_at": null,
        "created_at": "2018-12-06T15:22:28.071+01:00",
        "note": null,
        "note_interpolated": null,
        "todo_count": 0,
        "todo_due_date": null,
        "currency": "EUR",
        "currency_default": "USD",
        "currency_normalized": "EUR",
        "revenue": 0,
        "revenue_default": 0,
        "revenue_normalized": 0,
        "services_revenue": 0,
        "services_revenue_default": 0,
        "services_revenue_normalized": 0,
        "cost": 0,
        "cost_default": 0,
        "cost_normalized": 0,
        "work_cost": 0,
        "work_cost_default": 0,
        "work_cost_normalized": 0,
        "profit": 0,
        "profit_default": 0,
        "profit_normalized": 0,
        "invoiced": 0,
        "invoiced_default": 0,
        "invoiced_normalized": 0,
        "pending_invoicing": 0,
        "pending_invoicing_default": 0,
        "pending_invoicing_normalized": 0,
        "paid": 0,
        "paid_default": 0,
        "paid_normalized": 0,
        "expense": 0,
        "expense_default": 0,
        "expense_normalized": 0,
        "expense_reimbursable": 0,
        "expense_reimbursable_default": 0,
        "expense_reimbursable_normalized": 0,
        "expense_paid": 0,
        "expense_paid_default": 0,
        "expense_paid_normalized": 0,
        "budget_total": 0,
        "budget_total_default": 0,
        "budget_total_normalized": 0,
        "budget_used": 0,
        "budget_used_default": 0,
        "budget_used_normalized": 0,
        "actual_rate": 0,
        "actual_rate_default": 0,
        "actual_rate_normalized": 0
      },
      "relationships": {
        "creator": {
          "data": {
            "type": "people",
            "id": "507"
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "728"
          }
        },
        "document_type": {
          "data": null
        },
        "responsible": {
          "data": {
            "type": "people",
            "id": "508"
          }
        },
        "deal_status": {
          "data": {
            "type": "deal_statuses",
            "id": "991"
          }
        },
        "project": {
          "data": null
        },
        "lost_reason": {
          "data": null
        },
        "contract": {
          "data": null
        }
      }
    },
    {
      "id": "507",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user215@email.com",
        "title": null,
        "joined_at": "2017-01-01T15:00:00.000+01:00",
        "last_seen_at": "2017-01-01T15:00:00.000+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "727"
          }
        }
      }
    },
    {
      "id": "728",
      "type": "companies",
      "attributes": {
        "name": "Client171",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:28.042+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "508",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user216@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-12-06T15:22:28.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "729"
          }
        }
      }
    },
    {
      "id": "991",
      "type": "deal_statuses",
      "attributes": {
        "name": "prospective",
        "position": 6,
        "deleted_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 192
          }
        }
      }
    },
    {
      "id": "727",
      "type": "companies",
      "attributes": {
        "name": "Organization129",
        "default_currency": "USD",
        "created_at": "2018-12-06T15:22:27.975+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "729",
      "type": "companies",
      "attributes": {
        "name": "Client172",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:28.050+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ]
}

PATCH  /api/v2/contracts/9

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "contracts",
    "attributes": {
      "next_occurrence_on": "2016-12-29"
    }
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "must be after today",
      "source": {
        "pointer": "data/attributes/next_occurrence_on"
      }
    }
  ]
}

Update a contract
PATCH/api/v2/contracts/{id}

URI Parameters
HideShow
id
number (required) Example: 1

contract id


Dashboards

Dashboards

GET /api/v2/dashboards
Requestsreturns dashboards

GET  /api/v2/dashboards

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": [
    {
      "id": "1",
      "type": "dashboards",
      "attributes": {
        "name": "dashboard_name"
      },
      "relationships": {
        "person": {
          "data": {
            "type": "people",
            "id": "518"
          }
        }
      }
    }
  ],
  "included": [
    {
      "id": "518",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user226@email.com",
        "title": null,
        "joined_at": "2018-12-06T15:22:29.000+01:00",
        "last_seen_at": "2018-12-06T15:22:29.100+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "745"
          }
        }
      }
    },
    {
      "id": "745",
      "type": "companies",
      "attributes": {
        "name": "Organization133",
        "default_currency": "USD",
        "created_at": "2018-12-06T15:22:28.951+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ],
  "links": {
    "first": "http://test.host/api/v2/dashboards?page%5Bnumber%5D=1&page%5Bsize%5D=30",
    "last": "http://test.host/api/v2/dashboards?page%5Bnumber%5D=1&page%5Bsize%5D=30"
  },
  "meta": {
    "current_page": 1,
    "total_pages": 1,
    "total_count": 1,
    "page_size": 30,
    "max_page_size": 200
  }
}

Get dashboards
GET/api/v2/dashboards


POST /api/v2/dashboards
Requestscreates the dashboardreturns error

POST  /api/v2/dashboards

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "dashboards",
    "attributes": {
      "name": "Test Name"
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "3",
    "type": "dashboards",
    "attributes": {
      "name": "Test Name"
    },
    "relationships": {
      "person": {
        "data": {
          "type": "people",
          "id": "519"
        }
      }
    }
  },
  "included": [
    {
      "id": "519",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user227@email.com",
        "title": null,
        "joined_at": "2018-12-06T15:22:29.000+01:00",
        "last_seen_at": "2018-12-06T15:22:29.297+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "747"
          }
        }
      }
    },
    {
      "id": "747",
      "type": "companies",
      "attributes": {
        "name": "Organization135",
        "default_currency": "USD",
        "created_at": "2018-12-06T15:22:29.157+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ]
}

POST  /api/v2/dashboards

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "dashboards",
    "attributes": {
      "name": ""
    }
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/name"
      }
    }
  ]
}

Create a dashboard
POST/api/v2/dashboards

URI Parameters
HideShow
name
string (required) Example: Name

name


PATCH /api/v2/dashboards/1
Requestsupdats dashboardreturnes error

PATCH  /api/v2/dashboards/5

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "dashboard",
    "attributes": {
      "name": "dashboard rename"
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "5",
    "type": "dashboards",
    "attributes": {
      "name": "dashboard rename"
    },
    "relationships": {
      "person": {
        "data": {
          "type": "people",
          "id": "521"
        }
      }
    }
  },
  "included": [
    {
      "id": "521",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user229@email.com",
        "title": null,
        "joined_at": "2018-12-06T15:22:29.000+01:00",
        "last_seen_at": "2018-12-06T15:22:29.676+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "751"
          }
        }
      }
    },
    {
      "id": "751",
      "type": "companies",
      "attributes": {
        "name": "Organization139",
        "default_currency": "USD",
        "created_at": "2018-12-06T15:22:29.530+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ]
}

PATCH  /api/v2/dashboards/6

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "dashboards",
    "attributes": {
      "name": ""
    }
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/name"
      }
    }
  ]
}

Update a dashboard
PATCH/api/v2/dashboards/{id}

URI Parameters
HideShow
id
number (required) Example: 1

dashboard id


DELETE /api/v2/dashboards/1
Requestsdeletes dashboard

DELETE  /api/v2/dashboards/7

Headers
Content-Type: application/vnd.api+json
Responses204
This response has no content.

Deletes a dashboard
DELETE/api/v2/dashboards/{id}

URI Parameters
HideShow
id
number (required) Example: 1

dashboard id


Deal Statuses

Deal Statuses

GET /api/v2/deal_statuses
Requestsreturns deal statuses

GET  /api/v2/deal_statuses

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": [
    {
      "id": "1070",
      "type": "deal_statuses",
      "attributes": {
        "name": "Lead",
        "position": 1,
        "deleted_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 208
          }
        }
      }
    },
    {
      "id": "1071",
      "type": "deal_statuses",
      "attributes": {
        "name": "Prospect",
        "position": 2,
        "deleted_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 208
          }
        }
      }
    },
    {
      "id": "1072",
      "type": "deal_statuses",
      "attributes": {
        "name": "Proposal sent",
        "position": 3,
        "deleted_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 208
          }
        }
      }
    },
    {
      "id": "1073",
      "type": "deal_statuses",
      "attributes": {
        "name": "Negotiation",
        "position": 4,
        "deleted_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 208
          }
        }
      }
    },
    {
      "id": "1074",
      "type": "deal_statuses",
      "attributes": {
        "name": "Awaiting approval",
        "position": 5,
        "deleted_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 208
          }
        }
      }
    },
    {
      "id": "1075",
      "type": "deal_statuses",
      "attributes": {
        "name": "test deal status",
        "position": 6,
        "deleted_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 208
          }
        }
      }
    }
  ],
  "links": {
    "first": "http://test.host/api/v2/deal_statuses?page%5Bnumber%5D=1&page%5Bsize%5D=30",
    "last": "http://test.host/api/v2/deal_statuses?page%5Bnumber%5D=1&page%5Bsize%5D=30"
  },
  "meta": {
    "current_page": 1,
    "total_pages": 1,
    "total_count": 6,
    "page_size": 30,
    "max_page_size": 200
  }
}

Get deal statuses
GET/api/v2/deal_statuses


GET /api/v2/deal_statuses/1
Requestsreturns deal status

GET  /api/v2/deal_statuses/1081

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "1081",
    "type": "deal_statuses",
    "attributes": {
      "name": "test deal status",
      "position": 6,
      "deleted_at": null
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": 209
        }
      }
    }
  }
}

Gets a deal status
GET/api/v2/deal_statuses/{id}

URI Parameters
HideShow
id
number (required) Example: 1

deal status id


POST /api/v2/deal_statuses
Requestscreates deal statusreturns error

POST  /api/v2/deal_statuses

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deal_statuses",
    "attributes": {
      "name": "test name"
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "1088",
    "type": "deal_statuses",
    "attributes": {
      "name": "test name",
      "position": 7,
      "deleted_at": null
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": 210
        }
      }
    }
  }
}

POST  /api/v2/deal_statuses

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deal_statuses",
    "attributes": {
      "name": ""
    }
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/name"
      }
    }
  ]
}

Create a deal status
POST/api/v2/deal_statuses

URI Parameters
HideShow
name
string (required) Example: Name

name


PATCH /api/v2/deal_statuses/1
Requestsupdates deal_statusreturns error

PATCH  /api/v2/deal_statuses/1100

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deal_statuses",
    "attributes": {
      "name": "new name"
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "1100",
    "type": "deal_statuses",
    "attributes": {
      "name": "new name",
      "position": 6,
      "deleted_at": null
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": 212
        }
      }
    }
  }
}

PATCH  /api/v2/deal_statuses/1106

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deal_statuses",
    "attributes": {
      "name": ""
    }
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/name"
      }
    }
  ]
}

Update a deal status
PATCH/api/v2/deal_statuses/{id}

URI Parameters
HideShow
id
number (required) Example: 1

deal status id


DELETE /api/v2/deal_statuses/1
Requestsarchives deal_statusreturns error

DELETE  /api/v2/deal_statuses/1112

Headers
Content-Type: application/vnd.api+json
Responses204
This response has no content.

DELETE  /api/v2/deal_statuses/1118

Headers
Content-Type: application/vnd.api+json
Responses403
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": 403,
      "title": "Access Denied",
      "detail": "You are not authorized to access this resource"
    }
  ]
}

Deletes a deal status
DELETE/api/v2/deal_statuses/{id}

URI Parameters
HideShow
id
number (required) Example: 1

deal status id


Deals

Deals

Supported filter params

  • id

  • responsible_id

  • company_id

  • status_id

  • sales_status_id (1: open, 2: won, 3: lost)

  • contract_id

  • recurring

  • project_id

  • tags

  • query

  • after

  • before

  • won_after

  • won_before

  • lost_after

  • lost_before

  • closed_after

  • closed_before

  • needs_invoicing

  • type (1: deal, 2: budget)

  • project_type (1: internal project, 2: client project)

  • budget_status (1: open, 2: closed)

  • date_after

  • date_before

  • subsidiary_id

Supported Enumerations

Deal type:

  • internal (deal_type_id: 1)

  • client (deal_type_id: 2)

GET /api/v2/deals
Requestsreturns deals

GET  /api/v2/deals

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": [
    {
      "id": "65",
      "type": "deals",
      "attributes": {
        "name": "test name",
        "date": "2018-12-06",
        "end_date": null,
        "number": 1,
        "suffix": null,
        "time_approval": true,
        "client_access": false,
        "deal_type_id": 2,
        "budget": false,
        "sales_status_id": 1,
        "sales_status_updated_at": null,
        "tag_list": [],
        "origin_deal_id": null,
        "profit_margin": 0,
        "discount": null,
        "email_key": "07dbaa487ee3d76fc7224dde04205752",
        "purchase_order_number": null,
        "probability": 50,
        "budget_warning": null,
        "billable_time": 0,
        "estimated_time": 0,
        "budgeted_time": 0,
        "worked_time": 0,
        "time_to_close": null,
        "unapproved_entries_count": 0,
        "estimated_remaining_time": 0,
        "lost_comment": null,
        "closed_at": null,
        "last_activity_at": null,
        "deleted_at": null,
        "created_at": "2018-12-06T15:22:31.475+01:00",
        "note": null,
        "note_interpolated": null,
        "todo_count": 0,
        "todo_due_date": null,
        "currency": "EUR",
        "currency_default": "USD",
        "currency_normalized": "EUR",
        "revenue": 0,
        "revenue_default": 0,
        "revenue_normalized": 0,
        "services_revenue": 0,
        "services_revenue_default": 0,
        "services_revenue_normalized": 0,
        "cost": 0,
        "cost_default": 0,
        "cost_normalized": 0,
        "work_cost": 0,
        "work_cost_default": 0,
        "work_cost_normalized": 0,
        "profit": 0,
        "profit_default": 0,
        "profit_normalized": 0,
        "invoiced": 0,
        "invoiced_default": 0,
        "invoiced_normalized": 0,
        "pending_invoicing": 0,
        "pending_invoicing_default": 0,
        "pending_invoicing_normalized": 0,
        "paid": 0,
        "paid_default": 0,
        "paid_normalized": 0,
        "expense": 0,
        "expense_default": 0,
        "expense_normalized": 0,
        "expense_reimbursable": 0,
        "expense_reimbursable_default": 0,
        "expense_reimbursable_normalized": 0,
        "expense_paid": 0,
        "expense_paid_default": 0,
        "expense_paid_normalized": 0,
        "budget_total": 0,
        "budget_total_default": 0,
        "budget_total_normalized": 0,
        "budget_used": 0,
        "budget_used_default": 0,
        "budget_used_normalized": 0,
        "actual_rate": 0,
        "actual_rate_default": 0,
        "actual_rate_normalized": 0
      },
      "relationships": {
        "creator": {
          "data": {
            "type": "people",
            "id": "536"
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "772"
          }
        },
        "document_type": {
          "data": null
        },
        "responsible": {
          "data": {
            "type": "people",
            "id": "537"
          }
        },
        "deal_status": {
          "data": {
            "type": "deal_statuses",
            "id": "1138"
          }
        },
        "project": {
          "data": null
        },
        "lost_reason": {
          "data": null
        },
        "contract": {
          "data": null
        }
      }
    }
  ],
  "included": [
    {
      "id": "536",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user244@email.com",
        "title": null,
        "joined_at": "2018-12-06T15:22:31.000+01:00",
        "last_seen_at": "2018-12-06T15:22:31.491+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "771"
          }
        }
      }
    },
    {
      "id": "772",
      "type": "companies",
      "attributes": {
        "name": "Client189",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:31.445+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "537",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user245@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-12-06T15:22:31.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "773"
          }
        }
      }
    },
    {
      "id": "1138",
      "type": "deal_statuses",
      "attributes": {
        "name": "prospective",
        "position": 6,
        "deleted_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 218
          }
        }
      }
    },
    {
      "id": "771",
      "type": "companies",
      "attributes": {
        "name": "Organization155",
        "default_currency": "USD",
        "created_at": "2018-12-06T15:22:31.376+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "773",
      "type": "companies",
      "attributes": {
        "name": "Client190",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:31.453+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ],
  "links": {
    "first": "http://test.host/api/v2/deals?page%5Bnumber%5D=1&page%5Bsize%5D=30",
    "last": "http://test.host/api/v2/deals?page%5Bnumber%5D=1&page%5Bsize%5D=30"
  },
  "meta": {
    "current_page": 1,
    "total_pages": 1,
    "total_count": 1,
    "page_size": 30,
    "max_page_size": 200
  }
}

Get deals
GET/api/v2/deals


GET /api/v2/deals/1
Requestsreturns deal

GET  /api/v2/deals/66

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "66",
    "type": "deals",
    "attributes": {
      "name": "test name",
      "date": "2018-12-06",
      "end_date": null,
      "number": 1,
      "suffix": null,
      "time_approval": true,
      "client_access": false,
      "deal_type_id": 2,
      "budget": false,
      "sales_status_id": 1,
      "sales_status_updated_at": null,
      "tag_list": [],
      "origin_deal_id": null,
      "profit_margin": 0,
      "discount": null,
      "email_key": "183c50b86a22ac99b21615b54addc9a4",
      "purchase_order_number": null,
      "probability": 50,
      "budget_warning": null,
      "billable_time": 0,
      "estimated_time": 0,
      "budgeted_time": 0,
      "worked_time": 0,
      "time_to_close": null,
      "unapproved_entries_count": 0,
      "estimated_remaining_time": 0,
      "lost_comment": null,
      "closed_at": null,
      "last_activity_at": null,
      "deleted_at": null,
      "created_at": "2018-12-06T15:22:31.702+01:00",
      "note": null,
      "note_interpolated": null,
      "todo_count": 0,
      "todo_due_date": null,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "revenue": 0,
      "revenue_default": 0,
      "revenue_normalized": 0,
      "services_revenue": 0,
      "services_revenue_default": 0,
      "services_revenue_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "cost_normalized": 0,
      "work_cost": 0,
      "work_cost_default": 0,
      "work_cost_normalized": 0,
      "profit": 0,
      "profit_default": 0,
      "profit_normalized": 0,
      "invoiced": 0,
      "invoiced_default": 0,
      "invoiced_normalized": 0,
      "pending_invoicing": 0,
      "pending_invoicing_default": 0,
      "pending_invoicing_normalized": 0,
      "paid": 0,
      "paid_default": 0,
      "paid_normalized": 0,
      "expense": 0,
      "expense_default": 0,
      "expense_normalized": 0,
      "expense_reimbursable": 0,
      "expense_reimbursable_default": 0,
      "expense_reimbursable_normalized": 0,
      "expense_paid": 0,
      "expense_paid_default": 0,
      "expense_paid_normalized": 0,
      "budget_total": 0,
      "budget_total_default": 0,
      "budget_total_normalized": 0,
      "budget_used": 0,
      "budget_used_default": 0,
      "budget_used_normalized": 0,
      "actual_rate": 0,
      "actual_rate_default": 0,
      "actual_rate_normalized": 0
    },
    "relationships": {
      "creator": {
        "data": {
          "type": "people",
          "id": "538"
        }
      },
      "company": {
        "data": {
          "type": "companies",
          "id": "775"
        }
      },
      "document_type": {
        "data": null
      },
      "responsible": {
        "data": {
          "type": "people",
          "id": "539"
        }
      },
      "deal_status": {
        "data": {
          "type": "deal_statuses",
          "id": "1144"
        }
      },
      "project": {
        "data": null
      },
      "lost_reason": {
        "data": null
      },
      "contract": {
        "data": null
      }
    }
  },
  "included": [
    {
      "id": "538",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user246@email.com",
        "title": null,
        "joined_at": "2018-12-06T15:22:31.000+01:00",
        "last_seen_at": "2018-12-06T15:22:31.718+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "774"
          }
        }
      }
    },
    {
      "id": "775",
      "type": "companies",
      "attributes": {
        "name": "Client191",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:31.673+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "539",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user247@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-12-06T15:22:31.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "776"
          }
        }
      }
    },
    {
      "id": "1144",
      "type": "deal_statuses",
      "attributes": {
        "name": "prospective",
        "position": 6,
        "deleted_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 219
          }
        }
      }
    },
    {
      "id": "774",
      "type": "companies",
      "attributes": {
        "name": "Organization156",
        "default_currency": "USD",
        "created_at": "2018-12-06T15:22:31.602+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "776",
      "type": "companies",
      "attributes": {
        "name": "Client192",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:31.682+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ]
}

Gets a deal
GET/api/v2/deals/{id}

URI Parameters
HideShow
id
number (required) Example: 1

deal id


POST /api/v2/deals
Requestscreates dealreturns error

POST  /api/v2/deals

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deals",
    "attributes": {
      "name": "test name",
      "date": "Dec  6, 2018",
      "deal_type_id": "2",
      "deal_status_id": "1150",
      "sales_status_id": "1",
      "probability": "50",
      "currency": "EUR"
    },
    "relationships": {
      "company": {
        "data": {
          "type": "companies",
          "id": "778"
        }
      },
      "responsible": {
        "data": {
          "type": "people",
          "id": "542"
        }
      }
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "68",
    "type": "deals",
    "attributes": {
      "name": "test name",
      "date": "2018-12-06",
      "end_date": null,
      "number": 2,
      "suffix": null,
      "time_approval": false,
      "client_access": false,
      "deal_type_id": 2,
      "budget": false,
      "sales_status_id": 1,
      "sales_status_updated_at": "2018-12-06T15:22:32.000+01:00",
      "tag_list": [],
      "origin_deal_id": null,
      "profit_margin": 0,
      "discount": null,
      "email_key": "c88bc4ae54a1fa15e8c03b69f6740f3e",
      "purchase_order_number": null,
      "probability": 50,
      "budget_warning": null,
      "billable_time": 0,
      "estimated_time": 0,
      "budgeted_time": 0,
      "worked_time": 0,
      "time_to_close": null,
      "unapproved_entries_count": 0,
      "estimated_remaining_time": 0,
      "lost_comment": null,
      "closed_at": null,
      "last_activity_at": null,
      "deleted_at": null,
      "created_at": "2018-12-06T15:22:32.011+01:00",
      "note": null,
      "note_interpolated": null,
      "todo_count": 0,
      "todo_due_date": null,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "revenue": 0,
      "revenue_default": 0,
      "revenue_normalized": 0,
      "services_revenue": 0,
      "services_revenue_default": 0,
      "services_revenue_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "cost_normalized": 0,
      "work_cost": 0,
      "work_cost_default": 0,
      "work_cost_normalized": 0,
      "profit": 0,
      "profit_default": 0,
      "profit_normalized": 0,
      "invoiced": 0,
      "invoiced_default": 0,
      "invoiced_normalized": 0,
      "pending_invoicing": 0,
      "pending_invoicing_default": 0,
      "pending_invoicing_normalized": 0,
      "paid": 0,
      "paid_default": 0,
      "paid_normalized": 0,
      "expense": 0,
      "expense_default": 0,
      "expense_normalized": 0,
      "expense_reimbursable": 0,
      "expense_reimbursable_default": 0,
      "expense_reimbursable_normalized": 0,
      "expense_paid": 0,
      "expense_paid_default": 0,
      "expense_paid_normalized": 0,
      "budget_total": 0,
      "budget_total_default": 0,
      "budget_total_normalized": 0,
      "budget_used": 0,
      "budget_used_default": 0,
      "budget_used_normalized": 0,
      "actual_rate": 0,
      "actual_rate_default": 0,
      "actual_rate_normalized": 0
    },
    "relationships": {
      "creator": {
        "data": {
          "type": "people",
          "id": "540"
        }
      },
      "company": {
        "data": {
          "type": "companies",
          "id": "778"
        }
      },
      "document_type": {
        "data": null
      },
      "responsible": {
        "data": {
          "type": "people",
          "id": "542"
        }
      },
      "deal_status": {
        "data": {
          "type": "deal_statuses",
          "id": "1150"
        }
      },
      "project": {
        "data": null
      },
      "lost_reason": {
        "data": null
      },
      "contract": {
        "data": null
      }
    }
  },
  "included": [
    {
      "id": "540",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user248@email.com",
        "title": null,
        "joined_at": "2018-12-06T15:22:31.000+01:00",
        "last_seen_at": "2018-12-06T15:22:31.977+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "777"
          }
        }
      }
    },
    {
      "id": "778",
      "type": "companies",
      "attributes": {
        "name": "Client193",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:31.915+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "542",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user250@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 2,
        "invited_at": "2018-12-06T15:22:31.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "780"
          }
        }
      }
    },
    {
      "id": "1150",
      "type": "deal_statuses",
      "attributes": {
        "name": "prospective",
        "position": 6,
        "deleted_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 220
          }
        }
      }
    },
    {
      "id": "777",
      "type": "companies",
      "attributes": {
        "name": "Organization157",
        "default_currency": "USD",
        "created_at": "2018-12-06T15:22:31.814+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "780",
      "type": "companies",
      "attributes": {
        "name": "Client195",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:31.964+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ]
}

POST  /api/v2/deals

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deals",
    "attributes": {
      "name": ""
    }
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/name"
      }
    },
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/date"
      }
    },
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "is not a date",
      "source": {
        "pointer": "data/attributes/date"
      }
    },
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/responsible"
      }
    },
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/company"
      }
    },
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/deal_type"
      }
    },
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/probability"
      }
    },
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/currency"
      }
    },
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "is not an valid currency",
      "source": {
        "pointer": "data/attributes/currency"
      }
    },
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/deal_status"
      }
    },
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/sales_status"
      }
    },
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "is not included in the list",
      "source": {
        "pointer": "data/attributes/sales_status"
      }
    }
  ]
}

Create a deal
POST/api/v2/deals

URI Parameters
HideShow
name
string (required) Example: Name

name

date
date (required) Example: 2018-01-01

date

responsible_id: `1` (number, required) - responsible_id
string (required) 
company_id: `1` (number, required) - company_id
string (required) 
deal_type_id
number (required) Example: 1

deal type

probability
number (required) Example: 100

probability

currency
currency (required) Example: EUR

currency

deal_status
number (required) Example: 1

deal status

sales_status
number (required) Example: 1

sales status


PATCH /api/v2/deals/1
Requestsupdates dealreturns error

PATCH  /api/v2/deals/71

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deals",
    "attributes": {
      "name": "new name",
      "tag_list": [
        "invoiced",
        "paid"
      ]
    },
    "relationships": {
      "responsible": {
        "data": {
          "type": "people",
          "id": "549"
        }
      },
      "subscribers": {
        "data": [
          {
            "type": "people",
            "id": "550"
          },
          {
            "type": "people",
            "id": "551"
          }
        ]
      }
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "71",
    "type": "deals",
    "attributes": {
      "name": "new name",
      "date": "2018-12-06",
      "end_date": null,
      "number": 1,
      "suffix": null,
      "time_approval": true,
      "client_access": false,
      "deal_type_id": 2,
      "budget": false,
      "sales_status_id": 1,
      "sales_status_updated_at": null,
      "tag_list": [
        "invoiced",
        "paid"
      ],
      "origin_deal_id": null,
      "profit_margin": 0,
      "discount": null,
      "email_key": "733d74bfd87facae918ac7b7f9e937bc",
      "purchase_order_number": null,
      "probability": 50,
      "budget_warning": null,
      "billable_time": 0,
      "estimated_time": 0,
      "budgeted_time": 0,
      "worked_time": 0,
      "time_to_close": null,
      "unapproved_entries_count": 0,
      "estimated_remaining_time": 0,
      "lost_comment": null,
      "closed_at": null,
      "last_activity_at": null,
      "deleted_at": null,
      "created_at": "2018-12-06T15:22:32.584+01:00",
      "note": null,
      "note_interpolated": null,
      "todo_count": 0,
      "todo_due_date": null,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "revenue": 0,
      "revenue_default": 0,
      "revenue_normalized": 0,
      "services_revenue": 0,
      "services_revenue_default": 0,
      "services_revenue_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "cost_normalized": 0,
      "work_cost": 0,
      "work_cost_default": 0,
      "work_cost_normalized": 0,
      "profit": 0,
      "profit_default": 0,
      "profit_normalized": 0,
      "invoiced": 0,
      "invoiced_default": 0,
      "invoiced_normalized": 0,
      "pending_invoicing": 0,
      "pending_invoicing_default": 0,
      "pending_invoicing_normalized": 0,
      "paid": 0,
      "paid_default": 0,
      "paid_normalized": 0,
      "expense": 0,
      "expense_default": 0,
      "expense_normalized": 0,
      "expense_reimbursable": 0,
      "expense_reimbursable_default": 0,
      "expense_reimbursable_normalized": 0,
      "expense_paid": 0,
      "expense_paid_default": 0,
      "expense_paid_normalized": 0,
      "budget_total": 0,
      "budget_total_default": 0,
      "budget_total_normalized": 0,
      "budget_used": 0,
      "budget_used_default": 0,
      "budget_used_normalized": 0,
      "actual_rate": 0,
      "actual_rate_default": 0,
      "actual_rate_normalized": 0
    },
    "relationships": {
      "creator": {
        "data": {
          "type": "people",
          "id": "547"
        }
      },
      "company": {
        "data": {
          "type": "companies",
          "id": "788"
        }
      },
      "document_type": {
        "data": null
      },
      "responsible": {
        "data": {
          "type": "people",
          "id": "549"
        }
      },
      "deal_status": {
        "data": {
          "type": "deal_statuses",
          "id": "1168"
        }
      },
      "project": {
        "data": null
      },
      "lost_reason": {
        "data": null
      },
      "contract": {
        "data": null
      }
    }
  },
  "included": [
    {
      "id": "547",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user255@email.com",
        "title": null,
        "joined_at": "2018-12-06T15:22:32.000+01:00",
        "last_seen_at": "2018-12-06T15:22:32.642+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "787"
          }
        }
      }
    },
    {
      "id": "788",
      "type": "companies",
      "attributes": {
        "name": "Client200",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:32.557+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "549",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user257@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 2,
        "invited_at": "2018-12-06T15:22:32.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "790"
          }
        }
      }
    },
    {
      "id": "1168",
      "type": "deal_statuses",
      "attributes": {
        "name": "prospective",
        "position": 6,
        "deleted_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 223
          }
        }
      }
    },
    {
      "id": "787",
      "type": "companies",
      "attributes": {
        "name": "Organization160",
        "default_currency": "USD",
        "created_at": "2018-12-06T15:22:32.493+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "790",
      "type": "companies",
      "attributes": {
        "name": "Client202",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:32.602+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ]
}

PATCH  /api/v2/deals/72

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "deals",
    "attributes": {
      "name": ""
    }
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/name"
      }
    }
  ]
}

Update a deal
PATCH/api/v2/deals/{id}

URI Parameters
HideShow
id
number (required) Example: 1

deal id


DELETE /api/v2/deals/1
Requestsarchives deal

DELETE  /api/v2/deals/73

Headers
Content-Type: application/vnd.api+json
Responses204
This response has no content.

Deletes a deal
DELETE/api/v2/deals/{id}

URI Parameters
HideShow
id
number (required) Example: 1

deal id


PATCH /api/v2/deals/1/open
Requestsopens budget

PATCH  /api/v2/deals/91/open

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "91",
    "type": "deals",
    "attributes": {
      "name": "test name",
      "date": "2018-12-06",
      "end_date": null,
      "number": 2,
      "suffix": null,
      "time_approval": true,
      "client_access": false,
      "deal_type_id": 2,
      "budget": true,
      "sales_status_id": null,
      "sales_status_updated_at": null,
      "tag_list": [],
      "origin_deal_id": null,
      "profit_margin": 0,
      "discount": null,
      "email_key": "616e23c8082fcd22d147c4ae815ecd2e",
      "purchase_order_number": null,
      "probability": 50,
      "budget_warning": null,
      "billable_time": 0,
      "estimated_time": 0,
      "budgeted_time": 0,
      "worked_time": 0,
      "time_to_close": null,
      "unapproved_entries_count": 0,
      "estimated_remaining_time": 0,
      "lost_comment": null,
      "closed_at": null,
      "last_activity_at": null,
      "deleted_at": null,
      "created_at": "2018-12-06T15:22:35.976+01:00",
      "note": null,
      "note_interpolated": null,
      "todo_count": 0,
      "todo_due_date": null,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "revenue": 0,
      "revenue_default": 0,
      "revenue_normalized": 0,
      "services_revenue": 0,
      "services_revenue_default": 0,
      "services_revenue_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "cost_normalized": 0,
      "work_cost": 0,
      "work_cost_default": 0,
      "work_cost_normalized": 0,
      "profit": 0,
      "profit_default": 0,
      "profit_normalized": 0,
      "invoiced": 0,
      "invoiced_default": 0,
      "invoiced_normalized": 0,
      "pending_invoicing": 0,
      "pending_invoicing_default": 0,
      "pending_invoicing_normalized": 0,
      "paid": 0,
      "paid_default": 0,
      "paid_normalized": 0,
      "expense": 0,
      "expense_default": 0,
      "expense_normalized": 0,
      "expense_reimbursable": 0,
      "expense_reimbursable_default": 0,
      "expense_reimbursable_normalized": 0,
      "expense_paid": 0,
      "expense_paid_default": 0,
      "expense_paid_normalized": 0,
      "budget_total": 0,
      "budget_total_default": 0,
      "budget_total_normalized": 0,
      "budget_used": 0,
      "budget_used_default": 0,
      "budget_used_normalized": 0,
      "actual_rate": 0,
      "actual_rate_default": 0,
      "actual_rate_normalized": 0
    },
    "relationships": {
      "creator": {
        "data": {
          "type": "people",
          "id": "583"
        }
      },
      "company": {
        "data": {
          "type": "companies",
          "id": "845"
        }
      },
      "document_type": {
        "data": null
      },
      "responsible": {
        "data": {
          "type": "people",
          "id": "585"
        }
      },
      "deal_status": {
        "data": null
      },
      "project": {
        "data": null
      },
      "lost_reason": {
        "data": null
      },
      "contract": {
        "data": null
      }
    }
  },
  "included": [
    {
      "id": "583",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user291@email.com",
        "title": null,
        "joined_at": "2018-12-06T15:22:35.000+01:00",
        "last_seen_at": "2018-12-06T15:22:35.990+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "842"
          }
        }
      }
    },
    {
      "id": "845",
      "type": "companies",
      "attributes": {
        "name": "Client246",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:35.952+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "585",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user293@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-12-06T15:22:35.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "846"
          }
        }
      }
    },
    {
      "id": "842",
      "type": "companies",
      "attributes": {
        "name": "Organization171",
        "default_currency": "USD",
        "created_at": "2018-12-06T15:22:35.843+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "846",
      "type": "companies",
      "attributes": {
        "name": "Client247",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:35.960+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ]
}

Opens a deal
PATCH/api/v2/deals/{id}/open

URI Parameters
HideShow
id
number (required) Example: 1

deal id


PATCH /api/v2/deals/1/close
Requestscloses budget

PATCH  /api/v2/deals/93/close

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "93",
    "type": "deals",
    "attributes": {
      "name": "test name",
      "date": "2018-12-06",
      "end_date": null,
      "number": 2,
      "suffix": null,
      "time_approval": true,
      "client_access": false,
      "deal_type_id": 2,
      "budget": true,
      "sales_status_id": null,
      "sales_status_updated_at": null,
      "tag_list": [],
      "origin_deal_id": null,
      "profit_margin": 0,
      "discount": null,
      "email_key": "675c06f9f61c82a87daf72c75fe2ee72",
      "purchase_order_number": null,
      "probability": 50,
      "budget_warning": null,
      "billable_time": 0,
      "estimated_time": 0,
      "budgeted_time": 0,
      "worked_time": 0,
      "time_to_close": null,
      "unapproved_entries_count": 0,
      "estimated_remaining_time": 0,
      "lost_comment": null,
      "closed_at": "2018-12-06T15:22:36.294+01:00",
      "last_activity_at": null,
      "deleted_at": null,
      "created_at": "2018-12-06T15:22:36.270+01:00",
      "note": null,
      "note_interpolated": null,
      "todo_count": 0,
      "todo_due_date": null,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "revenue": 0,
      "revenue_default": 0,
      "revenue_normalized": 0,
      "services_revenue": 0,
      "services_revenue_default": 0,
      "services_revenue_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "cost_normalized": 0,
      "work_cost": 0,
      "work_cost_default": 0,
      "work_cost_normalized": 0,
      "profit": 0,
      "profit_default": 0,
      "profit_normalized": 0,
      "invoiced": 0,
      "invoiced_default": 0,
      "invoiced_normalized": 0,
      "pending_invoicing": 0,
      "pending_invoicing_default": 0,
      "pending_invoicing_normalized": 0,
      "paid": 0,
      "paid_default": 0,
      "paid_normalized": 0,
      "expense": 0,
      "expense_default": 0,
      "expense_normalized": 0,
      "expense_reimbursable": 0,
      "expense_reimbursable_default": 0,
      "expense_reimbursable_normalized": 0,
      "expense_paid": 0,
      "expense_paid_default": 0,
      "expense_paid_normalized": 0,
      "budget_total": 0,
      "budget_total_default": 0,
      "budget_total_normalized": 0,
      "budget_used": 0,
      "budget_used_default": 0,
      "budget_used_normalized": 0,
      "actual_rate": 0,
      "actual_rate_default": 0,
      "actual_rate_normalized": 0
    },
    "relationships": {
      "creator": {
        "data": {
          "type": "people",
          "id": "586"
        }
      },
      "company": {
        "data": {
          "type": "companies",
          "id": "850"
        }
      },
      "document_type": {
        "data": null
      },
      "responsible": {
        "data": {
          "type": "people",
          "id": "588"
        }
      },
      "deal_status": {
        "data": null
      },
      "project": {
        "data": null
      },
      "lost_reason": {
        "data": null
      },
      "contract": {
        "data": null
      }
    }
  },
  "included": [
    {
      "id": "586",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user294@email.com",
        "title": null,
        "joined_at": "2018-12-06T15:22:36.000+01:00",
        "last_seen_at": "2018-12-06T15:22:36.284+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "847"
          }
        }
      }
    },
    {
      "id": "850",
      "type": "companies",
      "attributes": {
        "name": "Client250",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:36.245+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "588",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user296@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-12-06T15:22:36.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "851"
          }
        }
      }
    },
    {
      "id": "847",
      "type": "companies",
      "attributes": {
        "name": "Organization172",
        "default_currency": "USD",
        "created_at": "2018-12-06T15:22:36.102+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "851",
      "type": "companies",
      "attributes": {
        "name": "Client251",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:36.253+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ]
}

Closes a deal
PATCH/api/v2/deals/{id}/close

URI Parameters
HideShow
id
number (required) Example: 1

deal id


Devices

Devices

Supported Enumerations

Apns server:

  • SandBox (apns_server_id: 1)

  • Labs (apns_server_id: 2)

  • AppStore (apns_server_id: 3)

POST /api/v2/devices
Requestscreates devicedeletes duplicate and creates devicereturns error

POST  /api/v2/devices

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "devices",
    "attributes": {
      "name": "device name",
      "device_type_id": "1",
      "firebase_token": "firebasetoken",
      "unique_identifier": "unique_identifier1"
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "1",
    "type": "devices",
    "attributes": {
      "name": "device name",
      "device_type_id": 1,
      "unique_identifier": "unique_identifier1",
      "firebase_token": "firebasetoken"
    },
    "relationships": {
      "user": {
        "data": {
          "type": "users",
          "id": "318"
        }
      }
    }
  },
  "included": [
    {
      "id": "318",
      "type": "users",
      "attributes": {
        "email": "user1@email.com",
        "first_name": "test first name",
        "last_name": "test last name",
        "time_zone": null,
        "avatar_url": null,
        "default_organization_id": 64,
        "default_organization_slug": "64-organization1",
        "intercom_hash": "442e8ddb79686c5129e07f84e6ffd3cda2556bdff8bc8c94901ca0b660fd1206",
        "beta_features": [],
        "sysadmin": false,
        "newsletter_consent": false,
        "newsletter_consent_at": null,
        "ical_token": null
      }
    }
  ]
}

POST  /api/v2/devices

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "devices",
    "attributes": {
      "name": "device name",
      "device_type_id": "1",
      "firebase_token": "firebasetoken",
      "unique_identifier": "unique_identifier2"
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "3",
    "type": "devices",
    "attributes": {
      "name": "device name",
      "device_type_id": 1,
      "unique_identifier": "unique_identifier2",
      "firebase_token": "firebasetoken"
    },
    "relationships": {
      "user": {
        "data": {
          "type": "users",
          "id": "319"
        }
      }
    }
  },
  "included": [
    {
      "id": "319",
      "type": "users",
      "attributes": {
        "email": "user2@email.com",
        "first_name": "test first name",
        "last_name": "test last name",
        "time_zone": null,
        "avatar_url": null,
        "default_organization_id": 65,
        "default_organization_slug": "65-organization2",
        "intercom_hash": "0d72f758b03abed989f5e82f5238e07300d17d9dd239cc93d96e570c70fea0e5",
        "beta_features": [],
        "sysadmin": false,
        "newsletter_consent": false,
        "newsletter_consent_at": null,
        "ical_token": null
      }
    }
  ]
}

POST  /api/v2/devices

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "devices",
    "attributes": {
      "name": ""
    }
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/name"
      }
    },
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/unique_identifier"
      }
    },
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/firebase_token"
      }
    }
  ]
}

Create a device
POST/api/v2/devices

URI Parameters
HideShow
name
string (required) Example: Name

name

unique_identifier
string (required) Example: 12345

unique identifier

firebase_token
string (required) Example: abcd

firebase token


DELETE /api/v2/devices/1
Requestsdeletes device

DELETE  /api/v2/devices/4

Headers
Content-Type: application/vnd.api+json
Responses204
This response has no content.

Deletes a device
DELETE/api/v2/devices/{id}

URI Parameters
HideShow
id
number (required) Example: 1

device id


Document Types

Document Types

Supported filter params

  • subsidiary_id

  • exportable_type_id (1: invoice, 2: deal, 3: budget)

  • status (1: active, 2: archived)

GET /api/v2/document_types
Requestsreturns document_types

GET  /api/v2/document_types

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": [
    {
      "id": "1",
      "type": "document_types",
      "attributes": {
        "name": "normal invoice",
        "tax1_name": "VAT",
        "tax1_value": "25.0",
        "tax2_name": null,
        "tax2_value": null,
        "locale": "en_US",
        "document_template_id": 1,
        "exportable_type_id": 1,
        "note": null,
        "footer": null,
        "template_options": {},
        "deleted_at": null,
        "header_template": null,
        "body_template": null,
        "footer_template": null,
        "scss_template": null,
        "exporter_options": {},
        "email_template": null
      },
      "relationships": {
        "subsidiary": {
          "data": {
            "type": "subsidiaries",
            "id": "2"
          }
        },
        "organization": {
          "data": {
            "type": "organizations",
            "id": 236
          }
        }
      }
    }
  ],
  "included": [
    {
      "id": "2",
      "type": "subsidiaries",
      "attributes": {
        "name": "Subsidiary2",
        "invoice_number_format": null,
        "deleted_at": null,
        "export_integration_type_id": null,
        "invoice_logo_url": null
      },
      "relationships": {
        "bill_from": {
          "data": null
        },
        "integration": {
          "data": null
        },
        "organization": {
          "data": {
            "type": "organizations",
            "id": 236
          }
        }
      }
    }
  ],
  "links": {
    "first": "http://test.host/api/v2/document_types?page%5Bnumber%5D=1&page%5Bsize%5D=30",
    "last": "http://test.host/api/v2/document_types?page%5Bnumber%5D=1&page%5Bsize%5D=30"
  },
  "meta": {
    "current_page": 1,
    "total_pages": 1,
    "total_count": 1,
    "page_size": 30,
    "max_page_size": 200
  }
}

Get document_types
GET/api/v2/document_types


GET /api/v2/document_types/1
Requestsreturns document_type

GET  /api/v2/document_types/2

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "2",
    "type": "document_types",
    "attributes": {
      "name": "normal invoice",
      "tax1_name": "VAT",
      "tax1_value": "25.0",
      "tax2_name": null,
      "tax2_value": null,
      "locale": "en_US",
      "document_template_id": 1,
      "exportable_type_id": 1,
      "note": null,
      "footer": null,
      "template_options": {},
      "deleted_at": null,
      "header_template": null,
      "body_template": null,
      "footer_template": null,
      "scss_template": null,
      "exporter_options": {},
      "email_template": null
    },
    "relationships": {
      "subsidiary": {
        "data": {
          "type": "subsidiaries",
          "id": "3"
        }
      },
      "organization": {
        "data": {
          "type": "organizations",
          "id": 237
        }
      }
    }
  },
  "included": [
    {
      "id": "3",
      "type": "subsidiaries",
      "attributes": {
        "name": "Subsidiary3",
        "invoice_number_format": null,
        "deleted_at": null,
        "export_integration_type_id": null,
        "invoice_logo_url": null
      },
      "relationships": {
        "bill_from": {
          "data": null
        },
        "integration": {
          "data": null
        },
        "organization": {
          "data": {
            "type": "organizations",
            "id": 237
          }
        }
      }
    }
  ]
}

Gets a document_type
GET/api/v2/document_types/{id}

URI Parameters
HideShow
id
number (required) Example: 1

document type id


POST /api/v2/document_types
Requestscreates document_typereturns error

POST  /api/v2/document_types

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "document_types",
    "attributes": {
      "name": "test name",
      "locale": "hr_HR",
      "exportable_type_id": "1"
    },
    "relationships": {
      "subsidiary": {
        "data": {
          "type": "subsidiaries",
          "id": "4"
        }
      }
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "4",
    "type": "document_types",
    "attributes": {
      "name": "test name",
      "tax1_name": null,
      "tax1_value": null,
      "tax2_name": null,
      "tax2_value": null,
      "locale": "hr_HR",
      "document_template_id": null,
      "exportable_type_id": 1,
      "note": null,
      "footer": null,
      "template_options": {},
      "deleted_at": null,
      "header_template": null,
      "body_template": null,
      "footer_template": null,
      "scss_template": null,
      "exporter_options": {},
      "email_template": null
    },
    "relationships": {
      "subsidiary": {
        "data": {
          "type": "subsidiaries",
          "id": "4"
        }
      },
      "organization": {
        "data": {
          "type": "organizations",
          "id": 238
        }
      }
    }
  },
  "included": [
    {
      "id": "4",
      "type": "subsidiaries",
      "attributes": {
        "name": "Subsidiary4",
        "invoice_number_format": null,
        "deleted_at": null,
        "export_integration_type_id": null,
        "invoice_logo_url": null
      },
      "relationships": {
        "bill_from": {
          "data": null
        },
        "integration": {
          "data": null
        },
        "organization": {
          "data": {
            "type": "organizations",
            "id": 238
          }
        }
      }
    }
  ]
}

POST  /api/v2/document_types

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "document_types",
    "attributes": {
      "name": ""
    }
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/name"
      }
    },
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/locale"
      }
    },
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/subsidiary"
      }
    }
  ]
}

Create a document_type
POST/api/v2/document_types

URI Parameters
HideShow
name
string (required) Example: Name

name

locale
string (required) Example: en_US

locale

subsidiary_id
number (required) Example: 1

subsidiary id


PATCH /api/v2/document_types/1
Requestsupdates document_typereturns error

PATCH  /api/v2/document_types/7

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "document_types",
    "attributes": {
      "name": "new name"
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "7",
    "type": "document_types",
    "attributes": {
      "name": "new name",
      "tax1_name": "VAT",
      "tax1_value": "25.0",
      "tax2_name": null,
      "tax2_value": null,
      "locale": "en_US",
      "document_template_id": 1,
      "exportable_type_id": 1,
      "note": null,
      "footer": null,
      "template_options": {},
      "deleted_at": null,
      "header_template": null,
      "body_template": null,
      "footer_template": null,
      "scss_template": null,
      "exporter_options": {},
      "email_template": null
    },
    "relationships": {
      "subsidiary": {
        "data": {
          "type": "subsidiaries",
          "id": "7"
        }
      },
      "organization": {
        "data": {
          "type": "organizations",
          "id": 241
        }
      }
    }
  },
  "included": [
    {
      "id": "7",
      "type": "subsidiaries",
      "attributes": {
        "name": "Subsidiary7",
        "invoice_number_format": null,
        "deleted_at": null,
        "export_integration_type_id": null,
        "invoice_logo_url": null
      },
      "relationships": {
        "bill_from": {
          "data": null
        },
        "integration": {
          "data": null
        },
        "organization": {
          "data": {
            "type": "organizations",
            "id": 241
          }
        }
      }
    }
  ]
}

PATCH  /api/v2/document_types/8

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "document_types",
    "attributes": {
      "name": ""
    }
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/name"
      }
    }
  ]
}

Update a document_type
PATCH/api/v2/document_types/{id}

URI Parameters
HideShow
id
number (required) Example: 1

document type id


DELETE /api/v2/document_types/1
Requestsarchives document type

DELETE  /api/v2/document_types/10

Headers
Content-Type: application/vnd.api+json
Responses204
This response has no content.

Deletes a document type
DELETE/api/v2/document_types/{id}

URI Parameters
HideShow
id
number (required) Example: 1

document type id


Emails

Emails

Supported filter params

  • status (1: unresolved, 2: resolved, 3: dismissed)

  • creator_id

  • recipient_id

  • sender_or_recipient_id

  • before

  • after

GET /api/v2/emails
Requestsreturns emails

GET  /api/v2/emails

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": [
    {
      "id": "5",
      "type": "emails",
      "attributes": {
        "subject": null,
        "body": "Email text body",
        "auto_linked": false,
        "linked_type": null,
        "linked_id": null,
        "dismissed_at": null,
        "created_at": "2018-12-06T15:22:37.564+01:00"
      },
      "relationships": {
        "creator": {
          "data": {
            "type": "people",
            "id": "599"
          }
        },
        "deal": {
          "data": null
        },
        "invoice": {
          "data": null
        },
        "recipients": {
          "data": []
        },
        "cc_recipients": {
          "data": []
        },
        "attachments": {
          "data": []
        }
      }
    }
  ],
  "included": [
    {
      "id": "599",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user307@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-12-06T15:22:37.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "862"
          }
        }
      }
    },
    {
      "id": "862",
      "type": "companies",
      "attributes": {
        "name": "Client252",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:37.552+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ],
  "links": {
    "first": "http://test.host/api/v2/emails?page%5Bnumber%5D=1&page%5Bsize%5D=30",
    "last": "http://test.host/api/v2/emails?page%5Bnumber%5D=1&page%5Bsize%5D=30"
  },
  "meta": {
    "current_page": 1,
    "total_pages": 1,
    "total_count": 1,
    "page_size": 30,
    "max_page_size": 200
  }
}

Get emails
GET/api/v2/emails


GET /api/v2/emails/1
Requestsreturns email

GET  /api/v2/emails/7

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "7",
    "type": "emails",
    "attributes": {
      "subject": null,
      "body": "Email text body",
      "auto_linked": false,
      "linked_type": null,
      "linked_id": null,
      "dismissed_at": null,
      "created_at": "2018-12-06T15:22:37.916+01:00"
    },
    "relationships": {
      "creator": {
        "data": {
          "type": "people",
          "id": "603"
        }
      },
      "deal": {
        "data": null
      },
      "invoice": {
        "data": null
      },
      "recipients": {
        "data": []
      },
      "cc_recipients": {
        "data": []
      },
      "attachments": {
        "data": []
      }
    }
  },
  "included": [
    {
      "id": "603",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user311@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-12-06T15:22:37.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "866"
          }
        }
      }
    },
    {
      "id": "866",
      "type": "companies",
      "attributes": {
        "name": "Client254",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:37.907+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ]
}

Gets a email
GET/api/v2/emails/{id}

URI Parameters
HideShow
id
number (required) Example: 1

email id


PATCH /api/v2/emails/1/attach
Requestsattaches emailreturns error

PATCH  /api/v2/emails/8/attach

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "emails",
    "relationships": {
      "deal": {
        "data": {
          "type": "deals",
          "id": "94"
        }
      }
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "8",
    "type": "emails",
    "attributes": {
      "subject": null,
      "body": "Email text body",
      "auto_linked": false,
      "linked_type": "Quote",
      "linked_id": 94,
      "dismissed_at": null,
      "created_at": "2018-12-06T15:22:38.070+01:00"
    },
    "relationships": {
      "creator": {
        "data": {
          "type": "people",
          "id": "605"
        }
      },
      "deal": {
        "data": {
          "type": "deals",
          "id": "94"
        }
      },
      "invoice": {
        "data": null
      },
      "recipients": {
        "data": []
      },
      "cc_recipients": {
        "data": []
      },
      "attachments": {
        "data": []
      }
    }
  },
  "included": [
    {
      "id": "605",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user313@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-12-06T15:22:38.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "868"
          }
        }
      }
    },
    {
      "id": "94",
      "type": "deals",
      "attributes": {
        "name": "test name",
        "date": "2018-12-06",
        "end_date": null,
        "number": 1,
        "suffix": null,
        "time_approval": true,
        "client_access": false,
        "deal_type_id": 2,
        "budget": false,
        "sales_status_id": 1,
        "sales_status_updated_at": null,
        "tag_list": [],
        "origin_deal_id": null,
        "profit_margin": 0,
        "discount": null,
        "email_key": "009c467be58ab43cac0d03e83e4d43d4",
        "purchase_order_number": null,
        "probability": 50,
        "budget_warning": null,
        "billable_time": 0,
        "estimated_time": 0,
        "budgeted_time": 0,
        "worked_time": 0,
        "time_to_close": null,
        "unapproved_entries_count": 0,
        "estimated_remaining_time": 0,
        "lost_comment": null,
        "closed_at": null,
        "last_activity_at": null,
        "deleted_at": null,
        "created_at": "2018-12-06T15:22:38.103+01:00",
        "note": null,
        "note_interpolated": null,
        "todo_count": 0,
        "todo_due_date": null,
        "currency": "EUR",
        "currency_default": "USD",
        "currency_normalized": "EUR",
        "revenue": 0,
        "revenue_default": 0,
        "revenue_normalized": 0,
        "services_revenue": 0,
        "services_revenue_default": 0,
        "services_revenue_normalized": 0,
        "cost": 0,
        "cost_default": 0,
        "cost_normalized": 0,
        "work_cost": 0,
        "work_cost_default": 0,
        "work_cost_normalized": 0,
        "profit": 0,
        "profit_default": 0,
        "profit_normalized": 0,
        "invoiced": 0,
        "invoiced_default": 0,
        "invoiced_normalized": 0,
        "pending_invoicing": 0,
        "pending_invoicing_default": 0,
        "pending_invoicing_normalized": 0,
        "paid": 0,
        "paid_default": 0,
        "paid_normalized": 0,
        "expense": 0,
        "expense_default": 0,
        "expense_normalized": 0,
        "expense_reimbursable": 0,
        "expense_reimbursable_default": 0,
        "expense_reimbursable_normalized": 0,
        "expense_paid": 0,
        "expense_paid_default": 0,
        "expense_paid_normalized": 0,
        "budget_total": 0,
        "budget_total_default": 0,
        "budget_total_normalized": 0,
        "budget_used": 0,
        "budget_used_default": 0,
        "budget_used_normalized": 0,
        "actual_rate": 0,
        "actual_rate_default": 0,
        "actual_rate_normalized": 0
      },
      "relationships": {
        "creator": {
          "data": {
            "type": "people",
            "id": "604"
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "869"
          }
        },
        "document_type": {
          "data": null
        },
        "responsible": {
          "data": {
            "type": "people",
            "id": "606"
          }
        },
        "deal_status": {
          "data": {
            "type": "deal_statuses",
            "id": "1311"
          }
        },
        "project": {
          "data": null
        },
        "lost_reason": {
          "data": null
        },
        "contract": {
          "data": null
        }
      }
    },
    {
      "id": "868",
      "type": "companies",
      "attributes": {
        "name": "Client255",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:38.059+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "604",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user312@email.com",
        "title": null,
        "joined_at": "2018-12-06T15:22:38.000+01:00",
        "last_seen_at": "2018-12-06T15:22:38.120+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "867"
          }
        }
      }
    },
    {
      "id": "869",
      "type": "companies",
      "attributes": {
        "name": "Client256",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:38.073+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "606",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user314@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-12-06T15:22:38.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "870"
          }
        }
      }
    },
    {
      "id": "1311",
      "type": "deal_statuses",
      "attributes": {
        "name": "prospective",
        "position": 6,
        "deleted_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 248
          }
        }
      }
    },
    {
      "id": "867",
      "type": "companies",
      "attributes": {
        "name": "Organization185",
        "default_currency": "USD",
        "created_at": "2018-12-06T15:22:37.989+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "870",
      "type": "companies",
      "attributes": {
        "name": "Client257",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:38.081+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ]
}

PATCH  /api/v2/emails/9/attach

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "emails",
    "relationships": {
      "deal": {
        "data": {
          "type": "deals",
          "id": ""
        }
      }
    }
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/deal"
      }
    }
  ]
}

Attachs a email
PATCH/api/v2/emails/{id}/attach

URI Parameters
HideShow
id
number (required) Example: 1

email id


PATCH /api/v2/emails/1/dismiss
Requestsdismisses email

PATCH  /api/v2/emails/12/dismiss

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "12",
    "type": "emails",
    "attributes": {
      "subject": null,
      "body": "Email text body",
      "auto_linked": false,
      "linked_type": null,
      "linked_id": null,
      "dismissed_at": "2018-12-06T15:22:38.759+01:00",
      "created_at": "2018-12-06T15:22:38.750+01:00"
    },
    "relationships": {
      "creator": {
        "data": {
          "type": "people",
          "id": "615"
        }
      },
      "deal": {
        "data": null
      },
      "invoice": {
        "data": null
      },
      "recipients": {
        "data": []
      },
      "cc_recipients": {
        "data": []
      },
      "attachments": {
        "data": []
      }
    }
  },
  "included": [
    {
      "id": "615",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user323@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-12-06T15:22:38.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "880"
          }
        }
      }
    },
    {
      "id": "880",
      "type": "companies",
      "attributes": {
        "name": "Client263",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:38.741+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ]
}

Dismisses a email
PATCH/api/v2/emails/{id}/dismiss

URI Parameters
HideShow
id
number (required) Example: 1

email id


DELETE /api/v2/emails/1
Requestsdeletes email

DELETE  /api/v2/emails/15

Headers
Content-Type: application/vnd.api+json
Responses204
This response has no content.

Deletes a email
DELETE/api/v2/emails/{id}

URI Parameters
HideShow
id
number (required) Example: 1

email id


Expenses

Expenses

Supported filter params

  • deal_id

  • service_type_id

  • company_id

  • project_id

  • date_after

  • date_before

  • pay_on_after

  • pay_on_before

  • paid_on_after

  • paid_on_before

  • status (1: paid, 2: unpaid)

GET /api/v2/expenses
Requestsreturns expenses

GET  /api/v2/expenses

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": [
    {
      "id": "5",
      "type": "expenses",
      "attributes": {
        "name": "test name",
        "date": "2018-12-06",
        "pay_on": null,
        "paid_on": null,
        "currency": "EUR",
        "currency_default": "USD",
        "currency_normalized": "EUR",
        "amount": 10000,
        "amount_default": 12500,
        "amount_normalized": 10000,
        "reimbursable_amount": 0,
        "reimbursable_amount_default": 0,
        "reimbursable_amount_normalized": 0,
        "profit": -10000,
        "profit_default": -12500,
        "profit_normalized": -10000
      },
      "relationships": {
        "deal": {
          "data": {
            "type": "deals",
            "id": "96"
          }
        },
        "service_type": {
          "data": {
            "type": "service_types",
            "id": "14"
          }
        },
        "attachment": {
          "data": null
        }
      }
    }
  ],
  "included": [
    {
      "id": "96",
      "type": "deals",
      "attributes": {
        "name": "test name",
        "date": "2018-12-06",
        "end_date": null,
        "number": 1,
        "suffix": null,
        "time_approval": true,
        "client_access": false,
        "deal_type_id": 2,
        "budget": true,
        "sales_status_id": null,
        "sales_status_updated_at": null,
        "tag_list": [],
        "origin_deal_id": null,
        "profit_margin": 0,
        "discount": null,
        "email_key": "dcf35d00e32fd050db530a590469b0f6",
        "purchase_order_number": null,
        "probability": 50,
        "budget_warning": null,
        "billable_time": 0,
        "estimated_time": 0,
        "budgeted_time": 0,
        "worked_time": 0,
        "time_to_close": null,
        "unapproved_entries_count": 0,
        "estimated_remaining_time": 0,
        "lost_comment": null,
        "closed_at": null,
        "last_activity_at": null,
        "deleted_at": null,
        "created_at": "2018-12-06T15:22:39.631+01:00",
        "note": null,
        "note_interpolated": null,
        "todo_count": 0,
        "todo_due_date": null,
        "currency": "EUR",
        "currency_default": "USD",
        "currency_normalized": "EUR",
        "revenue": 0,
        "revenue_default": 0,
        "revenue_normalized": 0,
        "services_revenue": 0,
        "services_revenue_default": 0,
        "services_revenue_normalized": 0,
        "cost": 10000,
        "cost_default": 12500,
        "cost_normalized": 10000,
        "work_cost": 0,
        "work_cost_default": 0,
        "work_cost_normalized": 0,
        "profit": -10000,
        "profit_default": -12500,
        "profit_normalized": -10000,
        "invoiced": 0,
        "invoiced_default": 0,
        "invoiced_normalized": 0,
        "pending_invoicing": 0,
        "pending_invoicing_default": 0,
        "pending_invoicing_normalized": 0,
        "paid": 0,
        "paid_default": 0,
        "paid_normalized": 0,
        "expense": 10000,
        "expense_default": 12500,
        "expense_normalized": 10000,
        "expense_reimbursable": 0,
        "expense_reimbursable_default": 0,
        "expense_reimbursable_normalized": 0,
        "expense_paid": 0,
        "expense_paid_default": 0,
        "expense_paid_normalized": 0,
        "budget_total": 0,
        "budget_total_default": 0,
        "budget_total_normalized": 0,
        "budget_used": 0,
        "budget_used_default": 0,
        "budget_used_normalized": 0,
        "actual_rate": 0,
        "actual_rate_default": 0,
        "actual_rate_normalized": 0
      },
      "relationships": {
        "creator": {
          "data": {
            "type": "people",
            "id": "626"
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "892"
          }
        },
        "document_type": {
          "data": null
        },
        "responsible": {
          "data": {
            "type": "people",
            "id": "627"
          }
        },
        "deal_status": {
          "data": null
        },
        "project": {
          "data": null
        },
        "lost_reason": {
          "data": null
        },
        "contract": {
          "data": null
        }
      }
    },
    {
      "id": "14",
      "type": "service_types",
      "attributes": {
        "name": "test name",
        "deleted_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 258
          }
        }
      }
    },
    {
      "id": "626",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user334@email.com",
        "title": null,
        "joined_at": "2018-12-06T15:22:39.000+01:00",
        "last_seen_at": "2018-12-06T15:22:39.673+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "891"
          }
        }
      }
    },
    {
      "id": "892",
      "type": "companies",
      "attributes": {
        "name": "Client269",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:39.607+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "627",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user335@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-12-06T15:22:39.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "893"
          }
        }
      }
    },
    {
      "id": "891",
      "type": "companies",
      "attributes": {
        "name": "Organization195",
        "default_currency": "USD",
        "created_at": "2018-12-06T15:22:39.537+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "893",
      "type": "companies",
      "attributes": {
        "name": "Client270",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:39.615+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ],
  "links": {
    "first": "http://test.host/api/v2/expenses?page%5Bnumber%5D=1&page%5Bsize%5D=30",
    "last": "http://test.host/api/v2/expenses?page%5Bnumber%5D=1&page%5Bsize%5D=30"
  },
  "meta": {
    "current_page": 1,
    "total_pages": 1,
    "total_count": 1,
    "page_size": 30,
    "max_page_size": 200
  }
}

Get expenses
GET/api/v2/expenses


GET /api/v2/expenses/1
Requestsreturns expense

GET  /api/v2/expenses/6

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "6",
    "type": "expenses",
    "attributes": {
      "name": "test name",
      "date": "2018-12-06",
      "pay_on": null,
      "paid_on": null,
      "currency": "EUR",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "amount": 10000,
      "amount_default": 12500,
      "amount_normalized": 10000,
      "reimbursable_amount": 0,
      "reimbursable_amount_default": 0,
      "reimbursable_amount_normalized": 0,
      "profit": -10000,
      "profit_default": -12500,
      "profit_normalized": -10000
    },
    "relationships": {
      "deal": {
        "data": {
          "type": "deals",
          "id": "97"
        }
      },
      "service_type": {
        "data": {
          "type": "service_types",
          "id": "15"
        }
      },
      "attachment": {
        "data": null
      }
    }
  },
  "included": [
    {
      "id": "97",
      "type": "deals",
      "attributes": {
        "name": "test name",
        "date": "2018-12-06",
        "end_date": null,
        "number": 1,
        "suffix": null,
        "time_approval": true,
        "client_access": false,
        "deal_type_id": 2,
        "budget": true,
        "sales_status_id": null,
        "sales_status_updated_at": null,
        "tag_list": [],
        "origin_deal_id": null,
        "profit_margin": 0,
        "discount": null,
        "email_key": "bd5026b7c90f20e433fb2d3ea5796d67",
        "purchase_order_number": null,
        "probability": 50,
        "budget_warning": null,
        "billable_time": 0,
        "estimated_time": 0,
        "budgeted_time": 0,
        "worked_time": 0,
        "time_to_close": null,
        "unapproved_entries_count": 0,
        "estimated_remaining_time": 0,
        "lost_comment": null,
        "closed_at": null,
        "last_activity_at": null,
        "deleted_at": null,
        "created_at": "2018-12-06T15:22:39.877+01:00",
        "note": null,
        "note_interpolated": null,
        "todo_count": 0,
        "todo_due_date": null,
        "currency": "EUR",
        "currency_default": "USD",
        "currency_normalized": "EUR",
        "revenue": 0,
        "revenue_default": 0,
        "revenue_normalized": 0,
        "services_revenue": 0,
        "services_revenue_default": 0,
        "services_revenue_normalized": 0,
        "cost": 10000,
        "cost_default": 12500,
        "cost_normalized": 10000,
        "work_cost": 0,
        "work_cost_default": 0,
        "work_cost_normalized": 0,
        "profit": -10000,
        "profit_default": -12500,
        "profit_normalized": -10000,
        "invoiced": 0,
        "invoiced_default": 0,
        "invoiced_normalized": 0,
        "pending_invoicing": 0,
        "pending_invoicing_default": 0,
        "pending_invoicing_normalized": 0,
        "paid": 0,
        "paid_default": 0,
        "paid_normalized": 0,
        "expense": 10000,
        "expense_default": 12500,
        "expense_normalized": 10000,
        "expense_reimbursable": 0,
        "expense_reimbursable_default": 0,
        "expense_reimbursable_normalized": 0,
        "expense_paid": 0,
        "expense_paid_default": 0,
        "expense_paid_normalized": 0,
        "budget_total": 0,
        "budget_total_default": 0,
        "budget_total_normalized": 0,
        "budget_used": 0,
        "budget_used_default": 0,
        "budget_used_normalized": 0,
        "actual_rate": 0,
        "actual_rate_default": 0,
        "actual_rate_normalized": 0
      },
      "relationships": {
        "creator": {
          "data": {
            "type": "people",
            "id": "628"
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "895"
          }
        },
        "document_type": {
          "data": null
        },
        "responsible": {
          "data": {
            "type": "people",
            "id": "629"
          }
        },
        "deal_status": {
          "data": null
        },
        "project": {
          "data": null
        },
        "lost_reason": {
          "data": null
        },
        "contract": {
          "data": null
        }
      }
    },
    {
      "id": "15",
      "type": "service_types",
      "attributes": {
        "name": "test name",
        "deleted_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 259
          }
        }
      }
    },
    {
      "id": "628",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user336@email.com",
        "title": null,
        "joined_at": "2018-12-06T15:22:39.000+01:00",
        "last_seen_at": "2018-12-06T15:22:39.919+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "894"
          }
        }
      }
    },
    {
      "id": "895",
      "type": "companies",
      "attributes": {
        "name": "Client271",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:39.852+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "629",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user337@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-12-06T15:22:39.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "896"
          }
        }
      }
    },
    {
      "id": "894",
      "type": "companies",
      "attributes": {
        "name": "Organization196",
        "default_currency": "USD",
        "created_at": "2018-12-06T15:22:39.784+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "896",
      "type": "companies",
      "attributes": {
        "name": "Client272",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:39.860+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ]
}

Gets a expense
GET/api/v2/expenses/{id}

URI Parameters
HideShow
id
number (required) Example: 1

expense id


POST /api/v2/expenses
Requestscreates expensereturns error

POST  /api/v2/expenses

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "expenses",
    "attributes": {
      "name": "test name",
      "amount": "10000",
      "currency": "USD",
      "date": "Dec  6, 2018"
    },
    "relationships": {
      "deal": {
        "data": {
          "type": "deals",
          "id": "98"
        }
      },
      "service_type": {
        "data": {
          "type": "service-type",
          "id": "16"
        }
      }
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "8",
    "type": "expenses",
    "attributes": {
      "name": "test name",
      "date": "2018-12-06",
      "pay_on": null,
      "paid_on": null,
      "currency": "USD",
      "currency_default": "USD",
      "currency_normalized": "EUR",
      "amount": 10000,
      "amount_default": 10000,
      "amount_normalized": 8000,
      "reimbursable_amount": 0,
      "reimbursable_amount_default": 0,
      "reimbursable_amount_normalized": 0,
      "profit": -8000,
      "profit_default": -10000,
      "profit_normalized": -8000
    },
    "relationships": {
      "deal": {
        "data": {
          "type": "deals",
          "id": "98"
        }
      },
      "service_type": {
        "data": {
          "type": "service_types",
          "id": "16"
        }
      },
      "attachment": {
        "data": null
      }
    }
  },
  "included": [
    {
      "id": "98",
      "type": "deals",
      "attributes": {
        "name": "test name",
        "date": "2018-12-06",
        "end_date": null,
        "number": 1,
        "suffix": null,
        "time_approval": true,
        "client_access": false,
        "deal_type_id": 2,
        "budget": true,
        "sales_status_id": null,
        "sales_status_updated_at": null,
        "tag_list": [],
        "origin_deal_id": null,
        "profit_margin": 0,
        "discount": null,
        "email_key": "fa3bae420d7d6eee026dd1b7d24ed0cc",
        "purchase_order_number": null,
        "probability": 50,
        "budget_warning": null,
        "billable_time": 0,
        "estimated_time": 0,
        "budgeted_time": 0,
        "worked_time": 0,
        "time_to_close": null,
        "unapproved_entries_count": 0,
        "estimated_remaining_time": 0,
        "lost_comment": null,
        "closed_at": null,
        "last_activity_at": null,
        "deleted_at": null,
        "created_at": "2018-12-06T15:22:40.118+01:00",
        "note": null,
        "note_interpolated": null,
        "todo_count": 0,
        "todo_due_date": null,
        "currency": "EUR",
        "currency_default": "USD",
        "currency_normalized": "EUR",
        "revenue": 0,
        "revenue_default": 0,
        "revenue_normalized": 0,
        "services_revenue": 0,
        "services_revenue_default": 0,
        "services_revenue_normalized": 0,
        "cost": 18000,
        "cost_default": 22500,
        "cost_normalized": 18000,
        "work_cost": 0,
        "work_cost_default": 0,
        "work_cost_normalized": 0,
        "profit": -18000,
        "profit_default": -22500,
        "profit_normalized": -18000,
        "invoiced": 0,
        "invoiced_default": 0,
        "invoiced_normalized": 0,
        "pending_invoicing": 0,
        "pending_invoicing_default": 0,
        "pending_invoicing_normalized": 0,
        "paid": 0,
        "paid_default": 0,
        "paid_normalized": 0,
        "expense": 18000,
        "expense_default": 22500,
        "expense_normalized": 18000,
        "expense_reimbursable": 0,
        "expense_reimbursable_default": 0,
        "expense_reimbursable_normalized": 0,
        "expense_paid": 0,
        "expense_paid_default": 0,
        "expense_paid_normalized": 0,
        "budget_total": 0,
        "budget_total_default": 0,
        "budget_total_normalized": 0,
        "budget_used": 0,
        "budget_used_default": 0,
        "budget_used_normalized": 0,
        "actual_rate": 0,
        "actual_rate_default": 0,
        "actual_rate_normalized": 0
      },
      "relationships": {
        "creator": {
          "data": {
            "type": "people",
            "id": "630"
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "898"
          }
        },
        "document_type": {
          "data": null
        },
        "responsible": {
          "data": {
            "type": "people",
            "id": "631"
          }
        },
        "deal_status": {
          "data": null
        },
        "project": {
          "data": null
        },
        "lost_reason": {
          "data": null
        },
        "contract": {
          "data": null
        }
      }
    },
    {
      "id": "16",
      "type": "service_types",
      "attributes": {
        "name": "test name",
        "deleted_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 260
          }
        }
      }
    },
    {
      "id": "630",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user338@email.com",
        "title": null,
        "joined_at": "2018-12-06T15:22:40.000+01:00",
        "last_seen_at": "2018-12-06T15:22:40.161+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null,
        "virtual": false
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "897"
          }
        }
      }
    },
    {
      "id": "898",
      "type": "companies",
      "attributes": {
        "name": "Client273",
        "default_currency": null,
        "created_at": "2018-12-06T15:22:40.093+01:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "631",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname"