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

  • company_id

  • person_id

  • creator_id

  • pinned

  • root_type

  • after

  • before

GET /api/v2/activities
Requestsreturns activities

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

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": [
    {
      "id": "19",
      "type": "activities",
      "attributes": {
        "event": "create",
        "changes": "",
        "item_id": 242,
        "item_type": "task",
        "item_name": "#1: Ticket title",
        "item_deleted_at": null,
        "parent_id": 823,
        "parent_type": "project",
        "parent_name": "test project",
        "parent_deleted_at": null,
        "root_id": 823,
        "root_type": "project",
        "root_name": "test project",
        "root_deleted_at": null,
        "deal_is_budget": false,
        "created_at": "2018-03-20T13:47:02.127+01:00"
      },
      "relationships": {
        "creator": {
          "data": {
            "type": "people",
            "id": "3548"
          }
        },
        "comment": {
          "data": null
        },
        "email": {
          "data": null
        }
      }
    }
  ],
  "included": [
    {
      "id": "3548",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user92@email.com",
        "title": null,
        "joined_at": "2018-03-20T13:47:02.000+01:00",
        "last_seen_at": "2018-03-20T13:47:02.177+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "4915"
          }
        }
      }
    },
    {
      "id": "4915",
      "type": "companies",
      "attributes": {
        "name": "Organization64",
        "default_currency": "USD",
        "created_at": "2018-03-20T13:47:00.391+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ],
  "links": {
    "first": "http://test.host/api/v2/activities?filter%5Btask_id%5D=242&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/24

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "24",
    "type": "activities",
    "attributes": {
      "event": "create",
      "changes": "",
      "item_id": 247,
      "item_type": "task",
      "item_name": "#1: Ticket title",
      "item_deleted_at": null,
      "parent_id": 838,
      "parent_type": "project",
      "parent_name": "test project",
      "parent_deleted_at": null,
      "root_id": 838,
      "root_type": "project",
      "root_name": "test project",
      "root_deleted_at": null,
      "deal_is_budget": false,
      "created_at": "2018-03-20T13:47:08.045+01:00"
    },
    "relationships": {
      "creator": {
        "data": {
          "type": "people",
          "id": "3578"
        }
      },
      "comment": {
        "data": null
      },
      "email": {
        "data": null
      }
    }
  },
  "included": [
    {
      "id": "3578",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user122@email.com",
        "title": null,
        "joined_at": "2018-03-20T13:47:08.000+01:00",
        "last_seen_at": "2018-03-20T13:47:08.058+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "4960"
          }
        }
      }
    },
    {
      "id": "4960",
      "type": "companies",
      "attributes": {
        "name": "Organization67",
        "default_currency": "USD",
        "created_at": "2018-03-20T13:47:07.141+01:00",
        "archived_at": null,
        "avatar_url": null,
        "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

GET /api/v2/attachments/1
Requestsreturns attachment

GET  /api/v2/attachments/25

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "25",
    "type": "attachments",
    "attributes": {
      "name": "img.png",
      "type": "image/png",
      "size": 3479,
      "url": "/system/attachments/files/000/000/025/original/img.png?1521550028",
      "thumb": "/system/attachments/files/000/000/025/thumb/img.png?1521550028",
      "temp_url": null,
      "processed": false,
      "attachable_type": "comment",
      "aws_policy": {
        "key": "uploads/33d36b1f1384b228dff984dea0617eec/img.png",
        "AWSAccessKeyId": "AKIAIFEOTRNFHR6QRCQQ",
        "acl": "public-read",
        "success_action_status": "201",
        "policy": "eyJleHBpcmF0aW9uIjoiMjAxOC0wMy0yMFQyMjo0NzowOFoiLCJjb25kaXRpb25zIjpbeyJidWNrZXQiOiJpbmZpbnVtLnByb2R1Y3RpdmUuZGV2ZWxvcG1lbnQifSx7ImFjbCI6InB1YmxpYy1yZWFkIn0seyJzdWNjZXNzX2FjdGlvbl9zdGF0dXMiOiIyMDEifSxbInN0YXJ0cy13aXRoIiwiJGtleSIsInVwbG9hZHMvIl0sWyJzdGFydHMtd2l0aCIsIiRDb250ZW50LVR5cGUiLCIiXV19",
        "signature": "nPMlXA4OCCqNB12PHXheKQm6+WE=",
        "Content-Type": "image/png"
      }
    },
    "relationships": {
      "creator": {
        "data": {
          "type": "people",
          "id": "3584"
        }
      }
    }
  },
  "included": [
    {
      "id": "3584",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user128@email.com",
        "title": null,
        "joined_at": "2018-03-20T13:47:08.000+01:00",
        "last_seen_at": "2018-03-20T13:47:08.523+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "4969"
          }
        }
      }
    },
    {
      "id": "4969",
      "type": "companies",
      "attributes": {
        "name": "Organization68",
        "default_currency": "USD",
        "created_at": "2018-03-20T13:47:08.177+01:00",
        "archived_at": null,
        "avatar_url": null,
        "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": "61",
      "attachable_type": "comment"
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "27",
    "type": "attachments",
    "attributes": {
      "name": "img.png",
      "type": null,
      "size": null,
      "url": "/system/attachments/files/000/000/027/original/img.png",
      "thumb": null,
      "temp_url": null,
      "processed": false,
      "attachable_type": "comment",
      "aws_policy": {
        "key": "uploads/87d492d39a8b2b93c23c8ce388a540e9/img.png",
        "AWSAccessKeyId": "AKIAIFEOTRNFHR6QRCQQ",
        "acl": "public-read",
        "success_action_status": "201",
        "policy": "eyJleHBpcmF0aW9uIjoiMjAxOC0wMy0yMFQyMjo0NzowOFoiLCJjb25kaXRpb25zIjpbeyJidWNrZXQiOiJpbmZpbnVtLnByb2R1Y3RpdmUuZGV2ZWxvcG1lbnQifSx7ImFjbCI6InB1YmxpYy1yZWFkIn0seyJzdWNjZXNzX2FjdGlvbl9zdGF0dXMiOiIyMDEifSxbInN0YXJ0cy13aXRoIiwiJGtleSIsInVwbG9hZHMvIl0sWyJzdGFydHMtd2l0aCIsIiRDb250ZW50LVR5cGUiLCIiXV19",
        "signature": "nPMlXA4OCCqNB12PHXheKQm6+WE=",
        "Content-Type": null
      }
    },
    "relationships": {
      "creator": {
        "data": {
          "type": "people",
          "id": "3585"
        }
      }
    }
  },
  "included": [
    {
      "id": "3585",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user129@email.com",
        "title": null,
        "joined_at": "2018-03-20T13:47:08.000+01:00",
        "last_seen_at": "2018-03-20T13:47:08.905+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "4971"
          }
        }
      }
    },
    {
      "id": "4971",
      "type": "companies",
      "attributes": {
        "name": "Organization69",
        "default_currency": "USD",
        "created_at": "2018-03-20T13:47:08.643+01:00",
        "archived_at": null,
        "avatar_url": null,
        "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


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

PATCH  /api/v2/attachments/29

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": "29",
    "type": "attachments",
    "attributes": {
      "name": "img.png",
      "type": "image/png",
      "size": 3479,
      "url": "/system/attachments/files/000/000/029/original/img.png?1521550029",
      "thumb": "/system/attachments/files/000/000/029/thumb/img.png?1521550029",
      "temp_url": "https://s3.amazonaws.com/infinum.productive.test/uploads/1418301662608/dummyfile.pdf",
      "processed": false,
      "attachable_type": "comment",
      "aws_policy": {
        "key": "uploads/e5a2b06977e3059fc39cd38c179bc0c8/img.png",
        "AWSAccessKeyId": "AKIAIFEOTRNFHR6QRCQQ",
        "acl": "public-read",
        "success_action_status": "201",
        "policy": "eyJleHBpcmF0aW9uIjoiMjAxOC0wMy0yMFQyMjo0NzowOVoiLCJjb25kaXRpb25zIjpbeyJidWNrZXQiOiJpbmZpbnVtLnByb2R1Y3RpdmUuZGV2ZWxvcG1lbnQifSx7ImFjbCI6InB1YmxpYy1yZWFkIn0seyJzdWNjZXNzX2FjdGlvbl9zdGF0dXMiOiIyMDEifSxbInN0YXJ0cy13aXRoIiwiJGtleSIsInVwbG9hZHMvIl0sWyJzdGFydHMtd2l0aCIsIiRDb250ZW50LVR5cGUiLCIiXV19",
        "signature": "RNdMoE/E6yRk7Ndx1bpG1aKX9FY=",
        "Content-Type": "image/png"
      }
    },
    "relationships": {
      "creator": {
        "data": {
          "type": "people",
          "id": "3587"
        }
      }
    }
  },
  "included": [
    {
      "id": "3587",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user131@email.com",
        "title": null,
        "joined_at": "2018-03-20T13:47:09.000+01:00",
        "last_seen_at": "2018-03-20T13:47:09.773+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "4975"
          }
        }
      }
    },
    {
      "id": "4975",
      "type": "companies",
      "attributes": {
        "name": "Organization71",
        "default_currency": "USD",
        "created_at": "2018-03-20T13:47:09.506+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ]
}

PATCH  /api/v2/attachments/30

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/31

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


Billability Reports

Billability Reports

Supported filter params

  • person_id

  • service_type_id

  • tags

  • after

  • before

GET /api/v2/billability_reports
Requestsreturns billability reports

GET  /api/v2/billability_reports?filter[person_id]=3591

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": [
    {
      "id": "billability-report-person-3591",
      "type": "billability_reports",
      "attributes": {
        "group": "person",
        "internal_time": 0,
        "client_time": 480
      },
      "relationships": {
        "person": {
          "data": {
            "type": "people",
            "id": "3591"
          }
        },
        "service_type": {
          "data": null
        }
      }
    }
  ],
  "included": [
    {
      "id": "3591",
      "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-03-20T13:47:10.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "4982"
          }
        }
      }
    },
    {
      "id": "4982",
      "type": "companies",
      "attributes": {
        "name": "Client99",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:10.910+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ],
  "links": {
    "first": "http://test.host/api/v2/billability_reports?filter%5Bperson_id%5D=3591&page%5Bnumber%5D=1&page%5Bsize%5D=30",
    "last": "http://test.host/api/v2/billability_reports?filter%5Bperson_id%5D=3591&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 billability reports
GET/api/v2/billability_reports


Boards

Boards

Supported filter params

  • project_id
GET /api/v2/boards
Requestsreturns boards

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

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": [
    {
      "id": "287",
      "type": "boards",
      "attributes": {
        "name": "board name",
        "position": 1,
        "archived_at": null
      },
      "relationships": {
        "project": {
          "data": {
            "type": "projects",
            "id": "841"
          }
        }
      }
    }
  ],
  "included": [
    {
      "id": "841",
      "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,
        "ongoing_contract_count": 0,
        "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": "4987"
          }
        },
        "project_manager": {
          "data": {
            "type": "people",
            "id": "3594"
          }
        },
        "last_actor": {
          "data": null
        }
      }
    },
    {
      "id": "4987",
      "type": "companies",
      "attributes": {
        "name": "Client103",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:11.660+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "3594",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user138@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-03-20T13:47:11.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "4986"
          }
        }
      }
    },
    {
      "id": "4986",
      "type": "companies",
      "attributes": {
        "name": "Client102",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:11.646+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ],
  "links": {
    "first": "http://test.host/api/v2/boards?filter%5Bproject_id%5D=841&page%5Bnumber%5D=1&page%5Bsize%5D=30",
    "last": "http://test.host/api/v2/boards?filter%5Bproject_id%5D=841&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/288

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "288",
    "type": "boards",
    "attributes": {
      "name": "board name",
      "position": 1,
      "archived_at": null
    },
    "relationships": {
      "project": {
        "data": {
          "type": "projects",
          "id": "842"
        }
      }
    }
  },
  "included": [
    {
      "id": "842",
      "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,
        "ongoing_contract_count": 0,
        "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": "4990"
          }
        },
        "project_manager": {
          "data": {
            "type": "people",
            "id": "3596"
          }
        },
        "last_actor": {
          "data": null
        }
      }
    },
    {
      "id": "4990",
      "type": "companies",
      "attributes": {
        "name": "Client105",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:12.205+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "3596",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user140@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-03-20T13:47:12.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "4989"
          }
        }
      }
    },
    {
      "id": "4989",
      "type": "companies",
      "attributes": {
        "name": "Client104",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:12.188+01:00",
        "archived_at": null,
        "avatar_url": null,
        "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": "843"
        }
      }
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "290",
    "type": "boards",
    "attributes": {
      "name": "test name",
      "position": 2,
      "archived_at": null
    },
    "relationships": {
      "project": {
        "data": {
          "type": "projects",
          "id": "843"
        }
      }
    }
  },
  "included": [
    {
      "id": "843",
      "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,
        "ongoing_contract_count": 0,
        "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": "4993"
          }
        },
        "project_manager": {
          "data": {
            "type": "people",
            "id": "3598"
          }
        },
        "last_actor": {
          "data": null
        }
      }
    },
    {
      "id": "4993",
      "type": "companies",
      "attributes": {
        "name": "Client107",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:12.785+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "3598",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user142@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-03-20T13:47:12.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "4992"
          }
        }
      }
    },
    {
      "id": "4992",
      "type": "companies",
      "attributes": {
        "name": "Client106",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:12.770+01:00",
        "archived_at": null,
        "avatar_url": null,
        "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


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

PATCH  /api/v2/boards/293

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": "293",
    "type": "boards",
    "attributes": {
      "name": "new name",
      "position": 1,
      "archived_at": null
    },
    "relationships": {
      "project": {
        "data": {
          "type": "projects",
          "id": "846"
        }
      }
    }
  },
  "included": [
    {
      "id": "846",
      "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,
        "ongoing_contract_count": 0,
        "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": "5002"
          }
        },
        "project_manager": {
          "data": {
            "type": "people",
            "id": "3604"
          }
        },
        "last_actor": {
          "data": null
        }
      }
    },
    {
      "id": "5002",
      "type": "companies",
      "attributes": {
        "name": "Client113",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:14.182+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "3604",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user148@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-03-20T13:47:14.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5001"
          }
        }
      }
    },
    {
      "id": "5001",
      "type": "companies",
      "attributes": {
        "name": "Client112",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:14.168+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ]
}

