---
title: "get data"
method: POST
path: "/api/salesdata"
---

# get data

`POST /api/salesdata`

Belirtilen rapor tipine göre veri çeker

## Request body

- SalesDataRequest
  - `Type` integer, required — Rapor tipi kodu
  - `StartDate` string — Başlangıç tarihi (YYYY-MM-DD HH:MM:SS)
  - `EndDate` string — Bitiş tarihi (YYYY-MM-DD HH:MM:SS)
  - `BranchCode` string — Şube kodu: Tümü için "0", çoklu şubeler için "222,111", tek şube için "12"
  - `All` 0 | 1 — Tüm veriler (1) veya belirtilen şubeler (0)
  - `BranchCodeString` string — Bazı raporlar için şube kodları
  - `WarehouseCodeString` string — Stok sayım için depo kodları

## Response `200`

Başarılı yanıt

- SalesDataResponse
  - `data` object[] — Rapor verileri
  - `totalRows` integer — Toplam satır sayısı
  - `affectedRows` integer — Etkilenen satır sayısı
  - `timestamp` string, date-time — Yanıt zamanı
  - `execution_time` number — Sorgu yürütme süresi (saniye)

## Other responses

- `400` — Geçersiz istek
- `401` — Geçersiz API anahtarı
- `404` — Rapor sorgusu bulunamadı
- `429` — İstek limiti aşıldı
- `500` — Sunucu hatası

---

[API](https://skmtc.dev/robotpos/apis/sql-query-api.md) · [All operations](https://skmtc.dev/robotpos/apis/sql-query-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/robotpos/sql-query-api/revisions/0fda49c65b95/schema)
