{"id":26664878,"url":"https://github.com/madeitbelgium/teamleader","last_synced_at":"2025-07-18T10:07:23.600Z","repository":{"id":33456282,"uuid":"158559420","full_name":"madeITBelgium/TeamLeader","owner":"madeITBelgium","description":"PHP TeamLeader API Laravel SDK","archived":false,"fork":false,"pushed_at":"2025-05-16T09:52:27.000Z","size":130,"stargazers_count":13,"open_issues_count":1,"forks_count":16,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-21T19:04:29.625Z","etag":null,"topics":["hacktoberfest","laravel","php","teamleader","teamleader-crm"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/madeITBelgium.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["madeitbelgium"]}},"created_at":"2018-11-21T14:21:11.000Z","updated_at":"2025-05-16T09:52:11.000Z","dependencies_parsed_at":"2025-04-11T20:52:12.514Z","dependency_job_id":"dd6a3c93-8e20-4407-bd41-2a819314aa8c","html_url":"https://github.com/madeITBelgium/TeamLeader","commit_stats":{"total_commits":74,"total_committers":7,"mean_commits":"10.571428571428571","dds":0.2702702702702703,"last_synced_commit":"d266813ab50abe6a0f40b60552bd20744eb5857e"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/madeITBelgium/TeamLeader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madeITBelgium%2FTeamLeader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madeITBelgium%2FTeamLeader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madeITBelgium%2FTeamLeader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madeITBelgium%2FTeamLeader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/madeITBelgium","download_url":"https://codeload.github.com/madeITBelgium/TeamLeader/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madeITBelgium%2FTeamLeader/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265738461,"owners_count":23820162,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","laravel","php","teamleader","teamleader-crm"],"created_at":"2025-03-25T16:46:38.225Z","updated_at":"2025-07-18T10:07:23.588Z","avatar_url":"https://github.com/madeITBelgium.png","language":"PHP","funding_links":["https://github.com/sponsors/madeitbelgium"],"categories":[],"sub_categories":[],"readme":"# PHP TeamLeader API Laravel SDK\n\n[![Latest Stable Version](https://poser.pugx.org/madeITBelgium/TeamLeader/v/stable.svg)](https://packagist.org/packages/madeITBelgium/TeamLeader)\n[![Total Downloads](https://poser.pugx.org/madeITBelgium/TeamLeader/d/total.svg)](https://packagist.org/packages/madeITBelgium/TeamLeader)\n[![License](https://poser.pugx.org/madeITBelgium/TeamLeader/license.svg)](https://packagist.org/packages/madeITBelgium/TeamLeader)\n\nWith this Laravel package you can create a TeamLeader integration.\n\n# Installation\n\n```\ncomposer require madeitbelgium/teamleader\n```\n\nOr require this package in your `composer.json` and update composer.\n\n```php\n\"madeitbelgium/teamleader\": \"^1.8\"\n```\n\n## Publish config file\n\n```php\nphp artisan vendor:publish --provider=\"MadeITBelgium\\TeamLeader\\ServiceProvider\\TeamLeader\"\n```\n\n## Laravel \u003c5.5\n\nAfter updating composer, add the ServiceProvider to the providers array in `config/app.php`\n\n```php\nMadeITBelgium\\TeamLeader\\ServiceProvider\\TeamLeader::class,\n```\n\nYou can use the facade for shorter code. Add this to your aliases:\n\n```php\n'TeamLeader' =\u003e MadeITBelgium\\TeamLeader\\Facade\\TeamLeader::class,\n```\n\n# Documentation\n\n## Usage\n\n```php\n\nuse MadeITBelgium\\TeamLeader\\TeamLeader;\n\n$teamLeader = new TeamLeader($appUrl, $clientId, $clientSecret, $redirectUri, $client = null);\n```\n\nIn laravel you can use the Facade\n\n```php\nuse MadeITBelgium\\TeamLeader\\Facade\\TeamLeader;\n\n$teamLeaderContact = TeamLeader::crm()-\u003econtact()-\u003eadd([\n    'first_name' =\u003e 'Tjebbe',\n    'last_name' =\u003e 'Lievens',\n    'emails' =\u003e [\n        [\n            'type' =\u003e 'primary',\n            'email' =\u003e 'info@madeit.be',\n        ]\n    ],\n    'telephones' =\u003e [\n        ['type' =\u003e 'mobile', 'number' =\u003e '0000000000'],\n    ],\n    'addresses' =\u003e [\n        [\n            'type' =\u003e 'primary',\n            'address' =\u003e [\n                'line_1' =\u003e 'Adres 1',\n                'postal_code' =\u003e '1234',\n                'city' =\u003e 'Cityname',\n                'country' =\u003e 'BE',\n            ]\n        ]\n    ],\n    'language' =\u003e \"nl\",\n]);\n$contactId = $teamLeaderContact-\u003edata-\u003eid;\n```\n\n## Authentication\n\nCreate a redirect URL and redirect the user to the teamleader URL.\n\n```php\nTeamLeader::setRedirectUrl($redirect_url);\n$redirectTo = TeamLeader::getAuthorizationUrl();\n```\n\nWhen the user succesfully is authenticated. The user is redirect to the provided redirect URL. You can now request (and\nsave) the access and refersh token.\n\n```php\n$accessTokenResult = TeamLeader::requestAccessToken($request-\u003eget('code'));\n$access_token = TeamLeader::getAccessToken();\n$refresh_token = TeamLeader::getRefreshToken();\n$expired_at = TeamLeader::getExpiresAt();\n```\n\nThe access token has a short expire time. Before each reqeust check if the access token is still valid.\n\n```php\nTeamLeader::setAccessToken($access_token);\nTeamLeader::setRefreshToken($refresh_token);\nTeamLeader::setExpiresAt($expired_at);\n$refresh = TeamLeader::checkAndDoRefresh();\nif (false !== $refresh) {\n    $access_token = TeamLeader::getAccessToken();\n    $refresh_token = TeamLeader::getRefreshToken();\n    $expired_at = TeamLeader::getExpiresAt();\n    //Save data to database\n}\n```\n\n## All available endpoints\n\nNeed more endpoints? Create an issue or contact us.\n\n```php\nTeamLeader::setRedirectUrl($redirect_url);\nTeamLeader::getAuthorizationUrl();\n\nTeamLeader::requestAccessToken($code);\nTeamLeader::getAccessToken();\nTeamLeader::getRefreshToken();\nTeamLeader::getExpiresAt();\n\nTeamLeader::setAccessToken($access_token);\nTeamLeader::setRefreshToken($refresh_token);\nTeamLeader::setExpiresAt($expired_at);\nTeamLeader::checkAndDoRefresh();\n\nTeamLeader::general()-\u003edepartment()-\u003elist()\nTeamLeader::general()-\u003edepartment()-\u003einfo($id)\nTeamLeader::general()-\u003euser()-\u003eme()\nTeamLeader::general()-\u003euser()-\u003elist()\nTeamLeader::general()-\u003euser()-\u003einfo($id)\nTeamLeader::general()-\u003eteam()-\u003elist()\nTeamLeader::general()-\u003ecustomField()-\u003elist()\nTeamLeader::general()-\u003ecustomField()-\u003einfo($id)\nTeamLeader::general()-\u003eworkType()-\u003elist()\n\nTeamLeader::crm()-\u003econtact()-\u003elist(['filter' =\u003e ..., 'page' =\u003e ..., 'sort' =\u003e ...]); //https://developer.focus.teamleader.eu/#/reference/crm/contacts/contacts.list\nTeamLeader::crm()-\u003econtact()-\u003einfo($id); //https://developer.focus.teamleader.eu/#/reference/crm/contacts/contacts.info\nTeamLeader::crm()-\u003econtact()-\u003eadd(['first_name' =\u003e ..., ...]); //https://developer.focus.teamleader.eu/#/reference/crm/contacts/contacts.add\nTeamLeader::crm()-\u003econtact()-\u003eupdate($id, ['first_name' =\u003e ...]) //https://developer.focus.teamleader.eu/#/reference/crm/contacts/contacts.update\nTeamLeader::crm()-\u003econtact()-\u003edelete($id); //https://developer.focus.teamleader.eu/#/reference/crm/contacts/contacts.delete\nTeamLeader::crm()-\u003econtact()-\u003etag($id, $tags); //https://developer.focus.teamleader.eu/#/reference/crm/contacts/contacts.tag\nTeamLeader::crm()-\u003econtact()-\u003euntag($id, $tags); //https://developer.focus.teamleader.eu/#/reference/crm/contacts/contacts.untag\nTeamLeader::crm()-\u003econtact()-\u003elinkToCompany($id, $companyId, $position, $decisionMaker) //https://developer.focus.teamleader.eu/#/reference/crm/contacts/contacts.linktocompany\nTeamLeader::crm()-\u003econtact()-\u003eunlinkToCompany($id, $companyId); //https://developer.focus.teamleader.eu/#/reference/crm/contacts/contacts.unlinkfromcompany\n\nTeamLeader::crm()-\u003ecompany()-\u003elist(['filter' =\u003e ..., 'page' =\u003e ..., 'sort' =\u003e ...]); //https://developer.focus.teamleader.eu/#/reference/crm/companies/companies.list\nTeamLeader::crm()-\u003ecompany()-\u003einfo($id); //https://developer.focus.teamleader.eu/#/reference/crm/companies/companies.info\nTeamLeader::crm()-\u003ecompany()-\u003eadd(['first_name' =\u003e ..., ...]); //https://developer.focus.teamleader.eu/#/reference/crm/companies/companies.add\nTeamLeader::crm()-\u003ecompany()-\u003eupdate($id, ['first_name' =\u003e ...]) //https://developer.focus.teamleader.eu/#/reference/crm/companies/companies.update\nTeamLeader::crm()-\u003ecompany()-\u003edelete($id); //https://developer.focus.teamleader.eu/#/reference/crm/companies/companies.delete\nTeamLeader::crm()-\u003ecompany()-\u003etag($id, $tags); //https://developer.focus.teamleader.eu/#/reference/crm/companies/companies.tag\nTeamLeader::crm()-\u003ecompany()-\u003euntag($id, $tags); //https://developer.focus.teamleader.eu/#/reference/crm/companies/companies.untag\n\nTeamLeader::deals()-\u003elist($data = []); //https://developer.focus.teamleader.eu/#/reference/deals/deals/deals.list\nTeamLeader::deals()-\u003einfo($id); //https://developer.focus.teamleader.eu/#/reference/deals/deals/deals.info\nTeamLeader::deals()-\u003ecreate($data); //https://developer.focus.teamleader.eu/#/reference/deals/deals/deals.create\nTeamLeader::deals()-\u003eupdate($id, $data); //https://developer.focus.teamleader.eu/#/reference/deals/deals/deals.update\nTeamLeader::deals()-\u003emove($id, $phaseId); //https://developer.focus.teamleader.eu/#/reference/deals/deals/deals.move\nTeamLeader::deals()-\u003ewin($id); //https://developer.focus.teamleader.eu/#/reference/deals/deals/deals.win\nTeamLeader::deals()-\u003elose($id, $reason_id = null, $extra_info = null); //https://developer.focus.teamleader.eu/#/reference/deals/deals/deals.lose\nTeamLeader::deals()-\u003edelete($id); //https://developer.focus.teamleader.eu/#/reference/deals/deals/deals.delete\nTeamLeader::deals()-\u003elostReasons($data = []); //https://developer.focus.teamleader.eu/#/reference/deals/deals/lostreasons.list\n\nTeamLeader::files()-\u003elist($data = [])\nTeamLeader::files()-\u003einfo($id)\nTeamLeader::files()-\u003edownload($id)\nTeamLeader::files()-\u003eupload($name, $subject = [], $folder = 'General')\nTeamLeader::files()-\u003edelete($id)\n\nTeamLeader::invoicing()-\u003einvoices()-\u003elist($data = [])\nTeamLeader::invoicing()-\u003einvoices()-\u003einfo($id)\nTeamLeader::invoicing()-\u003einvoices()-\u003edraft($data)\nTeamLeader::invoicing()-\u003einvoices()-\u003eupdate($id, $data)\nTeamLeader::invoicing()-\u003einvoices()-\u003edelete($id)\nTeamLeader::invoicing()-\u003einvoices()-\u003edownload($id, $format = 'pdf')\nTeamLeader::invoicing()-\u003einvoices()-\u003ecopy($id)\nTeamLeader::invoicing()-\u003einvoices()-\u003ebook($id, $on)\nTeamLeader::invoicing()-\u003einvoices()-\u003eregisterPayment($id, $paid_at, $amount, $currency = 'EUR')\nTeamLeader::invoicing()-\u003einvoices()-\u003ecredit($id, $creditNoteDate)\nTeamLeader::invoicing()-\u003einvoices()-\u003ecreditPartially($id, $creditNoteDate, $groupedLines, $discount = [])\n\nTeamLeader::invoicing()-\u003ecreditNotes()-\u003elist($data = [])\nTeamLeader::invoicing()-\u003ecreditNotes()-\u003einfo($id)\nTeamLeader::invoicing()-\u003ecreditNotes()-\u003edownload($id, $format = 'pdf')\n\nTeamLeader::invoicing()-\u003etaxRates()-\u003elist()\n\nTeamLeader::invoicing()-\u003esubscriptions()-\u003elist($data = [])\nTeamLeader::invoicing()-\u003esubscriptions()-\u003einfo($id)\nTeamLeader::invoicing()-\u003esubscriptions()-\u003ecreate($data)\nTeamLeader::invoicing()-\u003esubscriptions()-\u003eupdate($id, $data)\nTeamLeader::invoicing()-\u003esubscriptions()-\u003edeactivate($id)\n\nTeamLeader::products()-\u003eproduct()-\u003ecategoriesList($data = [])\nTeamLeader::products()-\u003eproduct()-\u003elist($data = [])\nTeamLeader::products()-\u003eproduct()-\u003einfo($id)\nTeamLeader::products()-\u003eproduct()-\u003eadd($data)\n\nTeamLeader::mailTemplates()-\u003elist($data = [])\n\nTeamLeader::timeTracking()-\u003elist($data = [])\nTeamLeader::timeTracking()-\u003einfo($id)\nTeamLeader::timeTracking()-\u003eadd($data)\nTeamLeader::timeTracking()-\u003eupdate($id, $data)\nTeamLeader::timeTracking()-\u003eresume($id, $data)\nTeamLeader::timeTracking()-\u003edelete($id)\n\nTeamLeader::milestones()-\u003elist($data = [])\nTeamLeader::milestones()-\u003einfo($id)\nTeamLeader::milestones()-\u003eadd($data)\nTeamLeader::milestones()-\u003eupdate($id, $data)\nTeamLeader::milestones()-\u003edelete($id)\nTeamLeader::milestones()-\u003eclose($id)\nTeamLeader::milestones()-\u003eopen($id)\n\nTeamLeader::tasks()-\u003elist($data = [])\nTeamLeader::tasks()-\u003einfo($id)\nTeamLeader::tasks()-\u003eadd($data)\nTeamLeader::tasks()-\u003eupdate($id, $data)\nTeamLeader::tasks()-\u003edelete($id)\nTeamLeader::tasks()-\u003ecomplete($id)\nTeamLeader::tasks()-\u003ereopen($id)\nTeamLeader::tasks()-\u003eschedule($id)\n\n\nTeamLeader::webhooks()-\u003elist(); //https://developer.focus.teamleader.eu/#/reference/other/webhooks/webhooks.list\nTeamLeader::webhooks()-\u003eregister($data); //https://developer.focus.teamleader.eu/#/reference/other/webhooks/webhooks.register\nTeamLeader::webhooks()-\u003eunregister($url, $types); //https://developer.focus.teamleader.eu/#/reference/other/webhooks/webhooks.unregister\n```\n\nThe complete documentation can be found at: [http://www.madeit.be/](http://www.madeit.be/)\n\n# Support\n\nSupport github or mail: tjebbe.lievens@madeit.be\n\n# Contributing\n\nPlease try to follow the psr-2 coding style guide. http://www.php-fig.org/psr/psr-2/\n\n# License\n\nThis package is licensed under LGPL. You are free to use it in personal and commercial projects. The code can be forked\nand modified, but the original copyright author should always be included!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadeitbelgium%2Fteamleader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmadeitbelgium%2Fteamleader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadeitbelgium%2Fteamleader/lists"}