PATCH  /api/v2/boards/294

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/296/archive

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "296",
    "type": "boards",
    "attributes": {
      "name": "board name",
      "position": null,
      "archived_at": "2018-03-20T12:47:15.822Z"
    },
    "relationships": {
      "project": {
        "data": {
          "type": "projects",
          "id": "849"
        }
      }
    }
  },
  "included": [
    {
      "id": "849",
      "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,
        "ongoing_contract_count": 0,
        "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": "5011"
          }
        },
        "project_manager": {
          "data": {
            "type": "people",
            "id": "3610"
          }
        },
        "last_actor": {
          "data": null
        }
      }
    },
    {
      "id": "5011",
      "type": "companies",
      "attributes": {
        "name": "Client119",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:15.600+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "3610",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user154@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-03-20T13:47:15.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5010"
          }
        }
      }
    },
    {
      "id": "5010",
      "type": "companies",
      "attributes": {
        "name": "Client118",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:15.587+01:00",
        "archived_at": null,
        "avatar_url": null,
        "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/297/restore

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "297",
    "type": "boards",
    "attributes": {
      "name": "Board11",
      "position": 2,
      "archived_at": null
    },
    "relationships": {
      "project": {
        "data": {
          "type": "projects",
          "id": "850"
        }
      }
    }
  },
  "included": [
    {
      "id": "850",
      "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,
        "ongoing_contract_count": 0,
        "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": "5014"
          }
        },
        "project_manager": {
          "data": {
            "type": "people",
            "id": "3612"
          }
        },
        "last_actor": {
          "data": null
        }
      }
    },
    {
      "id": "5014",
      "type": "companies",
      "attributes": {
        "name": "Client121",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:16.165+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "3612",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user156@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-03-20T13:47:16.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5013"
          }
        }
      }
    },
    {
      "id": "5013",
      "type": "companies",
      "attributes": {
        "name": "Client120",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:16.144+01:00",
        "archived_at": null,
        "avatar_url": null,
        "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
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": "34",
      "type": "bookings",
      "attributes": {
        "hours": 6,
        "time": 360,
        "started_on": "2018-03-20",
        "ended_on": "2018-03-20",
        "note": null,
        "total_hours": 0,
        "total_time": 0,
        "created_at": "2018-03-20T13:47:16.774+01:00",
        "updated_at": "2018-03-20T13:47:16.774+01:00"
      },
      "relationships": {
        "service": {
          "data": null
        },
        "event": {
          "data": {
            "type": "events",
            "id": "28"
          }
        },
        "person": {
          "data": {
            "type": "people",
            "id": "3614"
          }
        },
        "creator": {
          "data": {
            "type": "people",
            "id": "3613"
          }
        },
        "updater": {
          "data": {
            "type": "people",
            "id": "3613"
          }
        }
      }
    }
  ],
  "included": [
    {
      "id": "28",
      "type": "events",
      "attributes": {
        "name": "test name",
        "event_type_id": 2,
        "deleted_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 1522
          }
        }
      }
    },
    {
      "id": "3614",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user158@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-03-20T13:47:16.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5016"
          }
        }
      }
    },
    {
      "id": "3613",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user157@email.com",
        "title": null,
        "joined_at": "2018-03-20T13:47:16.000+01:00",
        "last_seen_at": "2018-03-20T13:47:16.796+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5015"
          }
        }
      }
    },
    {
      "id": "5016",
      "type": "companies",
      "attributes": {
        "name": "Client122",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:16.732+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "5015",
      "type": "companies",
      "attributes": {
        "name": "Organization85",
        "default_currency": "USD",
        "created_at": "2018-03-20T13:47:16.552+01:00",
        "archived_at": null,
        "avatar_url": null,
        "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/35

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "35",
    "type": "bookings",
    "attributes": {
      "hours": 6,
      "time": 360,
      "started_on": "2018-03-20",
      "ended_on": "2018-03-20",
      "note": null,
      "total_hours": 0,
      "total_time": 0,
      "created_at": "2018-03-20T13:47:17.072+01:00",
      "updated_at": "2018-03-20T13:47:17.072+01:00"
    },
    "relationships": {
      "service": {
        "data": null
      },
      "event": {
        "data": {
          "type": "events",
          "id": "29"
        }
      },
      "person": {
        "data": {
          "type": "people",
          "id": "3616"
        }
      },
      "creator": {
        "data": {
          "type": "people",
          "id": "3615"
        }
      },
      "updater": {
        "data": {
          "type": "people",
          "id": "3615"
        }
      }
    }
  },
  "included": [
    {
      "id": "29",
      "type": "events",
      "attributes": {
        "name": "test name",
        "event_type_id": 2,
        "deleted_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 1523
          }
        }
      }
    },
    {
      "id": "3616",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user160@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-03-20T13:47:17.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5018"
          }
        }
      }
    },
    {
      "id": "3615",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user159@email.com",
        "title": null,
        "joined_at": "2018-03-20T13:47:17.000+01:00",
        "last_seen_at": "2018-03-20T13:47:17.085+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5017"
          }
        }
      }
    },
    {
      "id": "5018",
      "type": "companies",
      "attributes": {
        "name": "Client123",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:17.052+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "5017",
      "type": "companies",
      "attributes": {
        "name": "Organization86",
        "default_currency": "USD",
        "created_at": "2018-03-20T13:47:16.926+01:00",
        "archived_at": null,
        "avatar_url": null,
        "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 bookingcreates the bookingreturns error

POST  /api/v2/bookings

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "bookings",
    "attributes": {
      "started_on": "Mar 20, 2018",
      "ended_on": "Mar 20, 2018",
      "hours": "6"
    },
    "relationships": {
      "event": {
        "data": {
          "type": "events",
          "id": "30"
        }
      },
      "person": {
        "data": {
          "type": "people",
          "id": "3618"
        }
      }
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "37",
    "type": "bookings",
    "attributes": {
      "hours": 6,
      "time": 360,
      "started_on": "2018-03-20",
      "ended_on": "2018-03-20",
      "note": null,
      "total_hours": 0,
      "total_time": 0,
      "created_at": "2018-03-20T13:47:17.462+01:00",
      "updated_at": "2018-03-20T13:47:17.462+01:00"
    },
    "relationships": {
      "service": {
        "data": null
      },
      "event": {
        "data": {
          "type": "events",
          "id": "30"
        }
      },
      "person": {
        "data": {
          "type": "people",
          "id": "3618"
        }
      },
      "creator": {
        "data": {
          "type": "people",
          "id": "3617"
        }
      },
      "updater": {
        "data": {
          "type": "people",
          "id": "3617"
        }
      }
    }
  },
  "included": [
    {
      "id": "30",
      "type": "events",
      "attributes": {
        "name": "test name",
        "event_type_id": 2,
        "deleted_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 1524
          }
        }
      }
    },
    {
      "id": "3618",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user162@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-03-20T13:47:17.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5020"
          }
        }
      }
    },
    {
      "id": "3617",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user161@email.com",
        "title": null,
        "joined_at": "2018-03-20T13:47:17.000+01:00",
        "last_seen_at": "2018-03-20T13:47:17.386+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5019"
          }
        }
      }
    },
    {
      "id": "5020",
      "type": "companies",
      "attributes": {
        "name": "Client124",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:17.347+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "5019",
      "type": "companies",
      "attributes": {
        "name": "Organization87",
        "default_currency": "USD",
        "created_at": "2018-03-20T13:47:17.207+01:00",
        "archived_at": null,
        "avatar_url": null,
        "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": {
      "started_on": "Mar 20, 2018",
      "ended_on": "Mar 20, 2018",
      "time": "360"
    },
    "relationships": {
      "event": {
        "data": {
          "type": "events",
          "id": "31"
        }
      },
      "person": {
        "data": {
          "type": "people",
          "id": "3620"
        }
      }
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "39",
    "type": "bookings",
    "attributes": {
      "hours": 6,
      "time": 360,
      "started_on": "2018-03-20",
      "ended_on": "2018-03-20",
      "note": null,
      "total_hours": 0,
      "total_time": 0,
      "created_at": "2018-03-20T13:47:17.864+01:00",
      "updated_at": "2018-03-20T13:47:17.864+01:00"
    },
    "relationships": {
      "service": {
        "data": null
      },
      "event": {
        "data": {
          "type": "events",
          "id": "31"
        }
      },
      "person": {
        "data": {
          "type": "people",
          "id": "3620"
        }
      },
      "creator": {
        "data": {
          "type": "people",
          "id": "3619"
        }
      },
      "updater": {
        "data": {
          "type": "people",
          "id": "3619"
        }
      }
    }
  },
  "included": [
    {
      "id": "31",
      "type": "events",
      "attributes": {
        "name": "test name",
        "event_type_id": 2,
        "deleted_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 1525
          }
        }
      }
    },
    {
      "id": "3620",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user164@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-03-20T13:47:17.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5022"
          }
        }
      }
    },
    {
      "id": "3619",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user163@email.com",
        "title": null,
        "joined_at": "2018-03-20T13:47:17.000+01:00",
        "last_seen_at": "2018-03-20T13:47:17.808+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5021"
          }
        }
      }
    },
    {
      "id": "5022",
      "type": "companies",
      "attributes": {
        "name": "Client125",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:17.771+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "5021",
      "type": "companies",
      "attributes": {
        "name": "Organization88",
        "default_currency": "USD",
        "created_at": "2018-03-20T13:47:17.632+01:00",
        "archived_at": null,
        "avatar_url": null,
        "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": {
      "hours": ""
    }
  }
}
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/hours"
      }
    }
  ]
}

