PHPackages                             fmarquesto/sap-business-one-connector - 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. fmarquesto/sap-business-one-connector

ActiveLibrary[API Development](/categories/api)

fmarquesto/sap-business-one-connector
=====================================

Utility to connect with SAP Business One through the Service Layer API

1.0.1(11mo ago)40MITPHPPHP ^8.2

Since Jun 8Pushed 11mo ago1 watchersCompare

[ Source](https://github.com/fmarquesto/sap-business-one-connector)[ Packagist](https://packagist.org/packages/fmarquesto/sap-business-one-connector)[ RSS](/packages/fmarquesto-sap-business-one-connector/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (5)Versions (4)Used By (0)

SAP Business One Connector
==========================

[](#sap-business-one-connector)

A lightweight PHP library for connecting and interacting with SAP Business One.

[![Latest Stable Version](https://camo.githubusercontent.com/3284e6b2493d00bc660cf614dd0238db1cdb9ee35b99233656bc4d7ecb4ffad7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f666d617271756573746f2f7361702d627573696e6573732d6f6e652d636f6e6e6563746f722e737667)](https://packagist.org/packages/fmarquesto/sap-business-one-connector)[![License](https://camo.githubusercontent.com/2f638344306a1147bf135c602820656ec3ac43fa0c8074533d68d3d0239ee0f8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f666d617271756573746f2f7361702d627573696e6573732d6f6e652d636f6e6e6563746f722e737667)](LICENSE)

---

🚀 Features
----------

[](#-features)

- Connect to SAP Business One (SAP B1) using HTTP/REST
- Lightweight and easy to integrate
- Built on top of Guzzle for HTTP requests
- Environment-based configuration with Dotenv
- Designed with extensibility and testability in mind

---

🧰 Requirements
--------------

[](#-requirements)

- PHP ^8.2
- SAP Business One with Service Layer API access
- Composer

---

📦 Installation
--------------

[](#-installation)

```
composer require fmarquesto/sap-business-one-connector
```

🛠 Usage
-------

[](#-usage)

### 🧪 Basic Setup

[](#-basic-setup)

```
use fmarquesto\SapBusinessOneConnector\Client;

// Load environment variables
$client = new Client(); // Automatically loads from .env file in the project root

// Or specify configuration directly

$connectionData = new \fmarquesto\SapBusinessOneConnector\ConnectionData('https://your-sap-b1-service-layer-url', '50000', 'Database', 'UserName', 'Password');
$client = new Client(connectionData: $connectionData);
```

### Environment variables

[](#environment-variables)

```
SAP_HOST="https://xxxx"
SAP_PORT=50000
SAP_USER=user
SAP_PASS=pass
SAP_DB=DB
```

📥 GET Example: Fetch Items
--------------------------

[](#-get-example-fetch-items)

```
use fmarquesto\SapBusinessOneConnector\Client;
use fmarquesto\SapBusinessOneConnector\QueryBuilder;
use fmarquesto\SapBusinessOneConnector\Resources;

$client = new Client();
$response = $client->execute(
    (new QueryBuilder(Resources::Items, top:21))
    ->addSelect('ItemCode', 'ItemName')
);

$response->success(); // true
$response->hasNextPage(); // true
$response->nextPage(); // Items?$select=ItemCode,%20ItemName&$top=1&$skip=20
$response->arrayBody(); // ['odata.metadata' => 'metadataurl', 'value' => [['ItemCode' => 'A00001', 'ItemName' => 'Item 1'], ...]], 'odata.nextLink' => 'nextlinkurl']
```

🧪 Testing
---------

[](#-testing)

```
composer test
```

📜 License
---------

[](#-license)

MIT © Fede Marquesto

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance52

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

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

Every ~0 days

Total

2

Last Release

339d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d20251b1978dfdedd7fa59073babef049d1c537c02be508159222d8209d7ae70?d=identicon)[fmarquesto](/maintainers/fmarquesto)

---

Top Contributors

[![fmarquesto](https://avatars.githubusercontent.com/u/16501896?v=4)](https://github.com/fmarquesto "fmarquesto (30 commits)")

---

Tags

apiconnectorintegrationservice layersapsapb1business-one

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/fmarquesto-sap-business-one-connector/health.svg)

```
[![Health](https://phpackages.com/badges/fmarquesto-sap-business-one-connector/health.svg)](https://phpackages.com/packages/fmarquesto-sap-business-one-connector)
```

###  Alternatives

[lasserafn/laravel-economic

Economic REST wrapper for Laravel

1118.5k](/packages/lasserafn-laravel-economic)[lasserafn/php-dinero

Dinero REST wrapper for PHP

115.2k](/packages/lasserafn-php-dinero)[bmeme/eventbrite_connector

PHP Library for integration with Eventbrite API v3

151.1k](/packages/bmeme-eventbrite-connector)

PHPackages © 2026

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