Appearance
Merchants List
Endpoint
sh
> GET ${BASE_URL}/merchantsSample Request
sh
$ curl -H 'Content-Type: application/json' \
-H 'x-api-token: ACCESS_TOKEN' \
"BASE_URL/merchants"Typescript
import * as axios from "axios";
axios
.get("BASE_URL/merchants", {
headers: {
"Content-Type": "application/json",
"x-api-token": "ACCESS_TOKEN"
},
})
.then((response) => {
console.log("Success:", response.data);
})
.catch((error) => {
console.error(
"Error:",
error.response ? error.response.data : error.message,
);
});Response Schema
Success Schema
ts
{
success: boolean;
message: string;
statusCode: number;
data: Array<{
id: number;
createdAt: string;
updatedAt: string;
deletedAt: any;
merchantName: string;
merchantLogo: any;
merchantType: string;
identifierType: number;
identifier: string;
email: string;
phone: string;
}>;
meta: {
itemsPerPage: number;
totalItems: number;
currentPage: number;
totalPages: number;
sortBy: Array<Array<string>>;
}
links: {
current: string;
}
}Error Schema
ts
{
statusCode: number;
success: boolean;
message: string;
data: any;
}Sample Response
json
{
"success": true,
"message": "Successful",
"statusCode": 200,
"data": [
{
"id": 1,
"createdAt": "2025-01-29T13:38:19.133Z",
"updatedAt": "2025-01-29T13:38:19.133Z",
"deletedAt": null,
"merchantName": "Shewa",
"merchantLogo": null,
"merchantType": "MERCHANT",
"identifierType": 1,
"identifier": "merchantIdentifier",
"email": "merchant@gmail.com",
"phone": "251****233",
"address": "Addis Ababa, Ethiopia"
}
],
"meta": {
"itemsPerPage": 10,
"totalItems": 1,
"currentPage": 1,
"totalPages": 1,
"sortBy": [["merchantName", "ASC"]]
}
}