# Mastercard Send Consumer Mapping (Version 1)
source: https://developer.mastercard.com/mastercard-send/documentation/consumer-mapping/index.md

Note: This documentation describes the **1st version** of the Mastercard Send Consumer Mapping service. Only use this information if you have already implemented that version of the service.

If you have not implemented this version of the service, do not use this information. Please contact your Mastercard representative about the new Consumer Mapping service.

## Overview {#overview}

The Consumer Mapping service is a consumer registration service for storing the consumer and account information that you capture, so that it is retained for long-term use.

The service stores the information securely with Mastercard, reducing the need for you to retain that information in your systems. The information can then be retrieved or referenced at any time, using the associated system-generated IDs or the reference IDs that you provided. You can use these IDs as Account URI aliases in your Mastercard Send API calls, see [Use with the Person-to-Person and Disbursements Services](https://developer.mastercard.com/mastercard-send/documentation/consumer-mapping/index.md#use-with-the-person-to-person-and-disbursements-services).

## How It Works {#how-it-works}

Use the following resources to create and manage the mappings:

* **Consumer** registers a consumer and account (creating a mapping) and can list/retrieve, update or delete registered consumers.
* **Consumer Account** adds, lists/retrieves, updates or deletes accounts for a registered consumer.
* **Consumer ContactID** adds, lists/retrieves, updates or deletes Contact IDs for a registered consumer.
* **Consumer GovernmentID** adds, lists/retrieves, updates or deletes Government IDs for a registered consumer.

![](https://static.developer.mastercard.com/content/mastercard-send/documentation/img/mastercard-send-consumer-mapping.png)

**NOTE:** You provide your own consumer_reference and account_reference IDs when creating those elements and you cannot change the IDs later. All elements are also given a system-generated ID.

Example Consumer Mapping sequence:

![](https://static.developer.mastercard.com/content/mastercard-send/documentation/img/mastercard-send-consumer-mapping-flow.png)

### Use with the Person-to-Person and Disbursements Services {#use-with-the-person-to-person-and-disbursements-services}

You can use the Consumer Mapping IDs in the following Mastercard Send API calls (in the `account_uri` field):

* Account Information API
* Account Verification API
* Payment Transfer API (part of the [Mastercard Send Person-to-Person](https://developer.mastercard.com/mastercard-send-person-to-person/documentation/) services)
* Disbursement API (part of the [Mastercard Send Disbursements](https://developer.mastercard.com/mastercard-send-disbursements/documentation/) services)

You specify the ID using the relevant Account URI schema:

|          Consumer Mapping ID           | Account URI Schema |
|----------------------------------------|--------------------|
| Mapping reference (consumer_reference) | consumer-ref       |
| Mapping ID                             | id                 |
| Account reference (account_reference)  | acct-ref           |
| Account ID                             | id                 |

For more information, see the documentation for the Mastercard Send API you are using.
Note: In that documentation, you may see similar Account URI schemas prefixed with 'sds-' (such as sds-mapping-ref). Do not use those schemas because they relate to the new Consumer Mapping service, not the service documented on this page.

### Use with the Lightbox Service {#use-with-the-lightbox-service}

The [Mastercard Send Lightbox](https://developer.mastercard.com/mastercard-send-lightbox/documentation/) service enables you to embed a secure card capture interface into your web portal/app so that consumers enter their card information directly into Mastercard secure systems, instead of your systems. The Lightbox service creates and returns a temporary token, with a 30-minute lifespan, for the card data.

![](https://static.developer.mastercard.com/content/mastercard-send/documentation/img/mastercard-send-consumer-mapping-with-lightbox.png)

You can use the temporary token as an 'acct-token' Account URI (in the `account_uri` field) in your Consumer Mapping API calls (step 5 in the diagram) when you:

* Create a consumer and account mapping
* Add or update an account record for a registered consumer

## API Reference {#api-reference}

### Environment Domains {#environment-domains}

**Sandbox:** <https://sandbox.api.mastercard.com>  

**Production:** <https://api.mastercard.com>

This API supports JSON and XML requests. In the expandable sections below, JSON example requests and responses are shown. For XML examples, see [Sample Requests and Responses](https://developer.mastercard.com/mastercard-send/documentation/consumer-mapping/index.md#sample-requests-and-responses).


API Specification: `https://static.developer.mastercard.com/content/mastercard-send/swagger/CM_swagger.yaml`

<br />

## Codes and Formats {#codes-and-formats}

### Account URIs {#account-uris}

You can use the following schemas for the `account_uri` field:

|   Schema   |                                                                                                                                                Specifies                                                                                                                                                 |                              Example                              |
|------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------|
| pan        | A card account number (PAN). Numeric, length 11-19. Data format: NNNNNNNNNNNNNNNN;exp=YYYY-MM                                                                                                                                                                                                            | pan:5432123456789012;exp=2021-02                                  |
| acct-token | A Lightbox token, which is a temporary system identifier generated by the Lightbox secure card capture service and returned as part of the capture response. This token has a lifespan of 30 minutes and should not be used as a permanent account identifier. Data format: 1-NN character alphanumeric. | acct-token:suZz18lhAFvx9LQa6U2VMxs0BJLAD_TXVzYvaqTsjcG_AImuzmvNXQ |

### Contact ID URIs {#contact-id-uris}

You can use the following schemas for the `contact_id_uri` field:

| Schema |                                                                                                                                                                                                               Specifies                                                                                                                                                                                                                |                 Example                  | Alias Length |
|--------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------|--------------|
| email  | Email address. Format: `email:{local-part}@{domain}`                                                                                                                                                                                                                                                                                                                                                                                   | email:test123@abcmail.com                | 5-254        |
| tel    | Telephone number, which must include the country code and the fully qualified country-specific phone number. This telephone number must be mapped to a card account number through PAN mapping or a registered consumer. Format: `tel:{telephone-number}`, where {telephone-number} is the MSISDN = CC + NDC (or NPA) + SN * CC = Country Code * NDC = National Destination Code * NPA = Number Planning Area * SN = Subscriber Number | tel:12125559175                          | 1-15         |
| social | Social network identifier. Format: `social:{network}/{user-id}` * {network} = The social network name. Valid values: Odnoklassniki, VK. * {user-id} = The user identifier for that social network.                                                                                                                                                                                                                                     | social:Odnoklassniki/test123@abcmail.com | 3-254        |

### Government ID URIs {#government-id-uris}

For the `government_id_uri` field, see the **Government ID URIs** section in the [Mastercard Send Person-to-Person](https://developer.mastercard.com/mastercard-send-person-to-person/documentation/) or [Mastercard Send Disbursements](https://developer.mastercard.com/mastercard-send-disbursements/documentation/) documentation.

### Date and Time Formats {#date-and-time-formats}

For the `date_of_birth` field, the date is specified in ISO 8601 format 'YYYY-MM-DD'. For example, 3 April 2000 is '2000-04-03'.

## Sample Requests and Responses {#sample-requests-and-responses}

This page presents example API messages (body payloads) for each type of API call.

For requests messages:

* **Format:** XML / JSON
* **HTTP Version:** 1.0 / 1.1
* **HTTP Header Parameters:**
  * content-type = The format of the inbound content being submitted, e.g. application/xml
  * content-length = The length of the inbound content body in octets

Response messages also contain the content-type and content-length header parameters.

Quick links to the subsections that follow:

* Consumer:

  * [Create - POST](https://developer.mastercard.com/mastercard-send/documentation/consumer-mapping/index.md#create-post)
  * [Read by ID - GET](https://developer.mastercard.com/mastercard-send/documentation/consumer-mapping/index.md#read-by-id-get)
  * [List by reference or ContactID - GET](https://developer.mastercard.com/mastercard-send/documentation/consumer-mapping/index.md#list-by-reference-or-contactid-get)
  * [Search by reference, ContactID, or GovernmentID - POST](https://developer.mastercard.com/mastercard-send/documentation/consumer-mapping/index.md#search-by-reference-contactid-or-governmentid-post)
  * [Update - PUT](https://developer.mastercard.com/mastercard-send/documentation/consumer-mapping/index.md#update-put)
  * [Delete - DELETE](https://developer.mastercard.com/mastercard-send/documentation/consumer-mapping/index.md#delete-delete)
* Consumer Account:

  * [Create - POST](https://developer.mastercard.com/mastercard-send/documentation/consumer-mapping/index.md#create-post-1)
  * [Read by ID - GET](https://developer.mastercard.com/mastercard-send/documentation/consumer-mapping/index.md#read-by-id-get-1)
  * [List - GET](https://developer.mastercard.com/mastercard-send/documentation/consumer-mapping/index.md#list-get)
  * [Update - PUT](https://developer.mastercard.com/mastercard-send/documentation/consumer-mapping/index.md#update-put-1)
  * [Delete - DELETE](https://developer.mastercard.com/mastercard-send/documentation/consumer-mapping/index.md#delete-delete-1)
* Consumer ContactID:

  * [Create - POST](https://developer.mastercard.com/mastercard-send/documentation/consumer-mapping/index.md#create-post-2)
  * [Read - GET](https://developer.mastercard.com/mastercard-send/documentation/consumer-mapping/index.md#read-get)
  * [List - GET](https://developer.mastercard.com/mastercard-send/documentation/consumer-mapping/index.md#list-get-1)
  * [Update - PUT](https://developer.mastercard.com/mastercard-send/documentation/consumer-mapping/index.md#update-put-2)
  * [Delete - DELETE](https://developer.mastercard.com/mastercard-send/documentation/consumer-mapping/index.md#delete-delete-2)
* Consumer GovernmentID:

  * [Create - POST](https://developer.mastercard.com/mastercard-send/documentation/consumer-mapping/index.md#create-post-3)
  * [Read - GET](https://developer.mastercard.com/mastercard-send/documentation/consumer-mapping/index.md#read-get-1)
  * [List - GET](https://developer.mastercard.com/mastercard-send/documentation/consumer-mapping/index.md#list-get-2)
  * [Update - PUT](https://developer.mastercard.com/mastercard-send/documentation/consumer-mapping/index.md#update-put-3)
  * [Delete - DELETE](https://developer.mastercard.com/mastercard-send/documentation/consumer-mapping/index.md#delete-delete-3)

### Consumer {#consumer}

#### Create - POST {#create---post}

Used by processors or acquirers to register a consumer.

##### Request {#request}

**Sandbox:** [https://sandbox.api.mastercard.com/send/v1/partners/{partnerId}/consumers](https://sandbox.api.mastercard.com/send/v1/partners/%7BpartnerId%7D/consumers)  

**Production URL:** [https://api.mastercard.com/send/v1/partners/{partnerId}/consumers](https://api.mastercard.com/send/v1/partners/%7BpartnerId%7D/consumers)
* XML

```XML
<consumer>
 	<consumer_reference>AB123456</consumer_reference>
 	<first_name>Jane</first_name>
 	<middle_name>Tyler</middle_name>
 	<last_name>Smith</last_name>
 	<nationality>USA</nationality>
 	<date_of_birth>1999-12-30</date_of_birth>
 	<address>
  		<line1>1 Main St</line1>
  		<line2>Apartment 9</line2>
  		<city>OFallon</city>
  		<country_subdivision>MO</country_subdivision>
  		<postal_code>63368</postal_code>
  		<country>USA</country>
 	</address>
 	<primary_phone>11234567890</primary_phone>
 	<primary_email>test123@abcmail.com</primary_email>
 	<account>
  		<default_sending>True</default_sending>
  		<default_receiving>True</default_receiving>
  		<account_reference>ABCD123456789</account_reference>
  		<label>JaneMC</label> 		
		<account_uri>pan:5432123456789012;exp=2017-02;cvc=123</account_uri>
  		<name_on_account>Jane Tyler Smith</name_on_account>
  		<address>
   			<line1>1 Main St</line1>
   			<line2>Apartment 9</line2>
   			<city>OFallon</city>
   			<country_subdivision>MO</country_subdivision>
   			<postal_code>63368</postal_code>
   			<country>USA</country>
  		</address>
 	</account>
</consumer>
```

##### Response {#response}

* XML

```XML
<consumer>
	<id>cns_f21tg68mh89c376h</id>
	<resource_type>consumer</resource_type>
	<consumer_reference>AB123456</consumer_reference>
	<first_name>Jane</first_name>
	<middle_name>Tyler</middle_name>
	<last_name>Smith</last_name>
	<nationality>USA</nationality>
	<date_of_birth>1999-12-30</date_of_birth>
	<address>
		<line1>1 Main Street</line1>
		<line2>Apartment 9</line2>
		<city>OFallon</city>
		<country_subdivision>MO</country_subdivision>
		<postal_code>63368</postal_code>
		<country>USA</country>
	</address>
	<primary_phone>11234567890</primary_phone>
	<primary_email>test123@abcmail.com</primary_email>
	<preferences>
		<default_accounts>
			<sending>acct_mk32k324mg6wn19x</sending>
			<receiving>acct_mk32k324mg6wn19x</receiving>
		</default_accounts>
	</preferences>
</consumer>
```

#### Read by ID - GET {#read-by-id---get}

Used by processors or acquirers to retrieve information on a registered consumer.

##### Request {#request-1}

**Sandbox URL:** [https://sandbox.api.mastercard.com/send/v1/partners/{partnerId}](https://sandbox.api.mastercard.com/send/v1/partners/%7BpartnerId%7D)​/consumers​/{consumerId}  

**Production URL:** [https://api.mastercard.com/send/v1/partners/{partnerId}](https://api.mastercard.com/send/v1/partners/%7BpartnerId%7D)​/consumers​/{consumerId}

No body

##### Response {#response-1}

* XML

```XML
<consumer>
	<id>cns_f21tg68mh89c376h</id>
	<resource_type>consumer</resource_type>
	<consumer_reference>AB123456</consumer_reference>
	<first_name>Jane</first_name>
	<middle_name>Tyler</middle_name>
	<last_name>Smith</last_name>
	<nationality>USA</nationality>
	<date_of_birth>1999-12-30</date_of_birth>
	<address>
		<line1>1 Main Street</line1>
		<line2>Apartment 9</line2>
		<city>OFallon</city>
		<country_subdivision>MO</country_subdivision>
		<postal_code>63368</postal_code>
		<country>USA</country>
	</address>
	<primary_phone>11234567890</primary_phone>
	<primary_email>test123@abcmail.com</primary_email>
	<preferences>
		<default_accounts>
			<sending>acct_mk32k324mg6wn19x</sending>
			<receiving>acct_mk32k324mg6wn19x</receiving>
		</default_accounts>
	</preferences>
</consumer>
```

#### List by reference or ContactID - GET {#list-by-reference-or-contactid---get}

Used by processors or acquirers to retrieve information on a registered consumer.

##### Request {#request-2}

**Sandbox URL:** [https://sandbox.api.mastercard.com/send/v1/partners/{partnerId}](https://sandbox.api.mastercard.com/send/v1/partners/%7BpartnerId%7D)​/consumers?\[ref={consumer_reference}\]\[contact_id_uri={contact_id_uri}\]  

**Production URL:** [https://api.mastercard.com/send/v1/partners/{partnerId}](https://api.mastercard.com/send/v1/partners/%7BpartnerId%7D)​/consumers?\[ref={consumer_reference}\]\[contact_id_uri={contact_id_uri}\]

No body

##### Response -- CONSUMER REFERENCE {#response--consumer-reference}

* XML

```XML
<consumers> 
     <resource_type>list</resource_type> 
     <item_count>1</item_count> 
     <data>
       <consumer>
          <id>cns_f21tg68mh89c376h</id>
          <resource_type>consumer</resource_type>
          <consumer_reference>AB123456</consumer_reference>
          <first_name>Jane</first_name>
          <middle_name>Tyler</middle_name>
          <last_name>Smith</last_name>
          <nationality>USA</nationality>
          <date_of_birth>1999-12-30</date_of_birth>
          <address>
             <line1>1 Main Street</line1>
             <line2>Apartment 9</line2>
             <city>OFallon</city>
             <country_subdivision>MO</country_subdivision>
             <postal_code>63368</postal_code>
             <country>USA</country>
          </address>
          <primary_phone>11234567890</primary_phone>
          <primary_email>test123@abcmail.com</primary_email>
          <preferences>
             <default_accounts>
                 <sending>acct_mk32k324mg6wn19x</sending>
                 <receiving>acct_mk32k324mg6wn19x</receiving>
             </default_accounts>
          </preferences>
       </consumer>
     </data> 
</consumers> 
```

##### Response -- CONTACT ID URI {#response--contact-id-uri}

* XML

```XML
<consumers> 
     <resource_type>list</resource_type> 
     <item_count>1</item_count> 
     <data>
       <consumer>
          <id>cns_f21tg68mh89c376h</id>
          <resource_type>consumer</resource_type>
          <consumer_reference>AB123456</consumer_reference>
          <first_name>Jane</first_name>
          <middle_name>Tyler</middle_name>
          <last_name>Smith</last_name>
          <nationality>USA</nationality>
          <date_of_birth>1999-12-30</date_of_birth>
          <address>
             <line1>1 Main Street</line1>
             <line2>Apartment 9</line2>
             <city>OFallon</city>
             <country_subdivision>MO</country_subdivision>
             <postal_code>63368</postal_code>
             <country>USA</country>
          </address>
          <primary_phone>11234567890</primary_phone>
          <primary_email>test123@abcmail.com</primary_email>
          <preferences>
             <default_accounts>
                <sending>acct_mk32k324mg6wn19x</sending>
                <receiving>acct_mk32k324mg6wn19x</receiving>
             </default_accounts>
          </preferences>
       </consumer>
     </data> 
</consumers> 
```

#### Search by reference, ContactID, or GovernmentID - POST {#search-by-reference-contactid-or-governmentid---post}

Used by processors or acquirers to retrieve information on a registered consumer.

##### Request -- CONSUMER REFERENCE {#request--consumer-reference}

**Sandbox URL:** [https://sandbox.api.mastercard.com/send/v1/partners/{partnerId}](https://sandbox.api.mastercard.com/send/v1/partners/%7BpartnerId%7D)​/consumers​/search  

**Production URL:** [https://api.mastercard.com/send/v1/partners/{partnerId}](https://api.mastercard.com/send/v1/partners/%7BpartnerId%7D)​/consumers​/search
* XML

```XML
<consumer> 
<search_by>consumer_reference</search_by> 
<search_value>AB123456</search_value>
</consumer>
```

##### Request -- CONTACT ID URI {#request--contact-id-uri}

* XML

```XML
<consumer> 
<search_by>contact_id_uri</search_by> 
<search_value>tel:1234567890</search_value> 
</consumer>
```

##### Request -- GOVERNMENT ID URI {#request--government-id-uri}

* XML

```XML
<consumer> 
<search_by>government_id_uri</search_by> 
<search_value>ppn:123456789;expiration-date=2019-05-27;issue-date=2011-07-12;issuing-country=USA;issuing-place=O'Fallon</search_value> 
</consumer>
```

##### Response -- CONSUMER REFERENCE {#response--consumer-reference-1}

* XML

```XML
<consumers> 
     <resource_type>list</resource_type> 
     <item_count>1</item_count> 
     <data>
       <consumer>
          <id>cns_f21tg68mh89c376h</id>
          <resource_type>consumer</resource_type>
          <consumer_reference>AB123456</consumer_reference>
          <first_name>Jane</first_name>
          <middle_name>Tyler</middle_name>
          <last_name>Smith</last_name>
          <nationality>USA</nationality>
          <date_of_birth>1999-12-30</date_of_birth>
          <address>
             <line1>1 Main Street</line1>
             <line2>Apartment 9</line2>
             <city>OFallon</city>
             <country_subdivision>MO</country_subdivision>
             <postal_code>63368</postal_code>
             <country>USA</country>
          </address>
          <primary_phone>11234567890</primary_phone>
          <primary_email>test123@abcmail.com</primary_email>
          <preferences>
             <default_accounts>
                 <sending>acct_mk32k324mg6wn19x</sending>
                 <receiving>acct_mk32k324mg6wn19x</receiving>
             </default_accounts>
          </preferences>
       </consumer>
     </data> 
</consumers> 
```

##### Response -- CONTACT ID URI {#response--contact-id-uri-1}

* XML

```XML
<consumers> 
     <resource_type>list</resource_type> 
     <item_count>1</item_count> 
     <data>
       <consumer>
          <id>cns_f21tg68mh89c376h</id>
          <resource_type>consumer</resource_type>
          <consumer_reference>AB123456</consumer_reference>
          <first_name>Jane</first_name>
          <middle_name>Tyler</middle_name>
          <last_name>Smith</last_name>
          <nationality>USA</nationality>
          <date_of_birth>1999-12-30</date_of_birth>
          <address>
             <line1>1 Main Street</line1>
             <line2>Apartment 9</line2>
             <city>OFallon</city>
             <country_subdivision>MO</country_subdivision>
             <postal_code>63368</postal_code>
             <country>USA</country>
          </address>
          <primary_phone>11234567890</primary_phone>
          <primary_email>test123@abcmail.com</primary_email>
          <preferences>
             <default_accounts>
                <sending>acct_mk32k324mg6wn19x</sending>
                <receiving>acct_mk32k324mg6wn19x</receiving>
             </default_accounts>
          </preferences>
       </consumer>
     </data> 
</consumers>
```

##### Response -- GOVERNMENT ID URI {#response--government-id-uri}

* XML

```XML
<consumers> 
     <resource_type>list</resource_type> 
     <item_count>1</item_count> 
     <data>
       <consumer>
          <id>cns_f21tg68mh89c376h</id>
          <resource_type>consumer</resource_type>
          <consumer_reference>AB123456</consumer_reference>
          <first_name>Jane</first_name>
          <middle_name>Tyler</middle_name>
          <last_name>Smith</last_name>
          <nationality>USA</nationality>
          <date_of_birth>1999-12-30</date_of_birth>
          <address>
             <line1>1 Main Street</line1>
             <line2>Apartment 9</line2>
             <city>OFallon</city>
             <country_subdivision>MO</country_subdivision>
             <postal_code>63368</postal_code>
             <country>USA</country>
          </address>
          <primary_phone>11234567890</primary_phone>
          <primary_email>test123@abcmail.com</primary_email>
          <preferences>
             <default_accounts>
                <sending>acct_mk32k324mg6wn19x</sending>
                <receiving>acct_mk32k324mg6wn19x</receiving>
             </default_accounts>
          </preferences>
       </consumer>
     </data> 
</consumers>
```

#### Update - PUT {#update---put}

Used by processors or acquirers to update information on a registered consumer.

##### Request {#request-3}

**Sandbox URL:** [https://sandbox.api.mastercard.com/send/v1/partners/{partnerId}](https://sandbox.api.mastercard.com/send/v1/partners/%7BpartnerId%7D)​/consumers​/{consumerId}  

**Production URL:** [https://api.mastercard.com/send/v1/partners/{partnerId}](https://api.mastercard.com/send/v1/partners/%7BpartnerId%7D)​/consumers​/{consumerId}
* XML

```XML
<consumer>
  <first_name>Jane</first_name>
  <middle_name>Tyler</middle_name>
  <last_name>Smith</last_name>
  <nationality>USA</nationality>
  <date_of_birth>1999-12-30</date_of_birth>
  <address>
     <line1>1 Main St</line1>
     <line2>Apartment 9</line2>
     <city>OFallon</city>
     <country_subdivision>MO</country_subdivision>
     <postal_code>63368</postal_code>
     <country>USA</country>
  </address>
  <primary_phone>11234567890</primary_phone>
  <primary_email>test123@abcmail.com</primary_email>
  <preferences>
    <default_accounts>
      <receiving>acct_mk32k324mg6wn19x</receiving>
    </default_accounts>
  </preferences>
</consumer>
```

**Response**
* XML

```XML
<consumer>
   <id>cns_f21tg68mh89c376h</id>
   <resource_type>consumer</resource_type>
   <consumer_reference>AB123456</consumer_reference>
   <first_name>Jane</first_name>
   <middle_name>Tyler</middle_name>
   <last_name>Smith</last_name>
   <nationality>USA</nationality>
   <date_of_birth>1999-12-30</date_of_birth>
   <address>
      <line1>1 Main Street</line1>
      <line2>Apartment 9</line2>
      <city>OFallon</city>
      <country_subdivision>MO</country_subdivision>
      <postal_code>63368</postal_code>
      <country>USA</country>
   </address>
   <primary_phone>11234567890</primary_phone>
   <primary_email>test123@abcmail.com</primary_email>
   <preferences>
      <default_accounts>
        <sending>acct_mk32k324mg6wn19x</sending>
        <receiving>acct_mk32k324mg6wn19x</receiving>
      </default_accounts>
    </preferences>
</consumer>
```

#### Delete - DELETE {#delete---delete}

Used by processors or acquirers to delete a registered consumer.

##### Request {#request-4}

**Sandbox URL:** [https://sandbox.api.mastercard.com/send/v1/partners/{partnerId}](https://sandbox.api.mastercard.com/send/v1/partners/%7BpartnerId%7D)​/consumers​/{consumerId}  

**Production URL:** [https://api.mastercard.com/send/v1/partners/{partnerId}](https://api.mastercard.com/send/v1/partners/%7BpartnerId%7D)​/consumers​/{consumerId}

No body

##### Response {#response-2}

* XML

```XML
<consumer>
     <id>cns_f21tg68mh89c376h</id>
     <resource_type>consumer</resource_type>
     <consumer_reference>AB123456</consumer_reference>
     <first_name>Jane</first_name>
     <middle_name>Tyler</middle_name>
     <last_name>Smith</last_name>
     <nationality>USA</nationality>
     <date_of_birth>1999-12-30</date_of_birth>
     <address>
        <line1>1 Main Street</line1>
        <line2>Apartment 9</line2>
        <city>OFallon</city>
        <country_subdivision>MO</country_subdivision>
        <postal_code>63368</postal_code>
        <country>USA</country>
     </address>
     <primary_phone>11234567890</primary_phone>
     <primary_email>test123@abcmail.com</primary_email>
     <preferences>
        <default_accounts>
           <sending>acct_mk32k324mg6wn19x</sending>
           <receiving>acct_mk32k324mg6wn19x</receiving>
        </default_accounts>
     </preferences>
</consumer>
```

### Consumer Account {#consumer-account}

#### Create - POST {#create---post-1}

Used by processors or acquirers to add an account for a registered consumer.

##### Request {#request-5}

**Sandbox URL:** [https://sandbox.api.mastercard.com/send/v1/partners/{partnerId}](https://sandbox.api.mastercard.com/send/v1/partners/%7BpartnerId%7D)​/consumers​/{consumerId}​/accounts  

**Production URL:** [https://api.mastercard.com/send/v1/partners/{partnerId}](https://api.mastercard.com/send/v1/partners/%7BpartnerId%7D)​/consumers​/{consumerId}​/accounts
* XML

```XML
<account> 
     <account_reference>AB123456</account_reference> 
     <label>JaneMC</label> 
     <account_uri> pan:5432123456789012;exp=2017-02;cvc=123</account_uri> 
     <name_on_account>Jane Tyler Smith</name_on_account> 
     <address> 
       <line1>1 Main St</line1> 
       <line2>Apartment 9</line2> 
       <city>OFallon</city> 
       <country_subdivision>MO</country_subdivision> 
       <postal_code>63368</postal_code> 
       <country>USA</country> 
     </address> 
</account>
```

##### Response {#response-3}

* XML

```XML
<account> 
     <id>acct_mk32k324mg6wn19x</id> 
     <resource_type>account</resource_type> 
     <account_reference>AB123456</account_reference> 
     <label>JaneMC</label> 
     <account_uri> pan:************9012</account_uri> 
     <brand>Mastercard</brand>
     <name_on_account>Jane Tyler Smith</name_on_account> 
     <address> 
        <line1>1 Main St</line1> 
        <line2>Apartment 9</line2> 
        <city>OFallon</city> 
        <country_subdivision>MO</country_subdivision> 
        <postal_code>63368</postal_code> 
        <country>USA</country> 
     </address>
</account>
```

#### Read by ID - GET {#read-by-id---get-1}

Used by processors or acquirers to retrieve an added account for a registered consumer.

##### Request {#request-6}

**Sandbox URL:** [https://sandbox.api.mastercard.com/send/v1/partners/{partnerId}](https://sandbox.api.mastercard.com/send/v1/partners/%7BpartnerId%7D)​/consumers​/{consumerId}​/accounts​/{accountId}  

**Production URL:** [https://api.mastercard.com/send/v1/partners/{partnerId}](https://api.mastercard.com/send/v1/partners/%7BpartnerId%7D)​/consumers​/{consumerId}​/accounts​/{accountId}

No body

##### Response {#response-4}

* XML

```XML
<account> 
	<id>acct_mk32k324mg6wn19x</id> 
	<resource_type>account</resource_type> 
	<account_reference>AB123456</account_reference> 
	<label>JaneMC</label> 
	<account_uri> pan:************9012</account_uri> 
        <brand>Mastercard</brand>
	<name_on_account>Jane Tyler Smith</name_on_account> 
	<address> 
		<line1>1 Main St</line1> 
		<line2>Apartment 9</line2> 
		<city>OFallon</city> 
		<country_subdivision>MO</country_subdivision> 
		<postal_code>63368</postal_code> 
		<country>USA</country> 
	</address>
</account>
	 
```

#### List - GET {#list---get}

Used by processors or acquirers to retrieve all added accounts for a particular consumer.

##### Request {#request-7}

**Sandbox URL:** [https://sandbox.api.mastercard.com/send/v1/partners/{partnerId}](https://sandbox.api.mastercard.com/send/v1/partners/%7BpartnerId%7D)​/consumers​/{consumerId}​/accounts  

**Production URL:** [https://api.mastercard.com/send/v1/partners/{partnerId}](https://api.mastercard.com/send/v1/partners/%7BpartnerId%7D)​/consumers​/{consumerId}​/accounts

No body

##### Response {#response-5}

* XML

```XML
<accounts> 
  <resource_type>list</resource_type> 
  <item_count>1</item_count> 
    <data> 
      <account> 
        <id>acct_mk32k324mg6wn19x</id> 
        <resource_type>account</resource_type> 
        <account_reference>AB123456</account_reference> 
        <label>JaneMC</label> 
        <account_uri> pan:************9012</account_uri> 
        <brand>Mastercard</brand>
        <name_on_account>Jane Tyler Smith</name_on_account>
        <address> 
          <line1>1 Main St</line1> 
          <line2>Apartment 9</line2> 
          <city>OFallon</city> 
          <country_subdivision>MO</country_subdivision> 
          <postal_code>63368</postal_code> 
          <country>USA</country> 
        </address>
      </account> 
    <!---multiple account resources--> 
  </data> 
</accounts> 
```

#### Update - PUT {#update---put-1}

Used by processors or acquirers to update information for a consumer account.

##### Request {#request-8}

**Sandbox URL:** [https://sandbox.api.mastercard.com/send/v1/partners/{partnerId}](https://sandbox.api.mastercard.com/send/v1/partners/%7BpartnerId%7D)​/consumers​/{consumerId}​/accounts​/{accountId}  

**Production URL:** [https://api.mastercard.com/send/v1/partners/{partnerId}](https://api.mastercard.com/send/v1/partners/%7BpartnerId%7D)​/consumers​/{consumerId}​/accounts​/{accountId}
* XML

```XML
<account> 
     <label>JaneMC</label> 
     <account_uri> pan:5432123456789012;exp=2017-02;cvc=123</account_uri> 
     <name_on_account>Jane Tyler Smith</name_on_account> 
     <address> 
       <line1>1 Main St</line1> 
       <line2>Apartment 9</line2> 
       <city>OFallon</city> 
       <country_subdivision>MO</country_subdivision> 
       <postal_code>63368</postal_code> 
       <country>USA</country> 
     </address> 
</account>
```

##### Response {#response-6}

* XML

```XML
<account> 
     <id>acct_mk32k324mg6wn19x</id> 
     <resource_type>account</resource_type> 
     <account_reference>AB123456</account_reference> 
     <label>JaneMC</label> 
     <account_uri> pan:************9012</account_uri> 
     <brand>Mastercard</brand>
     <name_on_account>Jane Tyler Smith</name_on_account> 
     <address> 
       <line1>1 Main St</line1> 
       <line2>Apartment 9</line2> 
       <city>OFallon</city> 
       <country_subdivision>MO</country_subdivision> 
       <postal_code>63368</postal_code> 
       <country>USA</country> 
     </address> 
</account> 
```

#### Delete - DELETE {#delete---delete-1}

Used by processors or acquirers to delete an account for a registered consumer.

##### Request {#request-9}

**Sandbox URL:** [https://sandbox.api.mastercard.com/send/v1/partners/{partnerId}](https://sandbox.api.mastercard.com/send/v1/partners/%7BpartnerId%7D)​/consumers​/{consumerId}​/accounts​/{accountId}  

**Production URL:** [https://api.mastercard.com/send/v1/partners/{partnerId}](https://api.mastercard.com/send/v1/partners/%7BpartnerId%7D)​/consumers​/{consumerId}​/accounts​/{accountId}

No body

##### Response {#response-7}

* XML

```XML
<account> 
    <id>acct_mk32k324mg6wn19x</id> 
    <resource_type>account</resource_type> 
    <account_reference>AB123456</account_reference> 
    <label>JaneMC</label> 
    <account_uri> pan:************9012</account_uri> 
    <brand>Mastercard</brand>
    <name_on_account>Jane Tyler Smith</name_on_account> 
    <address> 
        <line1>1 Main St</line1> 
        <line2>Apartment 9</line2> 
        <city>OFallon</city> 
        <country_subdivision>MO</country_subdivision> 
        <postal_code>63368</postal_code> 
        <country>USA</country> 
    </address> 
</account>
	 
```

### Consumer ContactID {#consumer-contactid}

#### Create - POST {#create---post-2}

Used by processors or acquirers to add a Contact ID for a registered consumer.

##### Request {#request-10}

**Sandbox URL:** [https://sandbox.api.mastercard.com/send/v1/partners/{partnerId}](https://sandbox.api.mastercard.com/send/v1/partners/%7BpartnerId%7D)​/consumers​/{consumerId}​/contact_ids  

**Production URL:** [https://api.mastercard.com/send/v1/partners/{partnerId}](https://api.mastercard.com/send/v1/partners/%7BpartnerId%7D)​/consumers​/{consumerId}​/contact_ids
* XML

```XML
<contact_id>   
	<contact_id_uri>tel:12125559175</contact_id_uri>  
</contact_id>
```

##### Response {#response-8}

* XML

```XML
<contact_id> 
	<id>cntc_3747dskr4hrfjjd</id> 
	<resource_type>contact_id</resource_type> 
	<contact_id_uri> tel:12125559175</contact_id_uri> 
</contact_id>
```

#### Read - GET {#read---get}

Used by processors or acquirers to retrieve an added Contact ID for a registered consumer.

##### Request {#request-11}

**Sandbox URL:** [https://sandbox.api.mastercard.com/send/v1/partners/{partnerId}](https://sandbox.api.mastercard.com/send/v1/partners/%7BpartnerId%7D)​/consumers​/{consumerId}​/contact_ids​/{contactId}  

**Production URL:** [https://api.mastercard.com/send/v1/partners/{partnerId}](https://api.mastercard.com/send/v1/partners/%7BpartnerId%7D)​/consumers​/{consumerId}​/contact_ids​/{contactId}

No body

##### Response {#response-9}

* XML

```XML
<contact_id> 
	<id>cntc_3747dskr4hrfjjd</id> 
	<resource_type>contact_id</resource_type> 
	<contact_id_uri> tel:12125559175</contact_id_uri> 
</contact_id>
```

#### List - GET {#list---get-1}

Used by processors or acquirers to retrieve all added Consumer Contact IDs for a registered consumer.

##### Request {#request-12}

**Sandbox URL:** [https://sandbox.api.mastercard.com/send/v1/partners/{partnerId}](https://sandbox.api.mastercard.com/send/v1/partners/%7BpartnerId%7D)​/consumers​/{consumerId}​/contact_ids  

**Production URL:** [https://api.mastercard.com/send/v1/partners/{partnerId}](https://api.mastercard.com/send/v1/partners/%7BpartnerId%7D)​/consumers​/{consumerId}​/contact_ids

No body

##### Response {#response-10}

* XML

```XML
<contacts>
	<resource_type>list</resource_type>
	<item_count>2</item_count>
	<data>
		<contact_id> 
 			<id>cntc_3747dskr4hrfjjd</id> 
  			<resource_type>contact_id</resource_type> 
  			<contact_id_uri> tel:12125559175</contact_id_uri> 
		 </contact_id>
		<contact_id> 
			 <id>cntc_3747dskr4hrfv46</id> 
			 <resource_type>contact_id</resource_type> 
			 <contact_id_uri> tel:12125556553</contact_id_uri> 
		</contact_id>
		<!---multiple contacts Id resources--> 
	</data> 
</contacts> 
```

#### Update - PUT {#update---put-2}

Used by processors or acquirers to update a Contact ID for a registered consumer.

##### Request {#request-13}

**Sandbox URL:** [https://sandbox.api.mastercard.com/send/v1/partners/{partnerId}](https://sandbox.api.mastercard.com/send/v1/partners/%7BpartnerId%7D)​/consumers​/{consumerId}​/contact_ids​/{contactId}  

**Production URL:** [https://api.mastercard.com/send/v1/partners/{partnerId}](https://api.mastercard.com/send/v1/partners/%7BpartnerId%7D)​/consumers​/{consumerId}​/contact_ids​/{contactId}
* XML

```XML
<contact_id>   
	<contact_id_uri>tel:12125559175</contact_id_uri>  
</contact_id>
```

##### Response {#response-11}

* XML

```XML
<contact_id> 
	<id>cntc_3747dskr4hrfjjd</id> 
	<resource_type>contact_id</resource_type> 
	<contact_id_uri>tel:12125559175</contact_id_uri> 
</contact_id>
```

#### Delete - DELETE {#delete---delete-2}

Used by processors or acquirers to delete a Contact ID for a registered consumer.

##### Request {#request-14}

**Sandbox URL:** [https://sandbox.api.mastercard.com/send/v1/partners/{partnerId}](https://sandbox.api.mastercard.com/send/v1/partners/%7BpartnerId%7D)​/consumers​/{consumerId}​/contact_ids​/{contactId}  

**Production URL:** [https://api.mastercard.com/send/v1/partners/{partnerId}](https://api.mastercard.com/send/v1/partners/%7BpartnerId%7D)​/consumers​/{consumerId}​/contact_ids​/{contactId}

No body

##### Response {#response-12}

* XML

```XML
<contact_id>
	<id>cntc_3747dskr4hrfjjd</id>
	<resource_type>contact_id</resource_type>
	<contact_id_uri>tel:12125559175</contact_id_uri> 
<contact_id> 
```

### Consumer GovernmentID {#consumer-governmentid}

#### Create - POST {#create---post-3}

Used by processors or acquirers to add a Government ID for a registered consumer.

##### Request {#request-15}

**Sandbox URL:** [https://sandbox.api.mastercard.com/send/v1/partners/{partnerId}](https://sandbox.api.mastercard.com/send/v1/partners/%7BpartnerId%7D)​/consumers​/{consumerId}​/government_ids  

**Production URL:** [https://api.mastercard.com/send/v1/partners/{partnerId}](https://api.mastercard.com/send/v1/partners/%7BpartnerId%7D)​/consumers​/{consumerId}​/government_ids
* XML

```XML
<government_id>   
	<government_id_uri>ppn:123456789;expiration-date=2019-05-27;issue-date=2011-07-12;issuing-country=USA;issuing-place=O'Fallon</government_id_uri>  
</government_id>
```

##### Response {#response-13}

* XML

```XML
<government_id>   	
	<id>govt_3747dskr4hrfjjd</id>  	
	<resource_type>government_id</resource_type> 
	<government_id_uri>ppn:*****6789;expiration-date=2019-05-27;issue-date=2011-07-12;issuing-country=USA;issuing-place=O'Fallon</government_id_uri>  
</government_id>
```

#### Read - GET {#read---get-1}

Used by processors or acquirers to retrieve a Government ID for a registered consumer.

##### Request {#request-16}

**Sandbox URL:** [https://sandbox.api.mastercard.com/send/v1/partners/{partnerId}](https://sandbox.api.mastercard.com/send/v1/partners/%7BpartnerId%7D)​/consumers​/{consumerId}​/government_ids​/{governmentId}  

**Production URL:** [https://api.mastercard.com/send/v1/partners/{partnerId}](https://api.mastercard.com/send/v1/partners/%7BpartnerId%7D)​/consumers​/{consumerId}​/government_ids​/{governmentId}

No body

##### Response {#response-14}

* XML

```XML
<government_id> 
	<id>govt_3747dskr4hrfjjd</id> 
	<resource_type>government_id</resource_type> 
	<government_id_uri>ppn:*****6789;expiration-date=2019-05-27;issue-date=2011-07-12;issuing-country=USA;issuing-place=O'Fallon</government_id_uri>
</government_id> 
```

#### List - GET {#list---get-2}

Used by processors or acquirers to retrieve all Government IDs for a registered consumer.

##### Request {#request-17}

**Sandbox URL:** [https://sandbox.api.mastercard.com/send/v1/partners/{partnerId}](https://sandbox.api.mastercard.com/send/v1/partners/%7BpartnerId%7D)​/consumers​/{consumerId}​/government_ids  

**Production URL:** [https://api.mastercard.com/send/v1/partners/{partnerId}](https://api.mastercard.com/send/v1/partners/%7BpartnerId%7D)​/consumers​/{consumerId}​/government_ids

No body

##### Response {#response-15}

* XML

```XML
<government_ids>
    <resource_type>list</resource_type>
    <item_count>2</item_count>
    <data>
        <government_id>
            <id>govt_3747dskr4hrfjjd</id>
            <resource_type>government_id</resource_type>
            <government_id_uri> 
               ppn:*****6789;expiration-date=2019-05-27;issue-date=2011-07-
               12;issuing-country=USA ;issuing-place=O'Fallon 
            </government_id_uri>
  	</government_id>
        <government_id>
            <id>govt_3748dskr4hrfjjd</id>
            <resource_type>government_id</resource_type>
            <government_id_uri> 
               ssn:*****9628 
            </government_id_uri>
  	</government_id>
    </data>
</government_ids> 
```

#### Update - PUT {#update---put-3}

Used by processors or acquirers to update a Government ID for a registered consumer.

##### Request {#request-18}

**Sandbox URL:** [https://sandbox.api.mastercard.com/send/v1/partners/{partnerId}](https://sandbox.api.mastercard.com/send/v1/partners/%7BpartnerId%7D)​/consumers​/{consumerId}​/government_ids​/{governmentId}  

**Production URL:** [https://api.mastercard.com/send/v1/partners/{partnerId}](https://api.mastercard.com/send/v1/partners/%7BpartnerId%7D)​/consumers​/{consumerId}​/government_ids​/{governmentId}
* XML

```XML
<government_id>   
	<government_id_uri>ppn:123456789;expiration-date=2019-05-27;issue-date=2011-07-12;issuing-country=USA;issuing-place=O'Fallon</government_id_uri>  
</government_id>
```

##### Response {#response-16}

* XML

```XML
<government_id> 
	<id>govt_3747dskr4hrfjjd</id> 
	<resource_type>government_id</resource_type> 
	<government_id_uri>ppn:*****6789;expiration-date=2019-05-27;issue-date=2011-07-12;issuing-country=USA;issuing-place=O'Fallon</government_id_uri>
</government_id>
```

#### Delete - DELETE {#delete---delete-3}

Used by processors or acquirers to delete a Government ID for a registered consumer.

##### Request {#request-19}

**Sandbox URL:** [https://sandbox.api.mastercard.com/send/v1/partners/{partnerId}](https://sandbox.api.mastercard.com/send/v1/partners/%7BpartnerId%7D)​/consumers​/{consumerId}​/government_ids​/{governmentId}  

**Production URL:** [https://api.mastercard.com/send/v1/partners/{partnerId}](https://api.mastercard.com/send/v1/partners/%7BpartnerId%7D)​/consumers​/{consumerId}​/government_ids​/{governmentId}

No body

##### Response {#response-17}

* XML

```XML
<government_id> 
	<id>govt_3747dskr4hrfjjd</id> 
	<resource_type>government_id</resource_type> 
	<government_id_uri>ppn:*****6789;expiration-date=2019-05-27;issue-date=2011-07-12;issuing-country=USA;issuing-place=O'Fallon</government_id_uri>
</government_id>
```

