{"method":"GET","path":"https://api.revcent.com/v2/transactions/search","summary":"Search Transactions","description":"Search previously created transactions using a search term. Useful for finding a transaction when you do not know the transaction ID and wish to retrieve the details of a specific transaction. Once a transaction has been found, use an individual search results' id property and the GetTransaction operation to retrieve the transaction details.<br><br>Important: If using the SearchTransactions and GetTransaction method within a public facing flow, i.e. a visitor is providing the search input in a public chat bot, it is highly recommended that you also verify the visitor is indeed related to the transaction using a secondary non-provided value, such as the customer email in the GetTransaction response, before providing information or taking action. View markdown documentation at https://revcent.com/documentation/markdown/mcp/operation/SearchTransactions.md for an in-depth overview of this operation.","operationId":"SearchTransactions","parameters":[{"name":"search_term","description":"The single search term or phrase. The search term will be used to find transactions using a full-text search engine. The search engine analyzes the following fields:<br><table class=\"table table-bordered\"><thead class=\"small\"><tr><th>Field</th> <th>Description</th></tr></thead> <tbody><tr><td>id</td> <td>The RevCent ID of the transaction.</td></tr> <tr><td>first_6</td> <td>The first 6 digits of the credit card used.</td></tr> <tr><td>last_4</td> <td>The last 4 digits of the credit card used.</td></tr> <tr><td>gateway_transaction_id</td> <td>The gateway transaction ID.</td></tr> <tr><td>metadata</td> <td>All metadata values within a transaction.</td></tr></tbody></table>","in":"query","required":true,"schema":{"type":"string"},"style":"form"}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"additionalProperties":false,"properties":{},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"description":"","properties":{"api_call_id":{"type":"string","description":"A 20 character API call ID.","minLength":20,"maxLength":20},"api_call_unix":{"description":"Unix timestamp of when the API call was initiated.","type":"integer","format":"unix-time"},"code":{"description":"API call response code.","type":"integer","format":"int32","enum":[1]},"results":{"items":{"type":"object","additionalProperties":false,"properties":{"item_type":{"type":"string","description":"The item type returned in the search result.","enum":["transaction"]},"id":{"type":"string","description":"A 20 character transaction ID.","minLength":20,"maxLength":20},"created_date_unix":{"description":"The unix timestamp of when the item was created.","type":"integer","format":"unix-time"},"first_name":{"type":"string","description":"The customer first name."},"last_name":{"type":"string","description":"The customer last name."},"email":{"type":"string","format":"email","description":"The customer email."},"card_id":{"type":"string","description":"A 20 character customer card ID.","minLength":20,"maxLength":20},"first_6":{"type":"string","description":"The first 6 digits of the credit card used."},"last_4":{"type":"string","description":"The last 4 digits of the credit card used."},"gateway_transaction_id":{"type":"string","description":"The originating gateway transaction ID."},"request_type":{"type":"string","description":"The request type that created the transaction."},"request_method":{"type":"string","description":"The request method that created the transaction."},"approved":{"type":"boolean","description":"Whether or not the transaction was approved."},"metadata":{"items":{"additionalProperties":false,"properties":{"name":{"type":"string","description":"A name paired to the value for the metadata object. Limited to 100 characters in length.","minLength":1,"maxLength":100},"value":{"type":"string","description":"A value paired to the name for the metadata object. Limited to 255 characters in length.","minLength":1,"maxLength":255}},"type":"object","required":["name","value"]},"type":"array","description":"An array of metadata objects, each metadata object being a name and value pair."},"url":{"type":"string","description":"The direct URL to the transaction details page in RevCent."},"highlights":{"items":{"type":"object","additionalProperties":false,"properties":{"field":{"type":"string","description":"The search field where the highlighted match was found."},"values":{"type":"array","description":"The values that matched within the search field.","items":{"type":"string","description":"The individual value that matched."}}}},"type":"array","description":"The fields that matched within the result, indicated by the search engine."},"score":{"type":"number","description":"The score for the individual search result. The score is determined by the search engine, with a higher score meaning a better match.","format":"float"}}},"type":"array"}},"type":"object","additionalProperties":false}}},"description":"Successful response."},"default":{"content":{"application/json":{"schema":{"description":"","properties":{"api_call_id":{"type":"string","description":"A 20 character API call ID.","minLength":20,"maxLength":20},"api_call_unix":{"description":"Unix timestamp of when the API call was initiated.","type":"integer","format":"unix-time"},"code":{"description":"This value indicates that there is an error. Will always be 0.","type":"integer","enum":[0]},"error_code":{"description":"The specific error code.","type":"string"},"message":{"description":"A human readable description of the error.","type":"string"},"result":{"description":"A description of the API call result.","type":"string"}},"title":"APIStandardErrors","type":"object","additionalProperties":false}}},"description":"Error response."}}}