List request
Sending multiple transactions in one request
Overview
After you've made a simple GET request, you can use a List request to send multiple transactions at once in a single request. This is typically used for the List view of transactions in Bank apps.
Start by constructing a JSON object containing transactions you wish to enrich. Send that JSON object in a POST request to the /api/v3/merchant/list
endpoint, and MRS will return JSON containing the merchants found for those transactions.
Request Size
List requests are recommended to contain 25 or less elements. Requests with higher amounts can be supported. Very long lists might have an impact on response times. Please contact us with any questions on this.
Transaction Ids
Each transaction must have a unique id property, which is used to identify the transaction in the response.
The id only has to be unique for this request, and can be any string. You could use the numeric index of the transaction in the transaction array, generate a unique UUID then and there for each transaction, etc.
This id is required when submitting Crowdsourcing reports, as it is used to identify the transaction within the request. The other parameters for each transaction are the same as the individual
/v3/merchant
GET request (see Quick Start).
Type
Typically it's recommended to use
restrictive
calls for List requests. See Restrictive vs Extended
Example Code
curl --request POST
--url https://
regional-snowdrop-domain-goes-here.com
/api/v3/merchant/list
--header 'Content-Type: application/json'
--header 'X-Api-Key:
<YOUR-API-KEY>
'
--data '{ "type": "restrictive", "transactions": [ { "merchant_name": "mcdonalds", "location": "london", "country": "GBR", "id": "1" }, { "merchant_name": "starbucks", "location": "Manchester", "id": "2", "country": "GBR" }, { "merchant_name": "ikea", "location": "Malmo", "id": "3", "country": "GBR" } ] }'
The returned response contains the enriched transactions in JSON format:
This is a JSON object containing one property per transaction sent.
The keys of this object are the ID that was provided, previously passed in as the id
property in each transaction array element.
For more on the meaning of these fields, consult the OpenAPI Docs .
Remember, the example above is simple, but you should add as many fields as you can for the best results. See Data. How to get the best results.
Having problems? Consult Troubleshooting or FAQ.
Last updated
Was this helpful?