---
title: "POST /ProductDetailQuery/History"
method: POST
path: "/ProductDetailQuery/History"
tags: ["ProductDetailQuery"]
---

# POST /ProductDetailQuery/History

`POST /ProductDetailQuery/History`

## Request

- Base URL: `https://api.khaasfood.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.khaasfood.com/ProductDetailQuery/History`
- Auth: OAuth 2
  - Authorization code: `https://api.khaasfood.com/connect/authorize`
  - Token URL: `https://api.khaasfood.com/connect/token`

## Request body

- KhaasFoodProductsDTOsProductDetailsProductHistorySearchRequestInputDto
  - `maxResultCount` integer
  - `skipCount` integer
  - `sorting` string, nullable
  - `productDetailId` string, uuid
  - `startDate` string, date-time, nullable
  - `endDate` string, date-time, nullable
  - `searchState` string, nullable
  - `orderState` 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
  - `warehouseId` string, uuid, nullable
  - `others` string[], nullable

## Response `200`

Success

- KhaasFoodProductsDTOsProductDetailsProductHistoryResponseDto
  - `pagedResult` VoloAbpApplicationDtosPagedResultDto1KhaasFoodProductsDTOsProductDetailsProductHistoryDtoKhaasFoodApplicationContractsVersion1000CultureNeutralPublicKeyTokenNull
    - `items` KhaasFoodProductsDTOsProductDetailsProductHistoryDto[], nullable
      - `invoiceNumber` string, nullable
      - `date` string, date-time, nullable
      - `type` string, nullable
      - `state` string, nullable
      - `orderState` 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
      - `orderStateString` string, nullable
      - `saleDetailType` 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8
      - `quantity` number, double
      - `saleFrom` string, nullable
      - `price` number, double
      - `total` number, double
      - `unitPrice` number, double
      - `warehouseId` string, uuid, nullable
      - `paid` number, double
      - `balance` number, double
      - `productName` string, nullable
      - `deliveryDate` string, date-time, nullable
    - `totalCount` integer
  - `summery` KhaasFoodProductsDTOsProductDetailsProductHistorySummeryDto
    - `pending` number, double
    - `processing` number, double
    - `done` number, double
    - `purchase` number, double
    - `totalAmount` number, double
    - `damage` number, double
    - `gift` number, double
    - `return` number, double
    - `totalQuantity` number, double
    - `soldAmount` number, double
  - `details` KhaasFoodProductsDTOsProductDetailsProductHistoryDetailDto
    - `productName` string, nullable
    - `purchased` number, double
    - `startingInventory` number, double
    - `sold` number, double
    - `stockIn` number, double
    - `stockOut` number, double
    - `gift` number, double
    - `return` number, double
    - `damage` number, double
    - `onHand` number, double

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `500`: Server Error
- `501`: Server Error

---

[API](https://skmtc.dev/khaasfood/apis/khaasfood-api.md) - [All operations](https://skmtc.dev/khaasfood/apis/khaasfood-api/llms.txt) - [OpenAPI document](https://skmtc.dev/khaasfood/apis/khaasfood-api/revisions/149b6034bea9?raw)
