---
title: "Bulk reschedule payments"
description: "Change the remaining-balance due date of many preorder orders (up to 1000 order_ids, or apply_to_all with the order list filters)."
url: https://docs.stoqapp.com/v2-reference/preorders-orders/bulk-reschedule-payments/
api: "API v2 reference"
method: POST
path: "/preorders/orders/bulk_reschedule_payment"
---

# Bulk reschedule payments

`POST https://app.stoqapp.com/api/v2/external/preorders/orders/bulk_reschedule_payment`

Change the remaining-balance due date of many preorder orders (up to 1000 order_ids, or apply_to_all with the order list filters).

**Note:** Matches the dashboard bulk action Reschedule payment. Changes the schedule only; nothing is charged. Poll status_url for per-order results.

## 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.

## Request body

- `search` (string): Order number or name, customer name, email, Shopify order id or gid, or admin order URL.
- `financial_status` (string): Comma-separated Shopify financial statuses.
- `fulfillment_status` (string): Comma-separated Shopify fulfillment statuses.
- `preorder_fulfillment_status` (string): Comma-separated: on_hold, scheduled, open.
- `cancelled_status` (string): Only cancelled orders, or only orders that are not cancelled. One of: `cancelled`, `not_cancelled`.
- `payment_collection_status` (string): Comma-separated: failed, success, unknown.
- `offer_id` (string): Comma-separated offer ids.
- `shopify_variant_id` (string): Comma-separated Shopify variant gids.
- `shopify_product_id` (string): Comma-separated Shopify product gids.
- `vendors` (array of strings): Only orders with a preorder item from one of these vendor names. A single string is read as one vendor.
- `customer_id` (string): Our customer id.
- `from` (string): Created on or after. A bare date is that whole day in shop time.
- `to` (string): Created on or before. A bare date is that whole day in shop time.
- `order_ids` (array of strings): Order ids or Shopify order ids (max 1000).
- `apply_to_all` (boolean): Instead of order_ids: every order matching the GET /preorders/orders filters sent alongside (all preorder orders when none), like the dashboard's select all.
- `due_at` (string): New due date, YYYY-MM-DD.

## Returns

- `job_id` (string): Id of the background job doing the work.
- `operation` (string): The bulk action started. One of: `release`, `send_confirmation`, `send_shipping_update`, `open_scheduled_fulfillments`, `reschedule_fulfillment`, `reschedule_payment`, `collect_payment`, `hold_fulfillments`, `split_fulfillment_orders`.
- `status` (string): Always queued: the job runs in the background. Poll status_url for progress. One of: `queued`.
- `status_url` (string): Path of the endpoint that reports this job's progress; poll it until the job finishes. Results are kept for 24 hours.
- `order_count` (integer): How many orders the job will act on.

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/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"
  }'
```

## 202

Success: example response shown.

```json
{
  "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
}
```

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

## 409

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

```json
{
  "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
    }
  ]
}
```

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