Create a booking
POST/api/v2/bookings


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

PATCH  /api/v2/bookings/41

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "bookings",
    "attributes": {
      "hours": "2"
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "41",
    "type": "bookings",
    "attributes": {
      "hours": 2,
      "time": 120,
      "started_on": "2018-03-20",
      "ended_on": "2018-03-20",
      "note": null,
      "total_hours": 0,
      "total_time": 0,
      "created_at": "2018-03-20T13:47:18.422+01:00",
      "updated_at": "2018-03-20T13:47:18.490+01:00"
    },
    "relationships": {
      "service": {
        "data": null
      },
      "event": {
        "data": {
          "type": "events",
          "id": "33"
        }
      },
      "person": {
        "data": {
          "type": "people",
          "id": "3624"
        }
      },
      "creator": {
        "data": {
          "type": "people",
          "id": "3623"
        }
      },
      "updater": {
        "data": {
          "type": "people",
          "id": "3623"
        }
      }
    }
  },
  "included": [
    {
      "id": "33",
      "type": "events",
      "attributes": {
        "name": "test name",
        "event_type_id": 2,
        "deleted_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 1527
          }
        }
      }
    },
    {
      "id": "3624",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user168@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-03-20T13:47:18.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5026"
          }
        }
      }
    },
    {
      "id": "3623",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user167@email.com",
        "title": null,
        "joined_at": "2018-03-20T13:47:18.000+01:00",
        "last_seen_at": "2018-03-20T13:47:18.439+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5025"
          }
        }
      }
    },
    {
      "id": "5026",
      "type": "companies",
      "attributes": {
        "name": "Client127",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:18.401+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "5025",
      "type": "companies",
      "attributes": {
        "name": "Organization90",
        "default_currency": "USD",
        "created_at": "2018-03-20T13:47:18.272+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ]
}

PATCH  /api/v2/bookings/42

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": "42",
    "type": "bookings",
    "attributes": {
      "hours": 2,
      "time": 120,
      "started_on": "2018-03-20",
      "ended_on": "2018-03-20",
      "note": null,
      "total_hours": 0,
      "total_time": 0,
      "created_at": "2018-03-20T13:47:18.824+01:00",
      "updated_at": "2018-03-20T13:47:18.893+01:00"
    },
    "relationships": {
      "service": {
        "data": null
      },
      "event": {
        "data": {
          "type": "events",
          "id": "34"
        }
      },
      "person": {
        "data": {
          "type": "people",
          "id": "3626"
        }
      },
      "creator": {
        "data": {
          "type": "people",
          "id": "3625"
        }
      },
      "updater": {
        "data": {
          "type": "people",
          "id": "3625"
        }
      }
    }
  },
  "included": [
    {
      "id": "34",
      "type": "events",
      "attributes": {
        "name": "test name",
        "event_type_id": 2,
        "deleted_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 1528
          }
        }
      }
    },
    {
      "id": "3626",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user170@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-03-20T13:47:18.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5028"
          }
        }
      }
    },
    {
      "id": "3625",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user169@email.com",
        "title": null,
        "joined_at": "2018-03-20T13:47:18.000+01:00",
        "last_seen_at": "2018-03-20T13:47:18.843+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5027"
          }
        }
      }
    },
    {
      "id": "5028",
      "type": "companies",
      "attributes": {
        "name": "Client128",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:18.801+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "5027",
      "type": "companies",
      "attributes": {
        "name": "Organization91",
        "default_currency": "USD",
        "created_at": "2018-03-20T13:47:18.658+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ]
}

PATCH  /api/v2/bookings/43

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "bookings",
    "attributes": {
      "started_on": null
    }
  }
}
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/started_on"
      }
    },
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "is not a date",
      "source": {
        "pointer": "data/attributes/started_on"
      }
    },
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "must be after or equal to ",
      "source": {
        "pointer": "data/attributes/ended_on"
      }
    }
  ]
}

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/44

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/66

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "66",
    "type": "comments",
    "attributes": {
      "commentable_type": "company",
      "body": "blah",
      "created_at": "2018-03-20T13:47:19.732+01:00",
      "pinned_at": null,
      "edited_at": null,
      "deleted_at": null
    },
    "relationships": {
      "creator": {
        "data": {
          "type": "people",
          "id": "3631"
        }
      },
      "pinned_by": {
        "data": null
      },
      "person": {
        "data": null
      },
      "company": {
        "data": {
          "type": "companies",
          "id": "5034"
        }
      },
      "deal": {
        "data": null
      },
      "task": {
        "data": null
      },
      "invoice": {
        "data": null
      },
      "attachments": {
        "data": []
      }
    }
  },
  "included": [
    {
      "id": "3631",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user175@email.com",
        "title": null,
        "joined_at": "2018-03-20T13:47:19.000+01:00",
        "last_seen_at": "2018-03-20T13:47:19.747+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5033"
          }
        }
      }
    },
    {
      "id": "5034",
      "type": "companies",
      "attributes": {
        "name": "Client131",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:19.727+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "5033",
      "type": "companies",
      "attributes": {
        "name": "Organization94",
        "default_currency": "USD",
        "created_at": "2018-03-20T13:47:19.612+01:00",
        "archived_at": null,
        "avatar_url": null,
        "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": "68",
    "type": "comments",
    "attributes": {
      "commentable_type": "task",
      "body": null,
      "created_at": "2018-03-20T13:47:20.037+01:00",
      "pinned_at": null,
      "edited_at": null,
      "deleted_at": null
    },
    "relationships": {
      "creator": {
        "data": {
          "type": "people",
          "id": "3632"
        }
      },
      "pinned_by": {
        "data": null
      },
      "person": {
        "data": null
      },
      "company": {
        "data": null
      },
      "deal": {
        "data": null
      },
      "task": {
        "data": null
      },
      "invoice": {
        "data": null
      },
      "attachments": {
        "data": []
      }
    }
  },
  "included": [
    {
      "id": "3632",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user176@email.com",
        "title": null,
        "joined_at": "2018-03-20T13:47:19.000+01:00",
        "last_seen_at": "2018-03-20T13:47:19.993+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5035"
          }
        }
      }
    },
    {
      "id": "5035",
      "type": "companies",
      "attributes": {
        "name": "Organization95",
        "default_currency": "USD",
        "created_at": "2018-03-20T13:47:19.860+01:00",
        "archived_at": null,
        "avatar_url": null,
        "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/70

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": "70",
    "type": "comments",
    "attributes": {
      "commentable_type": "company",
      "body": "new body",
      "created_at": "2018-03-20T13:47:20.457+01:00",
      "pinned_at": null,
      "edited_at": "2018-03-20T13:47:20.520+01:00",
      "deleted_at": null
    },
    "relationships": {
      "creator": {
        "data": {
          "type": "people",
          "id": "3634"
        }
      },
      "pinned_by": {
        "data": null
      },
      "person": {
        "data": null
      },
      "company": {
        "data": {
          "type": "companies",
          "id": "5040"
        }
      },
      "deal": {
        "data": null
      },
      "task": {
        "data": null
      },
      "invoice": {
        "data": null
      },
      "attachments": {
        "data": []
      }
    }
  },
  "included": [
    {
      "id": "3634",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user178@email.com",
        "title": null,
        "joined_at": "2018-03-20T13:47:20.000+01:00",
        "last_seen_at": "2018-03-20T13:47:20.473+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5039"
          }
        }
      }
    },
    {
      "id": "5040",
      "type": "companies",
      "attributes": {
        "name": "Client134",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:20.452+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "5039",
      "type": "companies",
      "attributes": {
        "name": "Organization97",
        "default_currency": "USD",
        "created_at": "2018-03-20T13:47:20.344+01:00",
        "archived_at": null,
        "avatar_url": null,
        "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/72/pin

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "72",
    "type": "comments",
    "attributes": {
      "commentable_type": "company",
      "body": "blah",
      "created_at": "2018-03-20T13:47:21.053+01:00",
      "pinned_at": "2018-03-20T13:47:21.073+01:00",
      "edited_at": null,
      "deleted_at": null
    },
    "relationships": {
      "creator": {
        "data": {
          "type": "people",
          "id": "3636"
        }
      },
      "pinned_by": {
        "data": {
          "type": "people",
          "id": "3636"
        }
      },
      "person": {
        "data": null
      },
      "company": {
        "data": {
          "type": "companies",
          "id": "5044"
        }
      },
      "deal": {
        "data": null
      },
      "task": {
        "data": null
      },
      "invoice": {
        "data": null
      },
      "attachments": {
        "data": []
      }
    }
  },
  "included": [
    {
      "id": "3636",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user180@email.com",
        "title": null,
        "joined_at": "2018-03-20T13:47:21.000+01:00",
        "last_seen_at": "2018-03-20T13:47:21.066+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5043"
          }
        }
      }
    },
    {
      "id": "5044",
      "type": "companies",
      "attributes": {
        "name": "Client136",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:21.048+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "5043",
      "type": "companies",
      "attributes": {
        "name": "Organization99",
        "default_currency": "USD",
        "created_at": "2018-03-20T13:47:20.936+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ]
}

PATCH  /api/v2/comments/73/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/74/unpin

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "74",
    "type": "comments",
    "attributes": {
      "commentable_type": "company",
      "body": "blah",
      "created_at": "2018-03-20T13:47:21.509+01:00",
      "pinned_at": null,
      "edited_at": null,
      "deleted_at": null
    },
    "relationships": {
      "creator": {
        "data": {
          "type": "people",
          "id": "3638"
        }
      },
      "pinned_by": {
        "data": null
      },
      "person": {
        "data": null
      },
      "company": {
        "data": {
          "type": "companies",
          "id": "5048"
        }
      },
      "deal": {
        "data": null
      },
      "task": {
        "data": null
      },
      "invoice": {
        "data": null
      },
      "attachments": {
        "data": []
      }
    }
  },
  "included": [
    {
      "id": "3638",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user182@email.com",
        "title": null,
        "joined_at": "2018-03-20T13:47:21.000+01:00",
        "last_seen_at": "2018-03-20T13:47:21.528+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5047"
          }
        }
      }
    },
    {
      "id": "5048",
      "type": "companies",
      "attributes": {
        "name": "Client138",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:21.503+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "5047",
      "type": "companies",
      "attributes": {
        "name": "Organization101",
        "default_currency": "USD",
        "created_at": "2018-03-20T13:47:21.391+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ]
}

PATCH  /api/v2/comments/75/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/76

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

  • status

  • 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": "5054",
      "type": "companies",
      "attributes": {
        "name": "Client141",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:22.185+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "5053",
      "type": "companies",
      "attributes": {
        "name": "Organization104",
        "default_currency": "USD",
        "created_at": "2018-03-20T13:47:22.076+01:00",
        "archived_at": null,
        "avatar_url": null,
        "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/5056

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "5056",
    "type": "companies",
    "attributes": {
      "name": "Client142",
      "default_currency": null,
      "created_at": "2018-03-20T13:47:22.391+01:00",
      "archived_at": null,
      "avatar_url": null,
      "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": "5059",
    "type": "companies",
    "attributes": {
      "name": "test name",
      "default_currency": null,
      "created_at": "2018-03-20T13:47:22.655+01:00",
      "archived_at": null,
      "avatar_url": null,
      "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


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

PATCH  /api/v2/companies/5063

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": "3646"
          },
          {
            "type": "people",
            "id": "3647"
          }
        ]
      }
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "5063",
    "type": "companies",
    "attributes": {
      "name": "new name",
      "default_currency": null,
      "created_at": "2018-03-20T13:47:23.036+01:00",
      "archived_at": null,
      "avatar_url": null,
      "description": null,
      "due_days": null,
      "tag_list": [
        "design",
        "IT"
      ]
    },
    "relationships": {
      "bill_to": {
        "data": null
      }
    }
  }
}

PATCH  /api/v2/companies/5067

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/5069/archive

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "5069",
    "type": "companies",
    "attributes": {
      "name": "Client149",
      "default_currency": null,
      "created_at": "2018-03-20T13:47:23.790+01:00",
      "archived_at": "2018-03-20T13:47:23.000+01:00",
      "avatar_url": null,
      "description": null,
      "due_days": null,
      "tag_list": []
    },
    "relationships": {
      "bill_to": {
        "data": null
      }
    }
  }
}

