PHPackages                             encoderuz/uzpost-php - 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. encoderuz/uzpost-php

ActiveLibrary[API Development](/categories/api)

encoderuz/uzpost-php
====================

Uzpost integration package for php

022PHP

Since Mar 13Pushed 1y ago1 watchersCompare

[ Source](https://github.com/encoderuz/uzpost-php)[ Packagist](https://packagist.org/packages/encoderuz/uzpost-php)[ RSS](/packages/encoderuz-uzpost-php/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Introduction
------------

[](#introduction)

UzpostClient is a PHP client for interacting with the Uzpost API. It simplifies sending HTTP requests, managing authentication, and handling API responses.

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

[](#installation)

composer require encoderuz/uzpost-php

Usage
-----

[](#usage)

For using UzpostClient api requests you need token. For getting token you don't need api\_key. You just use this case:

```
 $token = UzpostClient::token("your_username", "your_password");
 $client = new UzpostClient($token);
```

Methods
-------

[](#methods)

`token(string $username, string $password): string`

Authenticates a user and retrieves an authentication token.

`$username` (string): User's login username.

`$password` (string): User's password.

Returns (string): JWT authentication token.

### Example:

[](#example)

```
$token = UzpostClient::token('your-username', 'your-password');
```

```
get_result(): array
```

- Returns the result of the last API request.
- Returns (array): API response data.

```
send_request(string $method, string $endpoint, array $params = [], string $api_version = 'v1'): UzpostClient
```

- Sends an HTTP request to the Uzpost API.
- `$method` (string): HTTP method (GET, POST, etc.).
- `$endpoint` (string): API endpoint.
- `$params` (array): Request parameters.
- `$api_version` (string): API version. Default is v1.
- Returns (UzpostClient): The current instance with the response stored in result.

### Example:

[](#example-1)

```
$response = $client->send_request('GET', 'tracking/123456');
$result = $client->get_result();
```

Services
--------

[](#services)

---

### 2. CustomerService

[](#2-customerservice)

Handles authentication and customer-related operations.

#### Usage:

[](#usage-1)

```
$customerService = new CustomerService($client);
```

[Read more about CustomerService](./CUSTOMER_SERVICE.md)

---

### 3. JurisdictionService

[](#3-jurisdictionservice)

Retrieves jurisdiction-related data.

#### Usage:

[](#usage-2)

```
$jurisdictionService = new JurisdictionService($client);
```

[Read more about JurisdictionService](./JURISDICTION_SERVICE.md)

---

### 4. OrderService

[](#4-orderservice)

Handles order tracking, retrieval, creation, and cancellation.

#### Usage:

[](#usage-3)

```
$orderService = new OrderService($client);
```

[Read more about OrderService](./ORDER_SERVICE.md)

---

### 5. PricingService

[](#5-pricingservice)

Fetches package pricing and service types.

#### Usage:

[](#usage-4)

```
$pricingService = new PricingService($client);
```

[Read more about PricingService](./PRICING_SERVICE.md)

---

Exception Handling
------------------

[](#exception-handling)

All methods in these services throw `UzpostException` in case of API request failure.

#### Example:

[](#example-2)

```
try {
    $orders = $orderService->get_customer_orders(1, 10);
} catch (UzpostException $e) {
    echo "Error: " . $e->getMessage();
}
```

License
-------

[](#license)

This package is open-source and available under the MIT License.

###  Health Score

16

—

LowBetter than 4% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity16

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/43345536?v=4)[Abduqodir](/maintainers/encoderuz)[@encoderuz](https://github.com/encoderuz)

---

Top Contributors

[![encoderuz](https://avatars.githubusercontent.com/u/43345536?v=4)](https://github.com/encoderuz "encoderuz (17 commits)")

### Embed Badge

![Health badge](/badges/encoderuz-uzpost-php/health.svg)

```
[![Health](https://phpackages.com/badges/encoderuz-uzpost-php/health.svg)](https://phpackages.com/packages/encoderuz-uzpost-php)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k15](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

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