> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://apidocs.megamation.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://apidocs.megamation.com/_mcp/server.

# Get Accounts

GET https://api.megamation.com/CLIENT_ID/DATABASE_ID/CC

An example of getting account code information using search criteria

Reference: https://apidocs.megamation.com/api/cc/get-cc-get-accounts

## Authentication

- `Authorization` header (basic auth, required) — Basic authentication of the form `Basic <base64(username:password)>`.
- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Query parameters

- `INACTIVE_FLAG` (string, optional)

## Response

### 200

OK

## Examples

**Response**

```json
{
  "_embedded": {
    "account": [
      {
        "_links": {
          "self": {
            "href": "https://api.megamation.com/mpcdev/dl/CC/010200"
          }
        },
        "account_type": "FRP",
        "cc": "010200",
        "description": "GOVT GRANTS",
        "inactive_flag": "No"
      },
      {
        "_links": {
          "self": {
            "href": "https://api.megamation.com/mpcdev/dl/CC/521010"
          }
        },
        "account_type": "",
        "cc": "521010",
        "description": "Seaport Parking",
        "inactive_flag": "No"
      },
      {
        "_links": {
          "self": {
            "href": "https://api.megamation.com/mpcdev/dl/CC/521020"
          }
        },
        "account_type": "",
        "cc": "521020",
        "description": "Seaport Common Land - Samual Cunard Court",
        "inactive_flag": "No"
      },
      {
        "_links": {
          "self": {
            "href": "https://api.megamation.com/mpcdev/dl/CC/522025"
          }
        },
        "account_type": "",
        "cc": "522025",
        "description": "Seaport Equipment",
        "inactive_flag": "No"
      },
      {
        "_links": {
          "self": {
            "href": "https://api.megamation.com/mpcdev/dl/CC/510015"
          }
        },
        "account_type": "",
        "cc": "510015",
        "description": "Seaport Berths 19-23",
        "inactive_flag": "No"
      },
      {
        "_links": {
          "self": {
            "href": "https://api.megamation.com/mpcdev/dl/CC/M4180120"
          }
        },
        "account_type": "FRP",
        "cc": "M4180120",
        "description": "BUILDING MAINT EXTERIOR",
        "inactive_flag": "No"
      },
      {
        "_links": {
          "self": {
            "href": "https://api.megamation.com/mpcdev/dl/CC/M4180130"
          }
        },
        "account_type": "FRP",
        "cc": "M4180130",
        "description": "BUILDINGS - MAINT DOORS",
        "inactive_flag": "No"
      },
      {
        "_links": {
          "self": {
            "href": "https://api.megamation.com/mpcdev/dl/CC/0013020"
          }
        },
        "account_type": "",
        "cc": "0013020",
        "description": "Floor  Maintenance and Remediation",
        "inactive_flag": "No"
      },
      {
        "_links": {
          "self": {
            "href": "https://api.megamation.com/mpcdev/dl/CC/M4180115"
          }
        },
        "account_type": "FRP",
        "cc": "M4180115",
        "description": "FLOOR REPAIRS",
        "inactive_flag": "No"
      },
      {
        "_links": {
          "self": {
            "href": "https://api.megamation.com/mpcdev/dl/CC/0013030"
          }
        },
        "account_type": "FRP",
        "cc": "0013030",
        "description": "Ceiling  Maintenance and Remediation",
        "inactive_flag": "No"
      },
      {
        "_links": {
          "self": {
            "href": "https://api.megamation.com/mpcdev/dl/CC/0012020"
          }
        },
        "account_type": "FRP",
        "cc": "0012020",
        "description": "Windows  Maintenance and Remediation",
        "inactive_flag": "No"
      },
      {
        "_links": {
          "self": {
            "href": "https://api.megamation.com/mpcdev/dl/CC/0012030"
          }
        },
        "account_type": "FRP",
        "cc": "0012030",
        "description": "Exterior Doors Maintenance and Remediation",
        "inactive_flag": "No"
      },
      {
        "_links": {
          "self": {
            "href": "https://api.megamation.com/mpcdev/dl/CC/0013040"
          }
        },
        "account_type": "",
        "cc": "0013040",
        "description": "Hvac Maintennace",
        "inactive_flag": "No"
      },
      {
        "_links": {
          "self": {
            "href": "https://api.megamation.com/mpcdev/dl/CC/522010"
          }
        },
        "account_type": "",
        "cc": "522010",
        "description": "Administration Building",
        "inactive_flag": "No"
      },
      {
        "_links": {
          "self": {
            "href": "https://api.megamation.com/mpcdev/dl/CC/M4180125"
          }
        },
        "account_type": "FRP",
        "cc": "M4180125",
        "description": "COLUMN INSULATION REPAIRS",
        "inactive_flag": "No"
      },
      {
        "_links": {
          "self": {
            "href": "https://api.megamation.com/mpcdev/dl/CC/M4180140"
          }
        },
        "account_type": "FRP",
        "cc": "M4180140",
        "description": "BUILDINGS MAINT. ELECTRICAL",
        "inactive_flag": "No"
      },
      {
        "_links": {
          "self": {
            "href": "https://api.megamation.com/mpcdev/dl/CC/0013050"
          }
        },
        "account_type": "FRP",
        "cc": "0013050",
        "description": "Electrical Remediation",
        "inactive_flag": "No"
      },
      {
        "_links": {
          "self": {
            "href": "https://api.megamation.com/mpcdev/dl/CC/510025"
          }
        },
        "account_type": "",
        "cc": "510025",
        "description": "Seaport Berth 24",
        "inactive_flag": "No"
      },
      {
        "_links": {
          "self": {
            "href": "https://api.megamation.com/mpcdev/dl/CC/830130"
          }
        },
        "account_type": "",
        "cc": "830130",
        "description": "Water Lines",
        "inactive_flag": "No"
      },
      {
        "_links": {
          "self": {
            "href": "https://api.megamation.com/mpcdev/dl/CC/480162"
          }
        },
        "account_type": "",
        "cc": "480162",
        "description": "Engineering Services (RG) 480162",
        "inactive_flag": "No"
      },
      {
        "_links": {
          "self": {
            "href": "https://api.megamation.com/mpcdev/dl/CC/0013060"
          }
        },
        "account_type": "FRP",
        "cc": "0013060",
        "description": "Grounds Repair",
        "inactive_flag": "No"
      },
      {
        "_links": {
          "self": {
            "href": "https://api.megamation.com/mpcdev/dl/CC/042302"
          }
        },
        "account_type": "FRP",
        "cc": "042302",
        "description": "R & D EQUIP ADDITIONS",
        "inactive_flag": "No"
      },
      {
        "_links": {
          "self": {
            "href": "https://api.megamation.com/mpcdev/dl/CC/M4180122"
          }
        },
        "account_type": "FRP",
        "cc": "M4180122",
        "description": "VENTILATORS REPAIRS",
        "inactive_flag": "No"
      },
      {
        "_links": {
          "self": {
            "href": "https://api.megamation.com/mpcdev/dl/CC/010295"
          }
        },
        "account_type": "",
        "cc": "010295",
        "description": "LABOUR MAINTENANCE",
        "inactive_flag": "No"
      },
      {
        "_links": {
          "self": {
            "href": "https://api.megamation.com/mpcdev/dl/CC/0011010"
          }
        },
        "account_type": "FRP",
        "cc": "0011010",
        "description": "General Budget",
        "inactive_flag": "No"
      },
      {
        "_links": {
          "self": {
            "href": "https://api.megamation.com/mpcdev/dl/CC/M4180112"
          }
        },
        "account_type": "FRP",
        "cc": "M4180112",
        "description": "CURB REPAIRS",
        "inactive_flag": "No"
      },
      {
        "_links": {
          "self": {
            "href": "https://api.megamation.com/mpcdev/dl/CC/521025"
          }
        },
        "account_type": "",
        "cc": "521025",
        "description": "Seaport Berth 24 Backup Land",
        "inactive_flag": "No"
      },
      {
        "_links": {
          "self": {
            "href": "https://api.megamation.com/mpcdev/dl/CC/M4180110"
          }
        },
        "account_type": "FRP",
        "cc": "M4180110",
        "description": "BUILDING MAINT. MASONARY",
        "inactive_flag": "No"
      },
      {
        "_links": {
          "self": {
            "href": "https://api.megamation.com/mpcdev/dl/CC/0012010"
          }
        },
        "account_type": "FRP",
        "cc": "0012010",
        "description": "Stairs Maintenance and Remediation",
        "inactive_flag": "No"
      },
      {
        "_links": {
          "self": {
            "href": "https://api.megamation.com/mpcdev/dl/CC/312115"
          }
        },
        "account_type": "",
        "cc": "312115",
        "description": "South End Container Terminal Berths",
        "inactive_flag": "No"
      },
      {
        "_links": {
          "self": {
            "href": "https://api.megamation.com/mpcdev/dl/CC/M4180121"
          }
        },
        "account_type": "FRP",
        "cc": "M4180121",
        "description": "GENERAL & SIGN PAINTING",
        "inactive_flag": "No"
      },
      {
        "_links": {
          "self": {
            "href": "https://api.megamation.com/mpcdev/dl/CC/0011020"
          }
        },
        "account_type": "FRP",
        "cc": "0011020",
        "description": "Roof Maintenance and Remediation",
        "inactive_flag": "No"
      }
    ]
  },
  "_links": {
    "apiEntryPoint": {
      "href": "https://api.megamation.com/mpcdev/dl"
    },
    "self": {
      "href": "https://api.megamation.com/mpcdev/dl/CC?INACTIVE_FLAG=NO"
    }
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.megamation.com/CLIENT_ID/DATABASE_ID/CC"

querystring = {"INACTIVE_FLAG":"NO"}

response = requests.get(url, params=querystring, auth=("<username>", "<password>"))

print(response.json())
```

