# Transaction Lookup History

## Get merchant lookup history

> Returns filtered lookup records for a given merchant. Requires a valid JWT token. The merchantId in the path must match one of the associated merchants from the token.<br>

```json
{"openapi":"3.0.1","info":{"title":"TxFind API's Version 2 Endpoints","version":"2.0.0"},"tags":[],"servers":[{"url":"https://{baseUrl}","description":"Current server"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"paths":{"/merchant/{merchantId}/lookupHistory":{"post":{"summary":"Get merchant lookup history","description":"Returns filtered lookup records for a given merchant. Requires a valid JWT token. The merchantId in the path must match one of the associated merchants from the token.\n","tags":["Merchant Lookup"],"parameters":[{"name":"merchantId","in":"path","required":true,"description":"Merchant ID to query lookup history for","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sortField":{"type":"string"},"order":{"type":"string","enum":["ASC","DESC"]},"field":{"type":"array","items":{"type":"string","enum":["txShieldOICartReference","provider","service","lookupReference","cardBin","cardLast4","transactionDate","lookupDate"]},"description":"Fields to apply filters on. This array must be the same length as `value` and `operator`, \nwith each index corresponding to a filter condition. \nFor example, field[0] + operator[0] + value[0] form a complete filter clause.\n"},"value":{"type":"array","items":{"type":"string"},"description":"Values to compare against each `field`, matched by index. \nFor example, value[0] applies to field[0] using operator[0].\n"},"operator":{"type":"array","items":{"type":"string"},"description":"Operators used for each filter condition. Must match the `field` and `value` array indexes.\n"},"dateFrom":{"type":"string","format":"date-time"},"dateTo":{"type":"string","format":"date-time"}}}}}},"responses":{"200":{"description":"Successful response with list of lookups","content":{"application/json":{"schema":{"type":"object","properties":{"datalist":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"txShieldOICartReference":{"type":"string"},"provider":{"type":"string"},"service":{"type":"string"},"lookupReference":{"type":"string"},"cardBin":{"type":"string","nullable":true},"cardLast4":{"type":"string","nullable":true},"transactionDate":{"type":"string","format":"date-time","nullable":true},"lookupDate":{"type":"string","format":"date-time"},"receivedData":{"type":"object","properties":{"source":{"type":"string"},"cardBin":{"type":"string"},"cardLast4":{"type":"string"},"transactionDate":{"type":"string","format":"date-time"},"transactionAmount":{"type":"object","properties":{"amount":{"type":"number"},"currency":{"type":"string"}}},"authCode":{"type":"string"},"terminalId":{"type":"string"},"cardAcceptorId":{"type":"string"},"transactionId":{"type":"string"},"transactionType":{"type":"string"},"paymentDescriptor":{"type":"string"},"paymentDescriptorContact":{"type":"string"},"acquirerBin":{"type":"string"},"mcc":{"type":"string"},"verifiEntityInfo":{"type":"object","properties":{"partnerId":{"type":"integer"},"clientId":{"type":"integer"}}},"transactionRequestId":{"type":"string"},"paymentType":{"type":"string"},"insightId":{"type":"string"},"purchaseIdentifier":{"type":"string"}}},"returnData":{"type":"object","properties":{"receipt":{"type":"object","properties":{"paymentInformation":{"type":"object","properties":{"paymentTotalAmount":{"type":"object","properties":{"amount":{"type":"number"},"currency":{"type":"string"}}}}},"productsPurchasedList":{"type":"array","items":{"type":"object","properties":{"productDescription":{"type":"string"},"unitPriceAmount":{"type":"object","properties":{"amount":{"type":"number"},"currency":{"type":"string"}}},"quantity":{"type":"integer"}}}}}},"merchantInformation":{"type":"object","properties":{"merchantName":{"type":"string"},"merchantUrl":{"type":"string"},"merchantContactPhone":{"type":"string"},"storeDetails":{"type":"object","properties":{"storeName":{"type":"string"}}}}},"customerInformation":{"type":"object","properties":{"accountId":{"type":"string"}}},"deliveryAddress":{"type":"object","properties":{"address1":{"type":"string"},"address2":{"type":"string"},"city":{"type":"string"},"region":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"}}},"device":{"type":"object","properties":{"ipAddress":{"type":"string"}}}}},"errorMessage":{"type":"string","nullable":true},"merchantCart":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"txShieldOICartReference":{"type":"string"},"transactionDate":{"type":"string","format":"date-time"},"cardBin":{"type":"string"},"cardLast4":{"type":"string"},"amount":{"type":"number"},"currency":{"type":"string"},"paymentDescriptor":{"type":"string"},"merchantId":{"type":"string"},"dateCreated":{"type":"string","format":"date-time"},"email":{"type":"string"},"alertHappened":{"type":"boolean"},"alertReference":{"type":"string","nullable":true},"chargebackHappened":{"type":"boolean"},"chargebackReference":{"type":"string","nullable":true}}}},"merchantId":{"type":"string"},"merchantName":{"type":"string"}}}},"total":{"type":"integer"}}}}}},"400":{"description":"Bad Request - Missing merchantId or invalid format","content":{"application/json":{"schema":{"type":"object","properties":{"msg":{"type":"string"}}}}}},"403":{"description":"Forbidden - Token not authorized for this merchant","content":{"application/json":{"schema":{"type":"object","properties":{"msg":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"msg":{"type":"string"}}}}}}}}}}}
```
