---
title: "Get the fulfillments report"
description: "What is still owed to preorder customers: units sold, cancelled, fulfilled and outstanding (waiting, on hold, scheduled) per variant or product, as the dashboard's fulfillment table."
url: https://docs.stoqapp.com/v2-reference/preorders-reports/get-the-fulfillments-report/
api: "API v2 reference"
method: GET
path: "/preorders/reports/fulfillments"
---

# Get the fulfillments report

`GET https://app.stoqapp.com/api/v2/external/preorders/reports/fulfillments`

What is still owed to preorder customers: units sold, cancelled, fulfilled and outstanding (waiting, on hold, scheduled) per variant or product, as the dashboard's fulfillment table.

**Note:** Units, not orders. cancelled counts every unit on a cancelled order plus units refunded or split off from an open order. sold = cancelled + fulfilled + outstanding, and outstanding = waiting + on_hold + scheduled. Statuses are as of now; the window selects when the units were sold. range=all_time is the dashboard's All time. image_url is the variant's stored image, else the product's (null if none is stored).

## Query parameters

- `range` (string): Send all_time for the shop's whole history instead of a from/to window; from and to are then ignored. One of: `all_time`, `null`.
- `group_by` (string): Return one row per variant or per product. Default variant. One of: `variant`, `product`.
- `from` (string): Start of the window, as an ISO 8601 date or time. A bare date starts at midnight in the shop's time zone. Default 30 days ago.
- `to` (string): End of the window, as an ISO 8601 date or time. A bare date runs to the end of that day in the shop's time zone. Default today.
- `sort_by` (string): Column to sort the rows by. Default outstanding. One of: `outstanding`, `sold`, `fulfilled`, `cancelled`, `on_hold`, `scheduled`, `waiting`, `order_count`, `last_order_date`.
- `direction` (string): Sort order of the rows. Default desc. One of: `asc`, `desc`.
- `page` (integer): Page of rows to return, starting at 1.
- `per_page` (integer): Rows per page, 1 to 100. Default 25.

## Returns

- `window` (object, nullable): The date range the figures cover. Null when range is all_time.
  - `from` (string): Start of the range, ISO 8601.
  - `to` (string): End of the range, ISO 8601.
- `group_by` (string): e.g. `variant`
- `sort_by` (string): e.g. `outstanding`
- `direction` (string): e.g. `desc`
- `totals` (object)
  - `sold` (integer): e.g. `95`
  - `cancelled` (integer): e.g. `4`
  - `fulfilled` (integer): e.g. `12`
  - `on_hold` (integer): e.g. `61`
  - `scheduled` (integer): e.g. `10`
  - `waiting` (integer): e.g. `8`
  - `outstanding` (integer): e.g. `79`
  - `order_count` (integer): e.g. `88`
  - `as_of` (string, nullable): e.g. `2026-06-25T15:00:00Z`
- `rows` (array of objects)
  - `shopify_product_id` (string): e.g. `gid://shopify/Product/8784906035384`
  - `shopify_variant_id` (string): e.g. `gid://shopify/ProductVariant/47284734423096`
  - `image_url` (string, nullable): e.g. `https://cdn.shopify.com/s/files/1/0712/3456/7890/files/cl…`
  - `product_title` (string): e.g. `Classic Sneaker`
  - `variant_title` (string): e.g. `Blue / Medium`
  - `sku` (string): e.g. `CS-BLU-M`
  - `order_count` (integer): e.g. `58`
  - `sold` (integer): e.g. `64`
  - `cancelled` (integer): e.g. `3`
  - `fulfilled` (integer): e.g. `8`
  - `on_hold` (integer): e.g. `41`
  - `scheduled` (integer): e.g. `7`
  - `waiting` (integer): e.g. `5`
  - `outstanding` (integer): e.g. `53`
  - `last_order_date` (string): e.g. `2026-06-25T10:02:00Z`
