PHPackages                             citilink/expert-sender-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. citilink/expert-sender-api

AbandonedArchivedLibrary

citilink/expert-sender-api
==========================

API for expert sender service

v1.6.0(5y ago)2834.7k↓25%13[35 issues](https://github.com/citilinkru/expert-sender-api/issues)[1 PRs](https://github.com/citilinkru/expert-sender-api/pulls)MITPHPPHP ^7.1.0

Since Sep 26Pushed 5y ago4 watchersCompare

[ Source](https://github.com/citilinkru/expert-sender-api)[ Packagist](https://packagist.org/packages/citilink/expert-sender-api)[ RSS](/packages/citilink-expert-sender-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (9)Dependencies (7)Versions (27)Used By (0)

(UNSUPPORTED!) Expert Sender Api
================================

[](#unsupported-expert-sender-api)

**This repository is no longer supported. Looking for a new MAINTAINER**

[![Build Status](https://camo.githubusercontent.com/b71b73365e7ae243b9a0029119772fc53cf38f74da48fde733bc786e223d065c/68747470733a2f2f7472617669732d63692e6f72672f636974696c696e6b72752f6578706572742d73656e6465722d6170692e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/citilinkru/expert-sender-api)

[PHP API](https://sites.google.com/a/expertsender.com/api-documentation/) for [Expert Sender](http://www.expertsender.com/)

*fork of [LinguaLeo/expert-sender-api](https://github.com/LinguaLeo/expert-sender-api)*

Table of contents
-----------------

[](#table-of-contents)

- [Requirements](#requirements)
- [Installation](#installaion)
- [Usage](#usage)
- [Documentation](#documentation)
    - [Create API object](#create-api)
    - [Get server time](#get-server-time)
    - [Messages](#messages)
        - [Send transactional messages](#send-transactional-messages)
        - [Send system transactional messages](#send-system-transactional-messages)
        - [Send trigger messages](#send-trigger-messages)
    - [Subscribers](#subscribers)
        - [Get subscriber information](#get-subscriber-information)
        - [Add/Edit subscriber](#addedit-subscriber)
            - [How to change email or phone](#how-to-change-Email-or-Phone)
        - [Delete subscriber](#delete-subscriber)
        - [Get removed subscribers](#get-removed-subscribers)
        - [Get snoozed subscribers](#get-snoozed-subscribers)
        - [Snooze subscriber](#snooze-subscriber)
        - [Get subscriber activity](#get-subscriber-activity)
        - [Get subscriber segments](#get-subscriber-segments)
        - [Get segment size](#get-segment-size)
    - [Get bounces list](#get-bounces-list)
    - [Data Tables](#data-tables)
        - [Get list of tables](#get-list-of-tables)
            - [Tables summary](#tables-summary)
            - [Table details](#table-details)
        - [Get data](#get-data)
        - [Count rows](#count-rows)
        - [Clear table](#clear-table)
        - [Add row](#add-row)
        - [Add multiple rows](#add-multiple-rows)
        - [Update row](#update-row)
        - [Delete row](#delete-row)
        - [Delete rows](#delete-rows)

Requirements
------------

[](#requirements)

- PHP 7.1.0 or greater
- [Guzzle 6](https://github.com/guzzle/guzzle)

Installation
------------

[](#installation)

The recommended way to install is through [Composer](http://getcomposer.org).

```
composer require citilink/expert-sender-api
```

Usage
-----

[](#usage)

```
// ...

use GuzzleHttp\Client;
use Citilink\ExpertSenderApi\RequestSender;
use Citilink\ExpertSenderApi\ExpertSenderApi;
use Citilink\ExpertSenderApi\Model\SubscribersRequest\SubscriberInfo;
use Citilink\ExpertSenderApi\Model\SubscribersRequest\Options;
use Citilink\ExpertSenderApi\Model\SubscribersPostRequest\Identifier;
use Citilink\ExpertSenderApi\Enum\SubscribersPostRequest\Mode;

// ...

$httpClient = new Client(['base_uri' => 'https://api.esv2.com/']);
$requestSender = new RequestSender($httpClient, 'api-key');
$api = new ExpertSenderApi($requestSender);

$email = 'mail@mail.com';
$listId = 25;
$subscriberData = new SubscriberInfo(Identifier::createEmail($email), $listId);
$subscriberInfo->setFirstName('John');
$subscriberInfo->setLastName('Doe');
$subscriberInfo->setVendor('vendor');
$subscriberInfo->setTrackingCode('tracking code');
// another sets

$addResult = $api->subscribers()->addOrEdit([$subscriberData]);
if ($addResult->isOk()) {
    // ... make some stuff
} else {
    $errorMessages = $addResult->getErrorMessages();
    $errorCode = $addResult->getErrorCode();
}

// ...
```

Documentation
-------------

[](#documentation)

### Create API

[](#create-api)

```
use GuzzleHttp\Client;
use Citilink\ExpertSenderApi\RequestSender;
use Citilink\ExpertSenderApi\ExpertSenderApi;

// ...

// api endpoint always the same
$apiEndpoint = 'https://api.esv2.com/';

// http client must implements Guzzle's ClientInterface
$httpClient = new Client(['base_uri' => $apiEndpoint]);

// request sender object must implements RequestSenderInterface
$requestSender = new RequestSender($httpClient, 'api-key');

// now we have api object and can access to all methods of api
$api = new ExpertSenderApi($requestSender);
```

### Get server time

[](#get-server-time)

[documentation](https://sites.google.com/a/expertsender.com/api-documentation/methods/get-server-time)

```
$response = $api->getServerTime();
if ($response->isOk()) {
    $dateTime = $response->getServerTime();
    echo $dateTime->format('Y-m-d H:i:s');
} else {
    // handle errors
}
```

### Messages

[](#messages)

#### Send transactional messages

[](#send-transactional-messages)

[documentation](https://sites.google.com/a/expertsender.com/api-documentation/methods/messages/send-transactional-messages)

```
// ...

use Citilink\ExpertSenderApi\Model\TransactionalPostRequest\Receiver;
use Citilink\ExpertSenderApi\Model\TransactionalPostRequest\Snippet;
use Citilink\ExpertSenderApi\Model\TransactionalPostRequest\Attachment;

// ...

// message id is required
$messageId = 15;

// list id is optional, read documentation to get more inforamtion
$listId = 24;
$receiverByEmail = Receiver::createByEmail('mail@mail.com', $listId);
$receiverByEmailMd5 = Receiver::createByEmailMd5('md5');
$receiverById = Receiver::createById(862547);

// snippets are optional
$snippets = [];
$snippets[] = new Snippet('name1', 'value1');
$snippets[] = new Snippet('name2', 'value2');

// attachments are optional
$attachments = [];
$attachments[] = new Attachment('filename.jpeg', base64_encode('content'), 'image/jpeg');

// should response has guid of sent message
$returnGuid = true;

$response = $api->messages()->sendTransactionalMessage($messageId, $receiverById, $snippets, $attachments, $returnGuid);

if ($response->isOk()) {
    // guid available, only if returnGuid=true in request
    $guid = $response->getGuid();
} else {
    // handle errors
}
```

#### Send system transactional messages

[](#send-system-transactional-messages)

[documentation](https://sites.google.com/a/expertsender.com/api-documentation/methods/messages/send-system-transactional-messages)

```
// ...

use Citilink\ExpertSenderApi\Model\TransactionalPostRequest\Receiver;
use Citilink\ExpertSenderApi\Model\TransactionalPostRequest\Snippet;
use Citilink\ExpertSenderApi\Model\TransactionalPostRequest\Attachment;

// ...

// message id is required
$messageId = 15;

// list id is optional, read documentation to get more inforamtion
$listId = 24;
$receiverByEmail = Receiver::createByEmail('mail@mail.com', $listId);
$receiverByEmailMd5 = Receiver::createByEmailMd5('md5');
$receiverById = Receiver::createById(862547);

// snippets are optional
$snippets = [];
$snippets[] = new Snippet('name1', 'value1');
$snippets[] = new Snippet('name2', 'value2');

// attachments are optional
$attachments = [];
$attachments[] = new Attachment('filename.jpeg', base64_encode('content'), 'image/jpeg');

// should response has guid of sent message
$returnGuid = true;

$response = $api->messages()->sendSystemTransactionalMessage($messageId, $receiverById, $snippets, $attachments, $returnGuid);

if ($response->isOk()) {
    // guid available, only if returnGuid=true in request
    $guid = $response->getGuid();
} else {
    // handle errors
}
```

#### Send trigger messages

[](#send-trigger-messages)

[documentation](https://sites.google.com/a/expertsender.com/api-documentation/methods/messages/send-trigger-messages)

```
// ...

use Citilink\ExpertSenderApi\Model\TriggersPostRequest\Receiver;

// ...

$triggerMessageId = 25;
$response = $api->messages()->sendTriggerMessage(
    $triggerMessageId,
    [
        Receiver::createFromEmail('mail@mail.com'),
        Receiver::createFromId(384636),
    ]
);

if ($response->isOk()) {
    // do some stuff
} else {
    // handle errors
}
```

### Subscribers

[](#subscribers)

#### Get subscriber information

[](#get-subscriber-information)

[documentation](https://sites.google.com/a/expertsender.com/api-documentation/methods/subscribers/get-subscriber-information)

```
$subscriberEmail = 'mail@mail.com';

// get short info about subscriber
$shortInfoResponse = $api->subscribers()->getShort($subscriberEmail);

// get long info about subscriber
$longInfoResponse = $api->subscribers()->getLong($subscriberEmail);

// get full info about subscriber
$fullInfoResponse = $api->subscribers()->getFull($subscriberEmail);

// get events history
$eventsHistoryResponse = $api->subscribers()->getEventsHistory($subscriberEmail);
```

#### Add/Edit subscriber

[](#addedit-subscriber)

[documentation](https://sites.google.com/a/expertsender.com/api-documentation/methods/subscribers/add-subscriber)

```
// ...

use Citilink\ExpertSenderApi\Model\SubscribersPostRequest\Options;
use Citilink\ExpertSenderApi\Model\SubscribersPostRequest\Identifier;
use Citilink\ExpertSenderApi\Enum\SubscribersPostRequest\Mode;

// ...

$listId = 25;

// to add new subscriber you can use one of identifiers email or phone (but not others, read documentation
// for more information). You can use phone identifier, if sms channel is turned on, otherwise api
// return 400 response.
$emailIdentifier = Identifier::createEmail('mail@mail.com');
$phoneIdentifier = Identifier::createPhone('89159109933');

// if you want to edit subscriber you can use more identifiers
$emailMd5Indentifier = Identifier::createEmailMd5('md5');
$customSubscriberIdentifier = Identifier::createCustomSubscriberId('cuscom-subscriber-id');
$idIdentifier = Identifier::createId(100);

$identifierToUse = $emailIdentifier;
$subscriberData = new SubscriberInfo($identifierToUse, $listId);
$subscriberData->setFirsname('firstname');
// another sets...

// if you want to get additonal data on response, or verbose errors, you can create object
// with type Options. It's optional
$returnAdditionalDataOnResponse = true;
$useVerboseErrors = true;
$options = new Options($returnAdditionalDataOnResponse, $useVerboseErrors);

// if you want use another adding mode, create it. It's optional too and by default "AddAndUpdate"
$mode = Mode::ADD_AND_UPDATE();

// you can add more than one subscriber to request
$addOrEditResponse = $api->subscribers()->addOrEdit([$subscriberData], $options, $mode);

if ($addOrEditResponse->isOk()) {
    // do something if everything is ok
} else {
    // handle errors
}
```

##### How to change Email or Phone

[](#how-to-change-email-or-phone)

To change email or phone you must choose another identifier, for example:

- if you want to change email, you can choose CustomSubscriberId, Id or Phone identifier
- if you want to change phone, you can choose Email, EmailMd5, Id or CustomSubscriberId identifier
- if you want to change both, you can choose CustomSubscriberId or Id identifier

Code examples:

- Change email with Id:

    ```
    $identifier = Identifier::createId(45603);
    $subscriberData = new SubscriberData($identifier, $listId);
    $subscriberData->setEmail('new_email@mail.com');
    $api->subscribers()->addOrEdit([$subscriberData]);
    ```
- Change phone with EmailMd5:

    ```
    $identifier = Identifier::createEmailMd5('md5');
    $subscriberData = new SubscriberData($identifier, $listId);
    $subscriberData->setPhone('9153452412');
    $api->subscribers()->addOrEdit([$subscriberData]);
    ```
- Change both with ID

    ```
    $identifier = Identifier::createId(230584);
    $subscriberData = new SubscriberData($identifier, $listId);
    $subscriberData->setPhone('9153452412');
    $subscriberData->setEmail('new_email@mail.com');
    $api->subscribers()->addOrEdit([$subscriberData]);
    ```

#### Delete subscriber

[](#delete-subscriber)

[documentation](https://sites.google.com/a/expertsender.com/api-documentation/methods/subscribers/delete-subscriber)

```
$listId = 25;
$subscriberId = 5839274;
$subscriberEmail = 'mail@mail.com';

// delete by subscriber's ID from list
$api->subscribers()->deleteById($subscriberId, $listId);

// delete by subscriber's email from every list
$api->subscribers()->deleteByEmail($subscriberEmail);
```

#### Get removed subscribers

[](#get-removed-subscribers)

[documentation](https://sites.google.com/a/expertsender.com/api-documentation/methods/subscribers/get-removed-subscribers)

```
// ...

use Citilink\ExpertSenderApi\Enum\RemovedSubscribersGetRequest\RemoveType;
use Citilink\ExpertSenderApi\Enum\RemovedSubscribersGetRequest\Option;

// ...

// you can choose list ids
$listIds = [1, 2, 3];

// and/or you can choose remove types (reasons)
$removeTypes = [RemoveType::OPT_OUT_LINK(), RemoveType::USER_UNKNOWN()];

// and/or start date
$startDate = new \DateTime('2015-01-01');

// and/or end date
$endDate = new \DateTime('2016-01-01');

// and/or option. If specified, additional subscriber information will be returned
$option = Option::CUSTOMS();

$response = $api->subscribers()->getRemovedSubscribers($listIds, $removeTypes, $startDate, $endDate, $option);

foreach ($response->getRemovedSubscribers() as $removedSubscriber) {
    $email = $removedSubscriber->getEmail();
    // subscriber data present, only if Customs option specified
    $subscriberData = $removedSubscriber->getSubscriberData();
    $id = $subscriberData->getId();
    $properties = $subscriberData->getProperties();
}
```

#### Get snoozed subscribers

[](#get-snoozed-subscribers)

[documentation](https://sites.google.com/a/expertsender.com/api-documentation/methods/subscribers/get-snoozed-subscribers)

```
// every parameter is optional
$listIds = [1,2,3];
$startDate = new \DateTime('2017-01-01');
$endDate = new \DateTime('2017-02-02');
$response = $api->subscribers()->getSnoozedSubscribers($listIds, $startDate, $endDate);
if ($response->isOk()) {
    foreach ($response->getSnoozedSubscribers() as $snoozedSubscriber) {
        echo $snoozedSubscriber->getEmail();
        echo $snoozedSubscriber->getListId();
        echo $snoozedSubscriber->getSnoozedUntil();
    }
} else {
    // handle errors
}
```

#### Snooze subscriber

[](#snooze-subscriber)

[documentation](https://sites.google.com/a/expertsender.com/api-documentation/methods/subscribers/snooze-subscriber)

##### By ID

[](#by-id)

```
// Unique subscriber identifier
$subscriberId = 12;
// Number of weeks the subscription will be snoozed for
$snoozeWeeks = 20;
// List ID
$listId = 23;

// Snooze subscriber with id #12 for 20 weeks in List #23
$snoozedByIdResponse = $api->subscribers()->snoozeSubscriberById($subscriberId, $snoozeWeeks, $listId);
if ($snoozedByIdResponse->isOk()) {
    // ok
} else {
    // handle errors
}
```

##### By Email

[](#by-email)

```
// subscriber's email
$subscriberEmail = 'subscriber@mail.com';
// Number of weeks the subscription will be snoozed for
$snoozeWeeks = 10;

// Snooze subscriber with email 'subscriber@mail.com' for 20 weeks in all lists
$snoozedByEmailResponse = $api->subscribers()->snoozeSubscriberByEmail($subscriberEmail, $snoozeWeeks);
if ($snoozedByEmailResponse->isOk()) {
    // ok
} else {
    // handle errors
}
```

#### Get subscriber activity

[](#get-subscriber-activity)

[documentation](https://sites.google.com/a/expertsender.com/api-documentation/methods/get-subscriber-activity)

```
// ...
$returnGuidInResponse = true;
$returnTitleInResponse = true;
$subscriptions = $api->subscribers()->getSubscriberActivity()->getSubscriptions(new \DateTime('2017-02-02'))
    ->getSubscriptions();

$confirmations = $api->subscribers()->getSubscriberActivity()->getConfirmations(new \DateTime('2017-02-02'))
    ->getConfirmations();

$sends = $api->subscribers()->getSubscriberActivity()->getSends(
    new \DateTime('2017-06-24'),
    ReturnColumnsSet::STANDARD(),
    $returnGuidInResponse
)->getSends();

$opens = $api->subscribers()->getSubscriberActivity()->getOpens(
    new \DateTime('2017-06-24'),
    ReturnColumnsSet::STANDARD(),
    $returnGuidInResponse
)->getOpens();

$clicks = $api->subscribers()->getSubscriberActivity()->getClicks(
    new \DateTime('2017-06-24'),
    ReturnColumnsSet::STANDARD(),
    $returnTitleInResponse,
    $returnGuidInResponse
)->getClicks();

$complaints = $api->subscribers()->getSubscriberActivity()->getComplaints(
    new \DateTime('2017-06-24'),
    ReturnColumnsSet::STANDARD(),
    $returnGuidInResponse
)->getComplaints();

$removals = $api->subscribers()->getSubscriberActivity()->getRemovals(
    new \DateTime('2017-06-24'),
    ReturnColumnsSet::STANDARD(),
    $returnGuidInResponse
)->getRemovals();

$bounces = $api->subscribers()->getSubscriberActivity()->getBounces(
    new \DateTime('2017-06-24'),
    ReturnColumnsSet::STANDARD(),
    $returnGuidInResponse
)->getBounces();

$goals = $api->subscribers()->getSubscriberActivity()->getGoals(
    new \DateTime('2017-06-24'),
    ReturnColumnsSet::STANDARD(),
    $returnGuidInResponse
)->getGoals();
```

#### Get subscriber segments

[](#get-subscriber-segments)

[documentation](https://sites.google.com/a/expertsender.com/api-documentation/methods/get-subscriber-segments)

```
$response = $api->subscribers()->getSubscriberSegments();
if ($response->isOk()) {
    foreach($response->getSegments() as $segment) {
        echo $segment->getId();
        echo $segment->getName();
    }
} else {
    // handle errors
}
```

#### Get segment size

[](#get-segment-size)

[documentation](https://sites.google.com/a/expertsender.com/api-documentation/methods/get-segment-size)

```
$segmentId = 25;
$response = $api->subscribers()->getSegmentSize($segmentId);
if ($response->isOk()) {
    echo $response->getSize();
    echo $response->getCountDate()->format('Y-m-d H:i:s);
} else {
    // handle errors
}
```

### Get bounces list

[](#get-bounces-list)

[documentation](https://sites.google.com/a/expertsender.com/api-documentation/methods/get-bounces-list)

```
// ...
use Citilink\ExpertSenderApi\Enum\BouncesGetRequest\BounceType;
// ...
$startDate = new \DateTime('2015-01-01');
$endDate = new \DateTime('2016-01-01');
// bounce type is optional, null by defalt
$bounceType = BounceType::MAILBOX_FULL();

$response = $api->getBouncesList($startDate, $endDate, $bounceType);

foreach ($response->getBounces() as $bounce) {
    $date = $bounce->getDate();
    $email = $bounce->getEmail();
    // etc
}
```

Data Tables
-----------

[](#data-tables)

[documentation](https://sites.google.com/a/expertsender.com/api-documentation/methods/datatables)

### Get list of tables

[](#get-list-of-tables)

[documentation](https://sites.google.com/a/expertsender.com/api-documentation/methods/datatables/get-list-of-tables)

#### Tables summary

[](#tables-summary)

```
$response = $api->dataTables()->getTablesList();
if ($response->isOk()) {
   foreach ($response->getTables() as $table)) {
        echo $table->getId();
        echo $table->getName();
        echo $table->getColumnsCount();
        echo $table->getRelationshipsCount();
        echo $table->getRelationshipsDestinationCount();
        echo $table->getRowsCount();
        echo $table->getSize();
   }
} else {
    // handle errors
}
```

#### Table details

[](#table-details)

```
$response = $api->dataTables()->getTableDetails('table-name');
if ($response->isOk()) {
    $tableDetails = $response->getTableDetails();
    echo $tableDetails->getId();
    echo $tableDetails->getName();
    echo $tableDetails->getColumnsCount();
    echo $tableDetails->getRelationshipsCount();
    echo $tableDetails->getRelationshipsDestinationCount();
    echo $tableDetails->getRowsCount();
    echo $tableDetails->getDescription();
    foreach ($tableDetails->getColumns() as $column) {
        echo $column->getName();
        echo $column->getColumnType();
        echo $column->getLength();
        echo $column->getDefaultValue() ?: 'No default value';
        echo $column->isPrimaryKey() ? 'true' : 'false';
        echo $column->isRequired() ? 'true' : 'false';
    }
} else {
    // handle errors
}
```

### Get data

[](#get-data)

[documentation](https://sites.google.com/a/expertsender.com/api-documentation/methods/datatables/get-data)

```
// ...
use Citilink\ExpertSenderApi\Enum\DataTablesGetDataPostRequest\Direction;
use Citilink\ExpertSenderApi\Enum\DataTablesGetDataPostRequest\Operator;
use Citilink\ExpertSenderApi\Model\WhereCondition;
use Citilink\ExpertSenderApi\Model\DataTablesGetDataPostRequest\OrderByRule;
// ...
// limit is optional, and null by default
$limit = 30;
$response = $api->dataTables()->getRows(
    // table name to get data from
    'table-name',
    // array of column names to get from table
    ['ColumnName1', 'ColumnName2'],
    // where conditions to filter data
    [
        new WhereCondition('ColumnName1', Operator::EQUAL(), 'value'),
        new WhereCondition('ColumnName2', Operator::LIKE(), 'string'),
        new WhereCondition('ColumnName3', Operator::GREATER(), 24),
        new WhereCondition('ColumnName4', Operator::LOWER(), 10.54),
    ],
    // sorting rules
    [
        new OrderByRule('ColumnName1', Direction::ASCENDING()),
        new OrderByRule('ColumnName1', Direction::DESCENDING()),
    ],
    // and limit
    $limit
);

if ($response->isOk()) {
    // if everything is okay, you can get csv reader and fetch data
    $csvReader = $response->getCsvReader();
    foreach ($csvReader->fetchAll() as $row) {
        // fetched data will have column names in keys and values ... will be values
        echo $row['ColumnName1'];
        echo $row['ColumnName2'];
    }
} else {
    // handle errors
}
```

### Count rows

[](#count-rows)

[documentation](https://sites.google.com/a/expertsender.com/api-documentation/methods/datatables/count-rows)

```
// ...
use Citilink\ExpertSenderApi\Enum\DataTablesGetDataPostRequest\Operator;
use Citilink\ExpertSenderApi\Model\WhereCondition;
// ...
$response = $api->dataTables()->getRowsCount(
    'table-name',
    [
        new WhereCondition('Column1', Operator::EQUAL(), 12),
        new WhereCondition('Column2', Operator::GREATER(), 12.53),
        new WhereCondition('Column3', Operator::LOWER(), -0.56),
        new WhereCondition('Column5', Operator::LIKE(), 'string'),
    ]
);

if ($response->isOk()) {
    $count = $response->getCount();
} else {
    // handle errors
}
```

### Clear table

[](#clear-table)

[documentation](https://sites.google.com/a/expertsender.com/api-documentation/methods/datatables/clear-table)

```
$response = $api->dataTables()->clearTable('table-name');
if ($response->isOk()) {
    // table has been cleared
} else {
    // handle errors
}
```

### Add row

[](#add-row)

Use [add multiple rows method](#add-multiple-rows) to insert one row

### Add multiple rows

[](#add-multiple-rows)

[documentation](https://sites.google.com/a/expertsender.com/api-documentation/methods/datatables/add-multiple-rows)

```
// ...
use Citilink\ExpertSenderApi\Model\Column;
use Citilink\ExpertSenderApi\Model\DataTablesAddMultipleRowsPostRequest\Row;
// ...
$response = $api->dataTables()->addRows(
    // table name to insert rows
    'table-name',
    // rows to insert
    [
        new Row(
            [
                // fields to set
                new Column('ColumnName1', 10),
                new Column('ColumnName2', 10.5),
                new Column('ColumnName3', 'string'),
            ]
        ),
        new Row(
            [
                new Column('ColumnName1', 25),
                new Column('ColumnName2', 0.45),
                new Column('ColumnName3', 'value'),
            ]
        ),
    ]
);

if ($response->isOk()) {
    // make some stuff
} else {
    // handle errors
    echo $response->getErrorCode();
    foreach ($response->getErrorMessages() as $errorMessage) {
        echo $errorMessage->getMessage();
    }
}
```

### Update row

[](#update-row)

[documentation](https://sites.google.com/a/expertsender.com/api-documentation/methods/datatables/update-row)

```
// ...
use Citilink\ExpertSenderApi\Model\Column;
// ...
$response = $api->dataTables()->updateRow(
    // table name
    'table-name',
    // primary keys to find row
    [
        new Column('ColumnName1', 12),
        new Column('ColumnName2', 'value'),
    ],
    // fields to change
    [
        new Column('ColumnName3', 25),
        new Column('ColumnName4', 'string'),
        new Column('ColumnName5', 25.4)
    ]
);

if ($response->isOk()) {
    // make some stuff
} else {
    // handle errors
    echo $response->getErrorCode();
    foreach ($response->getErrorMessages() as $errorMessage) {
        echo $errorMessage->getMessage();
    }
}
```

### Delete row

[](#delete-row)

[documentation](https://sites.google.com/a/expertsender.com/api-documentation/methods/datatables/delete-row)

```
// ...
use Citilink\ExpertSenderApi\Model\Column;
// ...
$response = $api->dataTables()->deleteOneRow(
    // table name to update rows
    'table-name',
    // primary keys to find row
    [
        new Column('ColumnName1', 12),
        new Column('ColumnName2', 'value'),
    ]
);

if ($response->isOk()) {
    // make some stuff
} else {
    // handle errors
    echo $response->getErrorCode();
    foreach ($response->getErrorMessages() as $errorMessage) {
        echo $errorMessage->getMessage();
    }
}
```

### Delete rows

[](#delete-rows)

[documentation](https://sites.google.com/a/expertsender.com/api-documentation/methods/datatables/delete-rows)

```
// ...
use Citilink\ExpertSenderApi\Model\DataTablesDeleteRowsPostRequest\Filter;
use Citilink\ExpertSenderApi\Enum\DataTablesDeleteRowsPostRequest\FilterOperator;
// ...
$response = $api->dataTables()->deleteRows(
    'table-name',
    [
        new Filter('Column1', FilterOperator::EQ(), 12),
        new Filter('Column2', FilterOperator::GE(), 56.7),
        new Filter('Column3', FilterOperator::EQ(), 'string'),
        new Filter('Column4', FilterOperator::GT(), 89.234),
        new Filter('Column5', FilterOperator::LT(), 87.3),
        new Filter('Column6', FilterOperator::LE(), 98),
    ]
);

if ($response->isOk()) {
    $count = $response->getCount();
} else {
    // handle errors
}
```

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity37

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~116 days

Recently: every ~258 days

Total

23

Last Release

2057d ago

Major Versions

v0.4.0 → v1.0.02017-08-16

PHP version history (2 changes)0.1.1PHP &gt;=5.4.0

v0.4.0PHP ^7.1.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/761d5a7ce11f6f69c1dd108affdcb3c2155b317112da2e2723cb5be5025659a7?d=identicon)[citilink](/maintainers/citilink)

---

Top Contributors

[![AmsTaFFix](https://avatars.githubusercontent.com/u/3091599?v=4)](https://github.com/AmsTaFFix "AmsTaFFix (35 commits)")[![liderman](https://avatars.githubusercontent.com/u/8589259?v=4)](https://github.com/liderman "liderman (23 commits)")[![vitkovskii](https://avatars.githubusercontent.com/u/2269880?v=4)](https://github.com/vitkovskii "vitkovskii (19 commits)")[![alexandrfox](https://avatars.githubusercontent.com/u/199416?v=4)](https://github.com/alexandrfox "alexandrfox (15 commits)")[![MacDada](https://avatars.githubusercontent.com/u/136261?v=4)](https://github.com/MacDada "MacDada (7 commits)")[![nuwak](https://avatars.githubusercontent.com/u/4612469?v=4)](https://github.com/nuwak "nuwak (3 commits)")[![rdmrcv](https://avatars.githubusercontent.com/u/242112?v=4)](https://github.com/rdmrcv "rdmrcv (2 commits)")[![dnabatchikov](https://avatars.githubusercontent.com/u/12435223?v=4)](https://github.com/dnabatchikov "dnabatchikov (1 commits)")[![yapro](https://avatars.githubusercontent.com/u/263248?v=4)](https://github.com/yapro "yapro (1 commits)")

---

Tags

api-clientexpert-senderexpertsender

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/citilink-expert-sender-api/health.svg)

```
[![Health](https://phpackages.com/badges/citilink-expert-sender-api/health.svg)](https://phpackages.com/packages/citilink-expert-sender-api)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M647](/packages/sylius-sylius)[symfony/mailer

Helps sending emails

1.6k368.1M951](/packages/symfony-mailer)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19462.3M1.3k](/packages/drupal-core)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6939.5M340](/packages/drupal-core-recommended)[laravel-zero/framework

The Laravel Zero Framework.

3371.4M367](/packages/laravel-zero-framework)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
