Re: Exception when calling MerchantSearchApi - HttpClientErrorException: 404 Not Found

Solved! Go to solution
sruthi
Helper

Exception when calling MerchantSearchApi - HttpClientErrorException: 404 Not Found

Hi Team, I am getting org.springframework.web.client.HttpClientErrorException: 404 Not Found when trying to invoke merchant search API. I am using the sample project downloaded to invoke the API. Below is the request I am sending :

 

https://sandbox.api.visa.com/merchantsearch/v1/search

<POST https://sandbox.api.visa.com/merchantsearch/v1/search,class MerchantSearchpostPayload {
responseAttrList: GNSTANDARD
header: class Header {
messageDateTime: null
startIndex: null
requestMessageId: 3d79034d-4e11-41ff-bedb-71a934445716
}
searchAttrList: class SearchAttrList {
merchantCity: null
merchantStreetAddress: null
merchantName: STARBUCKS
merchantState: null
visaMerchantId: null
acquiringBin: null
merchantUrl: null
merchantPhoneNumber: null
acquirerCardAcceptorId: null
merchantCountryCode: 840
merchantPostalCode: null
visaStoreId: null
businessRegistrationId: null
}
searchOptions: class SearchOptions {
wildcard: merchantName
matchScore: true
maxRecords: 5
proximity: merchantName
matchIndicators: true
}
},{Accept=[application/json], Content-Type=[application/json], Authorization=[Basic RFpJOEpHT05UUFk0OEZITDdaNzQyMVBLVC1RYjRTUThGMDFEMTlSZkxkdXgzRXQ3dzpOcWdYOXhoM2dPM0Z2OGd3], User-Agent=[VDP_SampleCode_Java]}>

 

Could you suggest on how to resolve this error. 

3 REPLIES 3
API_Managers
Visa Developer Support Specialist

Re: Exception when calling MerchantSearchApi - HttpClientErrorException: 404 Not Found

Hey @sruthi,

 

Are you using our test data? Please note, that when you create a test App in our sandbox you will receive test data in your App. The test data for your Visa Developer application is available in the Dashboard under test data in the left navigation, this will ensure that you are using valid data that has been provisioned for specific scenarios. You will basically have a table per API that is split into the Request and Response sections and the values on the Request section are meant to be populated in the payload with the intention of obtaining results specified in the Response section.
 
Sandbox data is limited to what is provided in the Test Data tables and is not integrated to the Visa Network and you cannot test real data in sandbox. 

20190905 Test Data.png

 

Please refer to the Visa Developer Error Codes provided below. 

 

Payload and URI Error Code

HTTP STATUS: NOT FOUND

HTTP CODE: 404

CAUSE/RESOLUTION: The project is trying to hit an endpoint that does not exist. Refer to the API documentation to validate you are hitting the right endpoint.


We recommend you to use the Postman, SOAP UI, or VDP Playground tool to test the APIs. Please see user guides below for respective tools.
 
Postman – https://developer.visa.com/pages/working-with-visa-apis/two-way-ssl#testing_twoway_ssl_connectivity_... 
 
SOAP UI – https://developer.visa.com/pages/working-with-visa-apis/two-way-ssl#testing_twoway_ssl_connectivity_... 
 
VDP Playground – https://community.developer.visa.com/t5/Developer-Tools/How-to-test-and-troubleshoot-APIs-with-the-V... 

 

If the error persists, please provide the following information:

1. Endpoint
2. Request Header
3. Request Body
4. Response Header (include the x-correlation-id)
5. Response Body

Using SoapUI, you can find the x-correlation-id in the Raw Tab of the response header.

 




Thanks,

Tee



Was your question answered? Don't forget to click on "Accept as Solution" to help other devs find the answer to the same question.

sruthi
Helper

Re: Exception when calling MerchantSearchApi - HttpClientErrorException: 404 Not Found

Thanks! Testing the API through postman was successful. Hence I was able to integrate the API in my project. Thanks for the support 🙂

API_Managers
Visa Developer Support Specialist

Re: Exception when calling MerchantSearchApi - HttpClientErrorException: 404 Not Found

Hey @sruthi,

 

That's great to hear you received a successful response in Postman. Good job and you're welcome, I'm always happy to help.

 




Thanks,

Tee



Was your question answered? Don't forget to click on "Accept as Solution" to help other devs find the answer to the same question.