---
title: Retrieve summary of all payment instructions
slug: docs/demo/retrieve-summary-of-all-payment-instructions
description: Learn how to use the cURL command to send a GET request and fetch the JSON-formatted payment instructions summary for a specific account using the 'accountReference' parameter. This code example is a practical demonstration of retrieving relevant data fro
docTags: 
createdAt: 2022-03-21T20:12:45.000Z
---

{
  "id": "qHGm6kzFq8TOBBEdALnY0",
  "data": {
    "url": "https://api.fictive.com/REST/api/accounts/{accountReference}/payment-instructions/summary",
    "name": "Retrieve summary of all payment instructions",
    "method": "GET",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "accountReference",
          "type": "string",
          "description": "Account reference."
        }
      ],
      "queryParameters": [],
      "headerParameters": [
        {
          "kind": "optional",
          "name": "X-TokenId",
          "type": "string",
          "description": "The eSuite Token Id"
        },
        {
          "kind": "optional",
          "name": "X-SessionId",
          "type": "string",
          "description": "The eSuite Session Id"
        },
        {
          "kind": "required",
          "name": "X-Version",
          "type": "string",
          "description": "The eSuite Version"
        },
        {
          "kind": "optional",
          "name": "Origin",
          "type": "string",
          "description": "The eSuite Origin"
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": []
    },
    "responses": [
      {
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "schema": [
              {
                "kind": "optional",
                "name": "paymentInstructions",
                "type": "array",
                "schema": [
                  {
                    "kind": "optional",
                    "name": "paymentInstructionReference",
                    "type": "string",
                    "example": "",
                    "description": "Payment instruction - reference"
                  },
                  {
                    "kind": "optional",
                    "name": "status",
                    "type": "string",
                    "example": "",
                    "description": "Payment instruction - status"
                  },
                  {
                    "kind": "optional",
                    "name": "cartReference",
                    "type": "string",
                    "example": "",
                    "description": "Payment instruction - cart reference"
                  },
                  {
                    "kind": "optional",
                    "name": "nextFulfilmentReference",
                    "type": "string",
                    "example": "",
                    "description": "Payment instruction - next fulfilment reference"
                  },
                  {
                    "kind": "optional",
                    "name": "nextFulfilmentDate",
                    "type": "string<date-time>",
                    "example": "",
                    "description": "Payment instruction - next fulfilment date"
                  },
                  {
                    "kind": "optional",
                    "name": "lastPaymentDate",
                    "type": "string<date-time>",
                    "example": "",
                    "description": "Payment instruction - last payment date"
                  },
                  {
                    "kind": "optional",
                    "name": "nextPaymentDate",
                    "type": "string<date-time>",
                    "example": "",
                    "description": "Payment instruction - next payment date"
                  },
                  {
                    "kind": "optional",
                    "name": "description",
                    "type": "string",
                    "example": "",
                    "description": "Description"
                  },
                  {
                    "kind": "optional",
                    "name": "customPaymentInstructionParameters",
                    "type": "object",
                    "schema": [],
                    "example": {},
                    "description": "Custom Payment Instruction Parameters"
                  }
                ],
                "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.PaymentInstructions.PaymentInstructionSummary",
                "customType": "FictiveGlobal.Api.Rest.Dtos.v1.PaymentInstructions.PaymentInstructionSummary[]",
                "description": "Payment Instruction Summary List contents"
              }
            ],
            "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.PaymentInstructions.PaymentInstructionSummaryList",
            "customType": "FictiveGlobal.Api.Rest.Dtos.v1.PaymentInstructions.PaymentInstructionSummaryList",
            "isExpanded": true,
            "description": "Payment instruction list dto wrapper"
          }
        ],
        "isExpanded": true,
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "{\n  \"paymentInstructions\": [\n    {\n      \"paymentInstructionReference\": \"0010J3O92YZYM43OP0\",\n      \"status\": \"Pending\",\n      \"cartReference\": \"0010KCKSYU72H5M3X0\",\n      \"nextFulfilmentReference\": \"0010L00WASCMKX7UO3\",\n      \"nextFulfilmentDate\": \"2021-09-21T05:33:22.7917368\",\n      \"lastPaymentDate\": \"2021-09-21T05:33:22.7917368\",\n      \"nextPaymentDate\": \"2021-09-21T05:33:22.7917368\",\n      \"description\": null,\n      \"customPaymentInstructionParameters\": {\n        \"name\": \"value\"\n      }\n    }\n  ]\n}"
      },
      {
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "schema": [
              {
                "kind": "optional",
                "name": "paymentInstructions",
                "type": "array",
                "schema": [
                  {
                    "kind": "optional",
                    "name": "paymentInstructionReference",
                    "type": "string",
                    "example": "",
                    "description": "Payment instruction - reference"
                  },
                  {
                    "kind": "optional",
                    "name": "status",
                    "type": "string",
                    "example": "",
                    "description": "Payment instruction - status"
                  },
                  {
                    "kind": "optional",
                    "name": "cartReference",
                    "type": "string",
                    "example": "",
                    "description": "Payment instruction - cart reference"
                  },
                  {
                    "kind": "optional",
                    "name": "nextFulfilmentReference",
                    "type": "string",
                    "example": "",
                    "description": "Payment instruction - next fulfilment reference"
                  },
                  {
                    "kind": "optional",
                    "name": "nextFulfilmentDate",
                    "type": "string<date-time>",
                    "example": "",
                    "description": "Payment instruction - next fulfilment date"
                  },
                  {
                    "kind": "optional",
                    "name": "lastPaymentDate",
                    "type": "string<date-time>",
                    "example": "",
                    "description": "Payment instruction - last payment date"
                  },
                  {
                    "kind": "optional",
                    "name": "nextPaymentDate",
                    "type": "string<date-time>",
                    "example": "",
                    "description": "Payment instruction - next payment date"
                  },
                  {
                    "kind": "optional",
                    "name": "description",
                    "type": "string",
                    "example": "",
                    "description": "Description"
                  },
                  {
                    "kind": "optional",
                    "name": "customPaymentInstructionParameters",
                    "type": "object",
                    "schema": [],
                    "example": {},
                    "description": "Custom Payment Instruction Parameters"
                  }
                ],
                "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.PaymentInstructions.PaymentInstructionSummary",
                "customType": "FictiveGlobal.Api.Rest.Dtos.v1.PaymentInstructions.PaymentInstructionSummary[]",
                "description": "Payment Instruction Summary List contents"
              }
            ],
            "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.PaymentInstructions.PaymentInstructionSummaryList",
            "customType": "FictiveGlobal.Api.Rest.Dtos.v1.PaymentInstructions.PaymentInstructionSummaryList",
            "isExpanded": true,
            "description": "Payment instruction list dto wrapper"
          }
        ],
        "isExpanded": true,
        "statusCode": "204",
        "description": "No Content (No PaymentInstructions)",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "401",
        "description": "Not Authorized",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "404",
        "description": "Not Found (No Account)",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "500",
        "description": "Internal Server Error",
        "jsonExample": ""
      }
    ],
    "contentType": "application/json",
    "description": "This endpoint will provide the ability to retrieve a summary of all payment instructions for a given account",
    "examples": {
      "languages": [
        {
          "id": "0vWMYTj8N0FR9qdgqasiu",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://api.fictive.com/REST/api/accounts/{accountReference}/payment-instructions/summary \\\n     --header 'accept: application/json' \\\n     --header 'x-version: string'"
        },
        {
          "id": "aKPjoKGjhcYnn394VOfoq",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"x-version\", \"string\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.fictive.com/REST/api/accounts/{accountReference}/payment-instructions/summary\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "ZKmice-rVM_R5XsPweVLL",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.fictive.com/REST/api/accounts/{accountReference}/payment-instructions/summary\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"x-version\"] = \"string\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "GCz-Sj5BC5vaKu3mjGHwb",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.fictive.com/REST/api/accounts/{accountReference}/payment-instructions/summary\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'x-version': 'string'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "0vWMYTj8N0FR9qdgqasiu"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "{\n  \"paymentInstructions\": [\n    {\n      \"paymentInstructionReference\": \"0010J3O92YZYM43OP0\",\n      \"status\": \"Pending\",\n      \"cartReference\": \"0010KCKSYU72H5M3X0\",\n      \"nextFulfilmentReference\": \"0010L00WASCMKX7UO3\",\n      \"nextFulfilmentDate\": \"2021-09-21T05:33:22.7917368\",\n      \"lastPaymentDate\": \"2021-09-21T05:33:22.7917368\",\n      \"nextPaymentDate\": \"2021-09-21T05:33:22.7917368\",\n      \"description\": null,\n      \"customPaymentInstructionParameters\": {\n        \"name\": \"value\"\n      }\n    }\n  ]\n}"
        },
        {
          "id": "response-1-204",
          "language": "204",
          "code": "// No Content (No PaymentInstructions)\n{\n  \"paymentInstructions\": [\n    {\n      \"paymentInstructionReference\": \"\",\n      \"status\": \"\",\n      \"cartReference\": \"\",\n      \"nextFulfilmentReference\": \"\",\n      \"nextFulfilmentDate\": \"\",\n      \"lastPaymentDate\": \"\",\n      \"nextPaymentDate\": \"\",\n      \"description\": \"\",\n      \"customPaymentInstructionParameters\": {}\n    }\n  ]\n}"
        },
        {
          "id": "response-2-401",
          "language": "401",
          "code": "// Not Authorized\n"
        },
        {
          "id": "response-3-404",
          "language": "404",
          "code": "// Not Found (No Account)\n"
        },
        {
          "id": "response-4-500",
          "language": "500",
          "code": "// Internal Server Error\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}