For the complete documentation index, see llms.txt. This page is also available as Markdown.

[PUT] Update offer

* Authentication

Required Authorization

Limit throttle:30,1

Endpoint [PUT] - /shop-api/pre-order/update

Headers

Header
Required
Description

Authorization

Yes

Shop public API key Bearer token

Content-Type

Yes

application/json


1. Request Payload

Required

Field
Type
Required
Description

offer_id

integer | string

Yes

Offer ID to update

Patch semantics

This is a partial update. Only keys present in the request body are applied; omitted fields keep their current values.

Unknown keys outside the allow-list are ignored. If no allow-listed field is sent (only offer_id), the API still returns success with the current offer.

Updatable fields (allow-list)

Field
Type
Rules
Description

offer_name

string

max 255

Offer name

start_date

date

valid date

Pre-order start

end_date

date | null

nullable; must be after effective start_date

Clear with null

countdown_before_preorder_start

boolean

Countdown before start

countdown_before_preorder_end

boolean

Countdown before end

apply_to

string

product collection all

Target scope

products

array

min:1|max:50

Product/variant list

products.*.product_id

number

required with products

Shopify product ID

products.*.variant_id

number

required with products

Shopify variant ID

products.*.limit

number | null

min 0

Unit limit

collection_id

number | null

Shopify collection ID

preorder_condition_inventory

string

now outofstock instock

Inventory trigger

fulfillment_status

string

ON_HOLD UNFULFILLMENT SCHEDULED

Fulfillment order status

fulfillment_shipping_date

date | null

XOR with after_checkout

Exact shipping date

fulfillment_after_checkout

string | null

max:50; XOR with shipping_date

Days after checkout

turn_on_continue_selling_when_preorder_start

boolean

Auto continue-selling on start

turn_off_continue_selling_when_preorder_end

boolean

Auto turn-off on end

full_payment_discount_type

string

percentage | fixed

Full payment discount type

full_payment_discount_value

number

required with type; max:100 max:1000000

Full payment discount value

partial_payment_value_type

string

percentage fixed

Partial amount type

partial_payment_value

number

required with value_type; max 100 / 1000000

Partial amount

partial_payment_discount_type

string

percentage fixed

Partial discount type

partial_payment_discount_value

number

required with discount_type; max max:100 max:1000000

Partial discount value

partial_payment_remaining_balance_charge_date

date | null

Remaining balance charge date

Important rules

  1. Date — If start_date and/or end_date is sent, effective dates are compared (payload value or existing offer). When both are non-empty, end_date must be after start_date.

  2. Fulfillment XOR — Cannot send both fulfillment_shipping_date and fulfillment_after_checkout with values. Setting one clears the other on the merged offer. Sending null / "" clears that field.

  3. apply_to = product — When changing apply_to to product, products is required in the same request.

  4. apply_to = collection — When changing apply_to to collection, collection_id is required in the same request.

  5. Products / collection without apply_to

    • products may only be updated if current (or merged) apply_to is product.

    • collection_id may only be updated if current (or merged) apply_to is collection.

  6. Shopify validation — When apply_to / products / collection_id change, variants or collection are validated against Shopify.

Example — update name & dates only

Example — switch to products

Example — update fulfillment (exact date)

Example — clear end date

2. Success Response 200

No-op (no updatable fields sent) still returns:


3. Response Keys & Fields

Top-level

Key
Type
Description

success

boolean

true when update succeeds

message

string

"Offer updated"

data

object

Updated offer (same shape as Get Offer Detail)

data offer object

Same fields as Create / Get Detail:

Field
Type
Description

id

integer

Offer ID

offer_name

string

Offer name

start_date

string | null

Start datetime

end_date

string | null

End datetime

countdown_before_preorder_start

boolean

Countdown before start

countdown_before_preorder_end

boolean

Countdown before end

apply_to

string

product | collection | all

preorder_condition_inventory

string

Inventory condition

fulfillment_status

string | null

ON_HOLD | UNFULFILLMENT | SCHEDULED

fulfillment_shipping_date

string

Exact shipping date (if set)

fulfillment_after_checkout

mixed

Days after checkout (if set)

turn_on_continue_selling_when_preorder_start

boolean

Auto continue-selling on start

turn_off_continue_selling_when_preorder_end

boolean

Auto turn-off on end

status

integer | null

Unchanged by update API

products

array

When apply_to = product

collection_id

integer

When apply_to = collection

collection_name

string

Optional collection title

full_payment_discount_*

mixed

Full payment discount

partial_payment_*

mixed

Partial payment (if enabled)

Side effects after a successful update

Change
Behavior

Payment / fulfillment fields changed + selling plan enabled

Selling plan group is refreshed

apply_to / products / collection_id changed + product

Product resources & metafields updated

Apply target changed to collection / all

syncProducts job is queued

Offer has an end date

End-by-date job is (re)scheduled


4. Failed Response

Missing offer ID — HTTP 200

Offer not found — HTTP 200

Validation error — HTTP 200

Common custom validation messages:

Message
When

The end_date must be a date after start_date.

Effective end ≤ start

Invalid date.

Date parse failed

Products are required when apply_to is product.

Switching to product without products

Collection is required when apply_to is collection.

Switching to collection without collection_id

products can only be updated when apply_to is product.

Sending products while apply_to is not product

collection_id can only be updated when apply_to is collection.

Sending collection_id while apply_to is not collection

Only one of fulfillment_shipping_date or fulfillment_after_checkout is allowed.

Both fulfillment timing fields sent with values

Shopify errors — HTTP 200

Message
When

Products are required

Merged product list empty after apply change

Product variants not found

No valid Shopify variants

Collection is required

Merged collection empty

Collection not found

Collection does not exist on Shopify

Last updated

Was this helpful?