---
title: "What is still on order for a product, grouped by order type"
method: GET
path: "/api/v1/product/{product_id}/incoming-pos/drawer"
tags: ["product"]
---

# What is still on order for a product, grouped by order type

`GET /api/v1/product/{product_id}/incoming-pos/drawer`

## Request

- Base URL: `https://api.app.tightly.io`
- URL: `https://api.app.tightly.io/api/v1/product/{product_id}/incoming-pos/drawer`
- Auth: HTTP bearer

The same open orders as the per-variant read, grouped the other way: by `order_type`, in the fixed order `PURCHASE`, `TRANSFER`, `MANUFACTURING`, with one entry per order rather than one per variant.

Each order carries `id`, `name`, `expected_delivery_date`, `status`, `has_delivery_delay`, `supplier_signals`, `ordered_quantity` and `delivered_quantity` totalled across this product's variants, and `line_items` of `{variant_id, variant_title, quantity}` for the variants of this product only.

Proposals, cancelled orders and fully delivered orders are excluded, so what is here is what is genuinely still coming. A product with nothing inbound answers `purchase_orders_grouped_by_type: []`.

Take this one when a product's inbound needs counting by order type; take the per-variant read when the question is which variant the stock is coming for.

Scope: `products:read`.

## Path parameters

- `product_id` string, required

## Headers

- `Tightly-Version` string

## Response `200`

The product's open orders, grouped by order type.

- object
  - `data` GetProductDrawerIncomingPOsPayload
    - `purchase_orders_grouped_by_type` DrawerIncomingPOsByType[]
      - `order_type` unknown
      - `purchase_orders` DrawerIncomingPOItem[]
        - `delivered_quantity` integer
        - `expected_delivery_date` string, nullable
        - `has_delivery_delay` boolean, required
        - `id` string, required
        - `line_items` DrawerIncomingPOLineItem[]
          - `quantity` integer, required
          - `variant_id` string, required
          - `variant_title` string, nullable
        - `name` string, required
        - `ordered_quantity` integer
        - `status` string, required
        - `supplier_signals` string[]
  - `message` object: severity, service and desc.

## Other responses

- `401`: No usable key: malformed, unknown, revoked, expired or stopped. One refusal covers all five, because telling a caller which is which maps the surface for them.
- `403`: The key may not reach this operation. `scope_missing` when the key does not hold Products; `ip_not_allowed` when the caller's address is outside the key's allowlist. `plan_excludes` when the organisation's plan does not include the public API itself, which is sold with Essentials and is asked of every key minted under that gate. A key minted before the gate existed is never refused by it, whatever the plan holds. Products is ungated, so that is the only plan reason served here.
- `404`: No product in this organisation carries that id.
- `429`: The key has spent its allowance for this minute. 600 reads and 120 writes a minute, counted per key, refused calls included. `Retry-After` says how long to wait.
- `503`: The database is briefly out of reach, which is what a failover or a full connection pool looks like from outside. Wait the seconds `Retry-After` names and send the request again. A read is safe to repeat. A write is not, because the connection was lost in the middle of it, so read the object back before sending it a second time. Branch on the status rather than on `code`, which is `POSTGRES_UNAVAILABLE` from one of the two seams that raise this and `SERVICE_UNAVAILABLE` from the other.

---

[API](https://skmtc.dev/tightly/apis/tightly-api.md) · [All operations](https://skmtc.dev/tightly/apis/tightly-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tightly/apis/tightly-api/revisions/199f7eb35afb?raw)
