PHPackages                             paulchiu/yaspa - 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. paulchiu/yaspa

AbandonedArchivedLibrary[API Development](/categories/api)

paulchiu/yaspa
==============

Yet Another Shopify PHP API

0.1.0(8y ago)3141[1 issues](https://github.com/paulchiu/yaspa/issues)MITPHPPHP &gt;=7.1

Since Oct 27Pushed 1w ago4 watchersCompare

[ Source](https://github.com/paulchiu/yaspa)[ Packagist](https://packagist.org/packages/paulchiu/yaspa)[ RSS](/packages/paulchiu-yaspa/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

Warning

This project is abandoned and has been archived in 2026. It is no longer maintained.

Yet Another Shopify PHP API (yaspa)
===================================

[](#yet-another-shopify-php-api-yaspa)

[![CircleCI](https://camo.githubusercontent.com/b72ed7a20e11023a16e0d76f9d9eabc8c2142a6b36557a13309d9cdd09e469f3/68747470733a2f2f636972636c6563692e636f6d2f67682f7061756c636869752f79617370612f747265652f6d61737465722e7376673f7374796c653d737667)](https://circleci.com/gh/paulchiu/yaspa/tree/master)

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

[](#installation)

*Do not install this library. It is currently under active development and is in no way stable.*

Purpose
-------

[](#purpose)

Most Shopify APIs appear to be thin wrappers around Guzzle that makes things slightly more convenient but still makes it feel like you are interacting with a REST API.

The goal of this project is to go one step beyond and provide something closer to a SDK whereby the library offers everything through PHP without the developer needing to think too much about the REST API.

Examples
--------

[](#examples)

The following examples show how CRUD works with the API. For full documentation, see the [Yaspa Gitbook](https://paulchiu.gitbooks.io/yaspa/content/).

Please note that all examples utilise private authentication.

### Create private authentication credentials

[](#create-private-authentication-credentials)

Credentials are stored in a POPO (Plain Old PHP Object) model.

All other examples assume the presence of the following code.

```
use Yaspa\Authentication\Factory\ApiCredentials;
use Yaspa\Factory;

$credentials = Factory::make(ApiCredentials::class)
    ->makePrivate(
        'my-shop',
        '4ac0000000000000000000000000035f',
        '59c0000000000000000000000000007f'
    );
```

### Create a customer

[](#create-a-customer)

```
use Yaspa\AdminApi\Customer\Builders\CreateNewCustomerRequest;
use Yaspa\AdminApi\Customer\CustomerService;
use Yaspa\AdminApi\Customer\Models\Customer;
use Yaspa\Factory;

// Prepare creation request
$customer = (new Customer())
    ->setFirstName('Steve')
    ->setLastName('Lastnameson')
    ->setEmail(uniqid('steve-').'@example.com')
    ->setTags(['foo', 'bar'])
    ->setVerifiedEmail(true)
    ->setAcceptsMarketing(true);
$request = Factory::make(CreateNewCustomerRequest::class)
    ->withCredentials($credentials)
    ->withCustomer($customer);

// Create new customer, $newCustomer is a Customer model
$service = Factory::make(CustomerService::class);
$newCustomer = $service->createNewCustomer($request);
var_dump($newCustomer);
```

### Get all customers created in the past 7 days

[](#get-all-customers-created-in-the-past-7-days)

```
use Yaspa\AdminApi\Customer\Builders\GetCustomersRequest;
use Yaspa\AdminApi\Customer\CustomerService;
use Yaspa\Factory;

// Create request
$request = Factory::make(GetCustomersRequest::class)
    ->withCredentials($credentials)
    ->withCreatedAtMin(new DateTime('-7 days'));

// Get customers, $customers is an iterator
$service = Factory::make(CustomerService::class);
$customers = $service->getCustomers($request);

// Loop through customers, each $customer is a Customer model
// paging is automated
foreach ($customers as $index => $customer) {
    var_dump($customer);
}
```

### Update a customer

[](#update-a-customer)

```
use Yaspa\AdminApi\Customer\Builders\ModifyExistingCustomerRequest;
use Yaspa\AdminApi\Customer\CustomerService;
use Yaspa\Factory;

// Create request
$customerUpdates = (new Customer())
    ->setId(6820000675)
    ->setFirstName('Alice')
$request = Factory::make(ModifyExistingCustomerRequest::class)
    ->withCredentials($credentials)
    ->withCustomer($customerUpdates);

// Modify an existing customer, $modifiedCustomer is a Customer model
$service = Factory::make(CustomerService::class);
$modifiedCustomer = $service->modifyExistingCustomer($request);
var_dump($modifiedCustomer);
```

### Delete a customer

[](#delete-a-customer)

```
use Yaspa\AdminApi\Customer\CustomerService;
use Yaspa\Factory;

// Delete an existing customer
$service = Factory::make(CustomerService::class);
$service->deleteCustomerById($credentials, 6820000675);
```

Documentation
-------------

[](#documentation)

For full documentation, please see

Roadmap
-------

[](#roadmap)

See [issue 10](https://github.com/paulchiu/yaspa/issues/10) for the project roadmap and to do list.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance57

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 80.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3121d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/475eea1e1206da035c016ce09dcee32b83978944af6eb1a6913f1270b1fda480?d=identicon)[paulchiu](/maintainers/paulchiu)

---

Top Contributors

[![paulchiu](https://avatars.githubusercontent.com/u/3478672?v=4)](https://github.com/paulchiu "paulchiu (159 commits)")[![Jore](https://avatars.githubusercontent.com/u/696506?v=4)](https://github.com/Jore "Jore (38 commits)")

---

Tags

phpshopifyshopify-apishopify-php-apishopify-sdkapiclientshopify

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/paulchiu-yaspa/health.svg)

```
[![Health](https://phpackages.com/badges/paulchiu-yaspa/health.svg)](https://phpackages.com/packages/paulchiu-yaspa)
```

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[resend/resend-php

Resend PHP library.

564.7M21](/packages/resend-resend-php)[crowdin/crowdin-api-client

PHP client library for Crowdin API v2

611.5M5](/packages/crowdin-crowdin-api-client)[mozex/anthropic-laravel

Anthropic PHP for Laravel is a supercharged PHP API client that allows you to interact with the Anthropic API

71226.4k1](/packages/mozex-anthropic-laravel)[markrogoyski/numverify-api-client-php

Numverify API Client for PHP

1220.9k](/packages/markrogoyski-numverify-api-client-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