PATCH  /api/v2/companies/5071/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/5073/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/5075/restore

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "5075",
    "type": "companies",
    "attributes": {
      "name": "Client152",
      "default_currency": null,
      "created_at": "2018-03-20T13:47:24.373+01:00",
      "archived_at": null,
      "avatar_url": null,
      "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

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": "135",
      "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": "5077"
          }
        },
        "person": {
          "data": null
        },
        "invoice": {
          "data": null
        },
        "subsidiary": {
          "data": null
        }
      }
    }
  ],
  "included": [
    {
      "id": "5077",
      "type": "companies",
      "attributes": {
        "name": "Client153",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:24.576+01:00",
        "archived_at": null,
        "avatar_url": null,
        "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/136

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "136",
    "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": "5079"
        }
      },
      "person": {
        "data": null
      },
      "invoice": {
        "data": null
      },
      "subsidiary": {
        "data": null
      }
    }
  },
  "included": [
    {
      "id": "5079",
      "type": "companies",
      "attributes": {
        "name": "Client154",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:24.803+01:00",
        "archived_at": null,
        "avatar_url": null,
        "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": "5081"
        }
      }
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "138",
    "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": "5081"
        }
      },
      "person": {
        "data": null
      },
      "invoice": {
        "data": null
      },
      "subsidiary": {
        "data": null
      }
    }
  },
  "included": [
    {
      "id": "5081",
      "type": "companies",
      "attributes": {
        "name": "Client155",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:25.023+01:00",
        "archived_at": null,
        "avatar_url": null,
        "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


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

PATCH  /api/v2/contact_entries/147

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": "147",
    "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": "5094"
        }
      },
      "person": {
        "data": null
      },
      "invoice": {
        "data": null
      },
      "subsidiary": {
        "data": null
      }
    }
  },
  "included": [
    {
      "id": "5094",
      "type": "companies",
      "attributes": {
        "name": "Client162",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:27.138+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ]
}

PATCH  /api/v2/contact_entries/148

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/150

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": "37",
      "type": "contracts",
      "attributes": {
        "ends_on": null,
        "next_occurrence_on": "2017-02-01",
        "interval_id": 1
      },
      "relationships": {
        "template": {
          "data": {
            "type": "deals",
            "id": "483"
          }
        }
      }
    }
  ],
  "included": [
    {
      "id": "483",
      "type": "deals",
      "attributes": {
        "name": "test name",
        "date": "2018-03-20",
        "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,
        "probability": 50,
        "budget_warning": null,
        "billable_time": 0,
        "estimated_time": 0,
        "worked_time": 0,
        "unapproved_entries_count": 0,
        "lost_comment": null,
        "closed_at": null,
        "last_activity_at": null,
        "deleted_at": null,
        "created_at": "2018-03-20T13:47:29.045+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,
        "discounted": 0,
        "discounted_default": 0,
        "discounted_normalized": 0,
        "cost": 0,
        "cost_default": 0,
        "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_paid": 0,
        "expense_paid_default": 0,
        "expense_paid_normalized": 0
      },
      "relationships": {
        "creator": {
          "data": {
            "type": "people",
            "id": "3668"
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "5105"
          }
        },
        "document_type": {
          "data": null
        },
        "responsible": {
          "data": {
            "type": "people",
            "id": "3669"
          }
        },
        "deal_status": {
          "data": {
            "type": "deal_statuses",
            "id": "8030"
          }
        },
        "project": {
          "data": null
        },
        "lost_reason": {
          "data": null
        },
        "contract": {
          "data": null
        }
      }
    },
    {
      "id": "3668",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user212@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
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5104"
          }
        }
      }
    },
    {
      "id": "5105",
      "type": "companies",
      "attributes": {
        "name": "Client168",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:28.922+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "3669",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user213@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-03-20T13:47:29.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5106"
          }
        }
      }
    },
    {
      "id": "8030",
      "type": "deal_statuses",
      "attributes": {
        "name": "prospective",
        "position": 6
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 1564
          }
        }
      }
    },
    {
      "id": "5104",
      "type": "companies",
      "attributes": {
        "name": "Organization127",
        "default_currency": "USD",
        "created_at": "2018-03-20T13:47:28.721+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "5106",
      "type": "companies",
      "attributes": {
        "name": "Client169",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:29.008+01:00",
        "archived_at": null,
        "avatar_url": null,
        "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/38

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "38",
    "type": "contracts",
    "attributes": {
      "ends_on": null,
      "next_occurrence_on": "2017-02-01",
      "interval_id": 1
    },
    "relationships": {
      "template": {
        "data": {
          "type": "deals",
          "id": "484"
        }
      }
    }
  },
  "included": [
    {
      "id": "484",
      "type": "deals",
      "attributes": {
        "name": "test name",
        "date": "2018-03-20",
        "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,
        "probability": 50,
        "budget_warning": null,
        "billable_time": 0,
        "estimated_time": 0,
        "worked_time": 0,
        "unapproved_entries_count": 0,
        "lost_comment": null,
        "closed_at": null,
        "last_activity_at": null,
        "deleted_at": null,
        "created_at": "2018-03-20T13:47:29.563+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,
        "discounted": 0,
        "discounted_default": 0,
        "discounted_normalized": 0,
        "cost": 0,
        "cost_default": 0,
        "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_paid": 0,
        "expense_paid_default": 0,
        "expense_paid_normalized": 0
      },
      "relationships": {
        "creator": {
          "data": {
            "type": "people",
            "id": "3670"
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "5108"
          }
        },
        "document_type": {
          "data": null
        },
        "responsible": {
          "data": {
            "type": "people",
            "id": "3671"
          }
        },
        "deal_status": {
          "data": {
            "type": "deal_statuses",
            "id": "8036"
          }
        },
        "project": {
          "data": null
        },
        "lost_reason": {
          "data": null
        },
        "contract": {
          "data": null
        }
      }
    },
    {
      "id": "3670",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user214@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
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5107"
          }
        }
      }
    },
    {
      "id": "5108",
      "type": "companies",
      "attributes": {
        "name": "Client170",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:29.480+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "3671",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user215@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-03-20T13:47:29.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5109"
          }
        }
      }
    },
    {
      "id": "8036",
      "type": "deal_statuses",
      "attributes": {
        "name": "prospective",
        "position": 6
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 1565
          }
        }
      }
    },
    {
      "id": "5107",
      "type": "companies",
      "attributes": {
        "name": "Organization128",
        "default_currency": "USD",
        "created_at": "2018-03-20T13:47:29.270+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "5109",
      "type": "companies",
      "attributes": {
        "name": "Client171",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:29.501+01:00",
        "archived_at": null,
        "avatar_url": null,
        "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": "486"
        }
      }
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "40",
    "type": "contracts",
    "attributes": {
      "ends_on": null,
      "next_occurrence_on": "2017-02-01",
      "interval_id": 1
    },
    "relationships": {
      "template": {
        "data": {
          "type": "deals",
          "id": "486"
        }
      }
    }
  },
  "included": [
    {
      "id": "486",
      "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,
        "probability": 50,
        "budget_warning": null,
        "billable_time": 0,
        "estimated_time": 0,
        "worked_time": 0,
        "unapproved_entries_count": 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,
        "discounted": 0,
        "discounted_default": 0,
        "discounted_normalized": 0,
        "cost": 0,
        "cost_default": 0,
        "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_paid": 0,
        "expense_paid_default": 0,
        "expense_paid_normalized": 0
      },
      "relationships": {
        "creator": {
          "data": {
            "type": "people",
            "id": "3672"
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "5113"
          }
        },
        "document_type": {
          "data": null
        },
        "responsible": {
          "data": {
            "type": "people",
            "id": "3674"
          }
        },
        "deal_status": {
          "data": null
        },
        "project": {
          "data": null
        },
        "lost_reason": {
          "data": null
        },
        "contract": {
          "data": {
            "type": "contracts",
            "id": "40"
          }
        }
      }
    },
    {
      "id": "3672",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user216@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
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5110"
          }
        }
      }
    },
    {
      "id": "5113",
      "type": "companies",
      "attributes": {
        "name": "Client174",
        "default_currency": null,
        "created_at": "2017-01-01T15:00:00.000+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "3674",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user218@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
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5114"
          }
        }
      }
    },
    {
      "id": "5110",
      "type": "companies",
      "attributes": {
        "name": "Organization129",
        "default_currency": "USD",
        "created_at": "2018-03-20T13:47:30.027+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "5114",
      "type": "companies",
      "attributes": {
        "name": "Client175",
        "default_currency": null,
        "created_at": "2017-01-01T15:00:00.000+01:00",
        "archived_at": null,
        "avatar_url": null,
        "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/44

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": "44",
    "type": "contracts",
    "attributes": {
      "ends_on": "2017-12-31",
      "next_occurrence_on": "2017-02-01",
      "interval_id": 1
    },
    "relationships": {
      "template": {
        "data": {
          "type": "deals",
          "id": "491"
        }
      }
    }
  },
  "included": [
    {
      "id": "491",
      "type": "deals",
      "attributes": {
        "name": "test name",
        "date": "2018-03-20",
        "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,
        "probability": 50,
        "budget_warning": null,
        "billable_time": 0,
        "estimated_time": 0,
        "worked_time": 0,
        "unapproved_entries_count": 0,
        "lost_comment": null,
        "closed_at": null,
        "last_activity_at": null,
        "deleted_at": null,
        "created_at": "2018-03-20T13:47:32.432+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,
        "discounted": 0,
        "discounted_default": 0,
        "discounted_normalized": 0,
        "cost": 0,
        "cost_default": 0,
        "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_paid": 0,
        "expense_paid_default": 0,
        "expense_paid_normalized": 0
      },
      "relationships": {
        "creator": {
          "data": {
            "type": "people",
            "id": "3682"
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "5127"
          }
        },
        "document_type": {
          "data": null
        },
        "responsible": {
          "data": {
            "type": "people",
            "id": "3683"
          }
        },
        "deal_status": {
          "data": {
            "type": "deal_statuses",
            "id": "8067"
          }
        },
        "project": {
          "data": null
        },
        "lost_reason": {
          "data": null
        },
        "contract": {
          "data": null
        }
      }
    },
    {
      "id": "3682",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user226@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
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5126"
          }
        }
      }
    },
    {
      "id": "5127",
      "type": "companies",
      "attributes": {
        "name": "Client184",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:32.381+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "3683",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user227@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-03-20T13:47:32.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5128"
          }
        }
      }
    },
    {
      "id": "8067",
      "type": "deal_statuses",
      "attributes": {
        "name": "prospective",
        "position": 6
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 1570
          }
        }
      }
    },
    {
      "id": "5126",
      "type": "companies",
      "attributes": {
        "name": "Organization133",
        "default_currency": "USD",
        "created_at": "2018-03-20T13:47:32.252+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "5128",
      "type": "companies",
      "attributes": {
        "name": "Client185",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:32.395+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ]
}

PATCH  /api/v2/contracts/45

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": "37",
      "type": "dashboards",
      "attributes": {
        "name": "dashboard_name"
      },
      "relationships": {
        "person": {
          "data": {
            "type": "people",
            "id": "3693"
          }
        }
      }
    }
  ],
  "included": [
    {
      "id": "3693",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user237@email.com",
        "title": null,
        "joined_at": "2018-03-20T13:47:35.000+01:00",
        "last_seen_at": "2018-03-20T13:47:35.046+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5144"
          }
        }
      }
    },
    {
      "id": "5144",
      "type": "companies",
      "attributes": {
        "name": "Organization137",
        "default_currency": "USD",
        "created_at": "2018-03-20T13:47:34.706+01:00",
        "archived_at": null,
        "avatar_url": null,
        "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": "39",
    "type": "dashboards",
    "attributes": {
      "name": "Test Name"
    },
    "relationships": {
      "person": {
        "data": {
          "type": "people",
          "id": "3694"
        }
      }
    }
  },
  "included": [
    {
      "id": "3694",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user238@email.com",
        "title": null,
        "joined_at": "2018-03-20T13:47:35.000+01:00",
        "last_seen_at": "2018-03-20T13:47:35.423+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5146"
          }
        }
      }
    },
    {
      "id": "5146",
      "type": "companies",
      "attributes": {
        "name": "Organization139",
        "default_currency": "USD",
        "created_at": "2018-03-20T13:47:35.147+01:00",
        "archived_at": null,
        "avatar_url": null,
        "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


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

PATCH  /api/v2/dashboards/41

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": "41",
    "type": "dashboards",
    "attributes": {
      "name": "dashboard rename"
    },
    "relationships": {
      "person": {
        "data": {
          "type": "people",
          "id": "3696"
        }
      }
    }
  },
  "included": [
    {
      "id": "3696",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user240@email.com",
        "title": null,
        "joined_at": "2018-03-20T13:47:36.000+01:00",
        "last_seen_at": "2018-03-20T13:47:36.162+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5150"
          }
        }
      }
    },
    {
      "id": "5150",
      "type": "companies",
      "attributes": {
        "name": "Organization143",
        "default_currency": "USD",
        "created_at": "2018-03-20T13:47:35.888+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ]
}

PATCH  /api/v2/dashboards/42

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/43

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

Supported filter params

  • stage_id
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": "8146",
      "type": "deal_statuses",
      "attributes": {
        "name": "Lead",
        "position": 1
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 1586
          }
        }
      }
    },
    {
      "id": "8147",
      "type": "deal_statuses",
      "attributes": {
        "name": "Prospect",
        "position": 2
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 1586
          }
        }
      }
    },
    {
      "id": "8148",
      "type": "deal_statuses",
      "attributes": {
        "name": "Proposal sent",
        "position": 3
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 1586
          }
        }
      }
    },
    {
      "id": "8149",
      "type": "deal_statuses",
      "attributes": {
        "name": "Negotiation",
        "position": 4
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 1586
          }
        }
      }
    },
    {
      "id": "8150",
      "type": "deal_statuses",
      "attributes": {
        "name": "Awaiting approval",
        "position": 5
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 1586
          }
        }
      }
    },
    {
      "id": "8151",
      "type": "deal_statuses",
      "attributes": {
        "name": "test deal status",
        "position": 6
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 1586
          }
        }
      }
    }
  ],
  "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/8157

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

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": "8164",
    "type": "deal_statuses",
    "attributes": {
      "name": "test name",
      "position": 7
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": 1588
        }
      }
    }
  }
}

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


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

