PHPackages                             maree/oto - 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. maree/oto

ActiveLibrary

maree/oto
=========

package to integrate with oto shipping company api

9242PHP

Since Sep 23Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/mohamedmaree/oto)[ Packagist](https://packagist.org/packages/maree/oto)[ RSS](/packages/maree-oto/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Oto PHP Package 🚀
=================

[](#oto-php-package-)

A PHP package to integrate with [Oto](https://www.tryoto.com) API for shipments, deliveries, and order management in Saudi Arabia.

---

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

[](#-installation)

Install via [Composer](https://getcomposer.org):

```
composer require maree/oto
```

Publish the configuration file:

```
php artisan vendor:publish --provider="Maree\Oto\OtoServiceProvider" --tag="oto"
```

Then configure your settings in `config/oto.php`:

```
return [
    "refresh_token" => "", // Take it from Oto company
    "mode"          => "test", // Use "live" in production
    "currency"      => "SAR",
];
```

---

⚡ Usage
-------

[](#-usage)

### 1️⃣ Get Available Cities

[](#1️⃣-get-available-cities)

```
use Maree\Oto\Oto;

$response = Oto::availableCities($limit, $page);
```

### 2️⃣ Get Cities (New)

[](#2️⃣-get-cities-new)

```
use Maree\Oto\Oto;

$response = Oto::getCities();
```

### 3️⃣ Check Delivery Fee

[](#3️⃣-check-delivery-fee)

```
use Maree\Oto\Oto;

$itemDetails = [
    'weight' => 50,
    'totalDue' => 0,
    'originCity' => 'Riyadh',
    'destinationCity' => 'Jeddah'
];

$response = Oto::checkDeliveryFee($itemDetails);
```

### 4️⃣ Create Order

[](#4️⃣-create-order)

```
use Maree\Oto\Oto;

$orderData = [
    'orderId' => 1,
    'payment_method' => 'paid',
    'amount' => '40',
    'amount_due' => 0,
    'packageCount' => 10,
    'packageWeight' => 1,
    'orderDate' => '2022-06-12 22:30',
];

$customerData = [
    'name' => 'Mohamed Maree',
    'email' => 'm7mdmaree26@gmail.com',
    'mobile' => '010027*****',
];

$addressData = [
    'address' => '20, Maree Street, Almehalla Alkubra, Saudi Arabia',
    'district' => 'Maree District',
    'city' => 'Almehalla',
    'country' => 'SA',
    'lat' => '30.837645',
    'lng' => '30.23456',
];

$items = [
    [
        "productId" => '123',
        "name" => 'Book',
        "price" => '12',
        "rowTotal" => '15',
        "taxAmount" => '3',
        "quantity" => '2',
        "sku" => 'arabic_book',
        "image" => ''
    ],
    [
        "productId" => '145',
        "name" => 'Math Book',
        "price" => '18',
        "rowTotal" => '20',
        "taxAmount" => '1',
        "quantity" => '3',
        "sku" => 'math_book',
        "image" => ''
    ]
];

$response = Oto::createOrder($orderData, $customerData, $addressData, $items);
```

### 5️⃣ Cancel Order

[](#5️⃣-cancel-order)

```
use Maree\Oto\Oto;

$response = Oto::cancelOrder($orderId);
```

### 6️⃣ Get Order Status

[](#6️⃣-get-order-status)

```
use Maree\Oto\Oto;

$response = Oto::orderStatus($orderId);
```

### 7️⃣ Create Shipment

[](#7️⃣-create-shipment)

```
use Maree\Oto\Oto;

$response = Oto::createShipment($orderId, $deliveryOptionId);
```

### 8️⃣ Create Return Shipment

[](#8️⃣-create-return-shipment)

```
use Maree\Oto\Oto;

$response = Oto::createReturnShipment($orderId);
```

### 9️⃣ Create Pickup Location (New)

[](#9️⃣-create-pickup-location-new)

```
use Maree\Oto\Oto;

$pickupData = [
    'name' => 'Main Branch',
    'address' => '123 King Street, Riyadh',
    'city' => 'Riyadh',
    'district' => 'Central',
    'phone' => '0501234567'
];

$response = Oto::createPickupLocation($pickupData);
```

### 🔟 Print AWB (New)

[](#-print-awb-new)

```
use Maree\Oto\Oto;

$response = Oto::printAWB($shipmentId);
```

---

📚 Documentation
---------------

[](#-documentation)

- [Oto Official Documentation](https://www.tryoto.com)

---

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance44

Moderate activity, may be stable

Popularity17

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity13

Early-stage or recently created project

 Bus Factor1

Top contributor holds 71.4% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/0e88e6da55b1e4b359544c3e94fab80c6f73b3ce7ac82afd1d872a41aeb349fa?d=identicon)[mohamedmaree](/maintainers/mohamedmaree)

---

Top Contributors

[![mohamedmaree](https://avatars.githubusercontent.com/u/12659069?v=4)](https://github.com/mohamedmaree "mohamedmaree (5 commits)")[![heshamabdelhamid](https://avatars.githubusercontent.com/u/47713594?v=4)](https://github.com/heshamabdelhamid "heshamabdelhamid (2 commits)")

### Embed Badge

![Health badge](/badges/maree-oto/health.svg)

```
[![Health](https://phpackages.com/badges/maree-oto/health.svg)](https://phpackages.com/packages/maree-oto)
```

PHPackages © 2026

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