# trendyol-api

> [![npm version](https://badge.fury.io/js/trendyol-api.svg)](https://www.npmjs.com/package/trendyol-api) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) ![Npm Publish workflow](https://github.com/

Latest version **1.1.0** (published 2021-11-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install trendyol-api
pnpm add trendyol-api
yarn add trendyol-api
bun add trendyol-api
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2021-11-22 |
| First published | 2021-11-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 26.2 KB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 9 |
| Author | Mustafa Yazar |
| Maintainers | myazarc |

## Links

- npm: https://www.npmjs.com/package/trendyol-api
- Repository: https://github.com/myazarc/trendyol-api
- Homepage: https://github.com/myazarc/trendyol-api#readme
- Issues: https://github.com/myazarc/trendyol-api/issues
- npm.io page: https://npm.io/package/trendyol-api

## Dependencies (1)

- [axios](https://npm.io/package/axios.md) ^0.24.0

## Recent versions

- 1.1.0 (latest) — 2021-11-22
- 1.0.9 — 2021-11-22
- 1.0.8 — 2021-11-22
- 1.0.7 — 2021-11-22
- 1.0.6 — 2021-11-20
- 1.0.3 — 2021-11-20
- 1.0.2 — 2021-11-20
- 1.0.1 — 2021-11-20
- 1.0.0 — 2021-11-20

## README

# trendyol-api

[![npm version](https://badge.fury.io/js/trendyol-api.svg)](https://www.npmjs.com/package/trendyol-api)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
![Npm Publish workflow](https://github.com/myazarc/trendyol-api/actions/workflows/main.yml/badge.svg)
![NPM week download](https://img.shields.io/npm/dw/trendyol-api)
![jest coverage](https://raw.githubusercontent.com/myazarc/trendyol-api/main/.badges/coverage.svg)

Trendyol Api with Promise and Typescript support.

HttpClient: [axios](https://github.com/axios/axios)

# install

```bash
npm install trendyol-api --save
```

or

```bash
yarn add trendyol-api
```

# usage

```js
import Trendyol from "trendyol-api";
const ty = new Trendyol("API_KEY", "API_SECRET", "STORE_ID|MAGAZA_ID");

ty.getBrands().then((res) => {
  console.log(res.data);
});
```

```js
const trendyolApi = require("trendyol-api"),
  Trendyol = trendyolApi.Trendyol;
const ty = new Trendyol("API_KEY", "API_SECRET", "STORE_ID|MAGAZA_ID");

ty.getBrands().then((res) => {
  console.log(res.data);
});
```

# all methods

| Method                  | Description                                                                                       |
| ----------------------- | ------------------------------------------------------------------------------------------------- |
| createProduct           | Ürün göndermek için kullanılır.                                                                   |
| updatePriceAndInventory | Ürün fiyatı ve stok miktarını güncellemek için kullanılır.                                        |
| updateProduct           | Ürünün fiyat ve stok miktarı bilgisi hariç diğer bilgilerini güncellemek için kullanılır.         |
| getFilterProduct        | Kayıtlı ürünlerinizi listelemek için kullanılır.                                                  |
| getSuppliersAddresses   | İade ve Sevkiyat Adres Bilgilerini listelemek için kullanılır.                                    |
| getBatchRequestResult   | Ürün servislerinde verilern batchId sorgulaması için kullanılır.                                  |
| getOrders               | Siparişlerinizi almak için kullanılır.                                                            |
| getOrderWithAllPages    | Siparişleriniz birden fazla sayfada yer alıyorsa tamamını tek bir methodda almak için kullanılır. |
| getShipmentProviders    | Kargo Şirketlerini listemek için kullanılır.                                                      |
| getBrands               | Markaları listelemek için kullanılır.                                                             |
| getBrandsByName         | Markaları ismine göre aramak için kullanılır.                                                     |
| getCategories           | Kategorileri listelemek için kullanılır.                                                          |
| getCategoryAttributes   | Kategori-Özellik listesini almak için kullanılır.                                                 |

## Product

```js
    createProduct(payload: ProductRequest): Promise<ProductResponse>;
    updatePriceAndInventory(payload: PriceAndInventoryRequest): Promise<PriceAndInventoryResponse>;
    updateProduct(payload: UpdateProductRequest): Promise<UpdateProductResponse>;
    getFilterProduct(params?: FilterProductRequest): Promise<FilterProductResponse>;
    getBatchRequestResult(batchRequestId: string): Promise<BatchRequestResultResponse>;
```

## Order

```js
    getOrders(params?: OrderRequest): Promise<OrderResponse>;
    getOrderWithAllPages(): Promise<OrderResponse[]>;
```

## Other

```js
    getShipmentProviders(): Promise<ShipmentProviderResponse>;
    getBrands(params?: BrandRequest): Promise<BrandResponse>;
    getBrandsByName(brandName: string): Promise<BrandByNameResponse>;
    getCategoryAttributes(categoryId: number | string): Promise<CategoryAttributeResponse>;
    getCategories(): Promise<CategoryResponse>;
    getSuppliersAddresses(): Promise<SuppliersAddressResponse>;
```

---
_Source: https://npm.io/package/trendyol-api · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
