# List, retrieve, then update (replace) a funding instruction.

List, retrieve, then update (replace) a funding instruction.

1. OPTIONAL — list funding instructions sent within the required `dateFrom`/`dateTo` window, optionally paginated with `before`/`after`/`limit`. The response is paginated - instructions are in the `data` array. This step extracts the first instruction's integer `instructionId` for the follow-on steps.
 [listInstructions](/api/list-instructions)
2. OPTIONAL — retrieve the full detail of the first funding instruction from the list. Inspect `status` (`accepted`, `pending`, or `completed`) to confirm the instruction can still be updated - only an `accepted` instruction may be modified. `instructionId` is top-level here.
 [getInstruction](/api/get-instruction)
3. Replace the merchant funds-distribution details of the instruction retrieved above, using its integer `instructionId`. Only works while `status` is `accepted`; otherwise the gateway returns 409 (cannot be modified). The body is a full replacement of the `merchants` array (each recipient needs `fundingAccountId`, `paymentMethod` = `ACH`, and `amount.value`) plus optional `metadata`. This is a PUT that returns 204 No Content - there is no response body to capture.
 [updateInstructions](/api/update-instructions)

## Workflow diagram

```mermaid
flowchart TD
  step0["1. list funding instructions · API"]
  step1["2. get funding instruction · API"]
  step0 --> step1
  step2["3. update funding instruction · API"]
  step1 --> step2
```
