PHPackages                             dinja/spediamopro-sdk - 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. dinja/spediamopro-sdk

ActiveLibrary[API Development](/categories/api)

dinja/spediamopro-sdk
=====================

PHP SDK for SpediamoPro Rest API services

1.0.8(6mo ago)11.6k↓50%MITPHPPHP &gt;=5.4

Since Sep 2Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/dinja-srl/spediamopro-sdk)[ Packagist](https://packagist.org/packages/dinja/spediamopro-sdk)[ RSS](/packages/dinja-spediamopro-sdk/feed)WikiDiscussions main Synced 3d ago

READMEChangelog (9)Dependencies (3)Versions (10)Used By (0)

SpediamoPro PHP SDK
===================

[](#spediamopro-php-sdk)

This package is a PHP SDK for SpediamoPro Rest API services.

Installing
----------

[](#installing)

Install with composer

```
composer require dinja/spediamopro-sdk
```

Features
--------

[](#features)

Below there are the main operations of a shipment Workflow:

### Simulation

[](#simulation)

- POST /api/v1/simulazione
- POST /api/v1/spedizione/{id}
- PUT /api/v1/spedizione/{id}
- POST /api/v1/spedizione/{id}/can\_pay

### Shipment

[](#shipment)

- GET /api/v1/spedizione/{id}
- GET /api/v1/spedizione/{id}/ldv

Usage
-----

[](#usage)

### POST /api/v1/simulazione

[](#post-apiv1simulazione)

```
$debug = false;

$declaredArr = array();
$dataDeclared = new Dinja\SpediamoProSDK\Api\DataDeclared(1, 1, 1, 1, 0, null, null, null);
array_push($declaredArr, $dataDeclared);

$request = new Dinja\SpediamoProApiWrapper\Request\SimulazioneRequest('spediamopro_api_authcode', $debug);
$request->setColli($declaredArr)
    ->setNazioneMittente("IT")
    ->setNazioneDestinatario("IT")
    ->setCapMittente("70044")
    ->setCapDestinatario("70044")
    ->setCittaMittente("Polignano a Mare")
    ->setCittaDestinatario("Polignano a Mare")
    ->setProvinciaMittente("BA")
    ->setProvinciaDestinatario("BA");

$response = $request->call($debug);

if ($response->hasError()) {
    echo $response->getResult()->getErrorCode();
} else {
    $spedizioni = $response->getSpedizioni();
    $idSimulazione = $response->getId();
    $codiceSimulazione = $response->getCodice();
}
```

### POST /api/v1/spedizione/{id}

[](#post-apiv1spedizioneid)

```
$idSpedizione = -1;
foreach ($response->getSpedizioni() as $spedizione) {
    if($spedizione->getTariffCode() == "BRTEXP") {  // Example:
        $idSpedizione = $spedizione->getId();
    }
}
$request = new Dinja\SpediamoProApiWrapper\Request\SpedizioneRequest('spediamopro_api_authcode', $debug);

$response = $request->call($debug, $idSpedizione);
```

### PUT /api/v1/spedizione/{id}

[](#put-apiv1spedizioneid)

```
$request = new Dinja\SpediamoProApiWrapper\Request\SpedizioneRequest('spediamopro_api_authcode', $debug);
$request->setMethod("PUT");

$declaredArr = array();
$dataDeclared = new DataDeclared(1, 1, 1, 1, 0, null, null, null);
array_push($declaredArr, $dataDeclared);

$request->setColli($declaredArr)
    ->setNominativoMittente("Dinja Srl")
    ->setSenderAddressLine1("Via Leonardo da Vinci 22/24")
    ->setTelefonoMittente("0803009954")
    ->setEmailMittente("info@sellengine.it")
    ->setNominativoDestinatario("Mario Rossi")
    ->setPressoDestinatario("Dinja Srl")
    ->setConsigneeAddressLine1("Via Roma 1")
    ->setTelefonoDestinatario("0803009954")
    ->setNoteDestinatario("TEST")
    ->setEmailDestinatario("info@sellengine.it");

$response = $request->call($debug, $idSpedizione);
```

### POST /api/v1/spedizione/{id}/can\_pay

[](#post-apiv1spedizioneidcan_pay)

```
$request = new SpedizioneRequest('spediamopro_api_authcode', $debug);
$request->setApiPath("/api/v1/spedizione/" . $idSpedizione . "/can_pay");

$response = $request->call($debug);

if ($response->hasError()) {
    echo $response->getResult()->getErrorCode();
} else if($response->getCan_pay()) {

}
```

### GET /api/v1/spedizione/{id}

[](#get-apiv1spedizioneid)

```
$request = new SpedizioneRequest('spediamopro_api_authcode', $debug);
$request->setMethod("GET");
$request->setApiPath("/api/v1/spedizione/" . $idSpedizione);

$response = $request->call($debug);

if ($response->hasError()) {
    echo $response->getResult()->getErrorCode();
} else {
    $parcelId = $response->getSpedizione()->getColli()[0]->getTracking();
    if(!isset($parcelId))
        $parcelId = $response->getSpedizione()->getColli()[0]->getSegnacollo();

    $corriere = $response->getSpedizione()->getCorriere();
}
```

### GET /api/v1/spedizione/{id}/ldv

[](#get-apiv1spedizioneidldv)

```
$request = new SpedizioneRequest('spediamopro_api_authcode', $debug);
$request->setMethod("GET");
$spedizioneRequest->setApiPath("/api/v1/spedizione/" . $idSpedizione . "/ldv");

$response = $request->call($debug);

if ($response->hasError()) {
    echo $response->getResult()->getErrorCode();
} else {
    $filename = $response->getFilename();
    $b64 = $response->getB64();
}
```

Credits
-------

[](#credits)

- [Dinja Srl](https://github.com/dinja-srl)
- [All Contributors](../../contributors)

Documentation
-------------

[](#documentation)

Website:
API:

License
-------

[](#license)

This project is licensed under the MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance67

Regular maintenance activity

Popularity22

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90.9% 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 ~59 days

Recently: every ~19 days

Total

9

Last Release

194d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fe26bca7fab4f893154a4f3090af883212538fd4b9e6b2ecdc713223de87064b?d=identicon)[dinja-srl](/maintainers/dinja-srl)

![](https://www.gravatar.com/avatar/27145b02e93ff09238e6dce3d28dfaad4f32ded3d57e59a70b130d23d19b1aa2?d=identicon)[benjiam](/maintainers/benjiam)

---

Top Contributors

[![benjiam-gh](https://avatars.githubusercontent.com/u/43422150?v=4)](https://github.com/benjiam-gh "benjiam-gh (10 commits)")[![dinja-gh](https://avatars.githubusercontent.com/u/179718431?v=4)](https://github.com/dinja-gh "dinja-gh (1 commits)")

---

Tags

ecommercelogisticsSpediamoPro

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/dinja-spediamopro-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/dinja-spediamopro-sdk/health.svg)](https://phpackages.com/packages/dinja-spediamopro-sdk)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.5M7](/packages/avalara-avataxclient)[files.com/files-php-sdk

Files.com PHP SDK

2481.1k](/packages/filescom-files-php-sdk)[aimeos/prisma

A powerful PHP package for integrating media related Large Language Models (LLMs) into your applications

1943.1k5](/packages/aimeos-prisma)[volcengine/volcengine-php-sdk

118.7k](/packages/volcengine-volcengine-php-sdk)

PHPackages © 2026

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