Skip to content
The Cervinodata PHP API Client allows you to retrieve data of multiple platforms with just one API connection.
PHP Shell
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.openapi-generator
docs/Api
lib
test/Api
.openapi-generator-ignore
.php_cs
.travis.yml
README.md
composer.json
git_push.sh
phpunit.xml.dist

README.md

cervinodata_api

Before you get going with the Cervinodata API, set up Cervinodata (read the support page here: How to set up the Cervinodata API).

To use the Cervinodata API, you need all of the following:

  1. An active Cervinodata account, you can start a free trial here
  2. At least one connection to a platform (check here)
  3. At least one account switched ON (check here)
  4. At least one data refresh executed (check here)
  5. An active API token (check here)

If you wish to automate your Cervinodata API connection, check out the list of client API's at https://github.com/Cervinodata.

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen

Requirements

PHP 5.5 and later

Installation & Usage

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/cervinodata/clientapi-php.git"
    }
  ],
  "require": {
    "cervinodata/clientapi-php": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/cervinodata_api/vendor/autoload.php');

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');



// Configure Bearer authorization: bearerAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPI\Client\Api\AdvertisingDataApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$organisation_uuid = 'organisation_uuid_example'; // string | Organisation uuid
$format = 'format_example'; // string | Output format

try {
    $result = $apiInstance->getAdAccounts($organisation_uuid, $format);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AdvertisingDataApi->getAdAccounts: ', $e->getMessage(), PHP_EOL;
}

?>

Documentation for API Endpoints

All URIs are relative to https://app.cervinodata.com/api/v1

Class Method HTTP request Description
AdvertisingDataApi getAdAccounts GET /data/ad-accounts/{organisationUuid} Return ad accounts by organisation
AdvertisingDataApi getAdCampaignReportPerDay GET /data/ad-campaign-report-per-day/{organisationUuid} Return ad campaign report per day by organisation
AdvertisingDataApi getAdCampaignReportPerOrganisationPerAccountPerDay GET /data/ad-campaign-report-per-organisation-per-account-per-day/{organisationUuids} Return ad campaign report per organisation per account per day
AdvertisingDataApi getAdCampaigns GET /data/ad-campaigns/{organisationUuid} Return ad campaigns by organisation
AnalyticsDataApi getViews GET /data/views/{organisationUuid} Return views by organisation
AnalyticsDataDefaultMetricsApi getAnalyticsReportPerCampaignPerDay GET /data/analytics-report-per-campaign-per-day/{organisationUuid} Return analytics report per campaign per day by organisation
AnalyticsDataDefaultMetricsApi getAnalyticsReportPerChannelGroupPerDay GET /data/analytics-report-per-channel-group-per-day/{organisationUuid} Return analytics report per channel group per day by organisation
AnalyticsDataDefaultMetricsApi getAnalyticsReportPerDevicePerChannelGroupPerOrganisationPerViewPerDay GET /data/analytics-report-per-device-per-channel-group-per-organisation-per-view-per-day/{organisationUuids} Return analytics report per device per channel group per organisation per view per day
AnalyticsDataDefaultMetricsApi getAnalyticsReportPerDevicePerDay GET /data/analytics-report-per-device-per-day/{organisationUuid} Return analytics report per device per day by organisation
AnalyticsDataDefaultMetricsApi getAnalyticsReportPerSourceMediumPerDay GET /data/analytics-report-per-source-medium-per-day/{organisationUuid} Return analytics report per source medium per day by organisation
AnalyticsDataGoalsApi getAnalyticsGoalReportPerCampaignPerDay GET /data/analytics-goal-report-per-campaign-per-day/{organisationUuid} Return analytics goal report per campaign per day by organisation
AnalyticsDataGoalsApi getAnalyticsGoalReportPerChannelGroupPerDay GET /data/analytics-goal-report-per-channel-group-per-day/{organisationUuid} Return analytics goal report per channel group per day by organisation
AnalyticsDataGoalsApi getAnalyticsGoalReportPerDevicePerDay GET /data/analytics-goal-report-per-device-per-day/{organisationUuid} Return analytics goal report per device per day by organisation
AnalyticsDataGoalsApi getAnalyticsGoalReportPerSourceMediumPerDay GET /data/analytics-goal-report-per-source-medium-per-day/{organisationUuid} Return analytics goal report per source medium per day by organisation
CampaignGroupApi getCampaignGroupAdReportPerOrganisationPerDay GET /data/campaign-group-ad-report-per-organisation-per-day/{organisationUuids} Return campaign group ad report per organisation per day
CampaignGroupApi getCampaignGroupAnalyticsReportPerOrganisationPerDay GET /data/campaign-group-analytics-report-per-organisation-per-day/{organisationUuids} Return campaign group analytics report per organisation per day
CampaignGroupApi getCampaignGroupReportPerOrganisationPerDay GET /data/campaign-group-report-per-organisation-per-day/{organisationUuids} Return campaign group report per organisation per day
GenericDataApi getCampaignGroups GET /data/campaign-groups Return campaign groups
GenericDataApi getOrganisations GET /data/organisations Return organisations

Documentation For Models

Documentation For Authorization

bearerAuth

  • Type: Bearer authentication

Author

support@cervinodata.com

You can’t perform that action at this time.