PHPackages                             chkltlabs/wix-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. chkltlabs/wix-client

ActiveLibrary[API Development](/categories/api)

chkltlabs/wix-client
====================

A fluent interface for the Wix API

0.3.0(1y ago)27.8k↓33.3%MITPHP

Since Oct 12Pushed 1y ago2 watchersCompare

[ Source](https://github.com/chkltlabs/wix-client)[ Packagist](https://packagist.org/packages/chkltlabs/wix-client)[ RSS](/packages/chkltlabs-wix-client/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (5)Versions (4)Used By (0)

Chkltlabs Wix Client
====================

[](#chkltlabs-wix-client)

PHP implementation of Wix API as an SDK.

Installation
------------

[](#installation)

```
composer require chkltlabs/wix-client

```

Usage
-----

[](#usage)

The use of this package is intentionally extremely basic, methods have no required inputs except where required by the underlying Wix API. Please see [Wix API Docs](https://dev.wix.com/docs/rest/articles/getting-started/api-keys) for more information.

This package has only been tested using API Keys. Please see the Roadmap below for planned features.

To begin, instantiate the Wix class. Depending on the endpoints you plan to access, you may set one of `account_id/site_id` as a blank string (but not both).

```
use Chkltlabs\WixClient\Wix;

$api = new Wix(api_key: $my_api_key, account_id: $my_account_id, site_id: $my_site_id);

```

Now you have a class-based accessor to various api resources. These resources are treated as properties on the Wix class, or as properties of those properties:

```
//get all posts on the site's blog
$response = $api->blog->posts->list();

```

This structure aims to replicate the [Wix API Docs](https://dev.wix.com/docs/rest/articles/getting-started/api-keys) as closely as possible.

Roadmap
-------

[](#roadmap)

### Implemented

[](#implemented)

- Blog
- - Categories
    - Drafts
    - Posts
    - Tags
- Business
- - Location
    - Properties
- Comments
- Contacts
- - Bulk
    - ExtendedFields
    - Facets
    - Labels
- Coupons
- - Bulk
- Inbox
- - Conversations
    - Messages

### Upcoming

[](#upcoming)

- Marketing
- Media
- Members
- Site Content
- Automations
- Bookings
- Chat
- Data
- Events
- Forms
- Forum
- Groups
- Notifications
- Class method -&gt; Route Documentation

### Not Planned

[](#not-planned)

- Cashier
- eCommerce
- Loyalty Program
- Payments
- Pricing Plans
- Restaurants
- Stores
- Payment Provider SPI
- Account Management

Contributing
------------

[](#contributing)

The Package uses a unified request system built on AbstractResource, so contributing new endpoints is as simple as creating a new class in `src/Resources`, and creating further subclasses is as simple as creating a new directory that matches your class name, and adding the `HasCachedResources` trait to your parent class. Make sure each extends `AbstractResource`.

Example from Blog.php:

```
//src/Resources/Blog.php