PATCH  /api/v2/deal_statuses/8176

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": "8176",
    "type": "deal_statuses",
    "attributes": {
      "name": "new name",
      "position": 6
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": 1590
        }
      }
    }
  }
}

PATCH  /api/v2/deal_statuses/8182

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
Requestsdeletes deal_statusreturns error

DELETE  /api/v2/deal_statuses/8188

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

DELETE  /api/v2/deal_statuses/8194

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

  • responsible_id

  • company_id

  • status_id

  • sales_status_id

  • stage_id

  • contract_id

  • recurring

  • project_id

  • tags

  • query

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": "500",
      "type": "deals",
      "attributes": {
        "name": "test name",
        "date": "2018-03-20",
        "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,
        "probability": 50,
        "budget_warning": null,
        "billable_time": 0,
        "estimated_time": 0,
        "worked_time": 0,
        "unapproved_entries_count": 0,
        "lost_comment": null,
        "closed_at": null,
        "last_activity_at": null,
        "deleted_at": null,
        "created_at": "2018-03-20T13:47:40.026+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,
        "discounted": 0,
        "discounted_default": 0,
        "discounted_normalized": 0,
        "cost": 0,
        "cost_default": 0,
        "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_paid": 0,
        "expense_paid_default": 0,
        "expense_paid_normalized": 0
      },
      "relationships": {
        "creator": {
          "data": {
            "type": "people",
            "id": "3711"
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "5171"
          }
        },
        "document_type": {
          "data": null
        },
        "responsible": {
          "data": {
            "type": "people",
            "id": "3712"
          }
        },
        "deal_status": {
          "data": {
            "type": "deal_statuses",
            "id": "8214"
          }
        },
        "project": {
          "data": null
        },
        "lost_reason": {
          "data": null
        },
        "contract": {
          "data": null
        }
      }
    }
  ],
  "included": [
    {
      "id": "3711",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user255@email.com",
        "title": null,
        "joined_at": "2018-03-20T13:47:40.000+01:00",
        "last_seen_at": "2018-03-20T13:47:40.055+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5170"
          }
        }
      }
    },
    {
      "id": "5171",
      "type": "companies",
      "attributes": {
        "name": "Client202",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:39.975+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "3712",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user256@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-03-20T13:47:39.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5172"
          }
        }
      }
    },
    {
      "id": "8214",
      "type": "deal_statuses",
      "attributes": {
        "name": "prospective",
        "position": 6
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 1596
          }
        }
      }
    },
    {
      "id": "5170",
      "type": "companies",
      "attributes": {
        "name": "Organization159",
        "default_currency": "USD",
        "created_at": "2018-03-20T13:47:39.848+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "5172",
      "type": "companies",
      "attributes": {
        "name": "Client203",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:39.990+01:00",
        "archived_at": null,
        "avatar_url": null,
        "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/501

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "501",
    "type": "deals",
    "attributes": {
      "name": "test name",
      "date": "2018-03-20",
      "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,
      "probability": 50,
      "budget_warning": null,
      "billable_time": 0,
      "estimated_time": 0,
      "worked_time": 0,
      "unapproved_entries_count": 0,
      "lost_comment": null,
      "closed_at": null,
      "last_activity_at": null,
      "deleted_at": null,
      "created_at": "2018-03-20T13:47:40.401+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,
      "discounted": 0,
      "discounted_default": 0,
      "discounted_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "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_paid": 0,
      "expense_paid_default": 0,
      "expense_paid_normalized": 0
    },
    "relationships": {
      "creator": {
        "data": {
          "type": "people",
          "id": "3713"
        }
      },
      "company": {
        "data": {
          "type": "companies",
          "id": "5174"
        }
      },
      "document_type": {
        "data": null
      },
      "responsible": {
        "data": {
          "type": "people",
          "id": "3714"
        }
      },
      "deal_status": {
        "data": {
          "type": "deal_statuses",
          "id": "8220"
        }
      },
      "project": {
        "data": null
      },
      "lost_reason": {
        "data": null
      },
      "contract": {
        "data": null
      }
    }
  },
  "included": [
    {
      "id": "3713",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user257@email.com",
        "title": null,
        "joined_at": "2018-03-20T13:47:40.000+01:00",
        "last_seen_at": "2018-03-20T13:47:40.426+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5173"
          }
        }
      }
    },
    {
      "id": "5174",
      "type": "companies",
      "attributes": {
        "name": "Client204",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:40.351+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "3714",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user258@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-03-20T13:47:40.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5175"
          }
        }
      }
    },
    {
      "id": "8220",
      "type": "deal_statuses",
      "attributes": {
        "name": "prospective",
        "position": 6
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 1597
          }
        }
      }
    },
    {
      "id": "5173",
      "type": "companies",
      "attributes": {
        "name": "Organization160",
        "default_currency": "USD",
        "created_at": "2018-03-20T13:47:40.220+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "5175",
      "type": "companies",
      "attributes": {
        "name": "Client205",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:40.368+01:00",
        "archived_at": null,
        "avatar_url": null,
        "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": "Mar 20, 2018",
      "deal_type_id": "2",
      "deal_status_id": "8226",
      "sales_status_id": "1",
      "probability": "50",
      "currency": "EUR"
    },
    "relationships": {
      "company": {
        "data": {
          "type": "companies",
          "id": "5177"
        }
      },
      "responsible": {
        "data": {
          "type": "people",
          "id": "3717"
        }
      }
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "503",
    "type": "deals",
    "attributes": {
      "name": "test name",
      "date": "2018-03-20",
      "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-03-20T13:47:40.000+01:00",
      "tag_list": [],
      "origin_deal_id": null,
      "profit_margin": 0,
      "discount": null,
      "probability": 50,
      "budget_warning": null,
      "billable_time": 0,
      "estimated_time": 0,
      "worked_time": 0,
      "unapproved_entries_count": 0,
      "lost_comment": null,
      "closed_at": null,
      "last_activity_at": null,
      "deleted_at": null,
      "created_at": "2018-03-20T13:47:40.957+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,
      "discounted": 0,
      "discounted_default": 0,
      "discounted_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "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_paid": 0,
      "expense_paid_default": 0,
      "expense_paid_normalized": 0
    },
    "relationships": {
      "creator": {
        "data": {
          "type": "people",
          "id": "3715"
        }
      },
      "company": {
        "data": {
          "type": "companies",
          "id": "5177"
        }
      },
      "document_type": {
        "data": null
      },
      "responsible": {
        "data": {
          "type": "people",
          "id": "3717"
        }
      },
      "deal_status": {
        "data": {
          "type": "deal_statuses",
          "id": "8226"
        }
      },
      "project": {
        "data": null
      },
      "lost_reason": {
        "data": null
      },
      "contract": {
        "data": null
      }
    }
  },
  "included": [
    {
      "id": "3715",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user259@email.com",
        "title": null,
        "joined_at": "2018-03-20T13:47:40.000+01:00",
        "last_seen_at": "2018-03-20T13:47:40.840+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5176"
          }
        }
      }
    },
    {
      "id": "5177",
      "type": "companies",
      "attributes": {
        "name": "Client206",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:40.735+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "3717",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user261@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 2,
        "invited_at": "2018-03-20T13:47:40.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5179"
          }
        }
      }
    },
    {
      "id": "8226",
      "type": "deal_statuses",
      "attributes": {
        "name": "prospective",
        "position": 6
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 1598
          }
        }
      }
    },
    {
      "id": "5176",
      "type": "companies",
      "attributes": {
        "name": "Organization161",
        "default_currency": "USD",
        "created_at": "2018-03-20T13:47:40.591+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "5179",
      "type": "companies",
      "attributes": {
        "name": "Client208",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:40.814+01:00",
        "archived_at": null,
        "avatar_url": null,
        "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


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

PATCH  /api/v2/deals/506

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": "3724"
        }
      },
      "subscribers": {
        "data": [
          {
            "type": "people",
            "id": "3725"
          },
          {
            "type": "people",
            "id": "3726"
          }
        ]
      }
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "506",
    "type": "deals",
    "attributes": {
      "name": "new name",
      "date": "2018-03-20",
      "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,
      "probability": 50,
      "budget_warning": null,
      "billable_time": 0,
      "estimated_time": 0,
      "worked_time": 0,
      "unapproved_entries_count": 0,
      "lost_comment": null,
      "closed_at": null,
      "last_activity_at": null,
      "deleted_at": null,
      "created_at": "2018-03-20T13:47:42.208+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,
      "discounted": 0,
      "discounted_default": 0,
      "discounted_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "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_paid": 0,
      "expense_paid_default": 0,
      "expense_paid_normalized": 0
    },
    "relationships": {
      "creator": {
        "data": {
          "type": "people",
          "id": "3722"
        }
      },
      "company": {
        "data": {
          "type": "companies",
          "id": "5187"
        }
      },
      "document_type": {
        "data": null
      },
      "responsible": {
        "data": {
          "type": "people",
          "id": "3724"
        }
      },
      "deal_status": {
        "data": {
          "type": "deal_statuses",
          "id": "8244"
        }
      },
      "project": {
        "data": null
      },
      "lost_reason": {
        "data": null
      },
      "contract": {
        "data": null
      }
    }
  },
  "included": [
    {
      "id": "3722",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user266@email.com",
        "title": null,
        "joined_at": "2018-03-20T13:47:42.000+01:00",
        "last_seen_at": "2018-03-20T13:47:42.309+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5186"
          }
        }
      }
    },
    {
      "id": "5187",
      "type": "companies",
      "attributes": {
        "name": "Client213",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:42.154+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "3724",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user268@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 2,
        "invited_at": "2018-03-20T13:47:42.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5189"
          }
        }
      }
    },
    {
      "id": "8244",
      "type": "deal_statuses",
      "attributes": {
        "name": "prospective",
        "position": 6
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 1601
          }
        }
      }
    },
    {
      "id": "5186",
      "type": "companies",
      "attributes": {
        "name": "Organization164",
        "default_currency": "USD",
        "created_at": "2018-03-20T13:47:42.033+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "5189",
      "type": "companies",
      "attributes": {
        "name": "Client215",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:42.241+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ]
}

PATCH  /api/v2/deals/507

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/508

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/523/open

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "523",
    "type": "deals",
    "attributes": {
      "name": "test name",
      "date": "2018-03-20",
      "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,
      "probability": 50,
      "budget_warning": null,
      "billable_time": 0,
      "estimated_time": 0,
      "worked_time": 0,
      "unapproved_entries_count": 0,
      "lost_comment": null,
      "closed_at": null,
      "last_activity_at": null,
      "deleted_at": null,
      "created_at": "2018-03-20T13:47:49.167+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,
      "discounted": 0,
      "discounted_default": 0,
      "discounted_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "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_paid": 0,
      "expense_paid_default": 0,
      "expense_paid_normalized": 0
    },
    "relationships": {
      "creator": {
        "data": {
          "type": "people",
          "id": "3753"
        }
      },
      "company": {
        "data": {
          "type": "companies",
          "id": "5236"
        }
      },
      "document_type": {
        "data": null
      },
      "responsible": {
        "data": {
          "type": "people",
          "id": "3755"
        }
      },
      "deal_status": {
        "data": null
      },
      "project": {
        "data": null
      },
      "lost_reason": {
        "data": null
      },
      "contract": {
        "data": null
      }
    }
  },
  "included": [
    {
      "id": "3753",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user297@email.com",
        "title": null,
        "joined_at": "2018-03-20T13:47:49.000+01:00",
        "last_seen_at": "2018-03-20T13:47:49.191+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5233"
          }
        }
      }
    },
    {
      "id": "5236",
      "type": "companies",
      "attributes": {
        "name": "Client252",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:49.124+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "3755",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user299@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-03-20T13:47:49.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5237"
          }
        }
      }
    },
    {
      "id": "5233",
      "type": "companies",
      "attributes": {
        "name": "Organization174",
        "default_currency": "USD",
        "created_at": "2018-03-20T13:47:48.923+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "5237",
      "type": "companies",
      "attributes": {
        "name": "Client253",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:49.138+01:00",
        "archived_at": null,
        "avatar_url": null,
        "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/525/close

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "525",
    "type": "deals",
    "attributes": {
      "name": "test name",
      "date": "2018-03-20",
      "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,
      "probability": 50,
      "budget_warning": null,
      "billable_time": 0,
      "estimated_time": 0,
      "worked_time": 0,
      "unapproved_entries_count": 0,
      "lost_comment": null,
      "closed_at": "2018-03-20T13:47:49.767+01:00",
      "last_activity_at": null,
      "deleted_at": null,
      "created_at": "2018-03-20T13:47:49.730+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,
      "discounted": 0,
      "discounted_default": 0,
      "discounted_normalized": 0,
      "cost": 0,
      "cost_default": 0,
      "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_paid": 0,
      "expense_paid_default": 0,
      "expense_paid_normalized": 0
    },
    "relationships": {
      "creator": {
        "data": {
          "type": "people",
          "id": "3756"
        }
      },
      "company": {
        "data": {
          "type": "companies",
          "id": "5241"
        }
      },
      "document_type": {
        "data": null
      },
      "responsible": {
        "data": {
          "type": "people",
          "id": "3758"
        }
      },
      "deal_status": {
        "data": null
      },
      "project": {
        "data": null
      },
      "lost_reason": {
        "data": null
      },
      "contract": {
        "data": null
      }
    }
  },
  "included": [
    {
      "id": "3756",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user300@email.com",
        "title": null,
        "joined_at": "2018-03-20T13:47:49.000+01:00",
        "last_seen_at": "2018-03-20T13:47:49.754+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5238"
          }
        }
      }
    },
    {
      "id": "5241",
      "type": "companies",
      "attributes": {
        "name": "Client256",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:49.682+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "3758",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user302@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-03-20T13:47:49.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5242"
          }
        }
      }
    },
    {
      "id": "5238",
      "type": "companies",
      "attributes": {
        "name": "Organization175",
        "default_currency": "USD",
        "created_at": "2018-03-20T13:47:49.427+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "5242",
      "type": "companies",
      "attributes": {
        "name": "Client257",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:49.696+01:00",
        "archived_at": null,
        "avatar_url": null,
        "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

POST /api/v2/devices
Requestscreates devicedeletes duplicate and creates devicedeletes duplicate and creates 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",
      "push_token": "push_token1",
      "unique_identifier": "unique_identifier1"
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "25",
    "type": "devices",
    "attributes": {
      "name": "device name",
      "device_type_id": 1,
      "apns_server_id": null,
      "unique_identifier": "unique_identifier1",
      "push_token": "push_token1",
      "firebase_token": null
    },
    "relationships": {
      "user": {
        "data": {
          "type": "users",
          "id": "3433"
        }
      }
    }
  },
  "included": [
    {
      "id": "3433",
      "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": 1438,
        "default_organization_slug": "1438-organization1",
        "intercom_hash": "fa3e944d7481c92189b9cc53a0ac5414ee41a8bea24f72b34901b23e694967e5",
        "beta_features": [],
        "invitation_token": null,
        "reset_password_token": null,
        "sysadmin": false
      }
    }
  ]
}

POST  /api/v2/devices

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "devices",
    "attributes": {
      "name": "device name",
      "device_type_id": "1",
      "push_token": "push_token2",
      "unique_identifier": "unique_identifier2"
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "27",
    "type": "devices",
    "attributes": {
      "name": "device name",
      "device_type_id": 1,
      "apns_server_id": null,
      "unique_identifier": "unique_identifier2",
      "push_token": "push_token2",
      "firebase_token": null
    },
    "relationships": {
      "user": {
        "data": {
          "type": "users",
          "id": "3434"
        }
      }
    }
  },
  "included": [
    {
      "id": "3434",
      "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": 1439,
        "default_organization_slug": "1439-organization2",
        "intercom_hash": "2e6c5000a51bdeab3a10271a86819e6b03d03cd05b681870f349296e460bb50d",
        "beta_features": [],
        "invitation_token": null,
        "reset_password_token": null,
        "sysadmin": false
      }
    }
  ]
}

POST  /api/v2/devices

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "devices",
    "attributes": {
      "name": "device name",
      "device_type_id": "1",
      "push_token": "push_token4",
      "unique_identifier": "unique_identifier3"
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "29",
    "type": "devices",
    "attributes": {
      "name": "device name",
      "device_type_id": 1,
      "apns_server_id": null,
      "unique_identifier": "unique_identifier3",
      "push_token": "push_token4",
      "firebase_token": null
    },
    "relationships": {
      "user": {
        "data": {
          "type": "users",
          "id": "3435"
        }
      }
    }
  },
  "included": [
    {
      "id": "3435",
      "type": "users",
      "attributes": {
        "email": "user3@email.com",
        "first_name": "test first name",
        "last_name": "test last name",
        "time_zone": null,
        "avatar_url": null,
        "default_organization_id": 1440,
        "default_organization_slug": "1440-organization3",
        "intercom_hash": "79a61304610b73347752bd75db91ab782e7075ed77856b6943521fab5874e819",
        "beta_features": [],
        "invitation_token": null,
        "reset_password_token": null,
        "sysadmin": false
      }
    }
  ]
}

