apideck-libraries / php-sdk
The Apideck OpenAPI Spec: SDK Optimized
Installs: 164 057
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 3
Forks: 0
Open Issues: 3
Requires
- php: ^7.3 || ^8.0
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.3
- guzzlehttp/psr7: ^1.7 || ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.12
- phpunit/phpunit: ^8.0 || ^9.0
- dev-main
- 3.7.0
- 3.6.0
- 3.5.3
- 3.5.2
- 3.5.1
- 3.5.0
- 3.4.0
- 3.3.1
- 3.3.0
- 3.2.1
- 3.2.0
- 3.1.2
- 3.1.1
- 3.1.0
- 3.0.1
- 3.0.0
- 2.5.5
- 2.5.4
- 2.5.3
- 2.5.2
- 2.5.1
- 2.5.0
- 2.4.0
- 2.3.2
- 2.3.1
- 2.3.0
- 2.2.0
- 2.1.1
- 2.1.0
- 2.0.1
- 2.0.0
- 1.5.0
- 1.4.0
- 1.3.0
- 1.2.0
- 1.1.0
- 1.0.0
- 0.5.5
- 0.5.4
- 0.5.3
- 0.5.2
- 0.5.1
- 0.5.0
- 0.4.0
- 0.3.2
- 0.3.1
- 0.3.0
- 0.2.0
- 0.1.0
- 0.0.7
- 0.0.6
- dev-generator-update
- dev-revert-57-generator-update
This package is auto-updated.
Last update: 2024-12-20 13:34:28 UTC
README
Table of Contents
Installation
Requirements
PHP 7.3 and later. Should also work with PHP 8.0 but has not been tested.
Composer
Install the latest SDK using composer:
$ composer require apideck-libraries/php-sdk
Getting started
The module supports all Apideck API endpoints. For complete information about the API, head to the docs.
Configuration
A new Apideck instance is initialized by passing in required settings to the configuration.
require('vendor/autoload.php');
use Apideck\Client\Apideck;
use Apideck\Client\ApideckConfiguration;
$config = new ApideckConfiguration('<insert-api-key-here>', '<insert-application-id-here>', '<insert-consumer-id-here>');
$apideck = new Apideck($config);
Top level parameters (except for apiKey) can be overriden in specific resource calls.
<?php // Declare Unify Api to use $crmApi = $apideck->getCrmApi(); // Override consumerId serviceId as declared in initial configuration for this operation. $serviceId = 'salesforce'; $response = $crmApi->contactsAll( false, null, null, $serviceId, null, 10 );
Example
Retrieving a list of all contacts and updating the first record with a new address.
<?php require('vendor/autoload.php'); use Apideck\Client\Apideck; use Apideck\Client\ApideckConfiguration; use Apideck\Client\Model\Contact; use Apideck\Client\Model\Address; use Apideck\Client\Model\PhoneNumber; $config = new ApideckConfiguration('<insert-api-key-here>', '<insert-application-id-here>', '<insert-consumer-id-here>'); $apideck = new Apideck($config); $crmApi = $apideck->getCrmApi(); $response = $crmApi->contactsAll(false, null, null, $serviceId, null, 10); $data = $response->getData(); $result = $crmApi->contactsUpdate([ $data[0]->getId(), new Contact([ "name" => "John Doe", "first_name" => "John", "last_name" => "Doe", "addresses" => [ new Address([ "city" => "Hoboken", "line1" => "Streetname 19", "state" => "NY" ]) ], "phone_numbers" => [ new PhoneNumber([ "number" => "0486565656", "phoneType" => "home" ]) ] ]) ]); var_dump($result);
Apideck Unified Apis
The following Apis are currently available:
AccountingApi
Read the full documentation of the AccountingApi here.
AtsApi
Read the full documentation of the AtsApi here.
ConnectorApi
Read the full documentation of the ConnectorApi here.
CrmApi
Read the full documentation of the CrmApi here.
EcommerceApi
Read the full documentation of the EcommerceApi here.
FileStorageApi
Read the full documentation of the FileStorageApi here.
HrisApi
Read the full documentation of the HrisApi here.
IssueTrackingApi
Read the full documentation of the IssueTrackingApi here.
LeadApi
Read the full documentation of the LeadApi here.
PosApi
Read the full documentation of the PosApi here.
SmsApi
Read the full documentation of the SmsApi here.
VaultApi
Read the full documentation of the VaultApi here.
WebhookApi
Read the full documentation of the WebhookApi here.
Support
Open an issue!