---
title: "Discard an offer"
description: "Discard (soft-delete) a preorder offer. Not permanent: it can be restored later, and comes back off."
url: https://docs.stoqapp.com/v2-reference/preorders-offers/discard-an-offer/
api: "API v2 reference"
method: POST
path: "/preorders/offers/{id}/discard"
---

# Discard an offer

`POST https://app.stoqapp.com/api/v2/external/preorders/offers/{id}/discard`

Discard (soft-delete) a preorder offer. Not permanent: it can be restored later, and comes back off.

**Note:** Turns the offer off and removes its schedule first, as the dashboard does. Recoverable via restore indefinitely; it comes back off.

## Path parameters

- `id` (string, required): The offer's ID, from [`GET /preorders/offers`](https://docs.stoqapp.com/v2-reference/preorders-offers/list-offers/).

## Headers

- `Idempotency-Key` (string): A fresh unique key for every write (a new UUID, say); reuse it only to retry that write. Keys are remembered for 1 hour: the same key and the same request within that hour returns the first result, with `Idempotent-Replayed: true`, without running again; the same key with a different method, path or body is refused (422 `idempotency_key_reused`); a retry while the first is still running gets 409 `idempotency_key_in_progress`. Keys are per store. Server errors and rate limits are not kept, so their retry runs.

## Returns

