Visit Main Site
Join Partner Program
Login
     
Introduction
Labour Module SDK Documentation
Installation
Python
PHP
GitHub
Composer
Documentation
Account
Item
Item Fulfillment
Item Receipts
Order
Usage
Express
Invoice
Payment
Credit Note
Refund
Purchase Order
Purchase Invoice
Purchase Payment
Purchase Credit Notes
Purchase Refund
Gift Certificate
Return Merchandise Authorizations
RVA
Settings
Integration
Portal
Communications
Reports
Proforma
Custom Development
Custom Component
Custom Attribute
Custom Object
Custom Database
» Installing Exsited PHP SDK from Composer

Exsited PHP SDK Installation Guide Using Composer

This guide walks you through setting up a CakePHP project and integrating the Exsited PHP SDK via Composer. It includes installation steps, configuration of authentication, and making API calls through CakePHP controllers. By the end, your app will be able to authenticate and interact with Exsited's APIs.

Prerequisites

Ensure you have the following tools installed:

  • PHP: Version 7.0 or higher
  • Composer: Dependency manager for PHP
  • XAMPP: For local server and database
  • CakePHP: PHP framework (installed via Composer)

Project Setup

Step 1: Create a New CakePHP Project

Bash
composer create-project --prefer-dist cakephp/app my_cakephp_project
cd my_cakephp_project

Step 2: Configure Database (Optional for Developers)

Edit config/app.php and update the Datasources section with your database credentials.
Skip if you're just testing SDK calls.

Installing the SDK via Composer

Step 1: Run the Composer Command

Inside your CakePHP project root:

Bash
composer require exsitedapi/exsited-sdk:dev-main

This installs the SDK into vendor/exsitedapi/exsited-sdk.

SDK Configuration

Step 1: Navigate to the SDK Directory

Bash
cd vendor/exsitedapi/exsited-sdk

Step 2: Create SDK Config File

In the root directory of the cloned SDK project, ensure there is a file named sdk-config.json. If it doesn't exist, create one manually.

JSON
{  
    "apiVersion": "v3",
    "reQuestTimeOut": 240
}

Explanation of SDK Config Fields

KeyDescription
apiVersionThe default API version to be used by the SDK (e.g., "v3").
reQuestTimeOutThe request timeout limit (in seconds) for API calls. Helps prevent hanging requests on slow connections.

⚠️ File and field names are case-sensitive. Be sure to spell "reQuestTimeOut" exactly as shown above.

Step 3: Create Token File

Next, verify that a file named token.json exists in the root directory of the SDK. If not, create it manually.

You can now include one or more sets of credentials inside a JSON array like this:

JSON
[
  {
    "apiUrl": "[EXSITED_API_BASE_URL]",
    "appUrl": "[EXSITED_APP_URL]",
    "client_id": "[YOUR_CLIENT_ID]",
    "client_secret": "[YOUR_CLIENT_SECRET]",
    "access_token": "[YOUR_ACCESS_TOKEN]",
    "refresh_token": "[YOUR_REFRESH_TOKEN]",
    "redirect_uri": "[YOUR_REDIRECT_URI]",
    "authTokenRenewCallback": {}
  },
  {
    "apiUrl": "[EXSITED_API_BASE_URL]",
    "appUrl": "[EXSITED_APP_URL]",
    "client_id": "[YOUR_CLIENT_ID]",
    "client_secret": "[YOUR_CLIENT_SECRET]",
    "access_token": "[YOUR_ACCESS_TOKEN]",
    "refresh_token": "[YOUR_REFRESH_TOKEN]",
    "redirect_uri": "[YOUR_REDIRECT_URI]",
    "authTokenRenewCallback": {}
  }
]

Explanation of Token File Fields

KeyDescription
client_idYour provided Client ID
client_secretYour provided Client Secret
redirect_uriYour authorized Redirect URL
apiUrlAPI base URL (e.g., staging or live)
appUrlApp base URL

Important Notes

  • You can include multiple credential objects in an array format.
  • Each object must be properly formatted and comma-separated.
  • If using multiple accounts or environments, the SDK may provide a mechanism to select the appropriate configuration dynamically.

Looking to build next big project?

With our robust set of tools and resources, you can create custom solutions that integrate seamlessly with our system and take your business to the next level.

Join Our Partner Program
APIs
SDK
Help Center
Community
Contact Us

©2026 Exsited. All rights reserved.

Terms and Conditions | Privacy Policy

Follow Us: