Chilkat Online Tools

C# / New FreshBooks / List Credits

Back to Collection Items

// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.

Chilkat.Http http = new Chilkat.Http();
bool success;

// Adds the "Authorization: Bearer <access_token>" header.
http.AuthToken = "<access_token>";

Chilkat.StringBuilder sbResponseBody = new Chilkat.StringBuilder();
success = http.QuickGetSb("https://api.freshbooks.com/accounting/account/{{accountId}}/credit_notes/credit_notes",sbResponseBody);
if (success == false) {
    Debug.WriteLine(http.LastErrorText);
    return;
}

Chilkat.JsonObject jResp = new Chilkat.JsonObject();
jResp.LoadSb(sbResponseBody);
jResp.EmitCompact = false;

Debug.WriteLine("Response Body:");
Debug.WriteLine(jResp.Emit());

int respStatusCode = http.LastStatus;
Debug.WriteLine("Response Status Code = " + Convert.ToString(respStatusCode));
if (respStatusCode >= 400) {
    Debug.WriteLine("Response Header:");
    Debug.WriteLine(http.LastHeader);
    Debug.WriteLine("Failed.");
    return;
}

Curl Command

curl -X GET
	-H "Authorization: Bearer <access_token>"
https://api.freshbooks.com/accounting/account/{{accountId}}/credit_notes/credit_notes

Postman Collection Item JSON

{
  "name": "List Credits ",
  "event": [
    {
      "listen": "test",
      "script": {
        "exec": [
          "let jsonData = JSON.parse(responseBody);",
          "pm.environment.set(\"creditId\", jsonData.response.result.credit_notes[0].id)"
        ],
        "type": "text/javascript"
      }
    }
  ],
  "request": {
    "method": "GET",
    "header": [
    ],
    "url": {
      "raw": "https://api.freshbooks.com/accounting/account/{{accountId}}/credit_notes/credit_notes",
      "protocol": "https",
      "host": [
        "api",
        "freshbooks",
        "com"
      ],
      "path": [
        "accounting",
        "account",
        "{{accountId}}",
        "credit_notes",
        "credit_notes"
      ]
    }
  },
  "response": [
    {
      "name": "List Credits ",
      "originalRequest": {
        "method": "GET",
        "header": [
        ],
        "url": {
          "raw": "https://api.freshbooks.com/accounting/account/{{accountId}}/credit_notes/credit_notes",
          "protocol": "https",
          "host": [
            "api",
            "freshbooks",
            "com"
          ],
          "path": [
            "accounting",
            "account",
            "{{accountId}}",
            "credit_notes",
            "credit_notes"
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Server",
          "value": "nginx"
        },
        {
          "key": "Date",
          "value": "Fri, 11 Sep 2020 14:41:18 GMT"
        },
        {
          "key": "Content-Type",
          "value": "application/json"
        },
        {
          "key": "Vary",
          "value": "Accept-Encoding"
        },
        {
          "key": "X-NewRelic-App-Data",
          "value": "PxQBWV5TCBABVlVSAwEOVlcTGhE1AwE2QgNWEVlbQFtcCxYnRA9QFg1ZWU4DFVdfRgFPCkNFR0gHQ1NXCxI8DF8WXRECW0ZXVwxND14VVhFGGgdNVk0KBARWVFcCAANXUAUOClVSVU4dUxRAWl1SVAFdDVUEUFFTAQADAkRPXlJcFwQ/"
        },
        {
          "key": "X-Frame-Options",
          "value": "SAMEORIGIN"
        },
        {
          "key": "X-XSS-Protection",
          "value": "1; mode=block"
        },
        {
          "key": "X-Content-Type-Options",
          "value": "nosniff"
        },
        {
          "key": "Content-Security-Policy",
          "value": "default-src 'self'"
        },
        {
          "key": "X-Content-Security-Policy",
          "value": "default-src 'self'"
        },
        {
          "key": "Strict-Transport-Security",
          "value": "max-age=31556926; includeSubDomains; preload"
        },
        {
          "key": "Referrer-Policy",
          "value": "strict-origin-when-cross-origin"
        },
        {
          "key": "X-RateLimit-Limit",
          "value": "600"
        },
        {
          "key": "X-RateLimit-Remaining",
          "value": "596"
        },
        {
          "key": "X-RateLimit-Reset",
          "value": "1599835339"
        },
        {
          "key": "Retry-After",
          "value": "60"
        },
        {
          "key": "Access-Control-Allow-Origin",
          "value": "*"
        },
        {
          "key": "Content-Encoding",
          "value": "gzip"
        },
        {
          "key": "Via",
          "value": "1.1 google"
        },
        {
          "key": "Alt-Svc",
          "value": "h3-Q050=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\""
        },
        {
          "key": "Transfer-Encoding",
          "value": "chunked"
        }
      ],
      "cookie": [
      ],
      "body": "{\n    \"response\": {\n        \"result\": {\n            \"credit_notes\": [\n                {\n                    \"accounting_systemid\": \"E86Qp\",\n                    \"amount\": {\n                        \"amount\": \"150.00\",\n                        \"code\": \"CAD\"\n                    },\n                    \"city\": \"\",\n                    \"clientid\": 599843,\n                    \"code\": \"\",\n                    \"country\": \"\",\n                    \"create_date\": \"2020-07-31\",\n                    \"credit_number\": \"0000069\",\n                    \"credit_type\": \"goodwill\",\n                    \"creditid\": 30947,\n                    \"currency_code\": \"CAD\",\n                    \"current_organization\": \"Squarespace\",\n                    \"description\": \"Goodwill Credit\",\n                    \"display_status\": \"created\",\n                    \"dispute_status\": null,\n                    \"ext_archive\": 0,\n                    \"fname\": \"\",\n                    \"id\": 30947,\n                    \"language\": \"en\",\n                    \"last_order_status\": null,\n                    \"lname\": \"\",\n                    \"notes\": \"Free $150 voucher\",\n                    \"organization\": \"Squarespace\",\n                    \"paid\": {\n                        \"amount\": \"150.00\",\n                        \"code\": \"CAD\"\n                    },\n                    \"payment_status\": \"paid\",\n                    \"province\": \"\",\n                    \"sentid\": 1,\n                    \"status\": \"created\",\n                    \"street\": \"\",\n                    \"street2\": \"\",\n                    \"template\": \"clean-grouped\",\n                    \"terms\": \"Will be applied to future invoice\",\n                    \"vat_name\": \"\",\n                    \"vat_number\": \"\",\n                    \"vis_state\": 0\n                },\n                {\n                    \"accounting_systemid\": \"E86Qp\",\n                    \"amount\": {\n                        \"amount\": \"150.00\",\n                        \"code\": \"CAD\"\n                    },\n                    \"city\": \"\",\n                    \"clientid\": 599843,\n                    \"code\": \"\",\n                    \"country\": \"\",\n                    \"create_date\": \"2020-07-31\",\n                    \"credit_number\": \"0000064\",\n                    \"credit_type\": \"goodwill\",\n                    \"creditid\": 30943,\n                    \"currency_code\": \"CAD\",\n                    \"current_organization\": \"Squarespace\",\n                    \"description\": \"Goodwill Credit\",\n                    \"display_status\": \"created\",\n                    \"dispute_status\": null,\n                    \"ext_archive\": 0,\n                    \"fname\": \"\",\n                    \"id\": 30943,\n                    \"language\": \"en\",\n                    \"last_order_status\": null,\n                    \"lname\": \"\",\n                    \"notes\": \"Free $150 voucher\",\n                    \"organization\": \"Squarespace\",\n                    \"paid\": {\n                        \"amount\": \"150.00\",\n                        \"code\": \"CAD\"\n                    },\n                    \"payment_status\": \"paid\",\n                    \"province\": \"\",\n                    \"sentid\": 1,\n                    \"status\": \"created\",\n                    \"street\": \"\",\n                    \"street2\": \"\",\n                    \"template\": \"clean-grouped\",\n                    \"terms\": \"Will be applied to future invoice\",\n                    \"vat_name\": \"\",\n                    \"vat_number\": \"\",\n                    \"vis_state\": 0\n                },\n                {\n                    \"accounting_systemid\": \"E86Qp\",\n                    \"amount\": {\n                        \"amount\": \"1000.00\",\n                        \"code\": \"CAD\"\n                    },\n                    \"city\": \"\",\n                    \"clientid\": 592895,\n                    \"code\": \"\",\n                    \"country\": \"Poland\",\n                    \"create_date\": \"2020-09-02\",\n                    \"credit_number\": \"0000036\",\n                    \"credit_type\": \"overpayment\",\n                    \"creditid\": 30789,\n                    \"currency_code\": \"CAD\",\n                    \"current_organization\": \"ABC Healthcare\",\n                    \"description\": \"Overpayment: invoice #TH - 0124\",\n                    \"display_status\": \"created\",\n                    \"dispute_status\": null,\n                    \"ext_archive\": 0,\n                    \"fname\": \"ABC\",\n                    \"id\": 30789,\n                    \"language\": \"en\",\n                    \"last_order_status\": null,\n                    \"lname\": \"Healthcare\",\n                    \"notes\": \"Overpayment: invoice #TH - 0124\",\n                    \"organization\": \"ABC Healthcare\",\n                    \"paid\": {\n                        \"amount\": \"1000.00\",\n                        \"code\": \"CAD\"\n                    },\n                    \"payment_status\": \"paid\",\n                    \"province\": \"\",\n                    \"sentid\": 1,\n                    \"status\": \"created\",\n                    \"street\": \"\",\n                    \"street2\": \"\",\n                    \"template\": \"clean-grouped\",\n                    \"terms\": \"\",\n                    \"vat_name\": \"VAT Number\",\n                    \"vat_number\": \"\",\n                    \"vis_state\": 0\n                },\n                {\n                    \"accounting_systemid\": \"E86Qp\",\n                    \"amount\": {\n                        \"amount\": \"300.00\",\n                        \"code\": \"CAD\"\n                    },\n                    \"city\": \"\",\n                    \"clientid\": 568667,\n                    \"code\": \"\",\n                    \"country\": \"Canada\",\n                    \"create_date\": \"2020-08-12\",\n                    \"credit_number\": \"0000035\",\n                    \"credit_type\": \"overpayment\",\n                    \"creditid\": 30583,\n                    \"currency_code\": \"CAD\",\n                    \"current_organization\": \"Bob Smith\",\n                    \"description\": \"Overpayment: invoice #TH - 0076\",\n                    \"display_status\": \"created\",\n                    \"dispute_status\": null,\n                    \"ext_archive\": 0,\n                    \"fname\": \"Bob\",\n                    \"id\": 30583,\n                    \"language\": \"en\",\n                    \"last_order_status\": null,\n                    \"lname\": \"Smith\",\n                    \"notes\": \"Overpayment: invoice #TH - 0076\",\n                    \"organization\": \"Bob Smith\",\n                    \"paid\": {\n                        \"amount\": \"300.00\",\n                        \"code\": \"CAD\"\n                    },\n                    \"payment_status\": \"paid\",\n                    \"province\": \"\",\n                    \"sentid\": 1,\n                    \"status\": \"created\",\n                    \"street\": \"\",\n                    \"street2\": \"\",\n                    \"template\": \"clean-grouped\",\n                    \"terms\": \"\",\n                    \"vat_name\": \"\",\n                    \"vat_number\": \"\",\n                    \"vis_state\": 0\n                },\n                {\n                    \"accounting_systemid\": \"E86Qp\",\n                    \"amount\": {\n                        \"amount\": \"100.00\",\n                        \"code\": \"CAD\"\n                    },\n                    \"city\": \"Phoenix\",\n                    \"clientid\": 548489,\n                    \"code\": \"\",\n                    \"country\": \"United States\",\n                    \"create_date\": \"2020-08-06\",\n                    \"credit_number\": \"0000034\",\n                    \"credit_type\": \"prepayment\",\n                    \"creditid\": 30445,\n                    \"currency_code\": \"CAD\",\n                    \"current_organization\": \"ADS\",\n                    \"description\": \"\",\n                    \"display_status\": \"created\",\n                    \"dispute_status\": null,\n                    \"ext_archive\": 0,\n                    \"fname\": \"John\",\n                    \"id\": 30445,\n                    \"language\": \"en\",\n                    \"last_order_status\": null,\n                    \"lname\": \"Doe\",\n                    \"notes\": \"\",\n                    \"organization\": \"ADS\",\n                    \"paid\": {\n                        \"amount\": \"100.00\",\n                        \"code\": \"CAD\"\n                    },\n                    \"payment_status\": \"paid\",\n                    \"province\": \"Arizona\",\n                    \"sentid\": 557989,\n                    \"status\": \"created\",\n                    \"street\": \"\",\n                    \"street2\": \"\",\n                    \"template\": \"clean-grouped\",\n                    \"terms\": null,\n                    \"vat_name\": null,\n                    \"vat_number\": \"\",\n                    \"vis_state\": 0\n                },\n                {\n                    \"accounting_systemid\": \"E86Qp\",\n                    \"amount\": {\n                        \"amount\": \"300.00\",\n                        \"code\": \"CAD\"\n                    },\n                    \"city\": \"\",\n                    \"clientid\": 592185,\n                    \"code\": \"\",\n                    \"country\": \"\",\n                    \"create_date\": \"2020-07-28\",\n                    \"credit_number\": \"0000033\",\n                    \"credit_type\": \"prepayment\",\n                    \"creditid\": 30327,\n                    \"currency_code\": \"CAD\",\n                    \"current_organization\": \"test test\",\n                    \"description\": \"\",\n                    \"display_status\": \"created\",\n                    \"dispute_status\": null,\n                    \"ext_archive\": 0,\n                    \"fname\": \"Chris\",\n                    \"id\": 30327,\n                    \"language\": \"en\",\n                    \"last_order_status\": null,\n                    \"lname\": \"Clavio\",\n                    \"notes\": \"\",\n                    \"organization\": \"Chris Clavio\",\n                    \"paid\": {\n                        \"amount\": \"300.00\",\n                        \"code\": \"CAD\"\n                    },\n                    \"payment_status\": \"paid\",\n                    \"province\": \"\",\n                    \"sentid\": 563389,\n                    \"status\": \"created\",\n                    \"street\": \"\",\n                    \"street2\": \"\",\n                    \"template\": \"clean-grouped\",\n                    \"terms\": null,\n                    \"vat_name\": null,\n                    \"vat_number\": null,\n                    \"vis_state\": 0\n                },\n                {\n                    \"accounting_systemid\": \"E86Qp\",\n                    \"amount\": {\n                        \"amount\": \"9000.00\",\n                        \"code\": \"CAD\"\n                    },\n                    \"city\": \"Toronto\",\n                    \"clientid\": 494562,\n                    \"code\": \"M4K 2G5\",\n                    \"country\": \"Canada\",\n                    \"create_date\": \"2020-07-27\",\n                    \"credit_number\": \"0000032\",\n                    \"credit_type\": \"goodwill\",\n                    \"creditid\": 30289,\n                    \"currency_code\": \"CAD\",\n                    \"current_organization\": \"Plot #45\",\n                    \"description\": \"\",\n                    \"display_status\": \"created\",\n                    \"dispute_status\": null,\n                    \"ext_archive\": 0,\n                    \"fname\": \"Tom\",\n                    \"id\": 30289,\n                    \"language\": \"en\",\n                    \"last_order_status\": null,\n                    \"lname\": \"Hanks\",\n                    \"notes\": \"\",\n                    \"organization\": \"Plot #45\",\n                    \"paid\": {\n                        \"amount\": \"9000.00\",\n                        \"code\": \"CAD\"\n                    },\n                    \"payment_status\": \"paid\",\n                    \"province\": \"Ontario\",\n                    \"sentid\": 557989,\n                    \"status\": \"created\",\n                    \"street\": \"Oak St\",\n                    \"street2\": \"\",\n                    \"template\": \"clean-grouped\",\n                    \"terms\": null,\n                    \"vat_name\": null,\n                    \"vat_number\": \"\",\n                    \"vis_state\": 0\n                },\n                {\n                    \"accounting_systemid\": \"E86Qp\",\n                    \"amount\": {\n                        \"amount\": \"55.00\",\n                        \"code\": \"CAD\"\n                    },\n                    \"city\": \"\",\n                    \"clientid\": 590529,\n                    \"code\": \"\",\n                    \"country\": \"Canada\",\n                    \"create_date\": \"2020-07-17\",\n                    \"credit_number\": \"0000031\",\n                    \"credit_type\": \"overpayment\",\n                    \"creditid\": 30177,\n                    \"currency_code\": \"CAD\",\n                    \"current_organization\": \"Dom's Outhouses\",\n                    \"description\": \"Overpayment: invoice #20050850, prepayment credit\",\n                    \"display_status\": \"created\",\n                    \"dispute_status\": null,\n                    \"ext_archive\": 0,\n                    \"fname\": \"Dominic\",\n                    \"id\": 30177,\n                    \"language\": \"en\",\n                    \"last_order_status\": null,\n                    \"lname\": \"Schiavo\",\n                    \"notes\": \"Overpayment: invoice #20050850, prepayment credit\",\n                    \"organization\": \"Dom's Outhouses\",\n                    \"paid\": {\n                        \"amount\": \"55.00\",\n                        \"code\": \"CAD\"\n                    },\n                    \"payment_status\": \"paid\",\n                    \"province\": \"\",\n                    \"sentid\": 1,\n                    \"status\": \"created\",\n                    \"street\": \"\",\n                    \"street2\": \"\",\n                    \"template\": \"clean-grouped\",\n                    \"terms\": \"\",\n                    \"vat_name\": \"\",\n                    \"vat_number\": \"\",\n                    \"vis_state\": 0\n                },\n                {\n                    \"accounting_systemid\": \"E86Qp\",\n                    \"amount\": {\n                        \"amount\": \"112.00\",\n                        \"code\": \"CAD\"\n                    },\n                    \"city\": \"\",\n                    \"clientid\": 590529,\n                    \"code\": \"\",\n                    \"country\": \"Canada\",\n                    \"create_date\": \"2020-07-17\",\n                    \"credit_number\": \"0000030\",\n                    \"credit_type\": \"overpayment\",\n                    \"creditid\": 30167,\n                    \"currency_code\": \"CAD\",\n                    \"current_organization\": \"Dom's Outhouses\",\n                    \"description\": \"Overpayment: invoice #20050849\",\n                    \"display_status\": \"created\",\n                    \"dispute_status\": null,\n                    \"ext_archive\": 0,\n                    \"fname\": \"Dominic\",\n                    \"id\": 30167,\n                    \"language\": \"en\",\n                    \"last_order_status\": null,\n                    \"lname\": \"Schiavo\",\n                    \"notes\": \"Overpayment: invoice #20050849\",\n                    \"organization\": \"Dom's Outhouses\",\n                    \"paid\": {\n                        \"amount\": \"112.00\",\n                        \"code\": \"CAD\"\n                    },\n                    \"payment_status\": \"paid\",\n                    \"province\": \"\",\n                    \"sentid\": 1,\n                    \"status\": \"created\",\n                    \"street\": \"\",\n                    \"street2\": \"\",\n                    \"template\": \"clean-grouped\",\n                    \"terms\": \"\",\n                    \"vat_name\": \"\",\n                    \"vat_number\": \"\",\n                    \"vis_state\": 0\n                },\n                {\n                    \"accounting_systemid\": \"E86Qp\",\n                    \"amount\": {\n                        \"amount\": \"112.00\",\n                        \"code\": \"CAD\"\n                    },\n                    \"city\": \"\",\n                    \"clientid\": 590529,\n                    \"code\": \"\",\n                    \"country\": \"Canada\",\n                    \"create_date\": \"2020-07-17\",\n                    \"credit_number\": \"0000029\",\n                    \"credit_type\": \"overpayment\",\n                    \"creditid\": 30165,\n                    \"currency_code\": \"CAD\",\n                    \"current_organization\": \"Dom's Outhouses\",\n                    \"description\": \"Overpayment: invoice #20050849\",\n                    \"display_status\": \"created\",\n                    \"dispute_status\": null,\n                    \"ext_archive\": 0,\n                    \"fname\": \"Dominic\",\n                    \"id\": 30165,\n                    \"language\": \"en\",\n                    \"last_order_status\": null,\n                    \"lname\": \"Schiavo\",\n                    \"notes\": \"Overpayment: invoice #20050849\",\n                    \"organization\": \"Dom's Outhouses\",\n                    \"paid\": {\n                        \"amount\": \"112.00\",\n                        \"code\": \"CAD\"\n                    },\n                    \"payment_status\": \"paid\",\n                    \"province\": \"\",\n                    \"sentid\": 1,\n                    \"status\": \"created\",\n                    \"street\": \"\",\n                    \"street2\": \"\",\n                    \"template\": \"clean-grouped\",\n                    \"terms\": \"\",\n                    \"vat_name\": \"\",\n                    \"vat_number\": \"\",\n                    \"vis_state\": 0\n                },\n                {\n                    \"accounting_systemid\": \"E86Qp\",\n                    \"amount\": {\n                        \"amount\": \"112.00\",\n                        \"code\": \"CAD\"\n                    },\n                    \"city\": \"\",\n                    \"clientid\": 590529,\n                    \"code\": \"\",\n                    \"country\": \"Canada\",\n                    \"create_date\": \"2020-07-17\",\n                    \"credit_number\": \"0000028\",\n                    \"credit_type\": \"prepayment\",\n                    \"creditid\": 30163,\n                    \"currency_code\": \"CAD\",\n                    \"current_organization\": \"Dom's Outhouses\",\n                    \"description\": \"vwfwg\",\n                    \"display_status\": \"created\",\n                    \"dispute_status\": null,\n                    \"ext_archive\": 0,\n                    \"fname\": \"Dominic\",\n                    \"id\": 30163,\n                    \"language\": \"en\",\n                    \"last_order_status\": null,\n                    \"lname\": \"Schiavo\",\n                    \"notes\": \"\",\n                    \"organization\": \"Dom's Outhouses\",\n                    \"paid\": {\n                        \"amount\": \"112.00\",\n                        \"code\": \"CAD\"\n                    },\n                    \"payment_status\": \"paid\",\n                    \"province\": \"\",\n                    \"sentid\": 1,\n                    \"status\": \"created\",\n                    \"street\": \"\",\n                    \"street2\": \"\",\n                    \"template\": \"clean-grouped\",\n                    \"terms\": null,\n                    \"vat_name\": null,\n                    \"vat_number\": \"\",\n                    \"vis_state\": 0\n                },\n                {\n                    \"accounting_systemid\": \"E86Qp\",\n                    \"amount\": {\n                        \"amount\": \"500.00\",\n                        \"code\": \"CAD\"\n                    },\n                    \"city\": \"\",\n                    \"clientid\": 589351,\n                    \"code\": \"\",\n                    \"country\": \"Poland\",\n                    \"create_date\": \"2020-07-08\",\n                    \"credit_number\": \"0000027\",\n                    \"credit_type\": \"prepayment\",\n                    \"creditid\": 29979,\n                    \"currency_code\": \"CAD\",\n                    \"current_organization\": \"Kevin Melling\",\n                    \"description\": \"\",\n                    \"display_status\": \"created\",\n                    \"dispute_status\": null,\n                    \"ext_archive\": 0,\n                    \"fname\": \"Kevin\",\n                    \"id\": 29979,\n                    \"language\": \"en\",\n                    \"last_order_status\": null,\n                    \"lname\": \"Melling\",\n                    \"notes\": \"\",\n                    \"organization\": \"Kevin Melling\",\n                    \"paid\": {\n                        \"amount\": \"500.00\",\n                        \"code\": \"CAD\"\n                    },\n                    \"payment_status\": \"paid\",\n                    \"province\": \"\",\n                    \"sentid\": 557989,\n                    \"status\": \"created\",\n                    \"street\": \"\",\n                    \"street2\": \"\",\n                    \"template\": \"clean-grouped\",\n                    \"terms\": null,\n                    \"vat_name\": \"VAT Number\",\n                    \"vat_number\": null,\n                    \"vis_state\": 0\n                },\n                {\n                    \"accounting_systemid\": \"E86Qp\",\n                    \"amount\": {\n                        \"amount\": \"1000.00\",\n                        \"code\": \"CAD\"\n                    },\n                    \"city\": \"\",\n                    \"clientid\": 585673,\n                    \"code\": \"\",\n                    \"country\": \"Canada\",\n                    \"create_date\": \"2020-06-18\",\n                    \"credit_number\": \"0000026\",\n                    \"credit_type\": \"prepayment\",\n                    \"creditid\": 29687,\n                    \"currency_code\": \"CAD\",\n                    \"current_organization\": \"Disney World\",\n                    \"description\": \"\",\n                    \"display_status\": \"sent\",\n                    \"dispute_status\": null,\n                    \"ext_archive\": 0,\n                    \"fname\": \"Shri\",\n                    \"id\": 29687,\n                    \"language\": \"en\",\n                    \"last_order_status\": null,\n                    \"lname\": \"Test\",\n                    \"notes\": \"\",\n                    \"organization\": \"Disney World\",\n                    \"paid\": {\n                        \"amount\": \"1000.00\",\n                        \"code\": \"CAD\"\n                    },\n                    \"payment_status\": \"paid\",\n                    \"province\": \"\",\n                    \"sentid\": 1,\n                    \"status\": \"sent\",\n                    \"street\": \"\",\n                    \"street2\": \"\",\n                    \"template\": \"clean-grouped\",\n                    \"terms\": null,\n                    \"vat_name\": null,\n                    \"vat_number\": \"\",\n                    \"vis_state\": 0\n                },\n                {\n                    \"accounting_systemid\": \"E86Qp\",\n                    \"amount\": {\n                        \"amount\": \"56758.00\",\n                        \"code\": \"CAD\"\n                    },\n                    \"city\": \"\",\n                    \"clientid\": 585793,\n                    \"code\": \"\",\n                    \"country\": \"Canada\",\n                    \"create_date\": \"2020-06-18\",\n                    \"credit_number\": \"0000025\",\n                    \"credit_type\": \"overpayment\",\n                    \"creditid\": 29685,\n                    \"currency_code\": \"CAD\",\n                    \"current_organization\": \"Rabbit Zone\",\n                    \"description\": \"Overpayment: invoice #20050665\",\n                    \"display_status\": \"created\",\n                    \"dispute_status\": null,\n                    \"ext_archive\": 0,\n                    \"fname\": \"Ashley\",\n                    \"id\": 29685,\n                    \"language\": \"en\",\n                    \"last_order_status\": null,\n                    \"lname\": \"Mel\",\n                    \"notes\": \"Overpayment: invoice #20050665\",\n                    \"organization\": \"Rabbit Zone\",\n                    \"paid\": {\n                        \"amount\": \"56758.00\",\n                        \"code\": \"CAD\"\n                    },\n                    \"payment_status\": \"paid\",\n                    \"province\": \"\",\n                    \"sentid\": 1,\n                    \"status\": \"created\",\n                    \"street\": \"\",\n                    \"street2\": \"\",\n                    \"template\": \"clean-grouped\",\n                    \"terms\": \"\",\n                    \"vat_name\": \"\",\n                    \"vat_number\": \"\",\n                    \"vis_state\": 0\n                },\n                {\n                    \"accounting_systemid\": \"E86Qp\",\n                    \"amount\": {\n                        \"amount\": \"3657.00\",\n                        \"code\": \"CAD\"\n                    },\n                    \"city\": \"\",\n                    \"clientid\": 585793,\n                    \"code\": \"\",\n                    \"country\": \"\",\n                    \"create_date\": \"2020-06-18\",\n                    \"credit_number\": \"0000024\",\n                    \"credit_type\": \"prepayment\",\n                    \"creditid\": 29683,\n                    \"currency_code\": \"CAD\",\n                    \"current_organization\": \"Rabbit Zone\",\n                    \"description\": \"\",\n                    \"display_status\": \"viewed\",\n                    \"dispute_status\": null,\n                    \"ext_archive\": 0,\n                    \"fname\": \"\",\n                    \"id\": 29683,\n                    \"language\": \"en\",\n                    \"last_order_status\": null,\n                    \"lname\": \"\",\n                    \"notes\": \"\",\n                    \"organization\": \"\",\n                    \"paid\": {\n                        \"amount\": \"3657.00\",\n                        \"code\": \"CAD\"\n                    },\n                    \"payment_status\": \"paid\",\n                    \"province\": \"\",\n                    \"sentid\": 535534,\n                    \"status\": \"viewed\",\n                    \"street\": \"\",\n                    \"street2\": \"\",\n                    \"template\": \"clean-grouped\",\n                    \"terms\": null,\n                    \"vat_name\": null,\n                    \"vat_number\": null,\n                    \"vis_state\": 0\n                }\n            ],\n            \"page\": 1,\n            \"pages\": 3,\n            \"per_page\": 15,\n            \"total\": 36\n        }\n    }\n}"
    }
  ]
}