This PHP SDK is an API wrapper that allows developers to integrate their PHP applications easily with Arcadier's APIs. It does the heavily lifting of building the requests and authentication for every API call
- PHP 7.0.0+
- An Arcadier marketplace of package Scale or above (including Enterprise)
Download the required libraries to your directory using the following Composer command line:
composer require arcadier/arcadier-php
Find the .env
file in the following directory created: "vendor\arcadier\arcadier-php\src" and replace the variables with the relevant values:
CLIENT_ID = ""
CLIENT_SECRET = ""
DOMAIN = ""
PROTOCOL = ""
Remember to load the SDK by including the following line in all your PHP scripts:
require "vendor\arcadier\arcadier-php\src\api.php";
$sdk = new ApiSdk();
In every PHP script in your root directory, make sure to include api.php
require "vendor\arcadier\arcadier-php\src\api.php";
$sdk = new ApiSdk();
Then you will be able to call Arcadier's APIs in your script.
Get your marketplace's information
Endpoint: GET /api/v2/marketplaces
$marketplace_info = $sdk->getMarketplaceInfo();
echo $marketplace_info;
Listing all items:
Endpoint: GET /api/v2/items
$item_list = $sdk->getAllItems();
echo $item_list['Records']; //The actual array of items is in the "Records" field of the JSON response
The full documentation for the SDK can be found here.
View our full API collection on Postman here: API Documentation.
Our changelog can be accessed here.