POST  /api/v2/devices

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "devices",
    "attributes": {
      "name": "device name",
      "device_type_id": "1",
      "push_token": null,
      "firebase_token": "firebasetoken",
      "unique_identifier": "unique_identifier5"
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "31",
    "type": "devices",
    "attributes": {
      "name": "device name",
      "device_type_id": 1,
      "apns_server_id": null,
      "unique_identifier": "unique_identifier5",
      "push_token": null,
      "firebase_token": "firebasetoken"
    },
    "relationships": {
      "user": {
        "data": {
          "type": "users",
          "id": "3437"
        }
      }
    }
  },
  "included": [
    {
      "id": "3437",
      "type": "users",
      "attributes": {
        "email": "user5@email.com",
        "first_name": "test first name",
        "last_name": "test last name",
        "time_zone": null,
        "avatar_url": null,
        "default_organization_id": 1441,
        "default_organization_slug": "1441-organization4",
        "intercom_hash": "7352101f5986dd6faccb14ebac8c8b223667d908cdf03b590c87a225115e8a09",
        "beta_features": [],
        "invitation_token": null,
        "reset_password_token": null,
        "sysadmin": false
      }
    }
  ]
}

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/push_token"
      }
    },
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/firebase_token"
      }
    }
  ]
}

Create a device
POST/api/v2/devices


DELETE /api/v2/devices/1
Requestsdeletes device

DELETE  /api/v2/devices/32

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

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": "28",
      "type": "document_types",
      "attributes": {
        "name": "normal invoice",
        "tax1_name": "VAT",
        "tax1_value": 25,
        "locale": "en_US",
        "document_template_id": 1,
        "exportable_type_id": 1,
        "note": null,
        "footer": null,
        "template_options": {}
      },
      "relationships": {
        "subsidiary": {
          "data": {
            "type": "subsidiaries",
            "id": "95"
          }
        },
        "organization": {
          "data": {
            "type": "organizations",
            "id": 1613
          }
        }
      }
    }
  ],
  "included": [
    {
      "id": "95",
      "type": "subsidiaries",
      "attributes": {
        "name": "Subsidiary2",
        "export_integration_type_id": null,
        "invoice_logo_url": null
      },
      "relationships": {
        "bill_from": {
          "data": null
        },
        "integration": {
          "data": null
        },
        "organization": {
          "data": {
            "type": "organizations",
            "id": 1613
          }
        }
      }
    }
  ],
  "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/29

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "29",
    "type": "document_types",
    "attributes": {
      "name": "normal invoice",
      "tax1_name": "VAT",
      "tax1_value": 25,
      "locale": "en_US",
      "document_template_id": 1,
      "exportable_type_id": 1,
      "note": null,
      "footer": null,
      "template_options": {}
    },
    "relationships": {
      "subsidiary": {
        "data": {
          "type": "subsidiaries",
          "id": "96"
        }
      },
      "organization": {
        "data": {
          "type": "organizations",
          "id": 1614
        }
      }
    }
  },
  "included": [
    {
      "id": "96",
      "type": "subsidiaries",
      "attributes": {
        "name": "Subsidiary3",
        "export_integration_type_id": null,
        "invoice_logo_url": null
      },
      "relationships": {
        "bill_from": {
          "data": null
        },
        "integration": {
          "data": null
        },
        "organization": {
          "data": {
            "type": "organizations",
            "id": 1614
          }
        }
      }
    }
  ]
}

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": "97"
        }
      }
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "31",
    "type": "document_types",
    "attributes": {
      "name": "test name",
      "tax1_name": null,
      "tax1_value": null,
      "locale": "hr_HR",
      "document_template_id": null,
      "exportable_type_id": 1,
      "note": null,
      "footer": null,
      "template_options": {}
    },
    "relationships": {
      "subsidiary": {
        "data": {
          "type": "subsidiaries",
          "id": "97"
        }
      },
      "organization": {
        "data": {
          "type": "organizations",
          "id": 1615
        }
      }
    }
  },
  "included": [
    {
      "id": "97",
      "type": "subsidiaries",
      "attributes": {
        "name": "Subsidiary4",
        "export_integration_type_id": null,
        "invoice_logo_url": null
      },
      "relationships": {
        "bill_from": {
          "data": null
        },
        "integration": {
          "data": null
        },
        "organization": {
          "data": {
            "type": "organizations",
            "id": 1615
          }
        }
      }
    }
  ]
}

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


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

PATCH  /api/v2/document_types/34

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": "34",
    "type": "document_types",
    "attributes": {
      "name": "new name",
      "tax1_name": "VAT",
      "tax1_value": 25,
      "locale": "en_US",
      "document_template_id": 1,
      "exportable_type_id": 1,
      "note": null,
      "footer": null,
      "template_options": {}
    },
    "relationships": {
      "subsidiary": {
        "data": {
          "type": "subsidiaries",
          "id": "100"
        }
      },
      "organization": {
        "data": {
          "type": "organizations",
          "id": 1618
        }
      }
    }
  },
  "included": [
    {
      "id": "100",
      "type": "subsidiaries",
      "attributes": {
        "name": "Subsidiary7",
        "export_integration_type_id": null,
        "invoice_logo_url": null
      },
      "relationships": {
        "bill_from": {
          "data": null
        },
        "integration": {
          "data": null
        },
        "organization": {
          "data": {
            "type": "organizations",
            "id": 1618
          }
        }
      }
    }
  ]
}

PATCH  /api/v2/document_types/35

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


Emails

Emails

