Skip to main content
Glama

mcp-google-sheets

SKU.ts1.19 kB
import axios, { Axios } from 'axios'; import { CreateSkuParams, UpdateSkuParams } from './types'; export class Sku { api: Axios; constructor(host: string, appKey: string, appToken: string) { this.api = axios.create({ baseURL: 'https://' + host, headers: { 'X-VTEX-API-AppKey': appKey, 'X-VTEX-API-AppToken': appToken, }, }); } async getSkuById(skuID: number) { const route = '/api/catalog/pvt/stockkeepingunit/'; const response = await this.api.get(route + skuID); return response.data; } async getSkuListByProductId(productID: number) { const route = '/api/catalog_system/pvt/sku/stockkeepingunitByProductId/'; const response = await this.api.get(route + productID); return response.data; } async createSku(newSkuData: CreateSkuParams) { const route = '/api/catalog/pvt/stockkeepingunit'; const response = await this.api.post(route, newSkuData); return response.data; } async updateSku(skuID: number, newSkuData: UpdateSkuParams) { const route = '/api/catalog/pvt/stockkeepingunit/'; const response = await this.api.put(route + skuID, newSkuData); return response.data; } }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/activepieces/activepieces'

If you have feedback or need assistance with the MCP directory API, please join our Discord server