---
updatedAt: 2026-03-01T18:37:19.000Z
agentTools:
  siteIndex: https://techdocs.akamai.com/llms.txt
  projectIndex: https://techdocs.akamai.com/property-mgr/llms.txt
---

# List CP codes

```curl cURL
contractId="ctr_1-1TJZFW"
groupId="grp_1522"

egcurl --eg-section default --request GET \

  --url "https://$hostname/papi/v1/cpcodes?contractId=$contractId&groupId=$groupId" \
  --header "Accept: application/json"
  --header "PAPI-Use-Prefixes: true"
```

```node Node
const EdgeGrid = require("akamai-edgegrid");
const os = require("os");
const edgercPath = os.homedir + "/.edgerc.txt";
const edgercSection = "default";  
const eg = new EdgeGrid({
  path: edgercPath,
  section: edgercSection
});   


eg.auth({
  path: `/papi/v1/cpcodes`,
  method: "GET",
  headers: {
    
    "Accept": "application/json",
    "PAPI-Use-Prefixes": "true"},
  qs: {
    "contractId": "ctr_1-1TJZFW",
    "groupId": "grp_15225"
}                    
});
eg.send(function(error, response, body) {
  console.log(body);    
});
```

```python Python
import requests
from akamai.edgegrid import EdgeGridAuth, EdgeRc
from urllib.parse import urljoin

edgerc = EdgeRc('~/.edgerc.txt')
section = 'default'
baseurl = 'https://%s' % edgerc.get(section, 'host')

session = requests.Session()
session.auth = EdgeGridAuth.from_edgerc(edgerc, section)
 

path= '/papi/v1/cpcodes'
headers = {
  
  "Accept": "application/json",
  "PAPI-Use-Prefixes": "true"
} 
querystring = {
  "contractId": "ctr_1-1TJZFW",
  "groupId": "grp_15225"
}  

result = session.get(urljoin(baseurl, path), headers=headers, params=querystring)
print(result.status_code)
print(result.json())  
```

```json Response Example
{
    "accountId": "act_1-1TJZFB",
    "contractId": "ctr_1-1TJZFW",
    "groupId": "grp_15225",
    "cpcodes": {
        "items": [
            {
                "cpcodeId": "cpc_33190",
                "cpcodeName": "SME WAA",
                "createdDate": "2015-03-02T15:06:13Z",
                "productIds": [
                    "prd_Web_App_Accel"
                ]
            }
        ]
    }
}
```

# Set up authentication

<!-- curl@4 -->
<!-- node@1-8 -->
<!-- python@1-10 -->

If you haven't already, you need to [create your authentication credentials](https://techdocs.akamai.com/developer/docs/set-up-authentication-credentials) in an API client in Control Center. Set up the API client with:

* Access to the Property Manager API (PAPI).
* PAPI's access level set to READ-WRITE.

Then, you can include this code to apply the token values to validate your requests.

# Form the request URL

<!-- curl@6 -->
<!-- node@12 -->
<!-- python@13 -->

Specify the target endpoint.

# Set your headers

<!-- curl@7-8 -->
<!-- node@14-17 -->
<!-- python@14-18 -->

Include these headers:

* `Accept: application/json`
* `PAPI-Use-Prefixes`. This sets whether to represent ID prefixes in response data. Set to `false` when exchanging PAPI data with other APIs. Set it to `true` here because we're working in PAPI.

# Set your query string parameters

<!-- curl@6 -->
<!-- node@18-21 -->
<!-- python@19-22 -->

This request requires the `contractId` and `groupId` query string parameters. 

Specify the `contractId` and `groupId` that include the applicable ​Akamai​ product(s). If you need these values, run [list contracts](https://techdocs.akamai.com/property-mgr/reference/get-contracts) and [list groups](https://techdocs.akamai.com/property-mgr/reference/get-groups).

# Call the API

<!-- curl@1-8 -->
<!-- node@1-25 -->
<!-- python@1-26 -->

Call GET on the request URL.

# View the response

<!-- python@13,19-22 -->

The response object lists the `cpcodes` associated with the specified `contractId` and `groupId`.