POST
/v1/catalog/attributesPOST /v1/catalog/attributes
Scopes: catalog:attributes:write
Requires scope: catalog:attributes:write.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | no | |
dataType | string | no | |
isRequired | boolean | 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/attributes', {
// params: { path: { id: '...' }, query: { limit: 25 } },
// body: { /* request body */ },
});
if (error) throw error;
console.log(data);