# Add
source: https://developer.mastercard.com/iccp/documentation/05_api_reference/soap_api/purchaserequest/invoice_addenda_data/addaddenda/index.md

> Add up to 5000 invoice addenda records to a purchase request. In each request, send a maximum of 1000 invoice addenda records. Mastercard may change the limit on the number of records supported at a future date.
Note: Invoice addenda data is not supported for ICMP.

## 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}

{#fnref:1}

|                                                                              Names                                                                               |                                                                                                                                                                                            Description                                                                                                                                                                                            |                               Required for ICCP                                | Required for ICMP |     Type     |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------|-------------------|--------------|
| purchaseRequestId                                                                                                                                                | ID of an active purchase request. Cannot use ID of a canceled purchase request.                                                                                                                                                                                                                                                                                                                   | Yes                                                                            | No                | Numeric      |
| InvoiceNumber ^[1](https://developer.mastercard.com/iccp/documentation/05_api_reference/soap_api/purchaserequest/invoice_addenda_data/addaddenda/index.md#fn:1)^ | Number of an invoice up to 35 characters.                                                                                                                                                                                                                                                                                                                                                         | Yes                                                                            | No                | Alphanumeric |
| InvoiceCurrencyAmount                                                                                                                                            | Amount paid, up to 35 characters.                                                                                                                                                                                                                                                                                                                                                                 | No **NOTE:** Mandatory, if you specify the `CurrencyCode` parameter.           | No                | Numeric      |
| CurrencyCode                                                                                                                                                     | ISO 4217 Currency Codes                                                                                                                                                                                                                                                                                                                                                                           | No **NOTE** : Mandatory, if you specify the `InvoiceCurrencyAmount` parameter. | No                | Alphanumeric |
| CurrencyExponent                                                                                                                                                 | ISO 4217 Currency Codes                                                                                                                                                                                                                                                                                                                                                                           | No **NOTE** : Mandatory, if you specify the `InvoiceCurrencyAmount` parameter  | No                | Alphanumeric |
| CurrencySign                                                                                                                                                     | Credit or Debit                                                                                                                                                                                                                                                                                                                                                                                   | No **NOTE:** Mandatory, if you specify the `InvoiceCurrencyAmount` parameter   | No                | Alphanumeric |
| InvoiceDate                                                                                                                                                      | Date of an invoice in the format: YYYY-MM-DD                                                                                                                                                                                                                                                                                                                                                      | No                                                                             | No                | Date         |
| PONumber                                                                                                                                                         | Purchase order number provided by the company, up to 35 characters.                                                                                                                                                                                                                                                                                                                               | No                                                                             | Alphanumeric      | No           |
| moreAddendaExpected                                                                                                                                              | Whether or not you will make a follow up addAddenda call to add more invoice records. * Send as N/excluded from the request, the supplier email is sent after adding the invoice addenda records. * Send as Y if you are adding invoice addenda records through a series of API requests. In the final request, send the `moreAddendaExpected` parameter as N so that the supplier email is sent. | No                                                                             | No                | Boolean      |

### Sample request {#sample-request}

```xml
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
	<SOAP-ENV:Header/>
	<SOAP-ENV:Body>
		<ns2:addAddendaRequest xmlns="http://mastercard.com/sd/pc/service" xmlns:ns2="http://mastercard.com/sd/pc2/service">
			<ns2:purchaseRequestId>2187360</ns2:purchaseRequestId>
			<ns2:addendaData>
				<ns2:globalInvoiceRequest>
					<invoiceAddendum>
						<InvoiceNumber>2187360</InvoiceNumber>
						<InvoiceCurrencyAmount CurrencyCode="840" CurrencyExponent="1" CurrencySign="D">100</InvoiceCurrencyAmount>
						<InvoiceDate>2019-12-01</InvoiceDate>
						<PONumber>123</PONumber>
					</invoiceAddendum>
				</ns2:globalInvoiceRequest>
			</ns2:addendaData>
			<ns2:moreAddendaExpected>N</ns2:moreAddendaExpected>
		</ns2:addAddendaRequest>
	</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
```

## Response {#response}

For each request, you receive:

|                  Names                   |                          Description                           | Required |     Type      |
|------------------------------------------|----------------------------------------------------------------|----------|---------------|
| purchaseRequestId                        | ID of the purchase request.                                    | Yes      | Integer, long |
| responseDescription                      | A success message.                                             | Yes      | Alphanumeric  |
| All invoice details sent in the request. |                                                                | Yes      |               |
| Id                                       | Application assigned ID for each added invoice addenda record. | Yes      | Alphanumeric  |

### Sample response {#sample-response}

```xml
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
  <soapenv:Body>
    <ns2:addendaOperationResponse
      xmlns="http://mastercard.com/sd/pc/service"
      xmlns:ns2="http://mastercard.com/sd/pc2/service">
      <ns2:purchaseControlAddendaResponse>
        <ns2:purchaseRequestId>2187360</ns2:purchaseRequestId>
        <ns2:responseDescription>Request for Add Addenda successfully created.</ns2:responseDescription>
        <ns2:addendaDataResponse>
          <ns2:globalInvoiceResponse>
            <ns2:globalInvoiceAddendaResponse>
              <ns2:globalInvoiceAddendumResponse>
                <Id>0ADNff15f7c0bbfed0a1921e98593b8b0b6c10ecd80f9b92cd48431aa88ed7ef7df71588780932</Id>
                <InvoiceNumber>2187360</InvoiceNumber>
                <InvoiceCurrencyAmount CurrencySign="D" CurrencyExponent="1" CurrencyCode="840">100</InvoiceCurrencyAmount>
                <InvoiceDate>2019-12-01</InvoiceDate>
                <PONumber>123</PONumber>
              </ns2:globalInvoiceAddendumResponse>
            </ns2:globalInvoiceAddendaResponse>
          </ns2:globalInvoiceResponse>
        </ns2:addendaDataResponse>
      </ns2:purchaseControlAddendaResponse>
    </ns2:addendaOperationResponse>
  </soapenv:Body>
</soapenv:Envelope>
```

*** ** * ** ***

1. Mastercard recommends that unique invoice numbers are added to each purchase request. [↩︎](https://developer.mastercard.com/iccp/documentation/05_api_reference/soap_api/purchaserequest/invoice_addenda_data/addaddenda/index.md#fnref:1)

   {#fn:1}
{#fn:1}
