---
title: "Get purchase"
method: GET
path: "/shops/{SHOP_ID}/purchases/{PURCHASE_ID}"
tags: ["Purchase"]
---

# Get purchase

`GET /shops/{SHOP_ID}/purchases/{PURCHASE_ID}`

## Request

- Base URL: `https://pos.pages.fm/api/v1`
- URL: `https://pos.pages.fm/api/v1/shops/{SHOP_ID}/purchases/{PURCHASE_ID}`
- Auth: API key in query parameter `api_key`

Get one purchase by ID or display ID, in the same shape as an item of the purchase list. Purchases in warehouses the caller cannot view are reported as not found.

## Path parameters

- `SHOP_ID` integer, required
- `PURCHASE_ID` string, required

## Response `200`

Success

- object
  - `data` Purchase: Purchase information
    - `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
  - `success` boolean: Success status

## Other responses

- `404`: The purchase does not exist or is not visible to the caller

## Changes

- **2026-10-23** `521c4e3d7be9`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/pancake/apis/pancake-pos-open-api/changes/shops/:SHOP_ID/purchases/:PURCHASE_ID/get.md)

---

[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.dev/pancake/apis/pancake-pos-open-api/revisions/3df28d1fb5dc?raw)
