Bulk reschedule payments
API v2 is in public beta: endpoints and fields can change before general availability. See the changelog
/preorders/orders/bulk_reschedule_paymentCosts 2 rate-limit points · Rate limits
Change the remaining-balance due date of many preorder orders (up to 1000 order_ids, or apply_to_all with the order list filters).
Matches the dashboard bulk action Reschedule payment. Changes the schedule only; nothing is charged. Poll status_url for per-order results.
Also searched asbulk reschedule paymentchange payment due date for many ordersmove payment dates in bulkreschedule many payments
Headers
Idempotency-KeystringA 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 (422idempotency_key_reused); a retry while the first is still running gets 409idempotency_key_in_progress. Keys are per store. Server errors and rate limits are not kept, so their retry runs.
Request body
searchstringOrder number or name, customer name, email, Shopify order id or gid, or admin order URL.
financial_statusstringComma-separated Shopify financial statuses.
fulfillment_statusstringComma-separated Shopify fulfillment statuses.
preorder_fulfillment_statusstringComma-separated: on_hold, scheduled, open.
cancelled_statusstringOnly cancelled orders, or only orders that are not cancelled.
One ofcancellednot_cancelledpayment_collection_statusstringComma-separated: failed, success, unknown.
offer_idstringComma-separated offer ids.
shopify_variant_idstringComma-separated Shopify variant gids.
shopify_product_idstringComma-separated Shopify product gids.
vendorsarray of stringsOnly orders with a preorder item from one of these vendor names. A single string is read as one vendor.
customer_idstringOur customer id.
fromstringCreated on or after. A bare date is that whole day in shop time.
tostringCreated on or before. A bare date is that whole day in shop time.
order_idsarray of stringsOrder ids or Shopify order ids (max 1000).
apply_to_allbooleanInstead of order_ids: every order matching the GET /preorders/orders filters sent alongside (all preorder orders when none), like the dashboard's select all.
Defaultfalsedue_atstringNew due date, YYYY-MM-DD.
Returns
job_idstringId of the background job doing the work.
operationstringThe bulk action started.
One ofreleasesend_confirmationsend_shipping_updateopen_scheduled_fulfillmentsreschedule_fulfillmentreschedule_paymentcollect_paymenthold_fulfillmentssplit_fulfillment_ordersstatusstringAlways queued: the job runs in the background. Poll status_url for progress.
One ofqueuedstatus_urlstringPath of the endpoint that reports this job's progress; poll it until the job finishes. Results are kept for 24 hours.
order_countintegerHow many orders the job will act on.
Errors
forbiddenThe credential is valid, but the store's plan or settings do not allow this operation.
plan_requiredThe 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.
idempotency_key_in_progressAn earlier request with the same Idempotency-Key is still running. Wait, then resend the same request with the same key.
invalid_paramsOne or more fields failed the action's schema.
validation_failedThe 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.
curl -X POST "https://app.stoqapp.com/api/v2/external/preorders/orders/bulk_reschedule_payment" \
-H "X-Auth-Token: $STOQ_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"order_ids": [
"5f0c8a3e-6b2d-4f1a-9c7e-2d8b1a4e6f30",
"e27b9d40-5c13-4a8f-9e61-3f0a2c7d5b18",
"gid://shopify/Order/6123456698900"
],
"due_at": "2026-08-15"
}'const res = await fetch("https://app.stoqapp.com/api/v2/external/preorders/orders/bulk_reschedule_payment", {
method: "POST",
headers: {
"X-Auth-Token": process.env.STOQ_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
"order_ids": [
"5f0c8a3e-6b2d-4f1a-9c7e-2d8b1a4e6f30",
"e27b9d40-5c13-4a8f-9e61-3f0a2c7d5b18",
"gid://shopify/Order/6123456698900"
],
"due_at": "2026-08-15"
}),
});
const data = await res.json();import os
import requests
res = requests.post(
"https://app.stoqapp.com/api/v2/external/preorders/orders/bulk_reschedule_payment",
headers={"X-Auth-Token": os.environ["STOQ_API_KEY"]},
json={
"order_ids": [
"5f0c8a3e-6b2d-4f1a-9c7e-2d8b1a4e6f30",
"e27b9d40-5c13-4a8f-9e61-3f0a2c7d5b18",
"gid://shopify/Order/6123456698900"
],
"due_at": "2026-08-15"
},
)
data = res.json()require "net/http"
require "json"
uri = URI("https://app.stoqapp.com/api/v2/external/preorders/orders/bulk_reschedule_payment")
req = Net::HTTP::Post.new(uri, "X-Auth-Token" => ENV["STOQ_API_KEY"], "Content-Type" => "application/json")
req.body = {
order_ids: [
"5f0c8a3e-6b2d-4f1a-9c7e-2d8b1a4e6f30",
"e27b9d40-5c13-4a8f-9e61-3f0a2c7d5b18",
"gid://shopify/Order/6123456698900"
],
due_at: "2026-08-15"
}.to_json
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body){
"job_id": "1e7c3a95-d28b-4f60-a1e4-8b5d2c9f7a13",
"operation": "reschedule_payment",
"status": "queued",
"status_url": "/api/v2/external/preorders/orders/jobs/1e7c3a95-d28b-4f60-a1e4-8b5d2c9f7a13",
"order_count": 3
}{
"errors": [
"Invalid API key"
],
"code": "auth_invalid",
"details": [
{
"code": "auth_invalid",
"message": "Invalid API key",
"path": null,
"value": null,
"expected": null
}
]
}{
"errors": [
"A request with this Idempotency-Key is still running"
],
"code": "idempotency_key_in_progress",
"details": [
{
"code": "idempotency_key_in_progress",
"message": "A request with this Idempotency-Key is still running",
"path": null,
"value": null,
"expected": null
}
]
}{
"errors": [
"name is required"
],
"code": "validation_failed",
"details": [
{
"code": "validation_failed",
"message": "name is required",
"path": null,
"value": null,
"expected": null
}
]
}{
"errors": [
"Rate limit exceeded"
],
"code": "rate_limited",
"details": [
{
"code": "rate_limited",
"message": "Rate limit exceeded",
"path": null,
"value": null,
"expected": null
}
]
}