$client = GoHighLevel::client($access_token,'2021-07-28');
$contactResource = $client->contacts();
$contact = $contactResource->get(string $contactId);
$contact = $contactResource->update(string $contactId, [
//body
]);
$contact = $contactResource->delete(string $contactId);
$contact = $contactResource->upsert([
//body
]);
$contact = $contactResource->byBusiness(string $businessId);
$contact = $contactResource->create([
//body
]);
$contacts = $contactResource->list(string $locationId);
$taskResource = $contactResource->tasks();
$tasks = $taskResource->list(string $contactId);
$task = $taskResource->create(string $contactId, [
//body
]);
$task = $taskResource->get(string $contactId, string $taskId);
$task = $taskResource->update(string $contactId, string $taskId, [
//body
]);
$task = $taskResource->delete(string $contactId, string $taskId);
$task = $taskResource->completed(string $contactId, string $taskId, bool $completed);
$appointmentResource = $contactResource->appointments();
$contacts = $appointmentResource->contacts(string $contactId);
$tagsResource = $contactResource->tags();
$tag = $tagsResource->create(string $contactId, [
// tags
]);
$tag = $tagsResource->remove(string $contactId);
$notesResource = $contactResource->notes();
$notes = $notesResource->list(string $contactId);
$note = $notesResource->create(string $contactId, string $userId, string $body);
$note = $notesResource->get(string $contactId, string $id);
$note = $notesResource->update(string $contactId, string $id, string $userId, string $body);
$note = $notesResource->delete(string $contactId, string $id);
$campaignResource = $contactResource->campaign();
$campaign = $campaignResource->create(string $contactId, string $campaignId);
Or
$campaign = $campaignResource->add(string $contactId, string $campaignId);
$campaign = $campaignResource->removeContact(string $contactId, string $campaignId);
$campaign = $campaignResource->removeContactFromAll(string $contactId);
$workflowResource = $contactResource->workflow();
$workflow = $workflowResource->create(string $contactId, string $workflowId, string $eventStartTime);
Or
$workflow = $workflowResource->add(string $contactId, string $workflowId, string $eventStartTime);
$workflow = $workflowResource->delete(string $contactId, string $workflowId);
$resource = $contactResource->bulk(string $locationId, array $ids, string $businessId);
$searchResource = $contactResource->search();
$result = $searchResource->query([
//query parameters
]);
$result = $searchResource->getDuplicate(string $locationId, [
//query parameters
]);
$followerResource = $contactResource->followers();
$follower = $followerResource->add(string $contactId, [
"sx6wyHhbFdRXh302Lunr","sx6wyHhbFdRXh302Lunr"
]);