List Merchants
curl --request GET \
--url https://api.example.com/merchantsimport requests
url = "https://api.example.com/merchants"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/merchants', 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://api.example.com/merchants",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://api.example.com/merchants"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/merchants")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/merchants")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyMerchants
List Merchants
Retrieve a list of merchant accounts
GET
/
merchants
List Merchants
curl --request GET \
--url https://api.example.com/merchantsimport requests
url = "https://api.example.com/merchants"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/merchants', 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://api.example.com/merchants",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://api.example.com/merchants"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/merchants")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/merchants")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyEndpoint
GET https://api.digitzs.com/merchants
Overview
Use this endpoint to retrieve a paginated list of all merchant accounts associated with your application.Authentication
| Header | Value | Required |
|---|---|---|
x-api-key | Your API key | Yes |
Authorization | Bearer {appToken} | Yes |
appId | Your application ID | Yes |
Query Parameters
Number of results per page (default: 25, max: 100)
Number of results to skip for pagination (default: 0)
Filter by status:
active, pending, suspended, closedResponse
Success Response (200 OK)
{
"links": {
"self": "https://api.digitzs.com/merchants?limit=25",
"next": "https://api.digitzs.com/merchants?limit=25&offset=25"
},
"data": [
{
"type": "merchants",
"id": "merchant_abc123",
"attributes": {
"accountName": "Acme Corporation",
"accountType": "business",
"status": "active",
"createdAt": "2024-01-15T10:00:00Z",
"email": "info@acme.com"
}
},
{
"type": "merchants",
"id": "merchant_xyz789",
"attributes": {
"accountName": "Bob's Shop",
"accountType": "personal",
"status": "active",
"createdAt": "2024-01-10T14:30:00Z",
"email": "bob@shop.com"
}
}
],
"meta": {
"total": 156,
"limit": 25,
"offset": 0,
"hasMore": true
}
}
Code Examples
curl -X GET "https://api.digitzs.com/merchants?limit=25" \
-H "x-api-key: your-api-key" \
-H "Authorization: Bearer your-app-token" \
-H "appId: your-app-id"
const axios = require('axios');
async function listMerchants(options = {}) {
const params = new URLSearchParams({
limit: options.limit || 25,
offset: options.offset || 0,
...options.filters
});
const response = await axios.get(
`https://api.digitzs.com/merchants?${params}`,
{
headers: {
'x-api-key': 'your-api-key',
'Authorization': 'Bearer your-app-token',
'appId': 'your-app-id'
}
}
);
console.log(`Retrieved ${response.data.data.length} merchants`);
return response.data;
}
// Get active merchants
listMerchants({ filters: { status: 'active' } });
import requests
def list_merchants(limit=25, offset=0, **filters):
url = "https://api.digitzs.com/merchants"
params = {
"limit": limit,
"offset": offset,
**filters
}
headers = {
"x-api-key": "your-api-key",
"Authorization": "Bearer your-app-token",
"appId": "your-app-id"
}
response = requests.get(url, headers=headers, params=params)
return response.json()
# Get active merchants
list_merchants(status="active")
<?php
function listMerchants($options = []) {
$params = array_merge([
'limit' => 25,
'offset' => 0
], $options);
$url = "https://api.digitzs.com/merchants?" . http_build_query($params);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"x-api-key: your-api-key",
"Authorization: Bearer your-app-token",
"appId: your-app-id"
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
return json_decode(curl_exec($ch), true);
}
?>
require 'net/http'
require 'json'
def list_merchants(options = {})
params = {
limit: options[:limit] || 25,
offset: options[:offset] || 0
}.merge(options[:filters] || {})
uri = URI('https://api.digitzs.com/merchants')
uri.query = URI.encode_www_form(params)
request = Net::HTTP::Get.new(uri)
request['x-api-key'] = 'your-api-key'
request['Authorization'] = 'Bearer your-app-token'
request['appId'] = 'your-app-id'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(request)
end
JSON.parse(response.body)
end
Next Steps
Create Merchant
Create a new merchant account
⌘I

