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 Batches API Reference

Get Instruction Batches

get

List of Instruction Batches

Authorizations
cdpapi-Subscription-KeystringRequired
Query parameters
batchDatestring · dateRequired

The date to retrieve the Instruction Batch List for (ISO-8601 date, no time component)

Example: 2024-04-20
Responses
200

List of Instruction Batches for the supplied date

application/json
get/
GET /instruction-batches/?batchDate=2024-04-20 HTTP/1.1
Host: api.sandbox.flagstoneim.com
cdpapi-Subscription-Key: YOUR_API_KEY
Accept: */*
{
  "instructionBatches": [
    {
      "instructionType": "deposit",
      "instructionBatchTotalAmount": 300.15,
      "instructionBatchId": "50",
      "instructionBatchStatus": "open",
      "currencyCode": "GBP"
    },
    {
      "instructionType": "withdrawal",
      "instructionBatchTotalAmount": 96.15,
      "instructionBatchId": "49",
      "instructionBatchStatus": "open",
      "currencyCode": "GBP"
    },
    {
      "instructionType": "deposit",
      "instructionBatchTotalAmount": 96472.15,
      "instructionBatchId": "48",
      "instructionBatchStatus": "locked",
      "currencyCode": "GBP"
    },
    {
      "instructionType": "withdrawal",
      "instructionBatchTotalAmount": 30964.15,
      "instructionBatchId": "47",
      "instructionBatchStatus": "locked",
      "currencyCode": "GBP"
    },
    {
      "instructionType": "deposit",
      "instructionBatchTotalAmount": 17296.15,
      "instructionBatchId": "46",
      "instructionBatchStatus": "completed",
      "currencyCode": "GBP"
    },
    {
      "instructionType": "withdrawal",
      "instructionBatchTotalAmount": 6759.15,
      "instructionBatchId": "45",
      "instructionBatchStatus": "completed",
      "currencyCode": "GBP"
    }
  ]
}

Get Instruction Summaries

get

Get a summary of instruction batches

Authorizations
cdpapi-Subscription-KeystringRequired
Path parameters
instructionBatchIdstringRequired

The Id of the Instruction Batch

Example: 50
instructionFilterTypestring · enumRequired

The type of instructions to get, either 'All' or 'Closure'

Default: AllExample: AllPossible values:
Query parameters
pageNumberinteger · int32 · min: 1Optional

The page of results to retrieve (1-based)

Default: 1Example: 1
pageSizeinteger · int32 · min: 1 · max: 10000Optional

The number of records to return per page

Default: 50Example: 50
Responses
200

Returns the list of instruction summaries

application/json
pageNumberinteger · int32Required

Number of the page returned

pageSizeinteger · int32Required

The number of records on the page returned

pageCountinteger · int32Required

Total number of pages

get/{instructionBatchId}/instruction-summary/{instructionFilterType}
GET /instruction-batches/{instructionBatchId}/instruction-summary/{instructionFilterType} HTTP/1.1
Host: api.sandbox.flagstoneim.com
cdpapi-Subscription-Key: YOUR_API_KEY
Accept: */*
{
  "instructionSummaries": [
    {
      "instructionReference": "5d1abeac-7a8e-4ab9-9ba4-c574a75414aa",
      "instructionAmount": 100.35,
      "currencyCode": "GBP",
      "dateToBeActionedUTC": "2022-04-20"
    }
  ],
  "pageNumber": 1,
  "pageSize": 50,
  "pageCount": 1
}

Get References for an Instruction Batch

get

Gets a List of Instructions References for a Given Instructions Batch.

Note this will return empty if the Instruction batch is in a Completed State.

Authorizations
cdpapi-Subscription-KeystringRequired
Path parameters
idstringRequired

Id of the instruction batch to fetch references for

Query parameters
pageNumberinteger · int32 · min: 1Optional

The page of references to retrieve (1-based)

Default: 1Example: 1
pageSizeinteger · int32 · min: 1 · max: 10000Optional

The number of references to return per page

Default: 50Example: 50
Responses
200

List of references

application/json
referencesstring · uuid[]Required

The unique references (GUIDs) of the Instructions in the Instruction Batch

pageNumberinteger · int32Required

Number of the page returned

pageSizeinteger · int32Required

The number of records on the page returned

pageCountinteger · int32Required

Total number of pages

get/{id}/references
GET /instruction-batches/{id}/references HTTP/1.1
Host: api.sandbox.flagstoneim.com
cdpapi-Subscription-Key: YOUR_API_KEY
Accept: */*
{
  "references": [
    "5d1abeac-7a8e-4ab9-9ba4-c574a75414aa",
    "5dcc6e14-0fc8-4aef-bb1e-013c41508dc8",
    "a1a0a4ba-1710-4dda-afb3-afbcbf93b799",
    "dfecf029-f750-4108-a199-347ae47e1a3c",
    "c2660379-b8d4-46cf-a844-429c5e0474d3",
    "c6935218-b676-4b6b-bedd-70b5b145af99",
    "3f740c54-335d-4ecc-a1d9-57b664698b8a",
    "f270c998-2cbd-45d3-abdc-4afd56b96867",
    "06ca0914-2a95-4e50-8e02-93cd2e2c4991",
    "43ee77a7-5e2b-447a-bdc0-248d38d9f77b"
  ],
  "pageNumber": 1,
  "pageSize": 50,
  "pageCount": 1
}

Update Instruction Batches

post

Update the Status of Instruction Batches

Authorizations
cdpapi-Subscription-KeystringRequired
Body
instructionBatchStatusstring · enumRequired

The status to update the batches to. 'Closed' is the only status you can set, and only on batches that are currently 'Locked'; any other combination is rejected with 409 Conflict.

Possible values:
Responses
204

Request was successfully completed

No content

post/batch-update
POST /instruction-batches/batch-update HTTP/1.1
Host: api.sandbox.flagstoneim.com
cdpapi-Subscription-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 212

{
  "instructionBatchStatus": "Closed",
  "instructionBatches": [
    {
      "instructionBatchId": "4659",
      "totalAmount": 12650231.02,
      "totalNoticeAmount": 0
    },
    {
      "instructionBatchId": "4565",
      "totalAmount": 567321.27,
      "totalNoticeAmount": 0
    }
  ]
}

No content

Last updated