Getting startedGeneralCRMDealsInvoicesSubscriptionsProductsTicketsTimetracking & TasksCallsMeetingsPlanningProjectsExternal costsNotesFilesUsers & TeamsCustom Fields

Teamleader Products 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 add new products and fetch products from Teamleader.

Manipulating products

Adding a new product

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

Required POST parameters for opportunities

  • name: string: name of the product
  • price: decimal: price of the new product

Optional POST parameters

  • external_id: string: external ID code
  • vat: 00 / 06 / 12 / 21 / CM / EX / MC / VCMD: the vat tariff for this product
  • stock_amount: integer: the new value for stock
  • account_id: id of the bookkeeping account
  • automerge_by_name: 0/1 If this flag is set to 1, Teamleader will merge this info into an existing product with the same name, if it finds any. Default: 0
  • purchase_price decimal: purchase price of the product
  • custom_field_ID: replace ID by the ID of your custom field. (eg custom_field_310)

Sample output

Example output: 416654 (id of the product that was added)

Updating a product

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

Required POST parameters for opportunities

  • product_id: id: id of the product

Optional POST parameters

  • name: string: name of the product
  • price: decimal: price of the product
  • external_id: string: external ID code
  • stock_amount: integer: the new value for stock
  • purchase_price decimal: purchase price of the product
  • custom_field_ID: replace ID by the ID of your custom field. (eg custom_field_310)

Sample output

Example output: JSON array indicating success or failure of the operation

Deleting a product

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

Required POST parameters for opportunities

  • product_id: id: id of the product

Sample output

Example output: JSON array indicating success or failure of the operation

Searching products

Searching all products

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

Required POST parameters

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

Optional POST parameters

  • searchby: string: a search string. Teamleader will try to match each part of the string to the name or external ID of the product.
  • modifiedsince: integer: Unix timestamp. Teamleader will only return products that have been added or modified since that timestamp.

Sample output

Example output: JSON array containing all matching products. Each entry in the array is an associative array
containing information about the product such as name, price,..

Fetching detailed product information

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

Required POST parameters

  • product_id: integer: the ID of the product

Optional POST parameters

  • include_all_custom_fields: integer: if set to 1, all custom fields will be fetched, even long textblobs
  • include_photos integer: if set to 1, The product image url is returned with the result

Sample output

Example output: JSON array containing info about the product