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

2.0.0(3w ago)28.5k↑82.7%MITPHPPHP ^8.2CI passing

Since Oct 12Pushed 3w 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 yesterday

READMEChangelog (5)Dependencies (16)Versions (8)Used By (0)

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

[](#chkltlabs-wix-client)

PHP implementation of Wix API as an SDK.

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

[](#installation)

```
composer require chkltlabs/wix-client

```

Requires PHP 8.2+.

### Upgrading to 1.0

[](#upgrading-to-10)

Version 1.0 drops support for `nimbly/shuttle` 0.x, `psr/http-message` 1.x, and PHP versions below 8.2 to align with Laravel 13.

If you inject a custom HTTP client, no code changes are required. If you reference Shuttle or Capsule classes directly, update imports:

- `Shuttle\Shuttle` → `Nimbly\Shuttle\Shuttle`
- `Shuttle\Handler\MockHandler` → `Nimbly\Shuttle\Handler\MockHandler`
- `Capsule\Request` → `Nimbly\Capsule\Request`
- `Capsule\Response` → `Nimbly\Capsule\Response`

Shuttle 2.x no longer accepts a configuration array in its constructor; pass dependencies as named constructor arguments instead.

Continuous Integration
----------------------

[](#continuous-integration)

GitHub Actions runs the full PHPUnit suite on PHP 8.2, 8.3, and 8.4. PHP 8.2 also runs with `--prefer-lowest` to verify compatibility with minimum allowed dependency versions.

Local Testing with Docker
-------------------------

[](#local-testing-with-docker)

To run tests with pinned versions (without relying on host PHP/composer), use Docker:

```
docker compose up -d --build
docker compose exec wix-client composer install
docker compose exec wix-client ./vendor/bin/phpunit

```

To stop the container:

```
docker compose down

```

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.

For endpoints that do not yet have dedicated resource methods, use explicit domain resources:

```
//members domain
$response = $api->members->get('v1/members', ['limit' => 100]);
$response = $api->members->listMembersV1Members([], ['limit' => 100]);

//ecom domain
$response = $api->ecom->post('v1/orders/query', ['query' => []]);
$response = $api->ecom->getOrder(['id' => $orderId]);

//site actions domain
$response = $api->site_actions->post('v1/site-actions', ['action' => []]);
$response = $api->site_actions->bulkDeleteSite([], ['siteIds' => [$siteId]]);

```

Regenerate typed domain operation methods from Wix public docs:

```
python3 tools/generate_typed_resources.py --docs-root /tmp/wix-rest-docs

```

### Typed Resource Coverage Snapshot

[](#typed-resource-coverage-snapshot)

Generated from public docs currently available in `wix-incubator/wix-rest-docs`:

- `Api`: 0
- `Apps`: 5
- `Automations`: 1
- `B2BSiteManagement`: 0
- `Bookings`: 118
- `Chat`: 1
- `CurrencyConverter`: 2
- `DomainConnect`: 0
- `DomainSearch`: 1
- `Ecom`: 24
- `EmailMarketing`: 20
- `Events`: 63
- `EventsGuests`: 0
- `EventsPolicies`: 5
- `Faq`: 11
- `Forum`: 5
- `LocalDelivery`: 7
- `Locations`: 6
- `LoyaltyAccounts`: 8
- `LoyaltyPrograms`: 2
- `LoyaltyRewards`: 4
- `Marketing`: 2
- `MarketingConsent`: 8
- `Members`: 27
- `Notifications`: 0
- `Oauth`: 0
- `OauthApp`: 5
- `Payments`: 8
- `Pricing`: 0
- `PricingPlans`: 35
- `Progallery`: 9
- `PromoteSeoTxtFileServer`: 2
- `RedirectSession`: 1
- `Resellers`: 8
- `Restaurants`: 36
- `SiteActions`: 0
- `SiteFolders`: 6
- `SiteList`: 1
- `SiteMedia`: 24
- `SiteProperties`: 9
- `SocialGroups`: 24
- `Stores`: 82
- `V1`: 1
- `WixData`: 44

### Explicit Resource Status

[](#explicit-resource-status)

All top-level domain resources in `src/Resources` are now explicit custom classes extending `AbstractResource` (no remaining top-level `Domain` subclasses).

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
