---
title: Fetch Credit Flows
slug: fetch-credit-flows
docTags: 
createdAt: 2026-08-25T19:28:59.170Z
---

{
  "id": "0y5QGUtUce01MO230CrRz",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://api.nue.io/customers/{customerId}/credit-flows",
    "servers": [
      {
        "url": "https://api.nue.io/customers/{customerId}/credit-flows",
        "description": "**Production Environment** - Live production server for all customer-facing operations. Use this for production integrations with real customer data and transactions."
      },
      {
        "url": "https://api.sandbox.nue.io/customers/{customerId}/credit-flows",
        "description": "**Sandbox Environment** - Safe testing environment with sample data for development and integration testing. No rate limits apply. Data is reset weekly. Perfect for prototyping and QA testing."
      }
    ],
    "name": "Fetch Credit Flows",
    "description": "<p>Retrieves credit flow transactions for a specific customer. Credit flows represent individual credit transactions that track the movement of credits in and out of a customer's account, including issues, consumption, expirations, and cancellations. Supports optional enrichment with product and usage data.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "customerId",
          "type": "string",
          "description": "<p>The unique identifier of the customer (UUID or Salesforce ID)</p>"
        }
      ],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [
        {
          "kind": "optional",
          "name": "accountPoolIds",
          "type": "string",
          "description": "<p>JSON-encoded array of account pool IDs to filter by. Example: [\"pool-id-1\",\"pool-id-2\"]</p>"
        },
        {
          "kind": "optional",
          "name": "assetNumbers",
          "type": "string",
          "description": "<p>JSON-encoded array of subscription asset numbers to filter by. Example: [\"SUB-000001\",\"SUB-000002\"]</p>"
        },
        {
          "kind": "optional",
          "name": "includes",
          "type": "string",
          "description": "<p>Comma-separated list of related data to include. Options: 'product' (enriches with product info), 'usage' (enriches Consume transactions with usage data). Example: product,usage</p>"
        },
        {
          "kind": "optional",
          "name": "page",
          "type": "integer",
          "description": "Page number for pagination",
          "default": 1,
          "minimum": 1
        },
        {
          "kind": "optional",
          "name": "limit",
          "type": "integer",
          "description": "Number of results per page",
          "default": 100,
          "minimum": 1,
          "maximum": 500
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "ApiKeyAuth",
          "name": "nue-api-key",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Successfully retrieved credit flows",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"status\":\"SUCCESS\",\"data\":[{\"accountPoolId\":\"474935a8-16cc-46a6-927d-74c962cf460f\",\"assetNumber\":\"SUB-000185\",\"balance\":120000,\"createdById\":\"ddd60c9f-e694-4760-b832-f720ebf22a53\",\"createdDate\":\"2026-01-10T19:13:30.03Z\",\"creditEndDate\":\"2027-01-09\",\"creditId\":\"44b04d30-b8a2-4c95-ab70-d89a1bd594e1\",\"creditNumber\":\"CRE-000000000014\",\"creditStartDate\":\"2026-01-10\",\"creditTypeId\":\"6984e433-0151-4351-b9e2-b7f557672707\",\"currencyIsoCode\":\"USD\",\"customerId\":\"001RK00001jt2i1YAA\",\"id\":\"faa09e3e-f746-4743-a650-42a916f36ad2\",\"lastModifiedById\":\"ddd60c9f-e694-4760-b832-f720ebf22a53\",\"lastModifiedDate\":\"2026-01-10T19:13:30.03Z\",\"name\":\"CF-000000000015\",\"recordType\":\"Inflow\",\"salesAccountId\":\"001RK00001jt2i1YAA\",\"transactionAmount\":120000,\"transactionDate\":\"2026-01-10\",\"transactionSource\":\"OrderProduct\",\"transactionSourceId\":\"802RK00000v2qUjYAI\",\"transactionType\":\"Issue\"}],\"warnings\":[],\"pagination\":{\"page\":1,\"limit\":100,\"total\":2,\"totalPages\":1,\"hasNext\":false,\"hasPrevious\":false}}",
            "description": "",
            "schema": [
              {
                "name": "status",
                "kind": "optional",
                "type": "string<SUCCESS | PARTIAL_SUCCESS>",
                "description": "",
                "enum": [
                  "SUCCESS",
                  "PARTIAL_SUCCESS"
                ]
              },
              {
                "name": "data",
                "kind": "optional",
                "type": "array",
                "description": "",
                "example": "",
                "itemType": "object",
                "customType": "object[]",
                "schema": [
                  {
                    "name": "id",
                    "kind": "optional",
                    "type": "string",
                    "description": "Unique identifier for the credit flow"
                  },
                  {
                    "name": "name",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Credit flow name (e.g., CF-000000000015)</p>"
                  },
                  {
                    "name": "accountPoolId",
                    "kind": "optional",
                    "type": "string",
                    "description": "ID of the associated account credit pool"
                  },
                  {
                    "name": "assetNumber",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Subscription name/number associated with this flow</p>"
                  },
                  {
                    "name": "balance",
                    "kind": "optional",
                    "type": "number",
                    "description": "Credit balance after this transaction"
                  },
                  {
                    "name": "transactionAmount",
                    "kind": "optional",
                    "type": "number",
                    "description": "Amount of credits in this transaction"
                  },
                  {
                    "name": "transactionDate",
                    "kind": "optional",
                    "type": "string<date>",
                    "description": "Date of the transaction",
                    "format": "date"
                  },
                  {
                    "name": "transactionType",
                    "kind": "optional",
                    "type": "string<Issue | Consume | Expire | Cancel | CreditBack | CashOut | Reissue | Rollover>",
                    "description": "Type of transaction",
                    "enum": [
                      "Issue",
                      "Consume",
                      "Expire",
                      "Cancel",
                      "CreditBack",
                      "CashOut",
                      "Reissue",
                      "Rollover"
                    ]
                  },
                  {
                    "name": "transactionSource",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>Source of the transaction (e.g., OrderProduct, Usage)</p>"
                  },
                  {
                    "name": "transactionSourceId",
                    "kind": "optional",
                    "type": "string",
                    "description": "ID of the source record"
                  },
                  {
                    "name": "recordType",
                    "kind": "optional",
                    "type": "string<Inflow | Outflow>",
                    "description": "Direction of flow",
                    "enum": [
                      "Inflow",
                      "Outflow"
                    ]
                  },
                  {
                    "name": "creditId",
                    "kind": "optional",
                    "type": "string",
                    "description": "ID of the associated credit record"
                  },
                  {
                    "name": "creditNumber",
                    "kind": "optional",
                    "type": "string",
                    "description": "Credit record number"
                  },
                  {
                    "name": "creditStartDate",
                    "kind": "optional",
                    "type": "string<date>",
                    "description": "",
                    "format": "date"
                  },
                  {
                    "name": "creditEndDate",
                    "kind": "optional",
                    "type": "string<date>",
                    "description": "",
                    "format": "date"
                  },
                  {
                    "name": "creditTypeId",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "currencyIsoCode",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "customerId",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "salesAccountId",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "product",
                    "kind": "optional",
                    "type": "object",
                    "description": "<p>Product details (when includes=product)</p>",
                    "example": "",
                    "schema": []
                  },
                  {
                    "name": "usage",
                    "kind": "optional",
                    "type": "object",
                    "description": "<p>Usage details (when includes=usage, only for Consume transactions)</p>",
                    "example": "",
                    "schema": []
                  },
                  {
                    "name": "createdDate",
                    "kind": "optional",
                    "type": "string<date-time>",
                    "description": "",
                    "format": "date-time"
                  },
                  {
                    "name": "lastModifiedDate",
                    "kind": "optional",
                    "type": "string<date-time>",
                    "description": "",
                    "format": "date-time"
                  }
                ]
              },
              {
                "name": "warnings",
                "kind": "optional",
                "type": "array",
                "description": "Warnings for partial enrichment failures",
                "example": "",
                "itemType": "object",
                "customType": "object[]",
                "schema": [
                  {
                    "name": "code",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "message",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  }
                ]
              },
              {
                "name": "pagination",
                "kind": "optional",
                "type": "object",
                "description": "",
                "example": "",
                "schema": [
                  {
                    "name": "page",
                    "kind": "optional",
                    "type": "integer",
                    "description": ""
                  },
                  {
                    "name": "limit",
                    "kind": "optional",
                    "type": "integer",
                    "description": ""
                  },
                  {
                    "name": "total",
                    "kind": "optional",
                    "type": "integer",
                    "description": ""
                  },
                  {
                    "name": "totalPages",
                    "kind": "optional",
                    "type": "integer",
                    "description": ""
                  },
                  {
                    "name": "hasNext",
                    "kind": "optional",
                    "type": "boolean",
                    "description": ""
                  },
                  {
                    "name": "hasPrevious",
                    "kind": "optional",
                    "type": "boolean",
                    "description": ""
                  }
                ]
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "<p>Unauthorized - Authentication information is missing or invalid</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "<p>Authentication failed — returned with HTTP 401. Two variants occur: a missing key is rejected by the gateway with {status: \"FAILURE\", errorCode, errorType, message}; an invalid key is rejected by the service with {status: 401, error, message}.</p>",
            "customType": "UnauthorizedError",
            "schema": [
              {
                "name": "status",
                "kind": "optional",
                "type": "",
                "description": "<p>HTTP status code (e.g. 401) or the string \"FAILURE\" for gateway-level rejections.</p>"
              },
              {
                "name": "error",
                "kind": "optional",
                "type": "string",
                "description": "<p>Error reason phrase (invalid-key variant).</p>"
              },
              {
                "name": "errorCode",
                "kind": "optional",
                "type": "string",
                "description": "<p>Machine-readable error code, e.g. MISSING_AUTH_METHOD (missing-key variant).</p>"
              },
              {
                "name": "errorType",
                "kind": "optional",
                "type": "string",
                "description": "<p>Error category, e.g. AUTHENTICATION_ERROR (missing-key variant).</p>"
              },
              {
                "name": "message",
                "kind": "optional",
                "type": "string",
                "description": "<p>Human-readable error message.</p>"
              }
            ],
            "modelRef": "#/components/schemas/UnauthorizedError",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "404",
        "description": "<p>Not Found - Customer was not found</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "<p>The requested resource was not found — returned with HTTP 404.</p>",
            "customType": "NotFoundError",
            "schema": [
              {
                "name": "status",
                "kind": "optional",
                "type": "integer",
                "description": "HTTP status code."
              },
              {
                "name": "error",
                "kind": "optional",
                "type": "string",
                "description": "Error reason phrase."
              },
              {
                "name": "message",
                "kind": "optional",
                "type": "string",
                "description": "<p>Human-readable error message.</p>"
              }
            ],
            "modelRef": "#/components/schemas/NotFoundError",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "JfelRMXv4tyZJiMACbWeF",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url 'https://api.nue.io/customers/{customerId}/credit-flows?page=1&limit=100' \\\n     --header 'accept: application/json'"
        },
        {
          "id": "3BVQAmtAYmxE2_oWzSvwI",
          "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.nue.io/customers/{customerId}/credit-flows?page=1&limit=100\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "oZTRqIQmdzzsptvQJxH1h",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.nue.io/customers/{customerId}/credit-flows?page=1&limit=100\")\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": "En7znQe5JdJiJkN-6ZiY3",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.nue.io/customers/{customerId}/credit-flows?page=1&limit=100\"\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": "JfelRMXv4tyZJiMACbWeF"
    },
    "results": {
      "languages": [
        {
          "id": "sw3Jasxcf1oXPGd4j0YZW",
          "language": "200",
          "code": "// Successfully retrieved credit flows\n{\n  \"status\": \"\",\n  \"data\": [\n    {\n      \"id\": \"\",\n      \"name\": \"\",\n      \"accountPoolId\": \"\",\n      \"assetNumber\": \"\",\n      \"balance\": 0,\n      \"transactionAmount\": 0,\n      \"transactionDate\": \"\",\n      \"transactionType\": \"\",\n      \"transactionSource\": \"\",\n      \"transactionSourceId\": \"\",\n      \"recordType\": \"\",\n      \"creditId\": \"\",\n      \"creditNumber\": \"\",\n      \"creditStartDate\": \"\",\n      \"creditEndDate\": \"\",\n      \"creditTypeId\": \"\",\n      \"currencyIsoCode\": \"\",\n      \"customerId\": \"\",\n      \"salesAccountId\": \"\",\n      \"product\": {},\n      \"usage\": {},\n      \"createdDate\": \"\",\n      \"lastModifiedDate\": \"\"\n    }\n  ],\n  \"warnings\": [\n    {\n      \"code\": \"\",\n      \"message\": \"\"\n    }\n  ],\n  \"pagination\": {\n    \"page\": 0,\n    \"limit\": 0,\n    \"total\": 0,\n    \"totalPages\": 0,\n    \"hasNext\": false,\n    \"hasPrevious\": false\n  }\n}"
        },
        {
          "id": "JnOhfRq4QoY_PS7vA7IUH",
          "language": "401",
          "code": "// Unauthorized - Authentication information is missing or invalid\n{\n  \"status\": \"\",\n  \"error\": \"\",\n  \"errorCode\": \"\",\n  \"errorType\": \"\",\n  \"message\": \"\"\n}"
        },
        {
          "id": "fSBcDG331JmLalBuqaa17",
          "language": "404",
          "code": "// Not Found - Customer was not found\n{\n  \"status\": 0,\n  \"error\": \"\",\n  \"message\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "sw3Jasxcf1oXPGd4j0YZW"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}