Get a CP code

GET https://{{host}}/papi/v1/cpcodes/:cpcodeId?contractId={{contractId}}&groupId={{groupId}}

This operation gets details about a CP code. To view or update certain CP code data, such as name, time zone, and purgeability, use the CP Codes and Reporting Groups API.

Request Params

KeyDatatypeRequiredDescription
contractIdstring(Required) Unique identifier for the contract. See ID prefixes for details on omitting the value's ctr_ prefix.
groupIdstring(Required) Unique identifier for the group. See ID prefixes for details on omitting the value's grp_ prefix.
accountSwitchKeystring(Optional) For customers who manage more than one account, this runs the operation from another account. The Identity and Access Management API provides a list of available account switch keys.

HEADERS

KeyDatatypeRequiredDescription
PAPI-Use-Prefixesstring(Required) Enum Sets whether to represent ID prefixes in response data. Set to false when exchanging PAPI data with other APIs.
Acceptstring

RESPONSES

status: OK

{"accountId":"act_A-CCT3456","contractId":"ctr_K-0N7RAK7","cpcodes":{"items":[{"cpcodeId":"cpc_7563521","cpcodeName":"SME WAA","createdDate":"2015-03-02T15:06:13Z","productIds":["prd_Web_App_Accel"]}]},"groupId":"grp_12345"}