PHPackages                             opwoco/gsales-api-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. opwoco/gsales-api-client

ActiveLibrary[API Development](/categories/api)

opwoco/gsales-api-client
========================

SOAP Client for consumin gSales API

1.0.4(10y ago)025[1 PRs](https://github.com/opwoco/gsales-api-client/pulls)MITPHPPHP &gt;=5.4

Since Nov 13Pushed 9y ago2 watchersCompare

[ Source](https://github.com/opwoco/gsales-api-client)[ Packagist](https://packagist.org/packages/opwoco/gsales-api-client)[ RSS](/packages/opwoco-gsales-api-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (7)Used By (0)

SOAP API Client for gSales
==========================

[](#soap-api-client-for-gsales)

[![Latest Stable Version](https://camo.githubusercontent.com/cc106023502a3fbeaafd1643cb1aa1f81b615ef5d685ba349b0df7a6de77f950/68747470733a2f2f706f7365722e707567782e6f72672f726f6b64652f6773616c65732d6170692d636c69656e742f762f737461626c652e737667)](https://packagist.org/packages/rokde/gsales-api-client) [![Latest Unstable Version](https://camo.githubusercontent.com/871af6571b5a67b2167575ed1695b550098a4c5e720b7aa1dfa9c759bdda6be4/68747470733a2f2f706f7365722e707567782e6f72672f726f6b64652f6773616c65732d6170692d636c69656e742f762f756e737461626c652e737667)](https://packagist.org/packages/rokde/gsales-api-client) [![License](https://camo.githubusercontent.com/452917e0e5fba08ad941c40ab643d14fcc371396f7495f16b334b9e6549adf1a/68747470733a2f2f706f7365722e707567782e6f72672f726f6b64652f6773616c65732d6170692d636c69656e742f6c6963656e73652e737667)](https://packagist.org/packages/rokde/gsales-api-client) [![Total Downloads](https://camo.githubusercontent.com/7a5d5cdf7d1ad4d1e79e2a6d4bb390bd5d06fcb427eff46cb7b707c75c46a814/68747470733a2f2f706f7365722e707567782e6f72672f726f6b64652f6773616c65732d6170692d636c69656e742f646f776e6c6f6164732e737667)](https://packagist.org/packages/rokde/gsales-api-client)

A generic api client for the billing system gSales
--------------------------------------------------

[](#a-generic-api-client-for-the-billing-system-gsales)

We support API version 2.3 (published on 20th of August 2014).

---

[API Documentation](http://www.gsales.de/api_documentation.pdf)

---

Table of contents
-----------------

[](#table-of-contents)

1. [Installation](#installation)
2. [Contexts](#contexts)
3. [Article](#article)
4. [Authentication](#authentication)
5. [Comment](#comment)
6. [Configuration](#configuration)
7. [Contract](#contract)
8. [Customer](#customer)
9. [Document](#document)
10. [Invoice](#invoice)
11. [Mailspool](#mailspool)
12. [Newsletter](#newsletter)
13. [Offer](#offer)
14. [Queue](#queue)
15. [Refund](#refund)
16. [User](#user)
17. [Using in Frameworks](#using-in-frameworks)
18. [Using in Laravel 4](#using-in-laravel-4)
19. [Other Frameworks](#other-frameworks)

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

[](#installation)

Add to your composer.json following lines

```
"require": {
	"rokde/gsales-api-client": "~1.0"
}

```

### Using in Vanilla PHP

[](#using-in-vanilla-php)

```
$wsdl = 'http://URL-TO-YOUR/api/api.php?wsdl';
$apikey = 'YOUR-API-KEY-HERE';
$client = new \Rokde\Gsales\Api\Client($wsdl, $apikey);
echo $client->customer()->count(); // returns number of customers

```

That's it.

### Contexts

[](#contexts)

You have a lot of contexts to group api commands together.

#### Article

[](#article)

All article related commands are grouped in the `Article` context.

```
$client->article()->...;

```

Following methods are available for the article context:

- `get($articleId)`
- `all()`
- `count()`
- `create($article)`
- `update($article)`
- `delete($article)`

##### Create an article

[](#create-an-article)

```
$article = new \Rokde\Gsales\Api\Types\Article\Base();
$article->setTitle('Projectmanagement')
	->setRetailPrice(120);
$apiClient->article()->create($article);

```

#### Authentication

[](#authentication)

All authentication related commands are grouped in the `Authentication` context.

```
$client->authentication()->...;

```

Following methods are available for the authentication context:

- `passwordLost($customer)`
- `changePassword($customer, $newPassword)`
- `login($customer, $password)`
- `enableLogin($customer)`
- `enableLoginById($customer)`
- `disableLogin($customer)`
- `disableLoginById($customer)`

#### Comment

[](#comment)

All comment related commands are grouped in the `Comment` context.

```
$client->comment()->...;

```

Following methods are available for the comment context:

- `get($commentId)`
- `all($sub, $recordId)`
- `create($comment)`
- `delete($comment)`

#### Configuration

[](#configuration)

All configuration related commands are grouped in the `Configuration` context.

```
$client->configuration()->...;

```

Following methods are available for the configuration context:

- `get($key)`

#### Contract

[](#contract)

All contract related commands are grouped in the `Contract` context.

```
$client->contract()->...;

```

Following methods are available for the contract context:

- `get($contractId)`
- `all()`
- `repayable()`
- `processRepayable()`
- `processRepayableForCustomer($customer)`
- `processRepayableContract($contract)`
- `count()`
- `enable($contract)`
- `disable($contract)`
- `createPosition($contract, $position)`
- `updatePosition($contract, $position)`
- `deletePosition($contract, $position)`
- `delete($contract)`
- `createForCustomer($customer, $contract)`
- `update($contract, $data)`
- `updateEndDate($contract, $month, $year)`
- `removeEndDate($contract)`

#### Customer

[](#customer)

All customer related commands are grouped in the `Customer` context.

```
$client->customer()->...;

```

Following methods are available for the customer context:

- `get($customerId)`
- `all()`
- `count()`
- `repayable()`
- `create($customer)`
- `update($customer)`
- `updateProposal($customer)`
- `delete($customer)`

##### Fetch the number of customers

[](#fetch-the-number-of-customers)

```
$apiClient->customer()->count();

```

##### Fetch all customers

[](#fetch-all-customers)

```
$apiClient->customer()->all()

```

#### Document

[](#document)

All document related commands are grouped in the `Document` context.

```
$client->document()->...;

```

Following methods are available for the document context:

- `get($documentId)`
- `all()`
- `file($documentId)`

#### Invoice

[](#invoice)

All invoice related commands are grouped in the `Invoice` context.

```
$client->invoice()->...;

```

Following methods are available for the invoice context:

- `get($invoiceId)`
- `all()`
- `count()`
- `paid($invoice)`
- `open($invoice)`
- `canceled($invoice)`
- `createPosition($invoice, $position)`
- `updatePosition($invoice, $position)`
- `deletePosition($invoice, $position)`
- `delete($invoice)`
- `createForCustomer($customer)`
- `create($invoice)`
- `update($invoice)`
- `addToMailspool($invoice)`
- `pdf($invoice)`

#### Mailspool

[](#mailspool)

All mailspool related commands are grouped in the `Mailspool` context.

```
$client->mailspool()->...;

```

Following methods are available for the mailspool context:

- `send()`
- `get($mailSpoolId)`
- `all()`
- `count()`
- `duplicate($mailspool)`
- `approve($mailspool)`
- `removeApproval($mailspool)`
- `create($mailspool)`
- `update($mailspool)`
- `delete($mailspool)`
- `readByRecipient($mailspool)`

#### Newsletter

[](#newsletter)

All newsletter related commands are grouped in the `Newsletter` context.

```
$client->newsletter()->...;

```

Following methods are available for the newsletter context:

- `get($newsletterId)`
- `all()`
- `count()`
- `recipients($newsletter)`
- `create($newsletter)`
- `update($newsletter)`
- `delete($newsletter)`
- `addRecipient($newsletter, $recipient)`
- `addCustomerAsRecipient($newsletter, $customer)`
- `removeRecipient($newsletter, $recipient)`
- `spool($newsletter)`

#### Offer

[](#offer)

All offer related commands are grouped in the `Offer` context.

```
$client->offer()->...;

```

Following methods are available for the offer context:

- `get($offerId)`
- `all()`
- `count()`
- `accept($offer)`
- `declined($offer)`
- `open($offer)`
- `billed($offer)`
- `createPosition($offer, $position)`
- `updatePosition($offer, $position)`
- `deletePosition($offer, $position)`
- `delete($offer)`
- `createForCustomer($customer)`
- `create($offer)`
- `update($offer)`
- `addToMailspool($offer)`
- `pdf($offer)`
- `convertToInvoice($offer, $invoiceApiContext)`
- `convertToInvoicePositions($offer, $invoice, $invoiceApiContext)`

#### Queue

[](#queue)

All queue related commands are grouped in the `Queue` context.

```
$client->queue()->...;

```

Following methods are available for the queue context:

- `get($queueId)`
- `all()`
- `count()`
- `create($queueEntry)`
- `update($queueEntry)`
- `delete($queueEntry)`
- `auto($queueEntry)`
- `manual($queueEntry)`
- `noApproval($queueEntry)`
- `createInvoice($customer)`
- `createInvoices()`

##### Create a queue entry

[](#create-a-queue-entry)

```
$queueEntry = new \Rokde\Gsales\Api\Types\Queue\Base();
$queueEntry->setPositionText('Test')
	->setCustomerId(37)
	->setPrice(1.23)
	->setQuantity(1)
	->setApproval(0)
	->setUnit('x')
	->setDiscount(0)
	->setTax(0.19);
$apiClient->queue()->create($queueEntry);

```

#### Refund

[](#refund)

All refund related commands are grouped in the `Refund` context.

```
$client->refund()->...;

```

Following methods are available for the refund context:

- `get($refundId)`
- `all()`
- `count()`
- `paid($refund)`
- `canceled($refund)`
- `open($refund)`
- `createPosition($refund, $position)`
- `updatePosition($refund, $position)`
- `deletePosition($refund, $position)`
- `delete($refund)`
- `createForCustomer($customer)`
- `create($refund)`
- `update($refund)`
- `addToMailspool($refund)`
- `pdf($refund)`

#### User

[](#user)

All user related commands are grouped in the `User` context.

```
$client->user()->...;

```

Following methods are available for the user context:

- `get($userId)`
- `all()`
- `count()`
- `create($user)`
- `update($user)`
- `delete($user)`
- `lock($user)`
- `unlock($user)`
- `availableRoles()`
- `roles($user)`
- `addRole($user, $role)`
- `removeRole($user, $role)`

### Using in Frameworks

[](#using-in-frameworks)

#### Using in Laravel 4

[](#using-in-laravel-4)

After installing the package you have to add the following line to your `providers` Array in your app.php:

```
'Rokde\Gsales\Api\Supports\Laravel\LaravelGsalesApiClientServiceProvider',

```

To get your GsalesApiClient configured publish it's configuration:

```
php artisan config:publish rokde/gsales-api-client

```

Then you can set your `wsdl` and `apikey` to the published configuration file.

The service provider for laravel automatically creates a facade `GsalesApiClient` for you. So you can use it from the beginning like so:

```
GsalesApiClient::queue()->all(); // get all queue entries

```

or without facade:

```
$apiClient = App::make('gsales-api-client');
$apiClient->queue()->all();

```

#### Other Frameworks

[](#other-frameworks)

We do not use any other frameworks with this package yet. But please let us know when you need it elsewhere. Or fork it and develop your own. We appreciate pushing back your extension ;)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity62

Established project with proven stability

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 ~222 days

Total

5

Last Release

3315d ago

### Community

Maintainers

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

---

Tags

phpapiclientsoapgsales

### Embed Badge

![Health badge](/badges/opwoco-gsales-api-client/health.svg)

```
[![Health](https://phpackages.com/badges/opwoco-gsales-api-client/health.svg)](https://phpackages.com/packages/opwoco-gsales-api-client)
```

###  Alternatives

[kunalvarma05/dropbox-php-sdk

Dropbox PHP API V2 SDK (Unofficial)

3633.0M18](/packages/kunalvarma05-dropbox-php-sdk)[mozex/anthropic-php

Anthropic PHP is a supercharged community-maintained PHP API client that allows you to interact with Anthropic API.

46365.1k13](/packages/mozex-anthropic-php)[google-gemini-php/symfony

Symfony Bundle for Gemini

149.4k1](/packages/google-gemini-php-symfony)

PHPackages © 2026

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