PHPackages                             patryk-sawicki/sprii-laravel - 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. patryk-sawicki/sprii-laravel

ActiveLibrary

patryk-sawicki/sprii-laravel
============================

Sprii API client for laravel.

1.0.0(1y ago)07MITPHPPHP ^8.2

Since Jan 13Pushed 1y ago1 watchersCompare

[ Source](https://github.com/patryk-sawicki/sprii-laravel)[ Packagist](https://packagist.org/packages/patryk-sawicki/sprii-laravel)[ RSS](/packages/patryk-sawicki-sprii-laravel/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

Sprii API Client
================

[](#sprii-api-client)

Sprii API client for laravel.

Requirements
------------

[](#requirements)

- PHP 8.2 or higher with json extensions.

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

[](#installation)

The recommended way to install is through [Composer](http://getcomposer.org).

```
composer require patryk-sawicki/sprii-laravel
```

Backend Usage
-------------

[](#backend-usage)

Add to env:

```
SPRII_API_KEY = 'your_key'
SPRII_CACHE_DEFAULT_TTL = 86400 // optional - default 86400 seconds
```

Import class:

```
use PatrykSawicki\SpriiApi\app\Classes\Sprii;
```

### Products

[](#products)

Send products to sprii.

```
Sprii::products()->send(array $data); // return bool.
```

Request:

```
$data = [
            'id' => '1',
            'sku' => 'string',
            'name' => 'string',
            'price' => 0,
            'description' => 'string',
            'url' => 'string',
            'type' => 'simple',
            'status' => 'enabled',
            'image' => 'string',
            'alternativeImages' => [
                'string'
            ],
            'inventory' => 0,
            'manageStock' => true,
            'configurableOptions' => [
                [
                    'id' => 0,
                    'name' => 'string',
                    'position' => 0,
                    'values' => [
                        'string'
                    ]
                ]
            ],
            'variants' => [
                [
                    'id' => '2',
                    'sku' => 'string',
                    'name' => 'string',
                    'price' => 10,
                    'description' => 'string',
                    'url' => 'string',
                    'status' => 'enabled',
                    'image' => 'string',
                    'alternativeImages' => [
                        'string'
                    ],
                    'inventory' => 2,
                    'manageStock' => true,
                    'options' => [
                        [
                            'id' => 0,
                            'value' => 'string'
                        ]
                    ]
                ]
            ],
            'customAttributes' => 'string',
            'defaultQuantityToAdd' => 0,
            'test' => 0
        ];
```

Result:

```
true // or false
```

### Orders

[](#orders)

#### Send

[](#send)

Send orders to sprii.

```
Sprii::orders()->send(array $data); // return bool.
```

Request:

```
$data = [
            'spriiOrderNumber' => '1',
            'orderTotal' => 1,
            'id' => '1',
            'openForCheckout' => true,
            'items' => [
                [
                    'product_id' => '2',
                    'quantity' => 1,
                    'sku' => 'string',
                    'custom_attributes' => 'string',
                    'unitPrice' => 1
                ]
            ]
        ];
```

Result:

```
true // or false
```

#### Get order

[](#get-order)

Get order from sprii.

```
Sprii::orders()->get(string $id); // return object.
```

Request:

```
$id = '1';
```

Result:

```
object(stdClass)#1 (5) {
  ["order"] => object(stdClass)#2 (5) {
    ["id"] => string(1) "1"
    ["spriiOrderNumber"] => string(1) "1"
    ["orderTotal"] => int(1)
    ["openForCheckout"] => bool(true)
    ["items"] => array(1) {
      [0] => object(stdClass)#3 (5) {
        ["product_id"] => string(1) "2"
        ["quantity"] => int(1)
        ["sku"] => string(6) "string"
        ["custom_attributes"] => string(6) "string"
        ["unitPrice"] => int(1)
      }
    }
  }
}
```

Changelog
---------

[](#changelog)

Changelog is available [here](CHANGELOG.md).

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance42

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

485d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e2276e6082c07c002d8b66093671feaf3f1306bd8aa6ced5c0769a46a7bb9ff6?d=identicon)[patryk-sawicki](/maintainers/patryk-sawicki)

---

Top Contributors

[![patryk-sawicki](https://avatars.githubusercontent.com/u/30780444?v=4)](https://github.com/patryk-sawicki "patryk-sawicki (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/patryk-sawicki-sprii-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/patryk-sawicki-sprii-laravel/health.svg)](https://phpackages.com/packages/patryk-sawicki-sprii-laravel)
```

###  Alternatives

[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11320.2M21](/packages/anourvalar-eloquent-serialize)[namu/wirechat

A Laravel Livewire messaging app for teams with private chats and group conversations.

54324.5k](/packages/namu-wirechat)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135192.6k5](/packages/statamic-rad-pack-runway)

PHPackages © 2026

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