---
title: Retrieve Transaction Summary
slug: docs/demo/retrieve-transaction-summary
description: Learn how to make a GET request to a designated API endpoint effortlessly with this code example. Utilizing curl, this document offers step-by-step guidance, enabling you to retrieve the desired data seamlessly. Master the art of implementing API calls wi
docTags: 
createdAt: 2022-03-21T20:12:45.000Z
---

{
  "id": "Z3WlnQnJw87oGkf2-G-TE",
  "data": {
    "url": "https://api.fictive.com/REST/api/accounts/{accountReference}/transaction-summary",
    "name": "Retrieve Transaction Summary",
    "method": "GET",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "accountReference",
          "type": "string",
          "description": "Identifier of the account"
        }
      ],
      "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": "totalCustomerValue",
                "type": "array",
                "schema": [
                  {
                    "kind": "optional",
                    "name": "totalValue",
                    "type": "number<double>",
                    "example": "",
                    "description": "Ttotal amount."
                  },
                  {
                    "kind": "optional",
                    "name": "currency",
                    "type": "string",
                    "example": "",
                    "description": "Currency."
                  }
                ],
                "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.ValueCurrency",
                "customType": "FictiveGlobal.Api.Rest.Dtos.v1.ValueCurrency[]",
                "description": "Total customer value"
              },
              {
                "kind": "optional",
                "name": "totalPaymentsToDate",
                "type": "array",
                "schema": [
                  {
                    "kind": "optional",
                    "name": "currency",
                    "type": "string",
                    "example": "",
                    "description": "Currency code."
                  },
                  {
                    "kind": "optional",
                    "name": "quantity",
                    "type": "integer<int32>",
                    "example": 0,
                    "description": "Number of orders."
                  },
                  {
                    "kind": "optional",
                    "name": "totalValue",
                    "type": "number<double>",
                    "example": "",
                    "description": "Total amount balance."
                  },
                  {
                    "kind": "optional",
                    "name": "averageValue",
                    "type": "number<double>",
                    "example": "",
                    "description": "Average amount balance."
                  }
                ],
                "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.PurchaseAmount",
                "customType": "FictiveGlobal.Api.Rest.Dtos.v1.PurchaseAmount[]",
                "description": "Total payments to date"
              },
              {
                "kind": "optional",
                "name": "totalRefundsToDate",
                "type": "array",
                "schema": [
                  {
                    "kind": "optional",
                    "name": "currency",
                    "type": "string",
                    "example": "",
                    "description": "Currency code."
                  },
                  {
                    "kind": "optional",
                    "name": "quantity",
                    "type": "integer<int32>",
                    "example": 0,
                    "description": "Number of orders."
                  },
                  {
                    "kind": "optional",
                    "name": "totalValue",
                    "type": "number<double>",
                    "example": "",
                    "description": "Total amount balance."
                  },
                  {
                    "kind": "optional",
                    "name": "averageValue",
                    "type": "number<double>",
                    "example": "",
                    "description": "Average amount balance."
                  }
                ],
                "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.PurchaseAmount",
                "customType": "FictiveGlobal.Api.Rest.Dtos.v1.PurchaseAmount[]",
                "description": "Total refunds to date"
              },
              {
                "kind": "optional",
                "name": "outstandingPaymentsToDate",
                "type": "array",
                "schema": [
                  {
                    "kind": "optional",
                    "name": "currency",
                    "type": "string",
                    "example": "",
                    "description": "Currency code."
                  },
                  {
                    "kind": "optional",
                    "name": "quantity",
                    "type": "integer<int32>",
                    "example": 0,
                    "description": "Number of orders."
                  },
                  {
                    "kind": "optional",
                    "name": "totalValue",
                    "type": "number<double>",
                    "example": "",
                    "description": "Total amount balance."
                  },
                  {
                    "kind": "optional",
                    "name": "averageValue",
                    "type": "number<double>",
                    "example": "",
                    "description": "Average amount balance."
                  }
                ],
                "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.PurchaseAmount",
                "customType": "FictiveGlobal.Api.Rest.Dtos.v1.PurchaseAmount[]",
                "description": "Outstanding payments to date"
              },
              {
                "kind": "optional",
                "name": "outstandingCreditBalance",
                "type": "array",
                "schema": [
                  {
                    "kind": "optional",
                    "name": "totalValue",
                    "type": "number<double>",
                    "example": "",
                    "description": "Ttotal amount."
                  },
                  {
                    "kind": "optional",
                    "name": "currency",
                    "type": "string",
                    "example": "",
                    "description": "Currency."
                  }
                ],
                "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.ValueCurrency",
                "customType": "FictiveGlobal.Api.Rest.Dtos.v1.ValueCurrency[]",
                "description": "Outstanding credit balance"
              }
            ],
            "modelRef": "#/definitions/FictiveGlobal.Api.Rest.Dtos.v1.AccountBalance",
            "customType": "FictiveGlobal.Api.Rest.Dtos.v1.AccountBalance",
            "isExpanded": true,
            "description": "Account balance"
          }
        ],
        "isExpanded": true,
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "{\n  \"totalCustomerValue\": [\n    {\n      \"totalValue\": 56.2,\n      \"currency\": \"USD\"\n    }\n  ],\n  \"totalPaymentsToDate\": [\n    {\n      \"currency\": \"USD\",\n      \"quantity\": 2,\n      \"totalValue\": 18,\n      \"averageValue\": 9\n    }\n  ],\n  \"totalRefundsToDate\": [\n    {\n      \"currency\": \"USD\",\n      \"quantity\": 3,\n      \"totalValue\": 21,\n      \"averageValue\": 7\n    }\n  ],\n  \"outstandingPaymentsToDate\": [\n    {\n      \"currency\": \"USD\",\n      \"quantity\": 2,\n      \"totalValue\": 21,\n      \"averageValue\": 11.5\n    }\n  ],\n  \"outstandingCreditBalance\": [\n    {\n      \"totalValue\": 17.21,\n      \"currency\": \"USD\"\n    }\n  ]\n}"
      },
      {
        "isExpanded": true,
        "statusCode": "401",
        "description": "Not Authorized",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "404",
        "description": "Account cannot be found",
        "jsonExample": ""
      },
      {
        "isExpanded": true,
        "statusCode": "500",
        "description": "Internal Server Error",
        "jsonExample": ""
      }
    ],
    "contentType": "application/json",
    "description": "This endpoint will enable for the retrieval of a summary of payments, refunds, pending payments and available service credits.",
    "examples": {
      "languages": [
        {
          "id": "maqzcDMmpv5zsN4RlOCNc",
          "language": "curl",
          "label": "cURL",
          "code": "curl --location --globoff 'https://api.fictive.com/REST/api/accounts/{accountReference}/transaction-summary' \\\n--header 'Accept: application/json' \\\n--header 'Content-Type: application/json'"
        },
        {
          "id": "TQyay_mP9WoM5pqf_oEs_",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"Accept\", \"application/json\");\nmyHeaders.append(\"Content-Type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.fictive.com/REST/api/accounts/{accountReference}/transaction-summary\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "hKJl6fzoXW9dCTO-zKVYv",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.fictive.com/REST/api/accounts/{accountReference}/transaction-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\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "osoAySViydcaT5zqcgdi1",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.fictive.com/REST/api/accounts/{accountReference}/transaction-summary\"\n\npayload = {}\nheaders = {\n   'Accept': 'application/json',\n   'Content-Type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "maqzcDMmpv5zsN4RlOCNc"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "{\n  \"totalCustomerValue\": [\n    {\n      \"totalValue\": 56.2,\n      \"currency\": \"USD\"\n    }\n  ],\n  \"totalPaymentsToDate\": [\n    {\n      \"currency\": \"USD\",\n      \"quantity\": 2,\n      \"totalValue\": 18,\n      \"averageValue\": 9\n    }\n  ],\n  \"totalRefundsToDate\": [\n    {\n      \"currency\": \"USD\",\n      \"quantity\": 3,\n      \"totalValue\": 21,\n      \"averageValue\": 7\n    }\n  ],\n  \"outstandingPaymentsToDate\": [\n    {\n      \"currency\": \"USD\",\n      \"quantity\": 2,\n      \"totalValue\": 21,\n      \"averageValue\": 11.5\n    }\n  ],\n  \"outstandingCreditBalance\": [\n    {\n      \"totalValue\": 17.21,\n      \"currency\": \"USD\"\n    }\n  ]\n}"
        },
        {
          "id": "response-1-401",
          "language": "401",
          "code": "// Not Authorized\n"
        },
        {
          "id": "response-2-404",
          "language": "404",
          "code": "// Account cannot be found\n"
        },
        {
          "id": "response-3-500",
          "language": "500",
          "code": "// Internal Server Error\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}