Download the PHP package vanilo/cloud-sdk without Composer
On this page you can find all versions of the php package vanilo/cloud-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download vanilo/cloud-sdk
More information about vanilo/cloud-sdk
Files in vanilo/cloud-sdk
Informations about the package cloud-sdk
Vanilo Cloud PHP SDK
This package provides a PHP SDK for interacting with the Vanilo Cloud REST API.
Installation
The minimum requirement of this package is PHP 8.1.
To install this library in your application, use composer:
Usage
Authentication
To connect to the Vanilo Cloud API, you'll need your Shop's URL, a client_id
and a client_secret
.
The following code returns an API client instance:
Under the hood, the SDK will fetch auth tokens from the API in order to minimize the number of occasions when the
client_id
andclient_secret
are being sent over the wire.
To connect to the generic Sandbox environment use:
Vanilo Cloud Sandbox is available at: https://sandbox.v-shop.cloud/
The sandbox database is reset every 30 minutes
HTTP Basic Auth
If your Vanilo Cloud shop instance is protected with basic authentication, then use the
withBasicAuth('user', 'pass')
method to pass the basic http auth credentials:
Token Store
In order to effectively use the token authentication, and to avoid rate limiting exceptions, it's highly recommended to use a persistent token store.
When you have the APC extension installed and enabled, then you have nothing to do, everything is handled for you behind the scenes.
If you use this library in a Laravel Application, then the best is when you use the built-in Laravel Cache token store, that utilizes the configured cache for temporarily storing the auth tokens:
Retrieve Raw Responses
If you need to obtain the raw HTTP response from the API, you need to call the rawGet
, rawPost
, etc methods:
To obtain the contents of the API call, use json()
method of the returned response:
Taxonomies
To fetch a taxonomy by id:
Products
To fetch a product by sku:
To fetch the list of products:
To create a product:
To update a product by sku:
To delete a product by sku:
Master Products
To fetch a master product by id:
To fetch the list of master products:
To create a master product:
To update a master product by id:
To delete a master product by id:
Orders
To fetch an order by id:
To fetch the list of orders
To create an order:
To update an order by id:
To delete an order by id:
All versions of cloud-sdk with dependencies
illuminate/http Version ^8.83|^9.0|^10.0|^11.0
illuminate/collections Version >8
guzzlehttp/guzzle Version ^7.4
nesbot/carbon Version ^2.53.1