Merchant SDK Guide
This guide provides examples of how to interact with the Merchant API using the official AVCI CMS SDKs.
Installation
Ensure you have the SDK installed in your project:
TypeScript:
npm install avcicms
Python:
pip install avcicms
Usage Examples
Listing Merchants
TypeScript:
import { AvciCMS } from 'avcicms';
const cms = new AvciCMS({ apiKey: 'YOUR_API_KEY' });
const response = await cms.merchant.list({
page: 1,
limit: 10,
search: "store"
});
console.log(response.data);
Python:
from avcicms import AvciCMS
cms = AvciCMS(api_key="YOUR_API_KEY")
response = cms.merchant.list(page=1, limit=10, search="store")
print(response.data)
Fetching a Specific Merchant
TypeScript:
const merchant = await cms.merchant.getBySlug('my-store-slug');
console.log(merchant);
Python:
merchant = cms.merchant.get_by_slug('my-store-slug')
print(merchant)