```javascript
const url = 'https://api.megamation.com/CLIENT_ID/DATABASE_ID/CC?INACTIVE_FLAG=NO';
const credentials = btoa("<username>:<password>");

const options = {method: 'GET', headers: {Authorization: `Basic ${credentials}`}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.megamation.com/CLIENT_ID/DATABASE_ID/CC?INACTIVE_FLAG=NO"

	req, _ := http.NewRequest("GET", url, nil)

	req.SetBasicAuth("<username>", "<password>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.megamation.com/CLIENT_ID/DATABASE_ID/CC?INACTIVE_FLAG=NO")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request.basic_auth("<username>", "<password>")

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.megamation.com/CLIENT_ID/DATABASE_ID/CC?INACTIVE_FLAG=NO")
  .basicAuth("<username>", "<password>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.megamation.com/CLIENT_ID/DATABASE_ID/CC?INACTIVE_FLAG=NO', [
  'headers' => [
  ],
    'auth' => ['<username>', '<password>'],
]);

echo $response->getBody();
```

```csharp
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://api.megamation.com/CLIENT_ID/DATABASE_ID/CC?INACTIVE_FLAG=NO");
client.Authenticator = new HttpBasicAuthenticator("<username>", "<password>");
var request = new RestRequest(Method.GET);

IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let credentials = Data("<username>:<password>".utf8).base64EncodedString()

let headers = ["Authorization": "Basic \(credentials)"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.megamation.com/CLIENT_ID/DATABASE_ID/CC?INACTIVE_FLAG=NO")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```