# emailCardImage
source: https://developer.mastercard.com/iccp/documentation/05_api_reference/soap_api/purchaserequest/emailcardimage/index.md

> Use the **emailCardImage** request to send the virtual card image in an email to the recipient specified.

## Request Headers {#request-headers}

|    Key name     |                   Value                    |                                                                                                            Description for ICCP                                                                                                            |
|-----------------|--------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Idempotency-Key | Any random UUID set in HTTP Request Header | 1. The header key Idempotency-Key is optional. 2. If the header key Idempotency-Key is added then it should be non-null and non-empty. 3. Max length of key is 80 chars. 4. It is recommended that the key is UUID and generated randomly. |

## Parameters {#parameters}

|       Names       |                 Description                 | Required for ICCP | Required for ICMP |     Type      | Values |
|-------------------|---------------------------------------------|-------------------|-------------------|---------------|--------|
| purchaseRequestId | Id of a purchase request, except cancelled. | Yes               | Yes               | Integer, long |        |
| email             | Unlimited email addresses.                  | Yes               | Yes               | Alphanumeric  |        |

### Sample request {#sample-request}

```xml
<soapenv:Envelope xmlns:ser="http://mastercard.com/sd/pc2/service"
	xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
	<soapenv:Header/>
	<soapenv:Body>
		<ser:emailCardImage>
			<ser:purchaseRequestId>14546</ser:purchaseRequestId>
			<ser:email>abc@example.com</ser:email>
			<ser:email>def@example.com</ser:email>
		</ser:emailCardImage>
	</soapenv:Body>
</soapenv:Envelope>
```

## Response {#response}

|   Names   |           Description           | Required for ICCP | Required for ICMP |     Type     |
|-----------|---------------------------------|-------------------|-------------------|--------------|
| cardImage | A success or a failure message. | No                | No                | Alphanumeric |

### Sample response {#sample-response}

```xml
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
	<soapenv:Body>
		<ns2:emailCardImageResponse xmlns="http://mastercard.com/sd/pc/service"
			xmlns:ns2="http://mastercard.com/sd/pc2/service">
			<ns2:cardImage>Card Image has been Emailed Successfully</ns2:cardImage>
			<ns2:errorMessage xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance"/>
		</ns2:emailCardImageResponse>
	</soapenv:Body>
</soapenv:Envelope>
```

