# Digital Card Profiles
> This contains artwork and metadata relating to a Card's appearance in digital wallet apps like Apple Pay and Google Pay. For more information, see our guide on [digital card artwork](https://increase.com/documentation/card-art).

[Events](https://increase.com/documentation/events.md) will be generated for this resource. The possible event categories are: `digital_card_profile.created` and `digital_card_profile.updated`.

## The Digital Card Profile object
### Example
```json
{
  "app_icon_file_id": "file_makxrc67oh9l6sg7w9yc",
  "background_image_file_id": "file_makxrc67oh9l6sg7w9yc",
  "card_description": "Black Card",
  "contact_email": "user@example.com",
  "contact_phone": "+18882988865",
  "contact_website": "https://example.com",
  "created_at": "2020-01-31T23:59:59Z",
  "description": "Corporate logo Apple Pay Card",
  "id": "digital_card_profile_s3puplu90f04xhcwkiga",
  "idempotency_key": null,
  "issuer_name": "National Phonograph Company",
  "status": "active",
  "text_color": {
    "blue": 230,
    "green": 255,
    "red": 189
  },
  "type": "digital_card_profile"
}
```
### Attributes
- `app_icon_file_id` (string)
  The identifier of the File containing the card's icon image.

- `background_image_file_id` (string)
  The identifier of the File containing the card's front image.

- `card_description` (string)
  A user-facing description for the card itself.

- `contact_email` (string, nullable)
  An email address the user can contact to receive support for their card.

- `contact_phone` (string, nullable)
  A phone number the user can contact to receive support for their card.

- `contact_website` (string, nullable)
  A website the user can visit to view and receive support for their card.

- `created_at` (string)
  The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which the Digital Card Profile was created.

- `description` (string)
  A description you can use to identify the Card Profile.

- `id` (string)
  The Card Profile identifier.

- `idempotency_key` (string, nullable)
  The idempotency key you chose for this object. This value is unique across Increase and is used to ensure that a request is only processed once. Learn more about [idempotency](https://increase.com/documentation/idempotency-keys).

- `issuer_name` (string)
  A user-facing description for whoever is issuing the card.

- `status` (enum)
  The status of the Card Profile.
  Cases:
  * `pending` (The Card Profile is awaiting review from Increase and/or processing by card networks.)
  * `rejected` (There is an issue with the Card Profile preventing it from use.)
  * `active` (The Card Profile can be assigned to Cards.)
  * `archived` (The Card Profile is no longer in use.)

- `text_color` (dictionary)
  The Card's text color, specified as an RGB triple.

  - `text_color.blue` (integer)
    The value of the blue channel in the RGB color.

  - `text_color.green` (integer)
    The value of the green channel in the RGB color.

  - `text_color.red` (integer)
    The value of the red channel in the RGB color.

- `type` (string)
  A constant representing the object's type. For this resource it will always be `digital_card_profile`.

## List Card Profiles
GET /digital_card_profiles

### Example
```curl
curl \
  --url "${INCREASE_URL}/digital_card_profiles" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}"
```

### Query Parameters
- `cursor` (string, optional)
  Return the page of entries after this one.

- `limit` (integer, optional)
  Limit the size of the list that is returned. The default (and maximum) is 100 objects.

- `status.in` (array of enums, optional)
  Filter Digital Card Profiles for those with the specified digital wallet status or statuses. For GET requests, this should be encoded as a comma-delimited string, such as `?in=one,two,three`.
  Cases:
  * `pending` (The Card Profile is awaiting review from Increase and/or processing by card networks.)
  * `rejected` (There is an issue with the Card Profile preventing it from use.)
  * `active` (The Card Profile can be assigned to Cards.)
  * `archived` (The Card Profile is no longer in use.)

- `idempotency_key` (string, optional)
  Filter records to the one with the specified `idempotency_key` you chose for that object. This value is unique across Increase and is used to ensure that a request is only processed once. Learn more about [idempotency](https://increase.com/documentation/idempotency-keys).

### Returns a Digital Card Profile List object:
```json
{
  "data": [
    {
      "app_icon_file_id": "file_makxrc67oh9l6sg7w9yc",
      "background_image_file_id": "file_makxrc67oh9l6sg7w9yc",
      "card_description": "Black Card",
      "contact_email": "user@example.com",
      "contact_phone": "+18882988865",
      "contact_website": "https://example.com",
      "created_at": "2020-01-31T23:59:59Z",
      "description": "Corporate logo Apple Pay Card",
      "id": "digital_card_profile_s3puplu90f04xhcwkiga",
      "idempotency_key": null,
      "issuer_name": "National Phonograph Company",
      "status": "active",
      "text_color": {
        "blue": 230,
        "green": 255,
        "red": 189
      },
      "type": "digital_card_profile"
    }
  ],
  "next_cursor": "v57w5d"
}
```

## Create a Digital Card Profile
POST /digital_card_profiles

### Example
```curl
curl -X "POST" \
  --url "${INCREASE_URL}/digital_card_profiles" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}" \
  -H "Content-Type: application/json" \
  -d $'{
    "app_icon_file_id": "file_8zxqkwlh43wo144u8yec",
    "background_image_file_id": "file_1ai913suu1zfn1pdetru",
    "card_description": "MyBank Signature Card",
    "contact_email": "user@example.com",
    "contact_phone": "+18885551212",
    "contact_website": "https://example.com",
    "description": "My Card Profile",
    "issuer_name": "MyBank",
    "text_color": {
      "blue": 59,
      "green": 43,
      "red": 26
    }
  }'
```

### Body Parameters
- `app_icon_file_id` (string, required)
  The identifier of the File containing the card's icon image.

- `background_image_file_id` (string, required)
  The identifier of the File containing the card's front image.

- `card_description` (string, required)
  A user-facing description for the card itself.

- `contact_email` (string, optional)
  An email address the user can contact to receive support for their card.

- `contact_phone` (string, optional)
  A phone number the user can contact to receive support for their card.

- `contact_website` (string, optional)
  A website the user can visit to view and receive support for their card.

- `description` (string, required)
  A description you can use to identify the Card Profile.

- `issuer_name` (string, required)
  A user-facing description for whoever is issuing the card.

- `text_color` (dictionary, optional)
  The Card's text color, specified as an RGB triple. The default is white.

  - `text_color.blue` (integer, required)
    The value of the blue channel in the RGB color.

  - `text_color.green` (integer, required)
    The value of the green channel in the RGB color.

  - `text_color.red` (integer, required)
    The value of the red channel in the RGB color.

## Retrieve a Digital Card Profile
GET /digital_card_profiles/{digital_card_profile_id}

### Example
```curl
curl \
  --url "${INCREASE_URL}/digital_card_profiles/digital_card_profile_s3puplu90f04xhcwkiga" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}"
```
### Path Parameters
- `digital_card_profile_id` (string, required)
  The identifier of the Digital Card Profile.

## Archive a Digital Card Profile
POST /digital_card_profiles/{digital_card_profile_id}/archive

### Example
```curl
curl -X "POST" \
  --url "${INCREASE_URL}/digital_card_profiles/digital_card_profile_s3puplu90f04xhcwkiga/archive" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}"
```
### Path Parameters
- `digital_card_profile_id` (string, required)
  The identifier of the Digital Card Profile to archive.

## Clones a Digital Card Profile
POST /digital_card_profiles/{digital_card_profile_id}/clone

### Example
```curl
curl -X "POST" \
  --url "${INCREASE_URL}/digital_card_profiles/digital_card_profile_s3puplu90f04xhcwkiga/clone" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}" \
  -H "Content-Type: application/json" \
  -d $'{
    "background_image_file_id": "file_1ai913suu1zfn1pdetru"
  }'
```
### Path Parameters
- `digital_card_profile_id` (string, required)
  The identifier of the Digital Card Profile to clone.

### Body Parameters
- `app_icon_file_id` (string, optional)
  The identifier of the File containing the card's icon image.

- `background_image_file_id` (string, optional)
  The identifier of the File containing the card's front image.

- `card_description` (string, optional)
  A user-facing description for the card itself.

- `contact_email` (string, optional)
  An email address the user can contact to receive support for their card.

- `contact_phone` (string, optional)
  A phone number the user can contact to receive support for their card.

- `contact_website` (string, optional)
  A website the user can visit to view and receive support for their card.

- `description` (string, optional)
  A description you can use to identify the Card Profile.

- `issuer_name` (string, optional)
  A user-facing description for whoever is issuing the card.

- `text_color` (dictionary, optional)
  The Card's text color, specified as an RGB triple. The default is white.

  - `text_color.blue` (integer, required)
    The value of the blue channel in the RGB color.

  - `text_color.green` (integer, required)
    The value of the green channel in the RGB color.

  - `text_color.red` (integer, required)
    The value of the red channel in the RGB color.