Contract API Data

This section shows you the data model for the Contracts API. This API provides information about the products associated with either a specific contract (contractId) or a reporting group (reportingGroupId).

When using this API, keep in mind that you can only view information for contracts you have access to, and you can only run the reporting group operations if your user account includes the CPCode Rep Group role.

Download the JSON schemas for this API.

ContractHyperMedia

Lists the contracts that the requesting user has access to.

Download schema: contractHyperMediaList.json

Sample GET response:

{
    "contracts": [
        {
            "contractId": "3-ZQ0H6H",
            "href": "/contract-api/v1/contracts/3-ZQ0H6H/products/summaries"
        },
        {
            "contractId": "3-1EBV5F",
            "href": "/contract-api/v1/contracts/3-1EBV5F/products/summaries"
        },
        {
            "contractId": "3-XC1A0F",
            "href": "/contract-api/v1/contracts/3-XC1A0F/products/summaries"
        }
    ]
}

ContractHyperMedia Members

Member Type Description
contracts ContractHyperMedia.contracts[n] Array of contracts that the requesting user has access to.

ContractHyperMedia.contracts[n]  

Array of contracts that the requesting user has access to.

Member Type Description
contractId String The unique identifier for a contract.
href String The URL that accesses product information for the contractId.

ProductSummary

Lists the products associated with specific contracts.

Download schema: productSummaries.json

Sample GET response:

{
    "products": {
        "contractId": "1-2RBL",
        "marketing-products": [
            {
                "marketingProductId": "B-3-96NY56",
                "marketingProductName": "Access Control - All Streaming Delivery"
            },
            {
                "marketingProductId": "B-3-A5ME5",
                "marketingProductName": "Site and Visitor Intelligence"
            },
            {
                "marketingProductId": "B-4-1O78TS",
                "marketingProductName": "All Streaming Delivery"
            }
        ]
    }
}

ProductSummary Members

Member Type Description
products ProductSummary.products Object that lists the products associated with the contract specified.

ProductSummary.products  

Object that lists the products associated with the contract specified.

Member Type Description
contractId String The unique identifier for a contract.
marketing-products ProductSummary.products.marketing-products[n] The identifiers and names for each product included on a contract.

ProductSummary.products.marketing-products[n]  

The identifiers and names for each product included on a contract.

Member Type Description
marketingProductId String The unique identifier for a product.
marketingProductName String The formal name of a product.

ReportingGroup

A logical grouping of content provider (CP) codes.

Download schema: repGrpIdNameList.json

Sample GET response:

[
    {
        "id": 12289,
        "name": "foo.com group"
    },
    {
        "id": 139267,
        "name": "*.example.com"
    },
    {
        "id": 139268,
        "name": "images traffic group"
    },
    {
        "id": 7182,
        "name": "www.bar.com"
    },
    {
        "id": 13844,
        "name": "Radio and Streaming"
    },
    {
        "id": 130221,
        "name": "All Mini Country sites"
    }
]

ReportingGroup Members

Member Type Description
id Integer Unique identifier for each reporting group.
name String The descriptive name you supply for each reporting group.

Last modified: 1/25/2018