> ## Documentation Index
> Fetch the complete documentation index at: https://docs.truststack.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Credential Issuer Profiles

When issuing a Digital Product Passport, you need to provide `CredentialIssuer` information. This is a representation of the organization that is issuing the VC,
it requires a primary identifier (a `did:web` identifier) and a human readable `name` for the organization, and the optional of including other identifiers such as
tax registration numbers, etc.

The structure of the `CredentialIssuer` is as follows:

```json theme={null}
{
  "type": ["CredentialIssuer"],
  "id": "did:web:trustdid.dev:o:<ORG_ID>:acme-farms",
  "name": "ACME Farms"
}
```

<Note>
  As always, to learn more about Digital Product Passports please refer to the UNTP as the authoritative source:

  [UNTP Digital Product Passports](https://uncefact.github.io/spec-untp/docs/specification/DigitalProductPassport)
</Note>

For the lifecycle of a `organization` managed on the TrustStack, they are likely to issue many Digital Product Passports and to reduce boilerplate as a developer,
you can create a `CredentialIssuer` profile for your organization. This profile can be reused for each Digital Product Passport issued by that `organization`.

# Usage

With `@truststack/sdk` installed and configured, or alternatively, just the `@truststack/untp` package.

<CodeGroup>
  ```bash npm theme={null}
  npm install @truststack/sdk
  # or
  npm install @truststack/untp
  ```

  ```bash yarn theme={null}
  yarn add @truststack/sdk
  # or
  yarn add @truststack/untp
  ```

  ```bash pnpm theme={null}
  pnpm add @truststack/sdk
  # or
  pnpm add @truststack/untp
  ```
</CodeGroup>

## Creating

To create a `CredentialIssuer` profile, you can use the `untp` module.

```typescript theme={null}
import {UntpClient} from "@truststack/untp";

const client = new UntpClient();

const profile = await client.createCredentialIssuerProfile({
  name: "ACME Farms Profile",
  identifierId: "<DID_ID>",
});
```

where `<DID_ID>` is the `id` of the `did:web` identifier you want to use for the `CredentialIssuer` profile.

## Deleting

To delete a `CredentialIssuer` profile, you can use the `deleteCredentialIssuerProfile` method.

```typescript theme={null}
const profile = await client.deleteCredentialIssuerProfile("<PROFILE_ID>");
```

where `<PROFILE_ID>` is the `id` of the `CredentialIssuer` profile you want to delete.

## Retrieving

To retrieve a `CredentialIssuer` profile, you can use the `getCredentialIssuerProfile` method.

```typescript theme={null}
const profile = await client.getCredentialIssuerProfile("<PROFILE_ID>");
```

where `<PROFILE_ID>` is the `id` of the `CredentialIssuer` profile you want to retrieve.

## Listing

To list all `CredentialIssuer` profiles, you can use the `listCredentialIssuerProfiles` method.

```typescript theme={null}
const profiles = await client.listCredentialIssuerProfiles({
  page: 1,
  pageSize: 10,
});
```

where `page` and `pageSize` are optional parameters to paginate the results.

# Learn More

A `CredentialIssuerProfile` is a concept that is at the intersection of other features such as `DID` and `Digital Product Passports`.
For a practical example refer to a guide on managing [Organization DPPs](/untp/examples/organization-dpps)
