POST
/v1/catalog/productsPOST /v1/catalog/products
Scopes: catalog:products:write
Requires scope: catalog:products:write.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
sku | string | no | |
productName | string | no | |
weight | number<double> | no | |
msrp | number<double> | no | |
manufacturer | string | no | |
upc | string | no | |
asin | string | no |
Response (200)
| Field | Type | Required | Description |
|---|---|---|---|
id | integer<int64> | no | |
message | string | no |
Examples
import { SolidCommerceClient } from '@solidcommerce/sdk';
const client = new SolidCommerceClient({
apiKey: process.env.SOLIDCOMMERCE_API_KEY!,
});
const { data, error } = await client.raw.POST('/v1/catalog/products', {
// params: { path: { id: '...' }, query: { limit: 25 } },
// body: { /* request body */ },
});
if (error) throw error;
console.log(data);