Home - PureClarity/php-sdk GitHub Wiki

PureClarity PHP SDK

Requirements

  • PHP 7.0+
  • PHP json extension
  • PHP curl extension

About

The PureClarity PHP SDK provides features to allow developers to integrate their PHP-based store with PureClarity, its is also used by our Magento 2, X-Cart and WooCommerce extensions.

Installation

Manual download

You can download the SDK from the releases page on github.

Then when you've extracted the files into your project, make sure you include the autoloader

require_once <path/to/pureclarity/php-sdk/> . 'src/autoload.php';

Composer

If your project supports composers, then you can install the PHP SDK using composer require:

composer require pureclarity/php-sdk

Actions

The PureClarity PHP SDK allows you to integrate with PureClarity without having to write

The following actions are covered by this SDK:

Accounts

  • Signup - Creation PureClarity Accounts
  • Validation - Validation of exiting PureClarity accounts
  • Delete - Deletion of PureClarity Accounts

Data feeds

Data feeds sync your store's data with PureClarity. These should be used for the initial sync of data and regular (nightly) syncs thereafter.

Deltas

Deltas are used to sync changes to your store's data for individual data entities. These should be used to sync real-time changes to data on an individual item basis (rather then re-sending a full feed every time one item changes)

  • Overview
  • Product - update/delete for an individual product
  • User - update/delete an individual user (customer)

Information

These informational features are mainly used by our official extensions.

  • Feedback - Allows the sending of feedback to PureClarity
  • Dashboard information - returns statistics to show on a dashboard page in your store
  • Next Steps - Returns "Next Steps" with tips and instructions on how to get the most out of PureClarity

Utility

These utility features can give you information to use in custom calls outside of the scope of this SDK.

  • Supported Region List - gives technical details about the regions used by PureClarity (mainly for internal sdk usage / configuration display in platform extensions)
  • Supported Timezone list - gives list of supported timezones (useful for signup forms)
  • Endpoint URL list - returns the various endpoint URLs for PureClarity features (mainly for internal sdk usage)

Support

Please contact [email protected] with any issues you have using the SDK.