---
title: "List of purchases"
method: GET
path: "/shops/{SHOP_ID}/purchases"
tags: ["Purchase"]
---

# List of purchases

`GET /shops/{SHOP_ID}/purchases`

Get list of purchases

## Path parameters

- `SHOP_ID` integer, required

## Query parameters

- `page` integer
- `page_size` integer
- `status` -2 | -1 | 0 | 1 | 2
- `type` string
- `get_time_import` boolean

## Response `200`

Success

- object
  - `data` Purchase[] — List of purchases
    - `id` string — Purchase ID
    - `display_id` integer — Purchase ID
    - `status` -2 | -1 | 0 | 1 | 2 — Status
    - `time_import` string, date-time — Time import
    - `total_quantity` integer — Total quantity
    - `total_remain_quantity` integer — Total remain quantity
    - `total_price` integer — Total purchase price
    - `total_remain_price` integer — Total remain price
    - `note` string — Note
    - `warehouse_id` string — Warehouse ID
    - `supplier_products_id` integer — Supplier products ID
    - `supplier` object — Supplier information
      - `id` integer
      - `name` string
      - `custom_id` string
    - `discount` integer — Discount
    - `transport_fee` integer — Shipping fee
    - `prepaid_debt` integer — Prepaid debt
    - `auto_create_debts` boolean — Auto create debts
    - `not_create_transaction` boolean — Not create transaction
    - `is_lock` boolean — Locked
    - `created_type` string — Purchase type
    - `tags` integer[] — Tag IDs
    - `tag_info` object[] — Purchase tag information
      - `id` integer
      - `name` string
    - `items` object[] — Variation information
      - `id` string
      - `imported_price` integer — Imported price
      - `gross_price` integer — Gross price
      - `discount` integer — Discount on product
      - `quantity` integer — Import quantity
      - `variation_id` string — Variation ID
      - `product_name` string — Product name
      - `note_purchase` string — Note
      - `selling_status` string — Selling status
      - `variation` object
        - `id` string
        - `display_id` string
        - `barcode` string
        - `product_id` string
        - `retail_price` integer
        - `retail_price_after_discount` integer
        - `remain_quantity` integer
        - `weight` integer
        - `product` object
          - `display_id` string
          - `name` string
        - `variations_warehouses` VariationWarehouse[]
          - `id` string — Variation-warehouse record ID
          - `variation_id` string — Variation ID
          - `warehouse_id` string — Warehouse ID
          - `shop_id` integer — Shop ID
          - `remain_quantity` integer — Sellable quantity. May include incoming/waiting stock depending on shop settings.
          - `available_quantity` integer — remain_quantity clamped to be non-negative (max(0, remain_quantity)).
          - `actual_remain_quantity` integer — Quantity physically on hand in the warehouse.
          - `total_quantity` integer — Total quantity recorded at this warehouse.
          - `waitting_quantity` integer — Quantity tied up in orders that are awaiting stock (orders placed but waiting for goods to arrive). (Field name keeps the legacy `waitt-` spelling.)
          - `pending_quantity` integer — Quantity reserved by pending purchase orders.
          - `transfer_quantity` integer — Quantity currently being transferred out.
          - `pending_transfer_quantity` integer — Quantity pending transfer (not yet shipped between warehouses).
          - `pending_export_quantity` integer — Quantity pending export.
          - `shipping_quantity` integer — Quantity tied up in orders being shipped.
          - `returning_quantity` integer — Quantity in the process of being returned to this warehouse.
          - `defect_quantity` integer — Damaged/defective quantity.
          - `total_quantity_transfer` integer — Total quantity across transfer operations.
          - `shelf_quantity` integer — Quantity placed on the shelf.
          - `quantity_in_batch` integer — Quantity in the batch/lot.
          - `batch_position` string, nullable — Batch/lot location label.
          - `shelf_position` string, nullable — Shelf location label.
          - `selling_status` 'none' | 'bad' | 'normal' | 'star' — Selling-speed status of the variation at this warehouse.
          - `selling_avg` number — Average quantity sold per period — combine with remain_quantity to estimate days of stock left (for "running low" detection).
          - `avg_price` number — Average cost price of the stock at this warehouse.
          - `nearly_out` boolean — True when stock has reached the configured warning threshold (nearly out of stock).
          - `not_permission_view_quantity` boolean, nullable — True when the current user lacks permission to view quantities for this warehouse (quantity fields are then hidden/zeroed).
    - `images` string[] — Purchase images
    - `bill_images` string[] — Invoice images
    - `user_id` string — Creator ID
    - `user` object — Creator information
      - `id` string
      - `name` string
      - `fb_id` string
      - `avatar_url` string, uri
    - `inserted_at` string, date-time — Inserted at
    - `updated_at` string, date-time — Updated at
    - `received_at` string, date-time — Received at
    - `separate_by_display_ids` integer — Purchase ID separated
  - `page_number` integer — Page number
  - `page_size` integer — Page size
  - `success` boolean — Success status
  - `total_entries` integer — Total entries
  - `total_pages` integer — Total pages

---

[API](https://skmtc.dev/pancake/apis/pancake-pos-open-api.md) · [All operations](https://skmtc.dev/pancake/apis/pancake-pos-open-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/pancake/pancake-pos-open-api/revisions/acb70aa4b3f5/schema)
