PHPackages                             boolxy/trendyol - 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. boolxy/trendyol

ActiveLibrary

boolxy/trendyol
===============

The easiest way for using Trendyol API services in PHP

1.0.5(5y ago)3631812[1 PRs](https://github.com/boolxy/trendyol/pulls)MITPHPPHP ^7.4 || ^8

Since Mar 11Pushed 5y ago6 watchersCompare

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

READMEChangelog (6)Dependencies (4)Versions (7)Used By (0)

Trendyol API Client Library for PHP
===================================

[](#trendyol-api-client-library-for-php)

[![Tests](https://github.com/boolxy/trendyol/workflows/Tests/badge.svg?branch=master)](https://github.com/boolxy/trendyol/workflows/Tests/badge.svg?branch=master)[![StyleCI](https://camo.githubusercontent.com/ed18b47b9f4b2f729700d51ee6819e2df22308babbd8f71914dc01728345de6c/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3234313837373332392f736869656c643f6272616e63683d6d6173746572267374796c653d666c6174)](https://github.styleci.io/repos/241877329)[![Latest Stable Version](https://camo.githubusercontent.com/163605588a66d7205755e523b54797b79bdb163e1c59c64aa6232c0b9ee4d9b3/68747470733a2f2f706f7365722e707567782e6f72672f626f6f6c78792f7472656e64796f6c2f762f737461626c653f666f726d61743d666c6174)](https://packagist.org/packages/boolxy/trendyol)[![License](https://camo.githubusercontent.com/f9deb10d72845924feccef52ee47a44c02c9c0315c2e810ccf922d02efe552c7/68747470733a2f2f706f7365722e707567782e6f72672f626f6f6c78792f7472656e64796f6c2f6c6963656e73653f666f726d61743d666c6174)](https://packagist.org/packages/boolxy/trendyol)

Developed according to SOLID principles.

Trendyol is the largest and fastest growing mobile commerce company in Turkey and in the MENA region.

This library is the easiest way to use Trendyol API services in PHP. If you are a Trendyol partner and use PHP programming language on your own website, this package is perfect for you.

Services:

- Product Service
- Order Service
- Claim Service
- Settlement Service

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

[](#installation)

This package can be installed via Composer:

```
composer require boolxy/trendyol
```

Usage
-----

[](#usage)

### Product Service

[](#product-service)

#### Get brands

[](#get-brands)

```
use Boolxy\Trendyol\Trendyol;

$results = Trendyol::create($user, $pass, $supplier_id)
    ->productService()
    ->getBrands();
```

#### Get brands by name

[](#get-brands-by-name)

```
use Boolxy\Trendyol\Trendyol;

$results = Trendyol::create($user, $pass, $supplier_id)
    ->productService()
    ->getBrandsByName("TRENDYOL");
```

#### Get categories

[](#get-categories)

```
use Boolxy\Trendyol\Trendyol;

$results = Trendyol::create($user, $pass, $supplier_id)
    ->productService()
    ->getCategories();
```

#### Get attributes by categoryId

[](#get-attributes-by-categoryid)

```
use Boolxy\Trendyol\Trendyol;

$categoryId = 387;

$results = Trendyol::create($user, $pass, $supplier_id)
    ->productService()
    ->getAttributes($categoryId);
```

#### Get shipment providers

[](#get-shipment-providers)

```
use Boolxy\Trendyol\Trendyol;

$results = Trendyol::create($user, $pass, $supplier_id)
    ->productService()
    ->getProviders();
```

#### Get suppliers addresses

[](#get-suppliers-addresses)

```
use Boolxy\Trendyol\Trendyol;

$results = Trendyol::create($user, $pass, $supplier_id)
    ->productService()
    ->getSuppliersAddresses();
```

#### Get batch request result

[](#get-batch-request-result)

```
use Boolxy\Trendyol\Trendyol;

$batchRequestId = '5631d1a1-ec81-496f-9407-99876554433-1529820717';

$results = Trendyol::create($user, $pass, $supplier_id)
    ->productService()
    ->getBatchRequestResult($batchRequestId);
```

#### Get products

[](#get-products)

```
use Boolxy\Trendyol\Trendyol;

$results = Trendyol::create($user, $pass, $supplier_id)
    ->productService()
    ->getProducts();
```

with filters:

```
use Boolxy\Trendyol\Trendyol;
use Boolxy\Trendyol\Enums\DateQueryType;

$results = Trendyol::create($user, $pass, $supplier_id)
    ->productService()
    ->gettingProducts()
    ->dateQueryType(DateQueryType::create(DateQueryType::LAST_MODIFIED_DATE))
    ->barcode('XXX')
    ->page(1)
    ->size(50)
    // ...
    ->get();
```

#### Update price and inventory

[](#update-price-and-inventory)

```
use Boolxy\Trendyol\Trendyol;

$items = [
    [
        "barcode" => "8680000000",
        "quantity" => 100,
        "salePrice" => 112.85,
        "listPrice" => 113.85,
    ],
    // ...
];

$service = Trendyol::create($user, $pass, $supplier_id)
    ->productService()
    ->updatingPriceAndInventory();

foreach($items as $item) {
    $service->addItem(
        $item["barcode"],
        $item["quantity"],
        $item["salePrice"],
        $item["listPrice"]
    );
}

$results = $service->update();
```

#### Create your own products on Trendyol

[](#create-your-own-products-on-trendyol)

```
use Boolxy\Trendyol\Trendyol;
use Boolxy\Trendyol\Models\Product;

$attributes = [ /* ... */ ];

$product1 = new Product($attributes);

$items = [
    $product1,
    // ...
];

$service = Trendyol::create($user, $pass, $supplier_id)
    ->productService()
    ->creatingProducts();

foreach($items as $item) {
    $service->addProduct($item);
}

$result = $service->create();
```

### Order Service

[](#order-service)

#### Get shipment packages

[](#get-shipment-packages)

```
use Boolxy\Trendyol\Trendyol;
use Boolxy\Trendyol\Enums\ShipmentOrderBy;
use Boolxy\Trendyol\Enums\ShipmentStatus;
use Boolxy\Trendyol\Enums\OrderByDirection;

$results = Trendyol::create($user, $pass, $supplier_id)
    ->orderService()
    ->gettingShipmentPackages()
    ->status(ShipmentStatus::create(ShipmentStatus::DELIVERED))
    ->orderByField(ShipmentOrderBy::create(ShipmentOrderBy::PACKAGE_LAST_MODIFIED_DATE))
    ->orderByDirection(OrderByDirection::create(OrderByDirection::DESC))
    ->page(1)
    ->size(10)
    // ...
    ->get();
```

#### Update tracking number

[](#update-tracking-number)

```
use Boolxy\Trendyol\Trendyol;

$shipmentPackageId = 11650604;
$trackingNumber = "7340447182689";

$result = Trendyol::create($user, $pass, $supplier_id)
    ->orderService()
    ->updateTrackingNumber($shipmentPackageId, $trackingNumber);
```

#### Send invoice link

[](#send-invoice-link)

```
use Boolxy\Trendyol\Trendyol;

$shipmentPackageId = 11650604;
$invoiceLink = "https://extfatura.faturaentegratoru.com/324523-34523-52345-3453245.pdf";

$result = Trendyol::create($user, $pass, $supplier_id)
    ->orderService()
    ->sendInvoiceLink($invoiceLink, $shipmentPackageId);
```

#### Splitting shipment package

[](#splitting-shipment-package)

```
use Boolxy\Trendyol\Trendyol;

$result = Trendyol::create($user, $pass, $supplier_id)
    ->orderService()
    ->splittingShipmentPackage()
    ->setShipmentPackageId(11650604)
    ->addOrderLineId(2)
    ->addOrderLineId(3)
    ->addOrderLineId(4)
    // ...
    ->split();
```

multi

```
use Boolxy\Trendyol\Trendyol;

$result = Trendyol::create($user, $pass, $supplier_id)
    ->orderService()
    ->splittingShipmentPackageMulti()
    ->setShipmentPackageId(11650604)
    ->addGroup([ 3, 5, 6 ])
    ->addGroup([ 7, 8, 9 ])
    // ...
    ->split();
```

by quantity

```
use Boolxy\Trendyol\Trendyol;

$result = Trendyol::create($user, $pass, $supplier_id)
    ->orderService()
    ->splittingShipmentPackageByQuantity()
    ->setShipmentPackageId(11650604)
    ->addQuantitySplit($orderLineId = 0, [ 2, 2 ])
    // ...
    ->split();
```

### Claim Service

[](#claim-service)

#### Get claims

[](#get-claims)

```
use Boolxy\Trendyol\Trendyol;
use Boolxy\Trendyol\Enums\ClaimItemStatus;

$result = Trendyol::create($user, $pass, $supplier_id)
    ->claimService()
    ->gettingClaims()
    ->status(ClaimItemStatus::create(ClaimItemStatus::CREATED))
    // ...
    ->get();
```

#### Approve claim line items

[](#approve-claim-line-items)

```
use Boolxy\Trendyol\Trendyol;

$result = Trendyol::create($user, $pass, $supplier_id)
    ->claimService()
    ->approvingClaimLineItems()
    ->addClaimItemId("f9da2317-876b-4b86-b8f7-0535c3b65731")
    // ...
    ->approve();
```

#### Create claim issue

[](#create-claim-issue)

```
use Boolxy\Trendyol\Trendyol;

$result = Trendyol::create($user, $pass, $supplier_id)
    ->claimService()
    ->creatingClaimIssue()
    ->setClaimIssueReasonId(1)
    ->setClaimId("f9da2317-876b-4b86-b8f7-0535c3b65731")
    ->setClaimItemIdList("b71461e3-d1a0-4c1d-9a6d-18ecbcb5158c")
    ->addFile(__DIR__ . '/test.png')
    // ...
    ->create();
```

#### Get claims issue reasons

[](#get-claims-issue-reasons)

```
use Boolxy\Trendyol\Trendyol;

$results = Trendyol::create($user, $pass, $supplierId)
    ->claimService()
    ->getClaimsIssueReasons();
```

### Settlement Service

[](#settlement-service)

#### Get settlements

[](#get-settlements)

```
use Boolxy\Trendyol\Trendyol;
use Boolxy\Trendyol\Enums\SettlementDateType;

$results = Trendyol::create($user, $pass, $supplierId)
    ->settlementService()
    ->gettingSettlements()
    ->dateType(SettlementDateType::create(SettlementDateType::ORDER))
    ->startDate(1557469159834)
    ->endDate(1557469159834)
    // ...
    ->get();
```

Composer scripts
----------------

[](#composer-scripts)

With reviewing the tests, you can learn more about the package. Before testing: Copy phpunit.xml.dist as phpunit.xml and update it. After then you can start the testing.

- Run the tests

    ```
    composer test
    ```
- Check for PSR-2 standards

    ```
    composer check
    ```
- Apply PSR-2 standards

    ```
    composer fix
    ```

API Documentation
-----------------

[](#api-documentation)

-

Credits
-------

[](#credits)

- [Sezai Ozarslan](https://github.com/sezaiozarslan)
- [All Contributors](https://github.com/boolxy/trendyol/graphs/contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](https://github.com/boolxy/trendyol/blob/master/LICENSE.md) for more information.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 99% 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 ~75 days

Recently: every ~69 days

Total

6

Last Release

1873d ago

PHP version history (2 changes)1.0.0PHP ^7.4

1.0.2PHP ^7.4 || ^8

### Community

Maintainers

![](https://www.gravatar.com/avatar/2d05f146dd04a85a52878e5dfc69c87abb0c08006787d0dcaa693cec6138e66c?d=identicon)[boolxy](/maintainers/boolxy)

---

Top Contributors

[![sezaiozarslan](https://avatars.githubusercontent.com/u/6480751?v=4)](https://github.com/sezaiozarslan "sezaiozarslan (100 commits)")[![oktaykuzu1](https://avatars.githubusercontent.com/u/249705210?v=4)](https://github.com/oktaykuzu1 "oktaykuzu1 (1 commits)")

---

Tags

phptrendyoltrendyol-api-clienttrendyol-api-servicesphptrendyoltrendyol-api-clienttrendyol-api-services

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/boolxy-trendyol/health.svg)

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

###  Alternatives

[stevebauman/location

Retrieve a user's location by their IP Address

1.3k7.6M65](/packages/stevebauman-location)[josiasmontag/laravel-recaptchav3

Recaptcha V3 for Laravel package

2641.6M2](/packages/josiasmontag-laravel-recaptchav3)[dariusiii/tmdb-laravel

Laravel Package for TMDB ( The Movie Database ) API. Provides easy access to the wtfzdotnet/php-tmdb-api library.

1821.1k](/packages/dariusiii-tmdb-laravel)

PHPackages © 2026

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