API ReferenceProduct
product.create
Type: Mutation · Auth: Workspace admin
Input
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| categoryId | string | Yes | — | ID of the associated category |
| name | string | Yes | — | Name |
| sku | string | Yes | — | Sku |
| description | string | Yes | — | Description |
| manufacturer | string | No | — | Manufacturer |
| modelNumber | string | No | — | Model number |
| unitPrice | number | No | — | Unit price |
| costPrice | number | No | — | Cost price |
| msrp | number | No | — | Msrp |
| unit | enum(each, foot, meter, box, roll, pair, kit) | Yes | "each" | Unit |
| status | enum(draft, active, discontinued) | Yes | "draft" | Status |
| attributes | object | Yes | {} | Attributes |
| imageUrl | string.uri | No | — | Image url |
| datasheetUrl | string.uri | No | — | Datasheet url |
| warrantyMonths | integer | No | — | Warranty months |
| leadTimeDays | integer | No | — | Lead time days |
| minOrderQuantity | integer | Yes | 1 | Min order quantity |
| estimatedLaborHours | number | No | — | Estimated labor hours |
| laborNotes | string | No | — | Labor notes |
| notes | string | No | — | Notes |
| productType | enum(controller, panel, camera, sensor, reader, lock, switch, server, nvr_dvr, workstation, ups, pdu, enclosure, module, cable_run, access_point, intercom_station, other) | No | — | Product type |
| cutSheetS3Key | string | No | — | Cut sheet s3key |
| trackInventory | boolean | Yes | false | Track inventory |
| reorderPoint | unknown | No | — | Reorder point |
| reorderQty | unknown | No | — | Reorder qty |
| workspaceId | string | No | — | ID of the associated workspace |
| visibilityMode | enum(global, workspace_local, shared) | Yes | "workspace_local" | Visibility mode |
Example
{
"categoryId": "550e8400-e29b-41d4-a716-446655440000",
"name": "Example Name",
"sku": "example",
"description": "A description",
"manufacturer": "example",
"modelNumber": "example",
"unit": "each",
"status": "draft",
"attributes": {},
"minOrderQuantity": 1,
"trackInventory": false,
"visibilityMode": "global"
}