Skip to content

Get the wait time report

API v2 is in public beta: endpoints and fields can change before general availability. See the changelog

GET/back_in_stock/reports/wait_duration

Costs 1 rate-limit point · Rate limits

How long back-in-stock shoppers have been waiting: median wait days, the longest wait, and a binned wait-time histogram (paid plans only).

shopify_market_ids is a comma-separated list, as the waitlist page's Markets filter.

Also searched aswait durationwait timehow long are people waitingwait time histogramhow long have customers waited

Query parameters

  • shopify_variant_idstring

    Only this Shopify variant, as a gid or a numeric id.

  • shopify_product_idstring

    Only this Shopify product, as a gid or a numeric id.

  • shopify_market_idsstring

    Comma-separated Shopify market gids or numeric ids to keep.

  • fromstring

    Start of the window, an ISO 8601 date or date-time; a bare date starts at midnight in the shop's time zone. Default 30 days ago.

  • tostring

    End of the window, an ISO 8601 date or date-time; a bare date runs to the end of that day in the shop's time zone. Default today.

  • rangestring

    Set to all_time for the shop's whole history instead of from/to.

    One of all_time

Returns

  • windowobject

    The date range the figures cover. Null when range is all_time.

    Show 2 child attributesHide child attributes
    • fromstring

      Start of the range, ISO 8601.

    • tostring

      End of the range, ISO 8601.

  • median_wait_daysnumber
    Example: 1.5
  • max_wait_daysinteger
    Example: 1
  • intervalstring
    Example: string
  • distributionarray of objects
    Show 2 child attributesHide child attributes
    • daysinteger
      Example: 1
    • countinteger
      Example: 1
  • distribution_included_in_planboolean
    Example: true
  • shopify_market_idsarray of strings

Errors

403
forbidden

The credential is valid, but the store's plan or settings do not allow this operation.

403
plan_required

The change uses a feature that is only available on a paid STOQ plan. Connecting a paid-only integration returns 403; a write that sets paid-only fields returns 422 and saves nothing.

409
conflict

The request is well formed, but the resource's current state does not allow it.

422
invalid_params

One or more fields failed the action's schema.

422
validation_failed

The action refused the request for a reason that is not a single bad field.

Any request can also fail with auth_invalid (401) or rate_limited (429).

Every error has the same shape: see Errors and the list of error codes.

GET/back_in_stock/reports/wait_duration
curl "https://app.stoqapp.com/api/v2/external/back_in_stock/reports/wait_duration" \
  -H "X-Auth-Token: $STOQ_API_KEY"
Response
{
  "window": {
    "from": "2026-01-15T09:30:00Z",
    "to": "2026-01-15T09:30:00Z"
  },
  "median_wait_days": 1.5,
  "max_wait_days": 1,
  "interval": "string",
  "distribution": [
    {
      "days": 1,
      "count": 1
    }
  ],
  "distribution_included_in_plan": true,
  "shopify_market_ids": [
    "string"
  ]
}