# Update Request API
source: https://developer.mastercard.com/cross-border-services/documentation/api-ref/rfi-apis/update-request-api/index.md

Alert: If you are a Customer contracted with MTS EU or MTS UK, please proceed to [Update Request API Specifications for EU](https://developer.mastercard.com/cross-border-services/documentation/api-ref/rfi-apis/psd2-eu-update-request-api/index.md) and [Update Request API Specification for UK](https://developer.mastercard.com/cross-border-services/documentation/api-ref/rfi-apis/psd2-uk-update-request-api/index.md) respectively to ensure compliance with the relevant jurisdiction based on Regulatory Technical Standards (either EU or UK) derived from the Revised Payment Services Directive (PSD2).

## API {#api}

[**Open Specification**](https://static.developer.mastercard.com/content/cross-border-services/swagger/RFI+Spec.yaml)

This API will be used by a Customer to provide a response to a RFI request assigned to the Customer. Look at the RFI process description [How it works](https://developer.mastercard.com/cross-border-services/documentation/api-ref/rfi-apis/how-it-works/index.md) for details on how to use the Update Request API for a cross border RFI solution.


API Reference: `POST /send/partners/{partner_id}/crossborder/rfi/requests/{request_id}`

* **Formats supported** : JSON   
* **HTTP Version**: 1.0/ 1.1
* **Required HTTP header parameters** :   
  content-type : Format of the inbound content being submitted. example: application/ json   
  content-length: Length of the inbound content body in octets.   
  Accept: Format of the expected response must be provided in this header field. Example- application/json

## Environment Domains {#environment-domains}

* Sandbox/MTF
* Production

```Sandbox/MTF
https://sandbox.api.mastercard.com/send/partners/{partner_id}/crossborder/rfi/requests/{request_id} 
```

```Production
 https://api.mastercard.com/send/partners/{partner_id}/crossborder/rfi/requests/{request_id}
```

## API Convention {#api-convention}

Take a look at the [API Conventions](https://developer.mastercard.com/cross-border-services/documentation/api-basics/api-conventions/index.md) for general guidelines.

## Payload Encryption {#payload-encryption}

All the request payload sent by you to Mastercard must be encrypted. And you will need to decrypt the payload sent by  
Mastercard.   

For more detailed information on payload **Encryption/ Decryption** , please see [here](https://developer.mastercard.com/cross-border-services/documentation/api-ref/encryption/index.md)

## Sandbox Testing {#sandbox-testing}

You can make API calls to the Sandbox server from your application code using the [tutorials](https://developer.mastercard.com/cross-border-services/documentation/tutorials/index.md), which involves creating a Mastercard Developers project and using the Sandbox keys to generate the required OAuth 1.0a Authorization Header.
Tip: During the onboarding process, Mastercard will assign a registered partner ID to test in the higher environments (MTF Test and Production). This partner ID will not be able to access the sandbox environment, but the customer can still access sandbox by using the non-registered partner ID.   
Any correctly formatted partner ID can be used in the sandbox. As a best practice, use the first 15 digits of your institution's name (alphanumeric and/or special characters, no spaces) as the Partner_ID.   
For testing in sandbox, please use unique transaction_reference on each run. Note: The sandbox does not return parameters unique to a specific Customer; such as pricing, limits, and corridor-specific data requirements, but allows you to test general call structure and responses outside of the production environment. After sandbox testing is completed, Customers meeting the eligibility requirements will be assigned a project manager to do integrated testing in the test environment that has been configured to include requested receiving corridors, current foreign exchange rates, and fixed and variable fees specific to the Customer.

### Test Cases {#test-cases}

<br />

|            Status            |                                             Test Case                                              |                                                                                                                                                                                          Action                                                                                                                                                                                          |
|------------------------------|----------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Success                      | Customer wants to attach a document in response to an RFI requests. RFI status is moved to Review. | 1. Trigger Upload Document with FileName and File content. 2. MC system will return a documentId in response. 3. Then Trigger Update Request with request-id starting with "011". For example - "011XXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" Use the documentId returned from Step 2 for one of the fields which accepts documents. 4. System will return request status "REVIEW" in response. |
| Success                      | Mastercard needs additional details for a RFI which was responded to by Customer.                  | 1. Trigger Retrieve Request with request-id starting with "022". For example - "022XXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX". 2. Status of the RFI will be INPROGRESS. 3. Then Trigger Update Request for same request -id. 4. System will return request status "REVIEW" in response.                                                                                                          |
| Success                      | Closure of RFI request                                                                             | 1. Trigger Update Request with request-id starting with "033". For example - "033XXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX". 2. System will return request status "REVIEW" in response. 3. Trigger Retrieve Request for the same request-id after 10 mins. 4. System will return status of "CLOSED" for RFI.                                                                                     |
| Rejected with specific error | Update Document with specific error code                                                           | 1.Trigger Update Request with request-id starting with '1' and ending with the desired error code. For example: '1XXXXXXX-XXXX-XXXX-XXXX-XXXXXX082000' will REJECT upload and return 082000 error code in response.                                                                                                                                                                      |

## Sample Request {#sample-request}

### 1. Customer response for Sender's full name. {#1-customer-response-for-senders-full-name}

* JSON

```JSON
{
	"updateRequest": {
		"sender": {
			"fullName": "John Doe"
		}
	}
}
```

### 2. Customer response for Sender's full name with comments. {#2-customer-response-for-senders-full-name-with-comments}

* JSON

```JSON
{
	"updateRequest": {
		"sender": {
			"fullName": "John Doe"
		}
	},
	"other": {
		"comment": " Name was recently updated due to marriage"
	}
}
```

### 3. Response for all data fields. {#3-response-for-all-data-fields}

* JSON

```JSON
{
	"updateRequest": {
		"sender": {
			"fullName": "John Doe",
			"dateOfBirth": "1956-04-24",
			"placeOfBirth": "USA",
			"nationality": "USA",
			"governmentId": {
				"type": "Passport",
				"number": "KJ3479D2"
			},
			"fullAddress": {
				"addressLine1": "42 WEST ELM AVENUE",
				"addressLine2": "Suite 100",
				"city": "ANYTOWN",
				"countrySubdivision": "New Mexico",
				"country": "USA",
				"postalCode": "69999"
			},
			"sourceOfIncome": "Salary"
		},
		"recipient": {
			"fullName": "Joseph Bloggs",
			"dateOfBirth": "1983-10-12",
			"placeOfBirth": "BEL",
			"nationality": "BEL",
			"governmentId": {
				"type": "Driver's License",
				"number": "ABCF-4658776"
			},
			"fullAddress": {
				"addressLine1": "Global AVENUE",
				"addressLine2": "No-5432",
				"city": "XYZPlace",
				"country": "BEL",
				"postalCode": "1234"
			}
		},
		"paymentAndDocs": {
			"senderRecipientRelation": "Friend",
			"paymentPurpose": "Child support"
		},
		"other": {
			"comment": "Added Details"
		}
	}
}
```

### 4.Customer response for copy of recipient's address. {#4customer-response-for-copy-of-recipients-address}

* JSON

```JSON
{
	"updateRequest": {
		"recipient": {
			"fullAddress": {
				"documents": [
					"70787e97-d223-445a-98f3-dcc247f149e7"
				]
			}
	}
}
}
```

### 5.RFI response with field which accepts document id. {#5rfi-response-with-field-which-accepts-document-id}

* JSON

```JSON
{
	"updateRequest": {
		"sender": {
			"governmentId": {
				"documents": [
					"30028494-f6b1-4a10-a94f-f6ffe2f76e2b"
				]
			},
			"fullAddress": {
				"documents": [
					"301c32f1-f148-431b-8eaa-42d7d31d5957"
				]
			},
			"additionalDocuments": [
				"c04acab8-538d-4a3a-9cd3-5f28303c36b3"
			]
		},
		"recipient": {
			"governmentId": {
				"documents": [
					"8039a6f3-2bdc-4880-8b0f-1cfa8d8e6f7a"
				]
			},
			"fullAddress": {
				"documents": [
					"70787e97-d223-445a-98f3-dcc247f149e7"
				]
			},
			"additionalDocuments": [
				"d05c1475-794a-4bc9-b6e5-21f633f25dba"
			]
		},
		"paymentAndDocs": {
			"supportingDocs": [
				"904c63a6-6220-4d94-8abd-a1d1f19354c1"
			],
			"additionalDocuments": [
				"8039a6f3-2bdc-4880-8b0f-1cfa8d8e6f7a"
			]
		},
		"other": {
			"additionalDocuments": [
				"8039a6f3-2bdc-4880-8b0f-1cfa8d8e6f7a",
				"301c32f1-f148-431b-8eaa-42d7d31d5957",
				"8039a6f3-2bdc-4880-8b0f-1cfa8d8e6f7a"
			]
		}
	}
}
```

#### 6.RFI response when additional questions are requested. {#6rfi-response-when-additional-questions-are-requested}

* JSON

```JSON
{
  "updateRequest": {
		"sender": {
      "additionalQuestion": "Friend stays with me"
    },
    "recipient": {
      "additionalQuestion": "PassportId -GTU35789"
    },
    "paymentAndDocs": {
      "additionalQuestion": "Reason for three different payment in 24 hours to same beneficiary is because of limit on amount for one transactions"
    },
    "other": {
      "comment": "Added Details"
     }
    }
}
```

## Sample Response {#sample-response}

* JSON

```JSON
{
  "updateResponse": {
    "referenceId": "dlitsjsbTV77MrAHEKolaATXdaWiHgHB",
    "requestStatus": "REVIEW"
  }
}
```

## Error Codes {#error-codes}

Please refer to complete list of error codes [here](https://developer.mastercard.com/cross-border-services/documentation/response-error-codes/index.md).

For information about the HTTP response codes that may be returned for your API requests, see [HTTP Response Codes](https://developer.mastercard.com/cross-border-services/documentation/response-error-codes/http-response-codes/index.md).

### Timeout {#timeout}

Please allow at least 40 seconds to receive a response from the RFI APIs before considering the request to have timed out, at which point you may retry the call. If consistent timeouts occur, please contact the Cross Border Services Customer Support team at **[crossborder.services.support@mastercard.com](mailto:crossborder.services.support@mastercard.com)**.