- `meta` (object): Pagination for the list.
  - `total_count` (integer): Items matching the filters, across all pages.
  - `page` (integer): Page returned, starting at 1.
  - `per_page` (integer): Most items per page.
  - `total_pages` (integer): Pages available at this per_page; 0 when nothing matches.

Rate limit: this call costs 1 point ([rate limits](https://docs.stoqapp.com/docs/rate-limits/)).

## Examples

### Get the fulfillments report

```sh
curl "https://app.stoqapp.com/api/v2/external/preorders/reports/fulfillments" \
  -H "X-Auth-Token: $STOQ_API_KEY"
```

### Get the fulfillments report filtered by range, group_by and sort_by

```sh
curl "https://app.stoqapp.com/api/v2/external/preorders/reports/fulfillments?range=all_time&group_by=variant&sort_by=outstanding" \
  -H "X-Auth-Token: $STOQ_API_KEY"
```

## 200

Success: example response shown.

```json
{
  "window": {
    "from": "2026-05-26T00:00:00-04:00",
    "to": "2026-06-25T23:59:59-04:00"
  },
  "group_by": "variant",
  "sort_by": "outstanding",
  "direction": "desc",
  "totals": {
    "sold": 95,
    "cancelled": 4,
    "fulfilled": 12,
    "on_hold": 61,
    "scheduled": 10,
    "waiting": 8,
    "outstanding": 79,
    "order_count": 88,
    "as_of": "2026-06-25T15:00:00Z"
  },
  "rows": [
    {
      "shopify_product_id": "gid://shopify/Product/8784906035384",
      "shopify_variant_id": "gid://shopify/ProductVariant/47284734423096",
      "image_url": "https://cdn.shopify.com/s/files/1/0712/3456/7890/files/classic-sneaker-blue.jpg",
      "product_title": "Classic Sneaker",
      "variant_title": "Blue / Medium",
      "sku": "CS-BLU-M",
      "order_count": 58,
      "sold": 64,
      "cancelled": 3,
      "fulfilled": 8,
      "on_hold": 41,
      "scheduled": 7,
      "waiting": 5,
      "outstanding": 53,
      "last_order_date": "2026-06-25T10:02:00Z"
    },
    {
      "shopify_product_id": "gid://shopify/Product/8784906035384",
      "shopify_variant_id": "gid://shopify/ProductVariant/47284734455864",
      "image_url": "https://cdn.shopify.com/s/files/1/0712/3456/7890/files/classic-sneaker-red.jpg",
      "product_title": "Classic Sneaker",
      "variant_title": "Red / Large",
      "sku": "CS-RED-L",
      "order_count": 30,
      "sold": 31,
      "cancelled": 1,
      "fulfilled": 4,
      "on_hold": 20,
      "scheduled": 3,
      "waiting": 3,
      "outstanding": 26,
      "last_order_date": "2026-06-24T18:40:00Z"
    }
  ],
  "meta": {
    "total_count": 2,
    "page": 1,
    "per_page": 25,
    "total_pages": 1
  }
}
```

## 401

Missing or invalid `X-Auth-Token`.

```json
{
  "errors": [
    "Invalid API key"
  ],
  "code": "auth_invalid",
  "details": [
    {
      "code": "auth_invalid",
      "message": "Invalid API key",
      "path": null,
      "value": null,
      "expected": null
    }
  ]
}
```

## 422

The request failed validation.

```json
{
  "errors": [
    "name is required"
  ],
  "code": "validation_failed",
  "details": [
    {
      "code": "validation_failed",
      "message": "name is required",
      "path": null,
      "value": null,
      "expected": null
    }
  ]
}
```

## 429

Rate limited: cost-weighted per token (read 1, write 2; 360 points / 60s). Check `Retry-After`.

```json
{
  "errors": [
    "Rate limit exceeded"
  ],
  "code": "rate_limited",
  "details": [
    {
      "code": "rate_limited",
      "message": "Rate limit exceeded",
      "path": null,
      "value": null,
      "expected": null
    }
  ]
}
```

