PHPackages                             agenziasmart/swotto - 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. agenziasmart/swotto

ActiveLibrary[API Development](/categories/api)

agenziasmart/swotto
===================

PHP SDK for Swotto API

v2.1.0(3mo ago)082—0%MITPHPPHP &gt;=8.3

Since Oct 2Pushed 3mo agoCompare

[ Source](https://github.com/agenziasmart/swotto)[ Packagist](https://packagist.org/packages/agenziasmart/swotto)[ RSS](/packages/agenziasmart-swotto/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (10)Dependencies (8)Versions (13)Used By (0)

Swotto PHP SDK
==============

[](#swotto-php-sdk)

Official PHP client library for integrating with the **SW4 API** - a comprehensive B2B/ERP platform providing centralized access to:

- **Customer &amp; Supplier Management** (Master Data/Anagrafiche)
- **Inventory &amp; Stock Management** (Magazzino)
- **Product Information Management** (PIM)
- **Document Management** (Orders, Invoices, DDT, Agreements)

Swotto simplifies API integration with built-in authentication, error handling, file operations, and smart response handling.

[![Latest Version](https://camo.githubusercontent.com/6a92897ab168027bdab704636d4f7ac2657c319bba74edc605035606c9012b23/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6167656e7a6961736d6172742f73776f74746f2e737667)](https://packagist.org/packages/agenziasmart/swotto)[![PHP Version](https://camo.githubusercontent.com/d448e4c35a59e95bbf3683a5917e263cd676548b5bf3961b9cf8c14ba7fa69a1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6167656e7a6961736d6172742f73776f74746f2e737667)](https://packagist.org/packages/agenziasmart/swotto)[![License](https://camo.githubusercontent.com/849b8540930d05f7173cb1b8cae2527f232e9f52c37e3a130a5e5d77bcd07667/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6167656e7a6961736d6172742f73776f74746f2e737667)](LICENSE)

Why Swotto?
-----------

[](#why-swotto)

- **Type-safe** - PHPStan Level 8 compliant
- **Resilient** - Built-in Retry with Exponential Backoff
- **Immutable** - Fully stateless, worker-safe (FrankenPHP/Swoole)
- **Flexible** - Dual authentication (DevApp + Bearer tokens)
- **Smart responses** - Auto-detect JSON, CSV, PDF formats
- **Tested** - 222 tests, 743 assertions

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Quick Start](#quick-start)
- [Authentication](#authentication)
- [Basic Usage](#basic-usage)
- [Advanced Features](#advanced-features)
    - [Multi-Format Responses](#multi-format-responses)
    - [Retry with Exponential Backoff](#retry-with-exponential-backoff)
    - [Per-Call Options](#per-call-options)
    - [Default Options Pattern](#default-options-pattern)
- [File Uploads](#file-uploads)
- [Error Handling](#error-handling)
- [Configuration Reference](#configuration-reference)
- [Testing](#testing)
- [FAQ](#faq)
- [Support](#support)
- [License](#license)

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

[](#installation)

Install via Composer:

```
composer require agenziasmart/swotto
```

### Requirements

[](#requirements)

- PHP 8.3 or higher
- Composer
- A valid SW4 API account with DevApp credentials

Quick Start
-----------

[](#quick-start)

```
