Sirena API for lead providers and prospect data manipulation
This PHP package is automatically generated by the Swagger Codegen project:
- API version: 1.5.0
- Build package: io.swagger.codegen.languages.PhpClientCodegen For more information, please visit http://www.getsirena.com
PHP 5.4.0 and later
To install the bindings via Composer, add the following to composer.json
:
{
"repositories": [
{
"type": "git",
"url": "https://github.com/zephia/sirena-api-client.git"
}
],
"require": {
"zephia/sirena-api-client": "1.*"
}
}
Then run composer install
Download the files and include autoload.php
:
require_once('/path/to/SwaggerClient-php/autoload.php');
To run the unit tests:
composer install
./vendor/bin/phpunit
Please follow the installation procedure and then run the following:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKey
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer');
// Configure OAuth2 access token for authorization: OAuth2
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$api_instance = new Swagger\Client\Api\InteractionsApi();
$format = "format_example"; // string | An optional flag to force a response format. Note that the API also supports content negotiation and honors the Accept header.
$agent = "agent_example"; // string | The id of the agent to filter
$status = "status_example"; // string | The status to filter
$created_after = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | The start date to filter interactions by their creation date
$start = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | @deprecated - use createdAfter The start date to filter interactions by their creation date (alias of createdAfter)
$created_before = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | The end date to filter interactions by their creation date
$end = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | @deprecated - use createdBefore The end date to filter interactions by their creation date (alias of createdBefore)
try {
$result = $api_instance->getInteractions($format, $agent, $status, $created_after, $start, $created_before, $end);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling InteractionsApi->getInteractions: ', $e->getMessage(), PHP_EOL;
}
?>
All URIs are relative to http://api.getsirena.com/v1
Class | Method | HTTP request | Description |
---|---|---|---|
InteractionsApi | getInteractions | GET /prospects/interactions | |
LeadsApi | getCategories | GET /leads/categories | |
LeadsApi | getDefaults | GET /leads/defaults | |
LeadsApi | newInsuranceLead | POST /lead/insurance | |
LeadsApi | newRetailLead | POST /lead/retail | |
LeadsApi | newSavingPlanLead | POST /lead/saving-plan | |
LeadsApi | newVehicleLead | POST /lead/vehicle | |
NotificationsApi | deactivateSubscription | DELETE /notifications/subscription/{subscriptionId} | |
NotificationsApi | getActiveSubscriptionById | GET /notifications/subscription/{subscriptionId} | |
NotificationsApi | getActiveSubscriptions | GET /notifications/subscriptions | |
NotificationsApi | getTopics | GET /notifications/topics | |
NotificationsApi | newSubscription | POST /notifications/subscriptions | |
ProspectsApi | deleteProspect | DELETE /prospect/{prospectId} | |
ProspectsApi | getInteractionById | GET /prospect/{prospectId}/interaction/{interactionId} | |
ProspectsApi | getInteractions | GET /prospects/interactions | |
ProspectsApi | getProspectById | GET /prospect/{prospectId} | |
ProspectsApi | getProspectInteractions | GET /prospect/{prospectId}/interactions | |
ProspectsApi | getProspectQuotes | GET /prospect/{prospectId}/quotes | |
ProspectsApi | getProspects | GET /prospects | |
ProspectsApi | getQuoteById | GET /prospect/{prospectId}/quote/{quoteId} | |
ProspectsApi | getQuotes | GET /prospects/quotes | |
ProspectsApi | newProspectQuote | POST /prospect/{prospectId}/quotes | |
ProspectsApi | updateProspectQuote | PUT /prospect/{prospectId}/quote/{quoteId} | |
QuotesApi | getProspectQuotes | GET /prospect/{prospectId}/quotes | |
QuotesApi | getQuoteById | GET /prospect/{prospectId}/quote/{quoteId} | |
QuotesApi | getQuotes | GET /prospects/quotes | |
QuotesApi | newProspectQuote | POST /prospect/{prospectId}/quotes | |
QuotesApi | updateProspectQuote | PUT /prospect/{prospectId}/quote/{quoteId} |
- Agent
- Categories
- CategoriesByIndustry
- Category
- Defaults
- Error
- Finance
- Interaction
- InteractionMedium
- InteractionOutput
- InteractionOutputConversations
- Interactions
- Lead
- LeadData
- MessageMedium
- MessageOutput
- MoneyAmount
- MoneyAmountEstimate
- NewQuote
- NewSubscription
- ObjectId
- Odometer
- Product
- Proposal
- ProposalItems
- Prospect
- Prospects
- Quote
- QuoteItem
- Quotes
- Subscription
- Subscriptions
- Topic
- Topics
- UpdateQuote
- GeneralLead
- SavingPlanLead
- SavingPlanProduct
- VehicleLead
- VehicleProduct
- Type: API key
- API key parameter name: api-key
- Location: URL query string
- Type: OAuth
- Flow: accessCode
- Authorization URL: http://localhost:2000/oauth2/authorization
- Scopes:
- leads:write: Lead Provider
- prospects:read: Read Prospects
- prospects:readAdditionalData: Read Prospects Aditional Data
- prospects:write: Write Prospects
- notifications: Notifications