For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Skip to content

πŸ“Instruction Requests

What it is: The Instruction Request API is the engine of our platform.

It handles all savings instructions - deposits, withdrawals, account closures, and reverts.

How it works: You submit an instruction with a unique instructionReference (GUID) that you generate.

The API accepts the instruction asynchronously (202 Accepted) and we process it within the 24-hour processing window.

Poll the status endpoint to track progress: Created β†’ Processed or Rejected.

Base URL: https://api.sandbox.flagstoneim.com/instruction-request

API Version: 2021-11-01


πŸ“‹ Endpoints

Method
Path
Description

POST

/deposit

Create a deposit instruction

POST

/withdraw

Create a withdrawal instruction

GET

/status/{instructionReference}

Check instruction status

POST

/close-account

Request deposit account closure

POST

/revert

Revert a previous instruction


πŸ’° 1. Create Deposit Instruction

What it is: Submits a request to deposit funds into a savings product on behalf of a client.

How it works: Specify the product, issue, version, account reference, amount, and a unique instruction reference.

We validate and queue the instruction for processing.

Request Body:

Field
Type
Description

productReference

string

The ID of the target product

productIssueNumber

string

The issue number of the product

productIssueVersionNumber

string

The version of the product issue

accountReference

string

The client's account reference

amount

number

Deposit amount (to 2 decimal places)

instructionReference

string

Your unique GUID for this instruction

Response (202 Accepted):


πŸ’Έ 2. Create Withdrawal Instruction

What it is: Submits a request to withdraw funds from an existing deposit account.

How it works: Specify the account, currency, deposit account reference, amount, and a unique instruction reference.

Request Body:

Field
Type
Description

accountReference

string

The client's account reference

currencyIsoCode

string

Three-letter currency code (ISO-4217)

depositAccountReference

string

The deposit account to withdraw from

amount

number

Withdrawal amount (to 2 decimal places)

instructionReference

string

Your unique GUID for this instruction

Response (202 Accepted):


πŸ” 3. Check Instruction Status

What it is: Returns the current processing status of an instruction.

How it works: Poll this endpoint after submitting an instruction to track whether it has been processed or rejected.

Response (200 OK):

Status Values

Status
Meaning

Created

Instruction received and queued for processing

Processed

Instruction successfully completed

Rejected

Instruction failed - check statusReason for details

Response Code
Meaning

200

Status returned

404

Instruction reference not found


πŸ—‘οΈ 4. Deposit Account Closure

What it is: Request closure of a deposit account at its natural maturity or for an instant access/notice account.


↩️ 5. Revert Instruction

What it is: Request to revert a previously submitted instruction.

How it works: Supply a new instructionReference for the revert itself, plus the instructionToRevertReference of the instruction you want undone.

Response (202 Accepted):

What can be reverted?

An instruction can be reverted while it is still pending settlement. All of the following must hold:

  • The instruction batch it sits in - and its notice batch, where it has one - is still Open or Locked. Once a batch is Closed or beyond, the instruction can no longer be reverted.

  • The request falls inside the revert window either side of the batch lock time for your partner and currency.

  • The deposit account is still Open, unless the instruction being reverted is the final closure instruction for that account.

  • The instruction was not raised by Flagstone Operations.

  • Reverting will not take the deposit account outside the per-account limits of its product.

Response Code
Meaning

202

Revert request accepted for processing

400

instructionReference or instructionToRevertReference absent or not a GUID

None of these conditions is checked when you submit the request. A 202 confirms only that we accepted it, so a revert that breaches any of them is still accepted here and then reported as Rejected by the status endpoint, with the reason in statusReason. Poll the status endpoint to find out whether the reversal actually happened.


πŸ“– Full API Reference

For the complete OpenAPI specification including all schemas and field descriptions, see the Instruction Request API Reference.

Last updated