PHPackages                             inkpro/smartweb-api - 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. inkpro/smartweb-api

ActiveLibrary

inkpro/smartweb-api
===================

API wrapper to smartwebs soap platform

v1.0.3(4y ago)3136↑100%2MITPHPPHP &gt;=7.1

Since Jul 16Pushed 4y ago1 watchersCompare

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

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

Wrapper class for communication with the smartweb API.
======================================================

[](#wrapper-class-for-communication-with-the-smartweb-api)

Documentation for the API can be found here:
Smartweb uses a soap client to pool from their servers.

The easiest way to initiate:

```
$client = new \inkpro\smartwebapi\Client(["Username"=>"myuser", "Password"=>"mypassword"]);
```

If you need to specify a wsdl url, you can do like this:

```
$client = new \inkpro\smartwebapi\Client(
    ["Username"=>"myuser", "Password"=>"mypassword"],
    "https://customwsdl.url"
);
```

For available methods, take a look in `/src/Client.php`. Usage of available methods:

Retrieves all products

```
$products = $client->getAllProducts();
```

Retrieves a product

```
$product = $client->getProduct();
```

Updates a product

```
@param object $product Product object, should include either Id or ItemNumber prop.
$status = $client->updateProduct($product);
```

Deletes a product

```
$status = $client->deleteProduct($id);
```

Retrieves all categories

```
$categories = $client->getAllCategories();
```

Retrieves a category

```
$category = $client->getCategory($categoryId);
```

Retrieves all users.

```
$users = $client->getUsers();
```

Retrieves all newsletter users.

```
$users = $client->getNewsletterUsers();
```

UnSubscribe user from newsletter.

```
$status = $client->unsubscribeNewsletterUser($user);
```

Gets a user by id.

```
$user = $client->getUser($id);
```

Gets a user by email.

```
$user = $client->getUserByEmail($email);
```

Creates a user

```
@param object $user User object, corresponding to smartweb UserCreate schema.
* @see https://api.smart-web.dk/doc/Hosted%20Solution%20API/UserCreate.html
$status = $client->createUser($user);
```

Create order

```
@param object $order OrderData object, corresponding to smartweb Order_Create schema.
$status = $client->createOrder($order);
```

Get Order

```
$order = $client->getOrder($orderId);
```

Retrieves all Orders

```
* @param DateTime $start The first date to get orders from.
* @param DateTime $end The last date to get orders from.
* @param array $status The status codes of the orders you want to get.
$orders = $client->getOrders($start, $end, $status);
```

Gets all orders made by a certain user.

```
$orders = $client->getUsersOrders($userId);
```

Updates the comment on an order.

```
* @param $order Order to update.
$status = $client->updateOrderComment($order, $comment);
```

Updates the status on an order.

```
* @param $order Order to update.
$status = $client->updateOrderStatus($order, $status);
```

Creates invoice from an order.

```
* @param $order Order
* @param int $maturity_interval The amount of days from today's date to set the maturity date for the Invoice (0, 8, 14 or 30 days).
$status = $client->createInvoice($order, $maturity_interval);
```

Gets all images linked to a product id.

```
$images = $client->getProductImages($productId, $shopId);
```

Gets all orderlines from a certain order.

```
$orderLines = $client->getOrderLines($orderId);
```

Gets all orderlines from a certain order.

```
$orderLines = $client->getOrderLines($orderId);
```

Updates orderline status

```
* @param OrderLine $order_line Orderline to update. Must have Id property.
$status = $client->updateOrderLineStatus($orderline, $status);
```

Retrieves a customer

```
$order = $client->getCustomer($orderId);
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~90 days

Total

8

Last Release

1572d ago

Major Versions

v0.3 → v1.02021-06-15

PHP version history (2 changes)v0.1PHP &gt;=5.3.0

v0.2PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/0519ddaf9ad994f7c8ecf82e82edbf208b22a4c6b36ab28afddddfa6784f2ea4?d=identicon)[Esben](/maintainers/Esben)

---

Top Contributors

[![NuffZetPand0ra](https://avatars.githubusercontent.com/u/786349?v=4)](https://github.com/NuffZetPand0ra "NuffZetPand0ra (15 commits)")[![ajacobe](https://avatars.githubusercontent.com/u/4137890?v=4)](https://github.com/ajacobe "ajacobe (14 commits)")[![kg-bot](https://avatars.githubusercontent.com/u/5282920?v=4)](https://github.com/kg-bot "kg-bot (10 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/inkpro-smartweb-api/health.svg)

```
[![Health](https://phpackages.com/badges/inkpro-smartweb-api/health.svg)](https://phpackages.com/packages/inkpro-smartweb-api)
```

PHPackages © 2026

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