API Key
Authentication and Security
Requests must use TLS 1.2 (or higher) with known secure ciphers. The Data Enhancement uses the same authentication as the MDX, SSO, and Nexus APIs. You must have your IP address whitelisted, include theMD-API-KEY header with your respective api_key, and have a setting turned on in your client to get access to this service. MX also assigns a client ID; this value must be given as the client_id parameter in each request URL.
Base URL
The URL endpoint in the API has a base URL that will depend on the environment being addressed:Production Environment
Integration Environment (for initial integration testing)
Headers
Accept Header
All requests require an Accept header to specify the version and the encoding of the desired response body.Content-Type Header
All requests require a Content-Type header to specify the format of the request body.Errors
The API uses conventional HTTP response codes to indicate success or failure of an API request. In general, codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that resulted from the provided information (e.g., a required parameter was missing, etc.), and codes in the 5xx range indicate an error with MX’s servers.- 200 OK — Everything worked as expected.
- 400 Bad Request — Invalid parameter or body information.
- 401 Unauthorized — No valid API key provided.
- 403 Forbidden — The IP address doesn’t match the API key provided or the service is not enabled for the client.
- 404 Not Found — The requested item doesn’t exist.
- 500, 502, 503, 504 Server errors — Something went wrong on MX’s end.
Null Values
Fields may return a value ofnull in any number of circumstances, most often when data associated with the field does not exist.
Here are a few examples:
- A
categoryobject that is already a parent/top-level will have anullvalue in itsparent_guidfield. - A
transactionfor which no merchant information exists will have anullvalue for itsmerchant_guidandmerchant_location_guidfields. - A
merchantmay exist in our system but have no logo available; in that casedefault_no_image.pngis returned.
Transaction IDs
The API is used to categorize and describe transactions based on the information provided in a request. When possible, MX also returns merchant and merchant location information with each transaction. No data is actually created or stored on the MX platform when using Sherlock. Therefore, MX recommends anid be provided with each transaction provided. This id can be used to identify the transactions in the response body since they may not be returned in the same order.
