Re: merchantlocator "code": "9501" Invalid input found, please correct the input

VB1
Helper

merchantlocator "code": "9501" Invalid input found, please correct the input data

I was using following request and till last month it was working fine but today I retried again to access merchantlocator api (https://sandbox.api.visa.com/merchantlocator/v1/locator) , Basic Auth,  following request :

{
"searchOptions": {
"matchScore": "true",
"maxRecords": "5",
"matchIndicators": "true"
},
"header": {
"startIndex": "0",
"requestMessageId": "Request_001",
"messageDateTime": "2016-04-12T22:41:17.903"
},
"searchAttrList": {
"distanceUnit": "M",
"distance": "2",
"merchantCountryCode": "840",
"latitude": "37.363922",
"longitude": "-121.929163",
"merchantName": "Starbucks"
},
"responseAttrList": [
"GNLOCATOR"
]
}

but now I m getting following response :Starbucks

{
    "responseStatus": {
        "code""9501",
        "severity""ERROR",
        "message""Invalid input found, please correct the input data",
        "info""",
        "status""400"
    }
}
 
I tried to access other API like https://sandbox.api.visa.com/forexrates/v2/foreignexchangerates and I am getting proper response.
Please suggest what is the issue with Merchant Locator API request?
 
Regards,
Vaibhav

 

6 REPLIES 6
I_Doroteo3
Visa Developer Support Specialist

Re: merchantlocator "code": "9501" Invalid input found, please correct the input

Hi @VB1

 

I'll reach out to the product team regarding this issue and let you know when I receive a response.

 

Thanks, 

Illana

VB1
Helper

Re: merchantlocator "code": "9501" Invalid input found, please correct the input

One more point to mention : I tried by using  API reference example but same issue is coming for merchantlocator api: 

https://developer.visa.com/capabilities/merchant_locator/reference#tag/Merchant-Locator-API/operatio...

 

 

ApiRefError.JPG

I_Doroteo3
Visa Developer Support Specialist

Re: merchantlocator "code": "9501" Invalid input found, please correct the input

Hi @VB1

 

The Merchant Locator product page on VDP is in the process of being shut down over the next few weeks. Instead, the same endpoint is available under Merchant Search product page (Nearby Merchants API -> Merchant Locator).  Any testing for Merchant locator should be done there.

 

Hope this helps!

 

Thanks, 

Illana

VB1
Helper

Re: merchantlocator "code": "9501" Invalid input found, please correct the input

Hi Illana,

 

As you suggested to use following API : Nearby Merchants API -> Merchant Locator

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

but it has MerchantName as a required field but my requirements are not to search single merchant but I need to search all merchants with merchantCategoryCode :  "5541", "5542" with in some configured proximity near given latitude/longitude and for me best fit API is : 

https://sandbox.api.visa.com/merchantlocator/v1/locator

but I am unable to get proper response of  following request: 

 

(https://sandbox.api.visa.com/merchantlocator/v1/locator) , Basic Auth,  following request :

{
"searchOptions": {
"matchScore": "true",
"maxRecords": "5",
"matchIndicators": "true"
},
"header": {
"startIndex": "0",
"requestMessageId": "Request_001",
"messageDateTime": "2016-04-12T22:41:17.903"
},
"searchAttrList": {
"distanceUnit": "M",
"distance": "2",
"merchantCountryCode": "840",
"latitude": "37.363922",
"longitude": "-121.929163",
"merchantName": "Starbucks"
},
"responseAttrList": [
"GNLOCATOR"
]
}

but now I m getting following response :

{
    "responseStatus": {
        "code""9501",
        "severity""ERROR",
        "message""Invalid input found, please correct the input data",
        "info""",
        "status""400"
    }
}
 
I tried to access other API like https://sandbox.api.visa.com/forexrates/v2/foreignexchangerates and I am getting proper response.
Please suggest what changes I need to do in mentioned request for calling Merchant Locator API to get proper response? any hint your product team provided yet?
 
Regards,
Vaibhav

 

 

VB1
Helper

Re: merchantlocator "code": "9501" Invalid input found, please correct the input

Hi Illana,

 

Any update from product team? I tried to access Nearby Merchants API -> Merchant Locator (https://sandbox.api.visa.com/merchantsearch/v1/locator) , but seems like it is not fit for our requirement as it has required merchantName field and we need to find all merchants based on merchant code, latitude, longitude, configured proximity so we need  following  API to use: https://sandbox.api.visa.com/merchantlocator/v1/locator

Please suggest what is the problem in my initial payload shared with you?

 

I_Doroteo3
Visa Developer Support Specialist

Re: merchantlocator "code": "9501" Invalid input found, please correct the input

Hi @VB1

 

The product team's response was shared in my post above- their advice was to use the Merchant Search API for your use case. 

 

If you go to the Merchant Search API Reference page, under Merchant Locator you can toggle the object buttons (to the right of "One of:") to search for merchantName or merchantCategoryCode

 
 
 

Capture.PNG

 

Hope this helps!

 

Thanks, 

Illana