curl --request GET \
--url https://int-api.mx.com/merchant_locations/{merchant_location_guid} \
--header 'Accept-Version: <accept-version>' \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://int-api.mx.com/merchant_locations/{merchant_location_guid}"
headers = {
"Accept-Version": "<accept-version>",
"Authorization": "Basic <encoded-value>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Accept-Version': '<accept-version>', Authorization: 'Basic <encoded-value>'}
};
fetch('https://int-api.mx.com/merchant_locations/{merchant_location_guid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://int-api.mx.com/merchant_locations/{merchant_location_guid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Accept-Version: <accept-version>",
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://int-api.mx.com/merchant_locations/{merchant_location_guid}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Accept-Version", "<accept-version>")
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://int-api.mx.com/merchant_locations/{merchant_location_guid}")
.header("Accept-Version", "<accept-version>")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://int-api.mx.com/merchant_locations/{merchant_location_guid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Accept-Version"] = '<accept-version>'
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"merchant_location": {
"city": "North Kishaberg",
"country": "US",
"created_at": "2025-02-13T18:08:00+00:00",
"guid": "MCL-00024e59-18b5-4d79-b879-2a7896726fea",
"latitude": 39.5963005,
"longitude": -104.89158799999998,
"merchant_guid": "MCH-09466f0a-fb58-9d1a-bae2-2af0afbea621",
"phone_number": "(303) 689-0728",
"postal_code": "801121436",
"state": "CO",
"street_address": "8547 E Arapahoe Rd, Ste 1",
"updated_at": "2025-02-13T18:09:00+00:00"
}
}Read merchant location
curl --request GET \
--url https://int-api.mx.com/merchant_locations/{merchant_location_guid} \
--header 'Accept-Version: <accept-version>' \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://int-api.mx.com/merchant_locations/{merchant_location_guid}"
headers = {
"Accept-Version": "<accept-version>",
"Authorization": "Basic <encoded-value>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Accept-Version': '<accept-version>', Authorization: 'Basic <encoded-value>'}
};
fetch('https://int-api.mx.com/merchant_locations/{merchant_location_guid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://int-api.mx.com/merchant_locations/{merchant_location_guid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Accept-Version: <accept-version>",
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://int-api.mx.com/merchant_locations/{merchant_location_guid}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Accept-Version", "<accept-version>")
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://int-api.mx.com/merchant_locations/{merchant_location_guid}")
.header("Accept-Version", "<accept-version>")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://int-api.mx.com/merchant_locations/{merchant_location_guid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Accept-Version"] = '<accept-version>'
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"merchant_location": {
"city": "North Kishaberg",
"country": "US",
"created_at": "2025-02-13T18:08:00+00:00",
"guid": "MCL-00024e59-18b5-4d79-b879-2a7896726fea",
"latitude": 39.5963005,
"longitude": -104.89158799999998,
"merchant_guid": "MCH-09466f0a-fb58-9d1a-bae2-2af0afbea621",
"phone_number": "(303) 689-0728",
"postal_code": "801121436",
"state": "CO",
"street_address": "8547 E Arapahoe Rd, Ste 1",
"updated_at": "2025-02-13T18:09:00+00:00"
}
}merchant_location resource. The merchant_location_guid can be found on transaction objects.Authorizations
The MX Platform API requires basic access authentication using your client_id and api_key. These credentials must be Base64 encoded and included in the Authorization header of each API request to ensure secure access.
Here's an example using curl to access v20250224. Replace https://int-api.mx.com/endpoint with the actual API endpoint you wish to access and your Base64 encoded client_id and api_key.
curl -L -X POST `https://int-api.mx.com/endpoint' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Accept-Version: v20250224'
-H 'Authorization: Basic BASE_64_ENCODING_OF{client_id:api_key}'Headers
MX Platform API version.
"v20250224"
Path Parameters
The unique id for a merchant_location.
Response
OK
Hide child attributes
Hide child attributes
The city name.
"North Kishaberg"
The country name.
"US"
The date and time the merchant was created, represented in ISO 8601 format with a timestamp.
"2025-02-13T18:08:00+00:00"
The unique identifier for the merchant location. Defined by MX.
"MCL-00024e59-18b5-4d79-b879-2a7896726fea"
The latitude of the location where the transaction occurred. The number is a signed decimal (for example, Rio de Janeiro's latitude is -22.9027800 and Tokyo's latitude is 35.689488).
39.5963005
The longitude of the location where the transaction occurred. The number is a signed decimal (for example, Rio de Janeiro's longitude is -43.2075000 and Tokyo's longitude is 139.691706).
-104.89158799999998
The unique identifier for the merchant. Defined by MX.
"MCH-09466f0a-fb58-9d1a-bae2-2af0afbea621"
The phone number of the merchant location.
"(303) 689-0728"
The postal code of the merchant location.
"801121436"
The state abbreviation of the merchant location.
"CO"
The street address of the merchant location.
"8547 E Arapahoe Rd, Ste 1"
The date and time the resource was last updated in ISO 8601 format with a timestamp.
For categories, this field will always be null when is_default is true.
"2025-02-13T18:09:00+00:00"