The [offer object](https://docs.stoqapp.com/v2-reference/preorders-offers/).

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

## Example request

```sh
curl -X POST "https://app.stoqapp.com/api/v2/external/preorders/offers/73a74948-2b57-4cc3-971f-2b441828c977/discard" \
  -H "X-Auth-Token: $STOQ_API_KEY"
```

## 202

Success: example response shown.

```json
{
  "id": "73a74948-2b57-4cc3-971f-2b441828c977",
  "shopify_selling_plan_group_id": "gid://shopify/SellingPlanGroup/100",
  "name": "Summer Sneaker Drop",
  "internal_name": "summer-2026",
  "widget": {
    "button": {
      "button_text": "Preorder Now",
      "custom_colors_enabled": true,
      "text_color": "#ffffff",
      "background_color": "#8700d3"
    },
    "disclaimer": {
      "show_disclaimer": true,
      "disclaimer_text": "Expected to ship by August 2026",
      "text_color": "#FFFFFF",
      "background_color": "#1F2937",
      "border_radius": 4
    },
    "badge": {
      "show_badge": true,
      "badge_text": "Pre-Order",
      "text_color": "#FFFFFF",
      "background_color": "#000000"
    }
  },
  "inventory": {
    "stock_condition": "out_of_stock",
    "reserve": "on_sale"
  },
  "products": {
    "selection": "custom",
    "shopify_collection_id": null,
    "tags": [],
    "eligible_inventory_policy": "all",
    "excluded_shopify_variant_ids": [],
    "exclusion_tag": null,
    "variant_count": 12
  },
  "shipping": {
    "timeline": {
      "scope": "same",
      "show_shipping_text": true,
      "shipping_text": "Shipping: As soon as possible",
      "variant_shipping_text": "ASAP"
    },
    "delivery_timing": "asap",
    "ships_at": null,
    "days_after_checkout": null,
    "fulfillment": {
      "handling": "none",
      "hold_reason": "Order contains a preorder product. All fulfillments are on hold, as configured in STOQ > Preorders.",
      "separate_orders": {
        "grouping": "offer",
        "number_format": "suffix",
        "suffix": "SPLIT",
        "hold_fulfillments": false,
        "tag": "STOQ-split-order",
        "transaction_gateway": "Prepaid",
        "original_order_hold_tag": null,
        "original_order_split_tag": null
      }
    },
    "on_hold": {
      "release_schedule": "manual",
      "release_at": null,
      "require_payment": false
    }
  },
  "payments": {
    "options_offered": "full",
    "default_option": "full",
    "full": {
      "selling_plan_id": "gid://shopify/SellingPlan/101",
      "checkout_charge": {
        "charge_type": "percentage",
        "charge_amount": 100
      },
      "remaining_balance": {
        "charge_trigger": "no_remaining_balance",
        "charge_exact_time": null,
        "days_after_checkout": null
      },
      "price_adjustment": {
        "adjustment_type": null,
        "adjustment_amount": null
      },
      "option_title": "Full payment",
      "option_description": "Pay the full price now",
      "discount_text": "Save {{ discount }}"
    },
    "collection_schedule": "manual",
    "show_payment_widget": false,
    "show_discounted_price": null,
    "currency_code": "USD"
  },
  "availability": {
    "schedule": "disabled",
    "starts_at": null,
    "ends_at": null,
    "current_status": "deleted",
    "time_zone": "America/New_York"
  },
  "limits": {
    "default_per_variant": null,
    "display_style": "none",
    "limit_text": "{{ quantity }} units available for preorder",
    "show_icons": true,
    "progress_bar": {
      "progress_text": "{{ sold }} of {{ total }} claimed",
      "fill_color": "#ffffff",
      "background_color": "#e5e5e5",
      "box_background_color": null,
      "text_color": "#ffffff",
      "border_radius": 4,
      "show_percentage": false
    },
    "order_tags": [
      "STOQ-preorder"
    ],
    "terms": {
      "require_acceptance": false,
      "terms_text": "I acknowledge and agree to the preorder terms and conditions for this product.",
      "disable_button_until_accepted": false,
      "record_acceptance": false,
      "acceptance_label": "Preorder Terms Accepted"
    },
    "cart": {
      "allowed_items": "mixed",
      "error_message": "Preorders must be purchased separately from regular items. Please complete your current order first, or clear your cart to continue."
    },
    "order_quantity": {
      "minimum": null,
      "maximum": null
    }
  },
  "countdown": {
    "show_when": "disabled",
    "date_source": "schedule",
    "starts_at": null,
    "ends_at": null,
    "starts_text": null,
    "ends_text": null,
    "labels": {
      "days": "Days",
      "hours": "Hours",
      "minutes": "Mins",
      "seconds": "Secs"
    },
    "text_color": "#000000",
    "background_color": "#f5f5f5",
    "border_radius": 8,
    "units": [
      "days",
      "hours",
      "minutes",
      "seconds"
    ],
    "current": {
      "visible_phase": "hidden",
      "target_at": null,
      "heading_text": null,
      "starts_at": null,
      "ends_at": null
    }
  },
  "markets": {
    "scope": "all",
    "shopify_market_ids": []
  },
  "advanced": {
    "checkout_method": "selling_plan",
    "cart_attributes": {
      "show_payment": false,
      "show_shipping": true,
      "custom_text": null
    }
  },
  "integrations": {
    "pos": {
      "enable_pos": true,
      "inventory_check": "required"
    },
    "b2b": {
      "enable_b2b": true
    }
  },
  "batches": {
    "release_strategy": "all_at_once",
    "advance_schedule": "automatic",
    "label_format": "Batch {{ n }}",
    "status_text": {
      "past": "Sold out",
      "live": "Live",
      "upcoming": "Coming soon"
    },
    "widget": {
      "style": "roadmap",
      "progress": "counts",
      "show_other_ship_dates": true,
      "show_names": false
    },
    "items": []
  },
  "translations": {},
  "line_item_revenue": "4860.00",
  "order_revenue": "5235.50",
  "created_at": "2026-06-25T10:30:45Z",
  "updated_at": "2026-09-30T18:05:00Z"
}
```

## 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
    }
  ]
}
```

## 404

The resource does not exist for this shop, or the action path is not registered.

```json
{
  "errors": [
    "Offer not found"
  ],
  "code": "not_found",
  "details": [
    {
      "code": "not_found",
      "message": "Offer not found",
      "path": null,
      "value": null,
      "expected": null
    }
  ]
}
```

## 409

Invalid lifecycle transition: read the message; don't retry blindly. Also returned while an earlier request with the same Idempotency-Key is still running.

```json
{
  "errors": [
    "Offer is already disabled"
  ],
  "code": "conflict",
  "details": [
    {
      "code": "conflict",
      "message": "Offer is already disabled",
      "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
    }
  ]
}
```

