PHPackages                             mustafa-m-ugur/trendyol-api-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. mustafa-m-ugur/trendyol-api-php

ActiveLibrary[API Development](/categories/api)

mustafa-m-ugur/trendyol-api-php
===============================

TRENDYOL API PHP

20411PHP

Since Mar 26Pushed 3y ago4 watchersCompare

[ Source](https://github.com/mustafa-m-ugur/trendyol-php-api)[ Packagist](https://packagist.org/packages/mustafa-m-ugur/trendyol-api-php)[ RSS](/packages/mustafa-m-ugur-trendyol-api-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

trendyol-php-api
================

[](#trendyol-php-api)

Trendyol PHP Entegrasyonu

### License

[](#license)

- See [ChangeLog](https://github.com/mustafa-m-ugur/trendyol-php-api/blob/main/LICENSE)

Setup
-----

[](#setup)

```
composer require mustafa-m-ugur/trendyol-api-php
```

Client &amp; ProductService
---------------------------

[](#client--productservice)

```
use CMD\Trendyol\Trendyol;
include "vendor/autoload.php";

$isTestStage = true;
$trendyol = new Trendyol('xxxxxxx', 'xxxxxxx', 'xxxx', $isTestStage);

/**
 *
 * @description Trendyol Üzerindeki Ürünleri Görüntüler.
 *
 */
$response = $trendyol->product->productFilter(10, 20);

/**
 *
 * @description Kategori Listesi.
 *
 */
$response = $trendyol->product->listTrendyolCategories();
print_r($response->response["categories"]);
var_dump($response);

/**
 *
 * @description Ürün Attrubute Kodları Listesi.
 *
 */
$response = $trendyol->product->listTrendyolAttributes(123455);
var_dump($response);

/**
 *
 * @description Taşıyıcı Firmaların Listesi.
 *
 */
$response = $trendyol->product->listProviders();
var_dump($response);

/**
 *
 * @description Marka Listesi.
 *
 */
$response = $trendyol->product->listTrendyolBrands(123455);
print_r($response->response["brands"]);
var_dump($response);

/**
 *
 * @description İade ve Teslimat Adresleri Listesi.
 *
 */
$trendyol->product->getAddressesList();
$response =  $trendyol->product->getAddressesList();
var_dump($response);

/**
 *
 * @description Ürün Oluşturma.
 *
 */

$product = new TrendyolProductModel();
$product->barcode = "barcode-Deneme123";
$product->title = "Bebek  bezi";
$product->productMainId = "1234BT";
$product->brandId = 1791;
$product->categoryId = 411;
$product->quantity = 100;
$product->stockCode = "STK-111";
$product->dimensionalWeight = 2;
$product->description = "Ürün açıklama bilgisi";
$product->currencyType = "TRY";
$product->listPrice = 250.99;
$product->salePrice = 120.99;
$product->vatRate = 18;
$product->cargoCompanyId = 10;
$product->images = [
    new Image("https://www.sampleadress/path/folder/image_1.jpg"),
];
$product->attributes = [
    new Attribute([
        'attributeId' => 338,
        'attributeValueId' => 6980
    ]),
    new Attribute([
        'attributeId' => 338,
        'customAttributeValue' => 'PUDRA'
    ])
];

$request = new CreateUpdateRequestProductModel();
$request->items = [
    $product
];

$isupdate = false; /// Burası true olduğunda create değil update isteği göndermiş oluyoruz
$response = $trendyol->product->productTransfer($request, $isupdate);
echo $response->response["batchRequestId"];
var_dump($response);

/**
 *
 * @description Stok ve Fiyat Güncelleme.
 *
 */
$listOfStockAndPriceItems=[
    new StockAndPriceUpdateRequestModel("8680000000",100,112.85,113),
    new StockAndPriceUpdateRequestModel("8680000001",10,112.85,113),
];
$result  = $trendyol->product->updateStockAndPriceTransfer($listOfStockAndPriceItems);
print_r($result->response["batchRequestId"]);
var_dump($result);
```

OrderService
------------

[](#orderservice)

```
use CMD\Trendyol\Trendyol;
include "vendor/autoload.php";

$isTestStage = true;
$trendyol = new Trendyol('xxxxxxx', 'xxxxxxx', 'xxxx', $isTestStage);

/**
 *
 * @description Trendyol Üzerindeki Sipariş Listesi.
 *
 */
    $date = new \DateTime("2023-03-26");
    $getOrderRequest->startDate = $date->getTimestamp();
    $date->modify("+1 week");
    $getOrderRequest->endDate= $date->getTimestamp();
    $getOrderRequest->page=10;
    $getOrderRequest->size=10;
    $getOrderRequest->orderByDirection=DirectionType::DESC;
    //get-orders
    $response = $trendyol->order->getOrders($getOrderRequest);
    print_r($response->response["content"]);
    var_dump($response);

    /**
 *
 * @description Kargo Takip Numarasını Güncelleme.
 *
 */

    $result = $trendyol->order->updateTrackingNumber(44505271,"1Z3X9A776803647522");
    print_r($result->response);
    var_dump($result);

 /**
 *
 * @description Sipariş durumunu güncelleme.
 *
 */

 $status = new PackageStatusUpdateRequestModel();
$status->lines = [
    new PackageLine(123456,1),
];
$status->params = new PackageParams("EME2018000025208");
$status->status = OrderStatus::Picking;
$result = $trendyol->order->updatePackageStatus(44505271,$status);
var_dump($result);

 /**
 *
 * @description Fatura bilgisi Güncelleme.
 *
 */

 $invoiceLink = new SendInvoiceLinkRequestModel();
$invoiceLink->invoiceLink = "https://extfatura.faturaentegratoru.com/324523-34523-52345-3453245.pdf";
$invoiceLink->shipmentPackageId = 44505271;
//body yok sadece 201 dönüyor
$result = $trendyol->order->sendInvoiceLink($invoiceLink);
var_dump($result);

 /**
 *
 * @description Sipariş Paketlerini Parçalama.
 *
 */

$split = new OrderSplitRequestModel();
$split->splitPackages = [
    new SplitOrderDetails([
        new OrderLine(123456,1),
        new OrderLine(123456,2),
        new OrderLine(123456,3),
    ])
];
$shipmentPackageID = "44505271";
$result = $trendyol->order->splitOrderPackage($shipmentPackageID,$split);
var_dump($result->response);

 /**
 *
 * @description Kargo firması güncelleme.
 *
 */
$shipmentPackageID = 44505271;
$result =$trendyol->order->changeCargoCompany($shipmentPackageID,CargoCompanies::YKMP);
///response body yok sadece 200 dönüyor
var_dump($result);
```

Diğer servisleri  üzerindeki dökümantasyondan örneklendirebilirsiniz

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity22

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://www.gravatar.com/avatar/48aaa76196e9c15cd51b084f163682f92f50a0a2f970c530ce6e1eff79631cf1?d=identicon)[mustafa-m-ugur](/maintainers/mustafa-m-ugur)

---

Top Contributors

[![mustafa-m-ugur](https://avatars.githubusercontent.com/u/79857266?v=4)](https://github.com/mustafa-m-ugur "mustafa-m-ugur (1 commits)")

---

Tags

apiintegrationjsonlaravelmarketplacephptrendyoltrendyol-php-api

### Embed Badge

![Health badge](/badges/mustafa-m-ugur-trendyol-api-php/health.svg)

```
[![Health](https://phpackages.com/badges/mustafa-m-ugur-trendyol-api-php/health.svg)](https://phpackages.com/packages/mustafa-m-ugur-trendyol-api-php)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M271](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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