avaro / placetel-php-client
A PHP client library for the Placetel REST API
Installs: 10
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/avaro/placetel-php-client
Requires
- php: ^8.0
- guzzlehttp/guzzle: ^7.10
This package is not auto-updated.
Last update: 2025-10-04 04:31:22 UTC
README
Placetel PHP Client is a modern, easy-to-use PHP package for integrating the Placetel REST API into your own applications or CRM systems. With this client, you can easily retrieve, create, update, and delete contacts, all through a clean, object-oriented API.
Features
- Fully CRUD-capable Contact Repository (
create
,getById
,update
,delete
) - Modern PHP 8+ design with namespaces and DTOs
- Composer-ready and immediately usable in your own projects
Installation
Install via Composer:
composer require avaro-crm/placetel-php-client
Quick Start
require 'vendor/autoload.php'; use Avaro\Placetel\Client; use Avaro\Placetel\Entity\Contact; $client = new Client(getenv('PLACETEL_API_TOKEN')); // Retrieve all contacts $contacts = $client->contacts()->all(); foreach ($contacts as $contact) { echo $contact->getFirstName() . ' ' . $contact->getLastName() . PHP_EOL; } // Create a new contact $newContact = new Contact( firstName: "Anna", lastName: "Schmidt", email: "anna.schmidt@example.com", company: "Avaro GmbH" ); $created = $client->contacts()->create($newContact); echo "Contact created with ID: " . $created->getId(); // Update a contact $created->setEmail("anna.maria@example.com"); $updated = $client->contacts()->update($created); // Delete a contact $client->contacts()->delete($updated->getId());