Skip to content

Rename an offer

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

PATCH/preorders/offers/{id}

Costs 2 rate-limit points · Rate limits

Update the offer's names: name (customer-facing) and internal_name (staff-only label).

Deep partial: absent fields are unchanged. name cannot be blank; internal_name null restores the default label (Preorder N). Other settings have their own section PATCH (/preorders/offers/:id/<section>); turning the offer on or off and scheduling it are the enable, disable, schedule and unschedule operations.

Also searched asedit offermodify offerchange offer settingsrename offerchange offer namerename preorderchange internal namerelabel offer

Path parameters

Headers

  • Idempotency-Keystring

    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.

Request body

  • namestring

    Template name -- the customer-facing name of the offer.

  • internal_namestring, nullable

    Internal name -- shown to staff in the dashboard only. A rename sends only the field the merchant named: the label they call the offer by in the list (Preorder N or an internal label) is internal_name; send name too only when they ask to change what customers see.

Returns

The offer object.

Errors

404
not_found

The path is valid but nothing with that id exists in this store.

409
idempotency_key_in_progress

An earlier request with the same Idempotency-Key is still running. Wait, then resend the same request with the same key.

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.

PATCH/preorders/offers/{id}
curl -X PATCH "https://app.stoqapp.com/api/v2/external/preorders/offers/73a74948-2b57-4cc3-971f-2b441828c977" \
  -H "X-Auth-Token: $STOQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Summer Sneaker Preorder",
    "internal_name": "summer-2026-sneakers"
  }'
Response
{
  "id": "73a74948-2b57-4cc3-971f-2b441828c977",
  "shopify_selling_plan_group_id": "gid://shopify/SellingPlanGroup/100",
  "name": "Summer Sneaker Preorder",
  "internal_name": "summer-2026-sneakers",
  "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": "enabled",
    "starts_at": null,
    "ends_at": null,
    "current_status": "live",
    "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-07-02T15:20:11Z"
}