Skip to content

List orders from alerts

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

GET/back_in_stock/orders

Costs 1 rate-limit point · Rate limits

List orders placed after a back-in-stock alert, paginated. search matches order number/name, customer name, email, a Shopify order id (10+ digits), an order gid (gid://shopify/Order/<id>), or a Shopify admin order URL.

Filters match Reports > Back in stock > Sales recovered and combine with AND. product_match_type same_as_notification keeps orders where the customer bought the exact variant they were alerted about (the dashboard's Order matching: Exact variant match only). shopify_variant_id and shopify_product_id (gids) keep orders containing that variant or product, like a product's Orders tab. A bare from/to date is that whole day in the shop's time zone.

Also searched aslist back in stock ordersrestock alert ordersnotification ordersorders from restock alertssales recovered

Query parameters

  • pageinteger

    Page of results to return, starting at 1.

    Default 1
  • per_pageinteger

    Orders per page, 1 to 200. Default 50.

    Default 50
  • searchstring

    Only orders matching this order number or name, customer name, email, Shopify order id (10+ digits), order gid or Shopify admin order URL.

  • product_match_typestring

    Send same_as_notification to keep only orders where the customer bought the exact variant they were alerted about.

    One of same_as_notification
  • shopify_variant_idstring

    Only orders containing this Shopify variant, as a gid (gid://shopify/ProductVariant/<id>) or numeric id. One id only.

  • shopify_product_idstring

    Only orders containing this Shopify product, as a gid (gid://shopify/Product/<id>) or numeric id. One id only.

  • customer_idstring

    Only orders placed by this customer, by the customer's STOQ id.

  • fromstring

    Only orders created at or after this ISO 8601 date or time. A bare date starts at midnight in the shop's time zone; a time without an offset is read as UTC.

  • tostring

    Only orders created at or before this ISO 8601 date or time. A bare date runs to the end of that day in the shop's time zone; a time without an offset is read as UTC.

Returns

  • ordersarray of objects
    Show 12 child attributesHide child attributes
    • idstring
      Example: string
    • typestring
      Example: string
    • shopify_order_idstring
      Example: string
    • namestring
      Example: string
    • customerobject
      Show 3 child attributesHide child attributes
      • idnull
      • emailstring
        Example: string
      • namestring
        Example: string
    • total_pricestring
      Example: string
    • currencystring
      Example: string
    • financial_statusstring
      Example: string
    • fulfillment_statusstring
      Example: string
    • notified_productobject, nullable
      Show 3 child attributesHide child attributes
      • shopify_product_idstring
        Example: string
      • shopify_variant_idstring
        Example: string
      • titlestring
        Example: string
    • notificationobject, nullable
      Show 2 child attributesHide child attributes
      • channelstring
        Example: string
      • sent_atstring, nullable
        Example: string
    • created_atstring
      Example: 2026-01-15T09:30:00Z
  • metaobject

    Pagination for the list.

    Show 4 child attributesHide child attributes
    • total_countinteger

      Items matching the filters, across all pages.

    • pageinteger

      Page returned, starting at 1.

    • per_pageinteger

      Most items per page.

    • total_pagesinteger

      Pages available at this per_page; 0 when nothing matches.

Errors

422
invalid_params

One or more fields failed the action's schema.

422
validation_failed

The request failed validation.

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/orders
curl "https://app.stoqapp.com/api/v2/external/back_in_stock/orders" \
  -H "X-Auth-Token: $STOQ_API_KEY"
Response
{
  "orders": [
    {
      "id": "string",
      "type": "string",
      "shopify_order_id": "string",
      "name": "string",
      "customer": {
        "id": null,
        "email": "string",
        "name": "string"
      },
      "total_price": "string",
      "currency": "string",
      "financial_status": "string",
      "fulfillment_status": "string",
      "notified_product": {
        "shopify_product_id": "string",
        "shopify_variant_id": "string",
        "title": "string"
      },
      "notification": {
        "channel": "string",
        "sent_at": "string"
      },
      "created_at": "2026-01-15T09:30:00Z"
    }
  ],
  "meta": {
    "total_count": 1,
    "page": 1,
    "per_page": 1,
    "total_pages": 1
  }
}