# Get contract package

Get a contract package by its identifier (contract package hash).

```
GET /contract-packages/{contract_package_hash}
```

This endpoint allows you to retrieve detailed information about a specific contract package using its unique identifier, the contract package hash. The response includes various properties such as owner public key, name, description, metadata, latest version contract type ID, timestamp, icon URL, and deploys number.

## Query params

None

## Sorting

None

## Optional properties

| Property                   | Type                                                                                        | Description                              |
| -------------------------- | ------------------------------------------------------------------------------------------- | ---------------------------------------- |
| `account_info`             | [`AccountInfo`](https://docs.cspr.cloud/1.3.x/rest-api/account-info)                        | ContractPackage owner account info       |
| `centralized_account_info` | [`CentralizedAccountInfo`](https://docs.cspr.cloud/1.3.x/rest-api/centralized-account-info) | ContractPackage centralized account info |

## Response

[`ContractPackage`](https://docs.cspr.cloud/1.3.x/rest-api/contract-package)

## Example

```bash
curl -X 'GET' \
  'https://api.testnet.cspr.cloud/contract-packages/ae2feaa4e86841c1c6f40f1779e1e1cb1d9d4d52a0eb82a8962829646524e744' \
  -H 'Accept: application/json' \
  -H 'Authorization: 55f79117-fc4d-4d60-9956-65423f39a06a'
```

```json
{
  "data": {
    "contract_package_hash": "ae2feaa4e86841c1c6f40f1779e1e1cb1d9d4d52a0eb82a8962829646524e744",
    "owner_public_key": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01",
    "name": "MyContractPackage",
    "description": "A sample contract package",
    "metadata": {
      "name": "MyToken",
      "symbol": "MT",
      "decimals": 18,
      "balances_uref": "uref-0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef-007",
      "total_supply_uref": "uref-abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef-007",
      "ownership_mode": 1,
      "nft_kind": 2,
      "nft_metadata_kind": 1,
      "whitelist_mode": 0,
      "holder_mode": 1,
      "minting_mode": 2,
      "burn_mode": 1,
      "identifier_mode": 0,
      "metadata_mutability": 1,
      "owner_reverse_lookup_mode": 1,
      "events_mode": 2
    },
    "latest_version_contract_type_id": 3,
    "timestamp": "2023-01-01T12:00:00Z",
    "icon_url": "https://example.com/icon.png",
    "deploys_number": 42
  }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cspr.cloud/1.3.x/rest-api/contract-package/get-contract-package.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