Supported filter params

  • status

  • creator_id

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": "37",
      "type": "emails",
      "attributes": {
        "subject": null,
        "body": "Email text body",
        "auto_linked": false,
        "dismissed_at": null,
        "created_at": "2018-03-20T13:47:52.463+01:00"
      },
      "relationships": {
        "creator": {
          "data": {
            "type": "people",
            "id": "3768"
          }
        },
        "deal": {
          "data": null
        },
        "invoice": {
          "data": null
        },
        "recipients": {
          "data": []
        },
        "cc_recipients": {
          "data": []
        },
        "attachments": {
          "data": []
        }
      }
    }
  ],
  "included": [
    {
      "id": "3768",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user312@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-03-20T13:47:52.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5252"
          }
        }
      }
    },
    {
      "id": "5252",
      "type": "companies",
      "attributes": {
        "name": "Client258",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:52.438+01:00",
        "archived_at": null,
        "avatar_url": null,
        "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/39

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "39",
    "type": "emails",
    "attributes": {
      "subject": null,
      "body": "Email text body",
      "auto_linked": false,
      "dismissed_at": null,
      "created_at": "2018-03-20T13:47:53.228+01:00"
    },
    "relationships": {
      "creator": {
        "data": {
          "type": "people",
          "id": "3772"
        }
      },
      "deal": {
        "data": null
      },
      "invoice": {
        "data": null
      },
      "recipients": {
        "data": []
      },
      "cc_recipients": {
        "data": []
      },
      "attachments": {
        "data": []
      }
    }
  },
  "included": [
    {
      "id": "3772",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user316@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-03-20T13:47:53.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5256"
          }
        }
      }
    },
    {
      "id": "5256",
      "type": "companies",
      "attributes": {
        "name": "Client260",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:53.204+01:00",
        "archived_at": null,
        "avatar_url": null,
        "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/40/attach

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "emails",
    "relationships": {
      "deal": {
        "data": {
          "type": "deals",
          "id": "526"
        }
      }
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "40",
    "type": "emails",
    "attributes": {
      "subject": null,
      "body": "Email text body",
      "auto_linked": false,
      "dismissed_at": null,
      "created_at": "2018-03-20T13:47:53.591+01:00"
    },
    "relationships": {
      "creator": {
        "data": {
          "type": "people",
          "id": "3774"
        }
      },
      "deal": {
        "data": {
          "type": "deals",
          "id": "526"
        }
      },
      "invoice": {
        "data": null
      },
      "recipients": {
        "data": []
      },
      "cc_recipients": {
        "data": []
      },
      "attachments": {
        "data": []
      }
    }
  },
  "included": [
    {
      "id": "3774",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user318@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-03-20T13:47:53.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5258"
          }
        }
      }
    },
    {
      "id": "526",
      "type": "deals",
      "attributes": {
        "name": "test name",
        "date": "2018-03-20",
        "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,
        "probability": 50,
        "budget_warning": null,
        "billable_time": 0,
        "estimated_time": 0,
        "worked_time": 0,
        "unapproved_entries_count": 0,
        "lost_comment": null,
        "closed_at": null,
        "last_activity_at": null,
        "deleted_at": null,
        "created_at": "2018-03-20T13:47:53.670+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,
        "discounted": 0,
        "discounted_default": 0,
        "discounted_normalized": 0,
        "cost": 0,
        "cost_default": 0,
        "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_paid": 0,
        "expense_paid_default": 0,
        "expense_paid_normalized": 0
      },
      "relationships": {
        "creator": {
          "data": {
            "type": "people",
            "id": "3773"
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "5259"
          }
        },
        "document_type": {
          "data": null
        },
        "responsible": {
          "data": {
            "type": "people",
            "id": "3775"
          }
        },
        "deal_status": {
          "data": {
            "type": "deal_statuses",
            "id": "8375"
          }
        },
        "project": {
          "data": null
        },
        "lost_reason": {
          "data": null
        },
        "contract": {
          "data": null
        }
      }
    },
    {
      "id": "5258",
      "type": "companies",
      "attributes": {
        "name": "Client261",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:53.572+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "3773",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user317@email.com",
        "title": null,
        "joined_at": "2018-03-20T13:47:53.000+01:00",
        "last_seen_at": "2018-03-20T13:47:53.705+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5257"
          }
        }
      }
    },
    {
      "id": "5259",
      "type": "companies",
      "attributes": {
        "name": "Client262",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:53.600+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "3775",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user319@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-03-20T13:47:53.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5260"
          }
        }
      }
    },
    {
      "id": "8375",
      "type": "deal_statuses",
      "attributes": {
        "name": "prospective",
        "position": 6
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 1624
          }
        }
      }
    },
    {
      "id": "5257",
      "type": "companies",
      "attributes": {
        "name": "Organization187",
        "default_currency": "USD",
        "created_at": "2018-03-20T13:47:53.393+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "5260",
      "type": "companies",
      "attributes": {
        "name": "Client263",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:53.619+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ]
}

PATCH  /api/v2/emails/41/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/44/dismiss

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "44",
    "type": "emails",
    "attributes": {
      "subject": null,
      "body": "Email text body",
      "auto_linked": false,
      "dismissed_at": "2018-03-20T13:47:56.202+01:00",
      "created_at": "2018-03-20T13:47:56.182+01:00"
    },
    "relationships": {
      "creator": {
        "data": {
          "type": "people",
          "id": "3784"
        }
      },
      "deal": {
        "data": null
      },
      "invoice": {
        "data": null
      },
      "recipients": {
        "data": []
      },
      "cc_recipients": {
        "data": []
      },
      "attachments": {
        "data": []
      }
    }
  },
  "included": [
    {
      "id": "3784",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user328@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-03-20T13:47:56.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5270"
          }
        }
      }
    },
    {
      "id": "5270",
      "type": "companies",
      "attributes": {
        "name": "Client269",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:56.155+01:00",
        "archived_at": null,
        "avatar_url": null,
        "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/47

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
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": "42",
      "type": "expenses",
      "attributes": {
        "name": "test name",
        "date": "2018-03-20",
        "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": "528"
          }
        },
        "service_type": {
          "data": {
            "type": "service_types",
            "id": "257"
          }
        },
        "attachment": {
          "data": null
        }
      }
    }
  ],
  "included": [
    {
      "id": "528",
      "type": "deals",
      "attributes": {
        "name": "test name",
        "date": "2018-03-20",
        "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,
        "probability": 50,
        "budget_warning": null,
        "billable_time": 0,
        "estimated_time": 0,
        "worked_time": 0,
        "unapproved_entries_count": 0,
        "lost_comment": null,
        "closed_at": null,
        "last_activity_at": null,
        "deleted_at": null,
        "created_at": "2018-03-20T13:47:57.707+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,
        "discounted": 0,
        "discounted_default": 0,
        "discounted_normalized": 0,
        "cost": 10000,
        "cost_default": 12500,
        "cost_normalized": 10000,
        "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_paid": 0,
        "expense_paid_default": 0,
        "expense_paid_normalized": 0
      },
      "relationships": {
        "creator": {
          "data": {
            "type": "people",
            "id": "3793"
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "5280"
          }
        },
        "document_type": {
          "data": null
        },
        "responsible": {
          "data": {
            "type": "people",
            "id": "3794"
          }
        },
        "deal_status": {
          "data": null
        },
        "project": {
          "data": null
        },
        "lost_reason": {
          "data": null
        },
        "contract": {
          "data": null
        }
      }
    },
    {
      "id": "257",
      "type": "service_types",
      "attributes": {
        "name": "test name",
        "deleted_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 1633
          }
        }
      }
    },
    {
      "id": "3793",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user337@email.com",
        "title": null,
        "joined_at": "2018-03-20T13:47:57.000+01:00",
        "last_seen_at": "2018-03-20T13:47:57.774+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5279"
          }
        }
      }
    },
    {
      "id": "5280",
      "type": "companies",
      "attributes": {
        "name": "Client274",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:57.663+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "3794",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user338@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-03-20T13:47:57.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5281"
          }
        }
      }
    },
    {
      "id": "5279",
      "type": "companies",
      "attributes": {
        "name": "Organization196",
        "default_currency": "USD",
        "created_at": "2018-03-20T13:47:57.537+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "5281",
      "type": "companies",
      "attributes": {
        "name": "Client275",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:57.678+01:00",
        "archived_at": null,
        "avatar_url": null,
        "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/43

Headers
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "43",
    "type": "expenses",
    "attributes": {
      "name": "test name",
      "date": "2018-03-20",
      "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": "529"
        }
      },
      "service_type": {
        "data": {
          "type": "service_types",
          "id": "258"
        }
      },
      "attachment": {
        "data": null
      }
    }
  },
  "included": [
    {
      "id": "529",
      "type": "deals",
      "attributes": {
        "name": "test name",
        "date": "2018-03-20",
        "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,
        "probability": 50,
        "budget_warning": null,
        "billable_time": 0,
        "estimated_time": 0,
        "worked_time": 0,
        "unapproved_entries_count": 0,
        "lost_comment": null,
        "closed_at": null,
        "last_activity_at": null,
        "deleted_at": null,
        "created_at": "2018-03-20T13:47:58.156+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,
        "discounted": 0,
        "discounted_default": 0,
        "discounted_normalized": 0,
        "cost": 10000,
        "cost_default": 12500,
        "cost_normalized": 10000,
        "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_paid": 0,
        "expense_paid_default": 0,
        "expense_paid_normalized": 0
      },
      "relationships": {
        "creator": {
          "data": {
            "type": "people",
            "id": "3795"
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "5283"
          }
        },
        "document_type": {
          "data": null
        },
        "responsible": {
          "data": {
            "type": "people",
            "id": "3796"
          }
        },
        "deal_status": {
          "data": null
        },
        "project": {
          "data": null
        },
        "lost_reason": {
          "data": null
        },
        "contract": {
          "data": null
        }
      }
    },
    {
      "id": "258",
      "type": "service_types",
      "attributes": {
        "name": "test name",
        "deleted_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 1634
          }
        }
      }
    },
    {
      "id": "3795",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user339@email.com",
        "title": null,
        "joined_at": "2018-03-20T13:47:58.000+01:00",
        "last_seen_at": "2018-03-20T13:47:58.221+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5282"
          }
        }
      }
    },
    {
      "id": "5283",
      "type": "companies",
      "attributes": {
        "name": "Client276",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:58.111+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "3796",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user340@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-03-20T13:47:58.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5284"
          }
        }
      }
    },
    {
      "id": "5282",
      "type": "companies",
      "attributes": {
        "name": "Organization197",
        "default_currency": "USD",
        "created_at": "2018-03-20T13:47:57.975+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "5284",
      "type": "companies",
      "attributes": {
        "name": "Client277",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:58.126+01:00",
        "archived_at": null,
        "avatar_url": null,
        "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": "Mar 20, 2018"
    },
    "relationships": {
      "deal": {
        "data": {
          "type": "deals",
          "id": "530"
        }
      },
      "service_type": {
        "data": {
          "type": "service-type",
          "id": "259"
        }
      }
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "45",
    "type": "expenses",
    "attributes": {
      "name": "test name",
      "date": "2018-03-20",
      "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": "530"
        }
      },
      "service_type": {
        "data": {
          "type": "service_types",
          "id": "259"
        }
      },
      "attachment": {
        "data": null
      }
    }
  },
  "included": [
    {
      "id": "530",
      "type": "deals",
      "attributes": {
        "name": "test name",
        "date": "2018-03-20",
        "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,
        "probability": 50,
        "budget_warning": null,
        "billable_time": 0,
        "estimated_time": 0,
        "worked_time": 0,
        "unapproved_entries_count": 0,
        "lost_comment": null,
        "closed_at": null,
        "last_activity_at": null,
        "deleted_at": null,
        "created_at": "2018-03-20T13:47:58.561+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,
        "discounted": 0,
        "discounted_default": 0,
        "discounted_normalized": 0,
        "cost": 18000,
        "cost_default": 22500,
        "cost_normalized": 18000,
        "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_paid": 0,
        "expense_paid_default": 0,
        "expense_paid_normalized": 0
      },
      "relationships": {
        "creator": {
          "data": {
            "type": "people",
            "id": "3797"
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "5286"
          }
        },
        "document_type": {
          "data": null
        },
        "responsible": {
          "data": {
            "type": "people",
            "id": "3798"
          }
        },
        "deal_status": {
          "data": null
        },
        "project": {
          "data": null
        },
        "lost_reason": {
          "data": null
        },
        "contract": {
          "data": null
        }
      }
    },
    {
      "id": "259",
      "type": "service_types",
      "attributes": {
        "name": "test name",
        "deleted_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 1635
          }
        }
      }
    },
    {
      "id": "3797",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user341@email.com",
        "title": null,
        "joined_at": "2018-03-20T13:47:58.000+01:00",
        "last_seen_at": "2018-03-20T13:47:58.623+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5285"
          }
        }
      }
    },
    {
      "id": "5286",
      "type": "companies",
      "attributes": {
        "name": "Client278",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:58.518+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "3798",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user342@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 3,
        "invited_at": "2018-03-20T13:47:58.000+01:00",
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5287"
          }
        }
      }
    },
    {
      "id": "5285",
      "type": "companies",
      "attributes": {
        "name": "Organization198",
        "default_currency": "USD",
        "created_at": "2018-03-20T13:47:58.389+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "5287",
      "type": "companies",
      "attributes": {
        "name": "Client279",
        "default_currency": null,
        "created_at": "2018-03-20T13:47:58.532+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    }
  ]
}

POST  /api/v2/expenses

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "expenses",
    "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/deal"
      }
    },
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/service_type"
      }
    },
    {
      "status": "422",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/amount"
      }
    },
    {
      "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/date"
      }
    }
  ]
}

Create a expense
POST/api/v2/expenses


PATCH /api/v2/expenses/1
Requestsupdates expensereturns error

PATCH  /api/v2/expenses/49

Headers
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "expenses",
    "attributes": {
      "name": "new name"
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "49",
    "type": "expenses",
    "attributes": {
      "name": "new name",
      "date": "2018-03-20",
      "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": "534"
        }
      },
      "service_type": {
        "data": {
          "type": "service_types",
          "id": "263"
        }
      },
      "attachment": {
        "data": null
      }
    }
  },
  "included": [
    {
      "id": "534",
      "type": "deals",
      "attributes": {
        "name": "test name",
        "date": "2018-03-20",
        "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,
        "probability": 50,
        "budget_warning": null,
        "billable_time": 0,
        "estimated_time": 0,
        "worked_time": 0,
        "unapproved_entries_count": 0,
        "lost_comment": null,
        "closed_at": null,
        "last_activity_at": null,
        "deleted_at": null,
        "created_at": "2018-03-20T13:48:00.111+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,
        "discounted": 0,
        "discounted_default": 0,
        "discounted_normalized": 0,
        "cost": 10000,
        "cost_default": 12500,
        "cost_normalized": 10000,
        "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_paid": 0,
        "expense_paid_default": 0,
        "expense_paid_normalized": 0
      },
      "relationships": {
        "creator": {
          "data": {
            "type": "people",
            "id": "3805"
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "5298"
          }
        },
        "document_type": {
          "data": null
        },
        "responsible": {
          "data": {
            "type": "people",
            "id": "3806"
          }
        },
        "deal_status": {
          "data": null
        },
        "project": {
          "data": null
        },
        "lost_reason": {
          "data": null
        },
        "contract": {
          "data": null
        }
      }
    },
    {
      "id": "263",
      "type": "service_types",
      "attributes": {
        "name": "test name",
        "deleted_at": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 1639
          }
        }
      }
    },
    {
      "id": "3805",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user349@email.com",
        "title": null,
        "joined_at": "2018-03-20T13:48:00.000+01:00",
        "last_seen_at": "2018-03-20T13:48:00.183+01:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "norm": null
      },
      "relationships": {
        "company": {
          "data": {
            "type": "companies",
            "id": "5297"
          }
        }
      }
    },
    {
      "id": "5298",
      "type": "companies",
      "attributes": {
        "name": "Client286",
        "default_currency": null,
        "created_at": "2018-03-20T13:48:00.067+01:00",
        "archived_at": null,
        "avatar_url": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "bill_to": {
          "data": null
        }
      }
    },
    {
      "id": "3806",
      "type": "people",
      "attributes": {
        "first_name": "name",
        "last_name": "surname",
        "email": "user350@email.com",
        "title": null,
        "joined_at": null,
        "last_seen_at": null,
        "deactivated_