Getting startedGeneralCRMDealsInvoicesSubscriptionsProductsTicketsTimetracking & TasksCallsMeetingsPlanningProjectsExternal costsNotesFilesUsers & TeamsCustom Fields

Teamleader Projects API

This document assumes you have your API key and know how to perform a POST request (see Getting started)

This part of the api allows you to manage projects and milestones from Teamleader objects.

Projects API overview

Searching all projects

API endpoint: https://app.teamleader.eu/api/getProjects.php

Required POST parameters

  • amount: integer: the amount of projects returned per request (1 - 100)
  • pageno: integer: the current page (the first page is 0)

Optional POST parameters

  • searchby: string: a search string.
  • show_active_only: 0/1: if 1, this call will return only active projects.
  • selected_customfields: comma-separated list of the IDs of the custom fields you wish to select (max 10). Example: '42,142'

Sample output

Example output: JSON array containing all matching projects.
  • id: id of the project
  • title: string
  • phase: string
  • start_date: unix timestamp
  • start_date_formatted: dd/mm/yyyy

Search active projects by client

API endpoint: https://app.teamleader.eu/api/getProjectsByClient.php

Required POST parameters

  • contact_or_company: contact or company
  • contact_or_company_id:integer: ID of the contact or company related to this project
  • deep_search: 0/1: pass 1 to return not just projects related to the requested contact, but also to projects related to linked companies

Optional POST parameters

  • show_inactive_projects: 0/1: pass 1 to return not just projects that are active, but also closed projects, or projects that are on hold

Sample output

Example output: JSON array containing all active projects for this client.
  • id: id of the project
  • title: string
  • contact_or_company: string containing 'contact' or 'company'
  • contact_or_company_id: id
  • phase: string
  • cf_value_id: custom field content

Get detailed information about a project by ID

API endpoint: https://app.teamleader.eu/api/getProject.php

Required POST parameters

  • project_id: string: ID of the project

Sample output

Example output: JSON array containing information about the project.
  • id: id of the project
  • project_nr: integer
  • title: string
  • contact_or_company: string containing 'contact' or 'company'
  • contact_or_company_id: id
  • budget_indication: integer
  • phase: string
  • budget_spent_internal: integer
  • budget_spent_external: integer
  • description_html: string
  • start_date: unix timestamp
  • start_date_formatted: dd/mm/yyyy
  • custom_fields: array containing the custom field id's and their values

Add a new project

API endpoint: https://app.teamleader.eu/api/addProject.php

Required POST parameters

  • project_name: string: name of the project
  • project_budget: decimal: budget of the project
  • project_responsible_user_id: integer: ID of the user who will be responsible for this project
  • project_start_date: date: start date of the project (dd/mm/yyyy)
  • milestone_title: string: name of the first milestone
  • milestone_budget: decimal: budget of this milestone
  • milestone_invoiceable: 0/1: specifies whether the milestone can be invoiced
  • milestone_due_date: date: due date of this milestone (dd/mm/yyyy)
  • milestone_responsible_user_id: integer: ID of the user who will be responsible for this milestone

Extra POST parameters

  • milestone_billing_type: fixed_price/time_and_material: how should the milestone be billed? (default: time_and_material)
  • contact_or_company: 'contact' or 'company'
  • contact_or_company_id: integer: ID of the contact or company related to this project
  • external_order_number string: PO Number
  • custom_field_ID: replace ID by the ID of your custom field.

Sample output

Example output: JSON array containing information about the project.

Updating a project

API endpoint: https://app.teamleader.eu/api/updateProject.php

Required POST parameters

  • project_id: integer: ID of the project you would like to update
  • track_changes: 0/1: specifies whether the changes in this request should be tracked
  • title: string: name of the project

Extra POST parameters

  • custom_field_ID: replace ID by the ID of your custom field.

Sample output

Example output: JSON array containing information about the project.

Milestone API overview

Get all project milestones

API endpoint: https://app.teamleader.eu/api/getMilestonesByProject.php

Required POST parameters

  • project_id: string: ID of the project

Extra POST parameters

  • include_details: 0/1: if set to 1, timetracking stats will be included in the response
  • include_custom_fields_milestones: 0/1: return the custom fields for the milestones

Sample output

Example output: JSON array containing all the milestones under the queried project.
  • id: id of the milestone
  • title: string
  • due_date: unix timestamp
  • budget: integer
  • closed: boolean
  • responsible_user_id: id of the user
  • billing_type: string
  • time_tracked_minutes: integer
  • tasks_time_remaining_minutes: integer
  • tasks_time_overrun_minutes: integer

Get detailed information about a milestone by ID

API endpoint: https://app.teamleader.eu/api/getMilestone.php

Required POST parameters

  • milestone_id: string: ID of the milestone

Sample output

Example output: JSON array containing information about the milestone.
  • id: id of the milestone
  • title: string
  • due_date: unix timestamp
  • budget: integer
  • invoicable: boolean
  • responsible_user_id: id of the user
  • billing_type: string
  • finished: boolean
  • custom_fields: array containing the id's and values of the custom fields

Add a new milestone to an existing project

API endpoint: https://app.teamleader.eu/api/addMilestone.php

Required POST parameters

  • project_id: integer: ID of the project
  • title: string: title of the milestone
  • budget: decimal: budget of the milestone (in EUR)
  • invoiceable: 0/1: is the milestone invoiceable or not?
  • due_date: date (dd/mm/YYYY): due date of the milestone
  • responsible_crm_client_id: integer: ID of the user responsible for this milestone
  • billing_type: fixed_price/time_and_material: how should the milestone be billed?

Optional POST parameters

  • critical_path: integer: ID of the milestone that this milestone depends on

Sample output

Example output: JSON array containing information about the milestone.

Delete a milestone

API endpoint: https://app.teamleader.eu/api/deleteMilestone.php

Required POST parameters

  • milestone_id: integer: ID of the milestone

Sample output

Example output: Example output: JSON array indicating the success or failure of this call. /pre>

                

Getting all tasks related to a milestone

API endpoint: https://app.teamleader.eu/api/getTasksByMilestone.php

Required POST parameters

  • milestone_id: integer: ID of the milestone_id

Sample output

Example output: JSON array containing information about the tasks.
  • id: id of the milestone
  • due_date: unix timestamp
  • priority: string
  • description: string
  • done: boolean
  • owner_name: string
  • task_type: string
  • estimated_total_time_minutes: 0
  • time_tracked_minutes integer
  • time_remaining_minutes integer

Related parties API overview

Getting all external parties related to a project

API endpoint: https://app.teamleader.eu/api/getRelatedPartiesByProject.php

Required POST parameters

  • project_id: string: ID of the project

Sample output

Example output: JSON array containing all the parties related to the project.
  • group: string
  • type: string containing 'contact' or 'company'
  • id: id of the related party
  • name: string
  • role: string
  • telephone: string
  • email: string

Adding a new external related party to a project

API endpoint: https://app.teamleader.eu/api/addRelatedPartyToProject.php

Required POST parameters

  • project_id: string: ID of the project
  • group: string: assign this party to a group
  • contact_or_company: contact or company: Who is the invoice for?
  • contact_or_company_id:integer: ID of the contact or company

Optional POST parameters

  • role: string: describe the role of this related party

Sample output

Example output: JSON array indicating the success of this call.

Getting all users working on a project

API endpoint: https://app.teamleader.eu/api/getUsersOnProject.php

Required POST parameters

  • project_id: string: ID of the project

Sample output

Example output: JSON array containing information about the users working on this project.
  • user_id: id of the user
  • user_name: string
  • user_email: string
  • role: string