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

> In a request, delete up to 1000 invoice addenda records for a purchase request. Mastercard may change this record limit at a future date.
> Suppliers configured to receive email notifications receive the remaining invoice addenda records and the VCN details.
> You can also use the deleteAddendaSet element to delete all invoice addenda records for a purchase request.

## Parameters {#parameters}

|        Names        |                                                                                                                                                                                      Description                                                                                                                                                                                      |                                 Required                                  |  Type   |
|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------|---------|
| purchaseRequestId   | ID of an active purchase request.                                                                                                                                                                                                                                                                                                                                                     | Yes                                                                       | Numeric |
| id                  | ID of an invoice addenda record.                                                                                                                                                                                                                                                                                                                                                      | Yes **NOTE:** Not required when you use the `deleteAddendaSet` parameter. | Numeric |
| deleteAddendaSet    | Deletes all invoice addenda records from a purchase request.                                                                                                                                                                                                                                                                                                                          | Yes **NOTE:** Not required when you use the `ID` parameter.               | Boolean |
| moreAddendaExpected | Whether or not you will make a follow up deleteAddenda call to delete more invoice records. * When set to N, the supplier email is sent after deleting the invoice addenda records. * Send as Y if you are deleting 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                                                                        | Boolean |

### Sample request 1 {#sample-request-1}

To delete individual invoice addenda records, send:

* A purchase request Id.
* The IDs of invoice addenda records.

```xml
<soapenv:Envelope xmlns:ser="http://mastercard.com/sd/pc2/service" xmlns:ser1="http://mastercard.com/sd/pc/service">
	<soapenv:Header/>
	<soapenv:Body>
		<ser:deleteAddendaRequest>
			<ser:purchaseRequestId>900497</ser:purchaseRequestId>
			<ser:addendaIds>
				<ser1:globalInvoiceIds>
					<ser1:id>0ADNc4548a59ab4dfa7a8dab84a7ec6973d2cc7e9097100f27d24473b754e73106201558448933</ser1:id>
					<ser1:id>0ADNacc7a851bf3d1dcd86f35a004903d7a388965b1d4bd12857860521f6f02d9c061558448943</ser1:id>
					<ser1:id>0ADN6a858372d3b76ea617e0fe40e1a9c731f71103779f93d30903654298d1bb35d61558448920</ser1:id>
					<ser1:id>0ADN1dbf0c74f732fd4dd36a028e0e296e8cf10e9f2551547563f8fa5d2b113960eb1558446992</ser1:id>
				</ser1:globalInvoiceIds>
			</ser:addendaIds>
		</ser:deleteAddendaRequest>
	</soapenv:Body>
</soapenv:Envelope>
```

### Sample Request 2 {#sample-request-2}

To delete all invoice addenda records for a purchase request, send:

* A purchase request ID.
* The `deleteAddendaSet` parameter as Y.

```xml
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"	xmlns:ser="http://mastercard.com/sd/pc2/service" xmlns:ser1="http://mastercard.com/sd/pc/service">
	<soapenv:Header/>
	<soapenv:Body>
		<ser:deleteAddendaRequest>
			<ser:purchaseRequestId>900497</ser:purchaseRequestId>
			<ser:deleteAddendaSet>Y</ser:deleteAddendaSet>
		</ser:deleteAddendaRequest>
	</soapenv:Body>
</soapenv:Envelope>
```

## Response {#response}

For each request, you receive:

* The purchase request ID.
* A success message which has the number of records deleted.

### Sample Response {#sample-response}

```xml
<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>900497</ns2:purchaseRequestId>
				<ns2:responseCode>Success</ns2:responseCode>
				<ns2:responseDescription>The application successfully deleted 6 addenda records for the purchase request ID 900497</ns2:responseDescription>
			</ns2:purchaseControlAddendaResponse>
		</ns2:addendaOperationResponse>
	</soapenv:Body>
</soapenv:Envelope>
```

