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;
address: string;
merchantCategoryId?: number;
merchantCategory?: {
id: number;
createdAt: string;
updatedAt: string;
deletedAt: any;
categoryName: string;
isActive: boolean;
} | null;
}>;
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",
"merchantCategoryId": 5,
"merchantCategory": {
"id": 5,
"createdAt": "2025-01-10T08:15:42.000Z",
"updatedAt": "2025-01-10T08:15:42.000Z",
"deletedAt": null,
"categoryName": "Electronics Retailer",
"isActive": true
}
}
],
"meta": {
"itemsPerPage": 10,
"totalItems": 1,
"currentPage": 1,
"totalPages": 1,
"sortBy": [["merchantName", "ASC"]]
}
}Merchant Categories List
Endpoint
sh
> GET ${BASE_URL}/merchant-categoriesSample Request
sh
$ curl -H 'Content-Type: application/json' \
-H 'x-api-token: ACCESS_TOKEN' \
"BASE_URL/merchant-categories"Typescript
import * as axios from "axios";
axios
.get("BASE_URL/merchant-categories", {
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;
categoryName: string;
isActive: boolean;
}>;
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-10T08:15:42.133Z",
"updatedAt": "2025-01-10T08:15:42.133Z",
"deletedAt": null,
"categoryName": "Electronics Retailer",
"isActive": true
},
{
"id": 2,
"createdAt": "2025-01-11T10:22:19.000Z",
"updatedAt": "2025-01-11T10:22:19.000Z",
"deletedAt": null,
"categoryName": "Food & Beverage",
"isActive": true
},
{
"id": 3,
"createdAt": "2025-01-12T14:35:07.000Z",
"updatedAt": "2025-01-12T14:35:07.000Z",
"deletedAt": null,
"categoryName": "Fashion & Apparel",
"isActive": true
}
],
"meta": {
"itemsPerPage": 10,
"totalItems": 3,
"currentPage": 1,
"totalPages": 1,
"sortBy": [["categoryName", "ASC"]]
}
}